diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/ReportController.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/ReportController.java index 498cd634..7b5e76ab 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/ReportController.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/ReportController.java @@ -25,7 +25,7 @@ public class ReportController { /** * 接口日志表 * @param map - * @return + * @returnresourceRepair */ @PostMapping("/findIntegrationLog") public R findIntegrationLog(@RequestBody(required = false)Map map){ @@ -110,4 +110,19 @@ public class ReportController { return R.failed(e.getMessage()); } } + + /** + * 异常记录表 + * @param paramMap + * @return + */ + @GetMapping("/findAbnormalRecord") + public R findAbnormalRecord(@RequestBody(required = false) Map paramMap){ + try{ + List> result = reportService.findAbnormalRecord(paramMap); + return R.ok(result); + }catch (Exception e){ + return R.failed(e.getMessage()); + } + } } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java index cc526a4c..efe3c1bc 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java @@ -34,4 +34,6 @@ public interface ReportMapper { * @return */ List> findQualityInspectionReport(Map paramMap); + + List> findAbnormalRecord(Map paramMap); } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java index 2a27f874..9dc5f19e 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java @@ -33,4 +33,11 @@ public interface ReportService { * @return */ List> findQualityInspectionReport(Map paramMap); + + /** + * 查询异常记录表 + * @param paramMap + * @return + */ + List> findAbnormalRecord(Map paramMap); } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java index 0ebad8fd..9ecb99c3 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java @@ -230,6 +230,15 @@ public class ReportServiceImpl implements ReportService { return qualityInspectionReport; } + + @Override + public List> findAbnormalRecord(Map paramMap) { + String site = CommonMethods.getSite(); + paramMap.put("site",site); + paramMap.put("locale",LocaleContextHolder.getLocale().getLanguage()); + List> findAbnormalRecord = reportMapper.findAbnormalRecord(paramMap); + return null; + } } diff --git a/anomaly/src/main/resources/mapper/ReportMapper.xml b/anomaly/src/main/resources/mapper/ReportMapper.xml index 1986eae2..58b55306 100644 --- a/anomaly/src/main/resources/mapper/ReportMapper.xml +++ b/anomaly/src/main/resources/mapper/ReportMapper.xml @@ -144,8 +144,15 @@ TRUNC(TO_NUMBER((ZRRT.ACTUAL_COMPLETE_DATE-ZRRT.ACTUAL_START_DATE)*24),2) SHUT_DOWN_TIME, TRUNC(TO_NUMBER((ZRRT.WAIT_END_DATE -ZRRT.WAIT_START_DATE)*24),2) REPAIR_WAIT_TIME, TRUNC(TO_NUMBER((ZRRT.ACTUAL_COMPLETE_DATE-ZRRT.ACTUAL_START_DATE-ZRRT.WAIT_TIME)*24),2) REPAIR_TIME, - ZRRT. STATUS ,ZRRT.REPORT_USER REPORT_USER,ZNU.FULL_NAME REPORT_USER_DESCRIPTION, - ZRRT.REPAIR_USERS ,ZRRT.REMARK + CASE WHEN ZRRT.STATUS = '401' THEN '待维修' + WHEN ZRRT.STATUS = '501' THEN '维修中' + WHEN ZRRT.STATUS = '502' THEN '维修等待' + WHEN ZRRT.STATUS = '302' THEN '关闭' + WHEN ZRRT.STATUS = '301' THEN '维修完成' + WHEN ZRRT.STATUS = '601' THEN '报修单确认' + END STATUS + ,ZRRT.REPORT_USER REPORT_USER,ZNU.FULL_NAME REPORT_USER_DESCRIPTION, + ZRRT.REPAIR_USERS ,ZRRT.REMARK FROM Z_RESOURCE_REPAIR_TASK ZRRT INNER JOIN RESRCE R ON R.RESRCE = ZRRT.RESOURCE_NO AND R.SITE = ZRRT.SITE @@ -325,4 +332,57 @@ rt.DESCRIPTION, dflt.DATA_TAG,zabd.DUTY_CAUSE_TYPE,zabd.DUTY_TYPE ,zabd.DUTY_DEPART ORDER BY zab.CREATED_DATE_TIME DESC + + \ No newline at end of file diff --git a/meapi/src/main/resources/mapper/NcCodeMapper.xml b/meapi/src/main/resources/mapper/NcCodeMapper.xml index eb916d3d..8e9b32e8 100644 --- a/meapi/src/main/resources/mapper/NcCodeMapper.xml +++ b/meapi/src/main/resources/mapper/NcCodeMapper.xml @@ -433,7 +433,6 @@ UPPER(#{item}) AND NC.STATUS_BO = 'StatusBO:' || #{site} || ',101' - AND NG.NC_GROUP LIKE 'QC\_%' ESCAPE '\'