From 1a87e98e8ee5ec12dce0a4965390a10d89cb625d Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Thu, 1 Feb 2024 15:47:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E7=BC=BA=E7=BB=9F=E8=AE=A1=E6=9C=88?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../defect/mapper/OperDefectMapper.java | 1 + .../operational/defect/mapper/OperDefectMapper.xml | 70 +++++++++++++++------- .../defect/service/impl/OperDefectServiceImpl.java | 12 ++-- 3 files changed, 57 insertions(+), 26 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.java index dfe376f..cc14f7e 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.java @@ -26,6 +26,7 @@ public interface OperDefectMapper extends UserDataScopeBaseMapper getStatisticByMonth(@Param("month") String month, @Param("createDept") List createDept); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.xml index b0a2909..b958fae 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.xml @@ -7,9 +7,14 @@ SELECT P.DEFECT_GRADING as defectLevel,P.HANDLE_STATUS,COUNT(P.ID) AS DEFECT_NUM from hzims_oper_phenomenon P WHERE DATE_FORMAT(P.CREATE_TIME,'%Y-%m') = #{month} - - AND P.CREATE_DEPT = #{createDept} + + AND P.CREATE_DEPT in + + #{item} + + and P.DEFECT_GRADING IS NOT NULL + AND P.IS_DEFECT='1' AND P.IS_DELETED = '0' GROUP BY P.DEFECT_GRADING,P.HANDLE_STATUS ORDER BY P.DEFECT_GRADING @@ -20,37 +25,46 @@ SELECT P.DEFECT_GRADING as defectLevel,P.HANDLE_STATUS,COUNT(P.ID) AS DEFECT_NUM from hzims_oper_phenomenon P WHERE P.CREATE_TIME BETWEEN #{firstMonth} AND #{endMonth} - - AND P.CREATE_DEPT = #{createDept} + + AND P.CREATE_DEPT in + + #{item} + + AND P.IS_DEFECT='1' AND P.IS_DELETED = 0 + and P.DEFECT_GRADING IS NOT NULL GROUP BY P.DEFECT_GRADING,P.HANDLE_STATUS ORDER BY P.DEFECT_GRADING