From 0921161d64722ca0eeb3215bc30876bf415531d4 Mon Sep 17 00:00:00 2001 From: shanao Date: Wed, 23 Oct 2024 19:31:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=85=A8=E7=8E=AF?= =?UTF-8?q?=E4=BF=9D=E6=A3=80=E6=9F=A5loginUserId=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E5=AF=BC=E8=87=B4mybatis=20=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SafetyEnvironmentalExplainMapper.xml | 7 +- .../SafetyEnvironmentalInspectorMapper.xml | 171 ++++++++++-------- .../inspection/SafetyEnvironmentalMapper.xml | 19 +- 3 files changed, 111 insertions(+), 86 deletions(-) diff --git a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalExplainMapper.xml b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalExplainMapper.xml index 20b7571e..7793d128 100644 --- a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalExplainMapper.xml +++ b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalExplainMapper.xml @@ -207,8 +207,11 @@ GROUP BY se.INSPECTION_ID ORDER BY FIELD(se.INSPECTION_STATUS, '2', '1', '0', '3', '4', '5', '6', '7', '8', '-1', '-2'), - FIELD(if(se.INSPECTED_SITEUSER_ID = #{pd.loginUserId},se.INSPECTED_SITEUSER_ID,'1'), se.INSPECTED_SITEUSER_ID, '1'), - se.INSPECTION_TIME_START DESC + + FIELD(if(se.INSPECTED_SITEUSER_ID = #{pd.loginUserId}, se.INSPECTED_SITEUSER_ID, '1'), + se.INSPECTED_SITEUSER_ID, '1'), + + se.INSPECTION_TIME_START DESC diff --git a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalInspectorMapper.xml b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalInspectorMapper.xml index f786f694..a005570b 100644 --- a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalInspectorMapper.xml +++ b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalInspectorMapper.xml @@ -122,84 +122,101 @@ + + + and ( + isd.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}), '%') + OR iod.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}), '%') + ) + + GROUP BY f.INSPECTION_ID + ORDER BY FIELD(if(f.INSPECTION_USER_SIGN_TIME is not null, '2', '1'), '1', '2'), + + FIELD(if(se.INSPECTED_SITEUSER_ID = #{pd.loginUserId}, #{pd.loginUserId}, '1'), #{pd.loginUserId}, '1'), + + FIELD(se.INSPECTION_STATUS, '0', '1', '2', '3', '4', '5', '6', '7', '8', '-1', '-2'), + se.INSPECTION_TIME_START DESC, se.INSPECTION_TIME_END DESC +