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 +