This commit is contained in:
mashuai 2025-07-07 19:07:11 +08:00
parent f0c4987889
commit d4873a96c1
3 changed files with 7 additions and 4 deletions

View File

@ -900,6 +900,9 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
backApplyInfo.setAgreementId(agreementId);
listL4 = mapper.getUseTypeTreeL4(backApplyInfo);
if (!CollectionUtils.isEmpty(listL4)) {
listL4 = listL4.stream()
.filter(item -> StringUtils.isNotBlank(item.getMaterialName()) && StringUtils.isNotBlank(item.getTypeName()))
.collect(Collectors.toList());
// 将listL5中typeId相同的数据进行num相加
for (TypeTreeNode node : listL4) {
// 根据node中的typeId查询listL5中相同数据,如果在listL5中存在则将num相加,反之将node添加到list5中

View File

@ -857,7 +857,7 @@ 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( CASE WHEN sai.agreement_id = #{agreementId} THEN sai.num ELSE 0 END ) AS num,
mt.LEVEL as level
FROM
ma_type mt
@ -865,7 +865,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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)
AND IFNULL(sai.lease_type,0) = 0 AND sai2.num > 0)
GROUP BY
mt.type_id
</select>

View File

@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and mt.type_name like concat('%', #{maModel}, '%')
</if>
GROUP BY
mm.ma_code
mm.ma_id
</select>
<select id="getRetainedEquipmentList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
@ -668,7 +668,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and mt.type_name like concat('%', #{maModel}, '%')
</if>
GROUP BY
mm.ma_code
mm.ma_id
</select>
<select id="getUserRecords" resultType="com.bonus.material.clz.domain.machine.MaterialUseStorageInfo">