班组库存分包查询修改

This commit is contained in:
bonus 2025-10-14 23:31:57 +08:00
parent 25df39b6e0
commit ec6f1a5ea4
1 changed files with 11 additions and 2 deletions

View File

@ -858,11 +858,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bp.imp_unit as impUnit, bp.imp_unit as impUnit,
bp.pro_id AS proId, bp.pro_id AS proId,
bp.pro_name as proName, bp.pro_name as proName,
bz.ssfbdw AS subUnitName IFNULL(bz.ssfbdw,cai.sub_unit_name) AS subUnitName
FROM FROM
bm_unit bu bm_unit bu
LEFT JOIN clz_bm_agreement_info bai ON bu.unit_id = bai.unit_id LEFT JOIN clz_bm_agreement_info bai ON bu.unit_id = bai.unit_id
LEFT JOIN clz_slt_agreement_info sai ON bai.agreement_id = sai.agreement_id LEFT JOIN clz_slt_agreement_info sai ON bai.agreement_id = sai.agreement_id
LEFT JOIN clz_lease_apply_info cai on sai.lease_id = cai.id
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
LEFT JOIN `micro-tool`.bzgl_bz bz ON bp.external_id = bz.project_id LEFT JOIN `micro-tool`.bzgl_bz bz ON bp.external_id = bz.project_id
@ -880,7 +881,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and sd.dept_name LIKE CONCAT('%', #{impUnitName}, '%') and sd.dept_name LIKE CONCAT('%', #{impUnitName}, '%')
</if> </if>
<if test="subUnitName != null and subUnitName != ''"> <if test="subUnitName != null and subUnitName != ''">
and bz.ssfbdw LIKE CONCAT('%', #{subUnitName}, '%')
and (
bz.ssfbdw LIKE CONCAT('%', #{subUnitName}, '%') or
cai.sub_unit_name like concat('%',#{subUnitName},'%')
)
</if> </if>
<if test="departName != null and departName != ''"> <if test="departName != null and departName != ''">
and bp.pro_center LIKE CONCAT('%', #{departName}, '%') and bp.pro_center LIKE CONCAT('%', #{departName}, '%')
@ -900,6 +907,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY GROUP BY
bu.unit_id, bu.unit_id,
bp.pro_id bp.pro_id
ORDER BY sai.ID desc
</select> </select>
<select id="getTeamNumSecondList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedTeamVo"> <select id="getTeamNumSecondList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedTeamVo">