This commit is contained in:
parent
924dc3f6d7
commit
29940b3575
|
|
@ -418,6 +418,7 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
tmTaskAgreement.setCreateBy(createBy);
|
tmTaskAgreement.setCreateBy(createBy);
|
||||||
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
|
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
|
||||||
backApplyInfo.setTaskId(tmTask.getTaskId());
|
backApplyInfo.setTaskId(tmTask.getTaskId());
|
||||||
|
backApplyInfo.setBackStyle("1");
|
||||||
result += materialBackInfoMapper.insertBackApplyInfo(backApplyInfo);
|
result += materialBackInfoMapper.insertBackApplyInfo(backApplyInfo);
|
||||||
}
|
}
|
||||||
// 保存退料详情
|
// 保存退料详情
|
||||||
|
|
|
||||||
|
|
@ -510,10 +510,10 @@ public class SelectServiceImpl implements SelectService {
|
||||||
// 先查第四层类型
|
// 先查第四层类型
|
||||||
listL4 = mapper.getUseTypeTreeL4(bean);
|
listL4 = mapper.getUseTypeTreeL4(bean);
|
||||||
if (CollectionUtils.isNotEmpty(listL4)) {
|
if (CollectionUtils.isNotEmpty(listL4)) {
|
||||||
List<Long> list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList());
|
List<Long> list4ParentIds = listL4.stream().map(TypeTreeNode::getParentId).collect(Collectors.toList());
|
||||||
// 根据第四层parentId 查第三层类型
|
// 根据第四层parentId 查第三层类型
|
||||||
listL3 = mapper.getUseTypeTreeL3(list4ParentIds);
|
listL3 = mapper.getUseTypeTreeL3(list4ParentIds);
|
||||||
List<Long> list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList());
|
List<Long> list3ParentIds = listL3.stream().map(TypeTreeNode::getParentId).collect(Collectors.toList());
|
||||||
// 根据第三层parentId 查第1.2层类型
|
// 根据第三层parentId 查第1.2层类型
|
||||||
listL21 = mapper.getUseTypeTreeL21(list3ParentIds);
|
listL21 = mapper.getUseTypeTreeL21(list3ParentIds);
|
||||||
list.addAll(listL4);
|
list.addAll(listL4);
|
||||||
|
|
|
||||||
|
|
@ -662,15 +662,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mt.unit_name as unitName,
|
mt.unit_name as unitName,
|
||||||
mt.unit_value as unitValue,
|
mt.unit_value as unitValue,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
SUM( CASE WHEN sai.agreement_id = #{agreementId} AND sai.STATUS = '0' THEN sai.num ELSE 0 END ) AS num,
|
SUM(sai.num) AS num,
|
||||||
mt.LEVEL as level
|
mt.LEVEL as level
|
||||||
FROM
|
FROM
|
||||||
ma_type mt
|
ma_type mt
|
||||||
LEFT JOIN clz_slt_agreement_info sai ON mt.type_id = sai.type_id
|
LEFT JOIN clz_slt_agreement_info sai ON mt.type_id = sai.type_id
|
||||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
||||||
WHERE
|
WHERE
|
||||||
EXISTS ( SELECT 1 FROM clz_slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId}
|
sai.STATUS = '0' and sai.agreement_id = #{agreementId}
|
||||||
AND sai2.STATUS = '0' and IFNULL(sai.lease_type,0) = 0 and sai2.num > 0)
|
|
||||||
GROUP BY
|
GROUP BY
|
||||||
mt.type_id
|
mt.type_id
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue