From 037c8e3e695bd81c809c0f40b50ba6d94ba67127 Mon Sep 17 00:00:00 2001 From: jiang Date: Wed, 3 Dec 2025 19:52:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=85=B7=E5=BA=93=E5=AD=98=E6=94=B6?= =?UTF-8?q?=E8=97=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/mybatis/ma/GpsBindingMapper.xml | 94 ++++++++++--------- resources/mybatis/scrap/ScrapApplyMapper.xml | 4 +- resources/mybatis/scrap/ScrapAuditMapper.xml | 76 ++++++++------- .../mybatis/scrap/ScrapTaskRecordMapper.xml | 1 + 4 files changed, 94 insertions(+), 81 deletions(-) diff --git a/resources/mybatis/ma/GpsBindingMapper.xml b/resources/mybatis/ma/GpsBindingMapper.xml index 2468892..d1bb5f4 100644 --- a/resources/mybatis/ma/GpsBindingMapper.xml +++ b/resources/mybatis/ma/GpsBindingMapper.xml @@ -97,51 +97,57 @@ + - - SELECT - wsa.ID, - wsa.`CODE`, - wsa.CREATE_TIME AS applyTime, - wsa.apply_remark AS applyRemark, - - pu.`NAME` AS applyer, - pu2.`NAME` AS auditor, - wsa.AUDIT_TIME AS auditTime, - wsa.AUDIT_REMARK AS auditRemark , - wsa.`STATUS`, - GROUP_CONCAT(DISTINCT mt2.`NAME`) as typeName - - FROM - wf_scrap_apply wsa - LEFT JOIN scrap_apply_details sad ON sad.apply_id = wsa.ID - LEFT JOIN mm_type mt ON mt.ID = sad.type_id - LEFT JOIN mm_type mt2 ON mt2.ID = mt.PARENT_ID - LEFT JOIN pm_user pu on wsa.CREATOR = pu.ID - LEFT JOIN pm_user pu2 on wsa.AUDITOR = pu2.ID - where wsa.`STATUS` in (0,1,2) - - AND wsa.status = #{param.status} - - - AND ( - wsa.`CODE` LIKE CONCAT('%',#{param.keyWord},'%') - or pu.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') - or pu2.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') - - ) - - GROUP BY wsa.ID - order by wsa.ID desc - + + SELECT + wsa.ID, + wsa.`CODE`, + wsa.CREATE_TIME AS applyTime, + wsa.apply_remark AS applyRemark, + + pu.`NAME` AS applyer, + pu2.`NAME` AS auditor, + wsa.AUDIT_TIME AS auditTime, + wsa.AUDIT_REMARK AS auditRemark , + wsa.`STATUS`, + GROUP_CONCAT(DISTINCT mt2.`NAME`) as typeName + + FROM + wf_scrap_apply wsa + LEFT JOIN scrap_apply_details sad ON sad.apply_id = wsa.ID + LEFT JOIN mm_type mt ON mt.ID = sad.type_id + LEFT JOIN mm_type mt2 ON mt2.ID = mt.PARENT_ID + LEFT JOIN pm_user pu on wsa.CREATOR = pu.ID + LEFT JOIN pm_user pu2 on wsa.AUDITOR = pu2.ID + where wsa.`STATUS` in (0,1,2) + + AND wsa.status = #{param.status} + + + AND ( + wsa.`CODE` LIKE CONCAT('%',#{param.keyWord},'%') + or pu.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') + or pu2.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') + OR wsa.CREATOR LIKE CONCAT('%',#{param.keyWord},'%') + OR wsa.APPLY_REMARK LIKE CONCAT('%',#{param.keyWord},'%') + OR pu.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') + OR mt2.`NAME` LIKE CONCAT('%',#{param.keyWord},'%') + + ) + + GROUP BY wsa.ID + order by wsa.ID desc +