diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialBackApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialBackApplyInfoServiceImpl.java index a164da8e..2d8d000a 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialBackApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialBackApplyInfoServiceImpl.java @@ -418,6 +418,7 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe tmTaskAgreement.setCreateBy(createBy); taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement); backApplyInfo.setTaskId(tmTask.getTaskId()); + backApplyInfo.setBackStyle("1"); result += materialBackInfoMapper.insertBackApplyInfo(backApplyInfo); } // 保存退料详情 diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java index 459f44ca..23db006f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java @@ -510,10 +510,10 @@ public class SelectServiceImpl implements SelectService { // 先查第四层类型 listL4 = mapper.getUseTypeTreeL4(bean); if (CollectionUtils.isNotEmpty(listL4)) { - List list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList()); + List list4ParentIds = listL4.stream().map(TypeTreeNode::getParentId).collect(Collectors.toList()); // 根据第四层parentId 查第三层类型 listL3 = mapper.getUseTypeTreeL3(list4ParentIds); - List list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList()); + List list3ParentIds = listL3.stream().map(TypeTreeNode::getParentId).collect(Collectors.toList()); // 根据第三层parentId 查第1.2层类型 listL21 = mapper.getUseTypeTreeL21(list3ParentIds); list.addAll(listL4); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialBackInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialBackInfoMapper.xml index ed37b534..c0e99058 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialBackInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialBackInfoMapper.xml @@ -662,15 +662,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt.unit_name as unitName, mt.unit_value as unitValue, 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 FROM ma_type mt 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' WHERE - EXISTS ( SELECT 1 FROM clz_slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId} - AND sai2.STATUS = '0' and IFNULL(sai.lease_type,0) = 0 and sai2.num > 0) + sai.STATUS = '0' and sai.agreement_id = #{agreementId} GROUP BY mt.type_id