From 0aa12bd997fda36b5fd201ce6676013e265cb239 Mon Sep 17 00:00:00 2001
From: hongchao <3228015117@qq.com>
Date: Thu, 4 Sep 2025 18:26:28 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=A3=80=E4=BF=AE=E9=A2=84?=
=?UTF-8?q?=E8=AD=A6=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/material/push/ProDataUseInfoMapper.xml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/push/ProDataUseInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/push/ProDataUseInfoMapper.xml
index 845c4838..b3e7bddf 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/push/ProDataUseInfoMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/push/ProDataUseInfoMapper.xml
@@ -192,13 +192,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ELSE NULL
END) AS TimeoutNum
FROM ma_machine mm
- LEFT JOIN slt_agreement_info sai on sai.ma_id = mm.ma_id and mm.type_id = sai.type_id and sai.`status`='0' and sai.end_time is null
+ LEFT JOIN slt_agreement_info sai on sai.ma_id = mm.ma_id and mm.type_id = sai.type_id
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
left join sys_dept sd ON sd.dept_id = bp.imp_unit
where mm.next_check_time is not null and mt.`level` = '4'
+ and sai.`status`='0' and sai.end_time is null
+ and bp.external_id is not null
+ and mm.ma_status = 2
AND sd.dept_id = #{deptId}
@@ -221,13 +224,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ELSE NULL
END AS daysDiff
FROM ma_machine mm
- LEFT JOIN slt_agreement_info sai on sai.ma_id = mm.ma_id and mm.type_id = sai.type_id and sai.`status`='0' and sai.end_time is null
+ LEFT JOIN slt_agreement_info sai on sai.ma_id = mm.ma_id and mm.type_id = sai.type_id
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
LEFT JOIN sys_dept sd on bp.imp_unit = sd.dept_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
WHERE mm.next_check_time is not null AND mt.`level`=4
+ and bp.external_id is not null
+ and sai.`status`='0' and sai.end_time is null
+ and mm.ma_status = 2
AND bp.pro_id = #{proId}
@@ -255,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY bp.pro_id
+ order by mt.jiju_type desc