From ec6f1a5ea4f018b405a20c1101c9139221653856 Mon Sep 17 00:00:00 2001
From: bonus <1203338439@qq.com>
Date: Tue, 14 Oct 2025 23:31:57 +0800
Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BB=84=E5=BA=93=E5=AD=98=E5=88=86?=
=?UTF-8?q?=E5=8C=85=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/material/clz/MaterialMachineMapper.xml | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
index fa664a16..965a2ebb 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml
@@ -858,11 +858,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bp.imp_unit as impUnit,
bp.pro_id AS proId,
bp.pro_name as proName,
- bz.ssfbdw AS subUnitName
+ IFNULL(bz.ssfbdw,cai.sub_unit_name) AS subUnitName
FROM
bm_unit bu
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_lease_apply_info cai on sai.lease_id = cai.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 `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 bz.ssfbdw LIKE CONCAT('%', #{subUnitName}, '%')
+
+
+ and (
+ bz.ssfbdw LIKE CONCAT('%', #{subUnitName}, '%') or
+ cai.sub_unit_name like concat('%',#{subUnitName},'%')
+ )
+
and bp.pro_center LIKE CONCAT('%', #{departName}, '%')
@@ -900,6 +907,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY
bu.unit_id,
bp.pro_id
+
+ ORDER BY sai.ID desc