From daad2e4a8ec465bb8afa80c555633ff704b75b50 Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Thu, 9 Sep 2021 15:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ReportDataController.java | 22 +++++ .../common/mapper/ReportDataMapper.java | 4 +- .../common/service/ReportDataService.java | 4 + .../service/impl/ReportDataServiceImpl.java | 11 ++- .../resources/mapper/ReportDataMapper.xml | 86 ++++++++++++++++++- 5 files changed, 121 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/controller/ReportDataController.java b/common/src/main/java/com/foreverwin/mesnac/common/controller/ReportDataController.java index 489c8013..c07f1dd0 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/controller/ReportDataController.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/controller/ReportDataController.java @@ -144,4 +144,26 @@ public class ReportDataController { } } + @GetMapping("/inspectionDetailPassRate") + public R findInspectionDetailPassRate(@RequestParam(required = false) Map paramMap) { + try { + paramMap.put("site", CommonMethods.getSite()); + List> result = reportDataService.findInspectionDetailPassRate(paramMap); + return R.ok(result); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + } + @GetMapping("/sectionPassRate") + public R findSectionPassRate(@RequestParam(required = false) Map paramMap) { + try { + paramMap.put("site", CommonMethods.getSite()); + List> result = reportDataService.findSectionPassRate(paramMap); + return R.ok(result); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + } + + } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/mapper/ReportDataMapper.java b/common/src/main/java/com/foreverwin/mesnac/common/mapper/ReportDataMapper.java index 99997824..9ba95f21 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/mapper/ReportDataMapper.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/mapper/ReportDataMapper.java @@ -1,6 +1,5 @@ package com.foreverwin.mesnac.common.mapper; -import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.List; @@ -31,4 +30,7 @@ public interface ReportDataMapper { List> findUserPassRate(Map paramMap); + List> findInspectionDetailPassRate(Map paramMap); + + List> findSectionPassRate(Map paramMap); } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/ReportDataService.java b/common/src/main/java/com/foreverwin/mesnac/common/service/ReportDataService.java index c12c2e47..47bef354 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/ReportDataService.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/ReportDataService.java @@ -50,4 +50,8 @@ public interface ReportDataService { List> findUserPassRate(Map paramMap); + List> findInspectionDetailPassRate(Map paramMap); + + List> findSectionPassRate(Map paramMap); + } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ReportDataServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ReportDataServiceImpl.java index 3eb3964e..8b021f78 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ReportDataServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ReportDataServiceImpl.java @@ -9,7 +9,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.LocalDate; -import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -85,4 +84,14 @@ public class ReportDataServiceImpl implements ReportDataService{ public List> findUserPassRate(Map paramMap) { return reportDataMapper.findUserPassRate(paramMap); } + + @Override + public List> findInspectionDetailPassRate(Map paramMap) { + return reportDataMapper.findInspectionDetailPassRate(paramMap); + } + + @Override + public List> findSectionPassRate(Map paramMap) { + return reportDataMapper.findSectionPassRate(paramMap); + } } diff --git a/common/src/main/resources/mapper/ReportDataMapper.xml b/common/src/main/resources/mapper/ReportDataMapper.xml index a8e1f3f9..d79e2ece 100644 --- a/common/src/main/resources/mapper/ReportDataMapper.xml +++ b/common/src/main/resources/mapper/ReportDataMapper.xml @@ -410,7 +410,7 @@ JOIN WORK_CENTER WC ON WC.SITE = zit.SITE AND WC.WORK_CENTER = zit.WORK_CENTER LEFT JOIN WORK_CENTER_T WT ON WT.WORK_CENTER_BO = WC.HANDLE AND WT.LOCALE = 'zh' LEFT JOIN Z_ABNORMAL_BILL ZAB ON zit.SFC=ZAB.SFC AND zit.SITE=ZAB.SITE AND zit.STEP_ID=ZAB.STEP_ID AND zab."TYPE"='Z' - WHERE zit.SITE= #{site} AND zit.CATEGORY='P' AND zit.STATUS='COMPLETE' + WHERE zit.SITE= #{site} AND (zit.CATEGORY='P' OR zit.CATEGORY='S') AND zit.STATUS='COMPLETE' AND zit.WORK_CENTER = #{workCenter} @@ -423,7 +423,6 @@ GROUP BY zit."RESULT",zit.sfc ,zit.OPERATION,zit.STEP_ID, zit.CREATED_DATE_TIME,zit.RESRCE,zab.NC_QTY, WT.DESCRIPTION,ZSD.DISPATCH_QTY ) GROUP BY DESCRIPTION, "MONTH" ORDER BY DESCRIPTION,"MONTH" - + + + \ No newline at end of file