| | |
| | | public CommonResult<List<CokingTraceSuggestDTO>> getTraceSuggestList(@RequestParam Map<String, Object> params) { |
| | | String relId = (String) params.get("relId"); |
| | | String processType = (String) params.get("processType"); |
| | | String clock = (String) params.get("clock"); |
| | | if (StringUtils.isBlank(relId) && StringUtils.isNotBlank(processType)) { |
| | | // 查找最新的relId |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DAY_OF_YEAR, -1); |
| | | String clock = DateUtils.format(calendar.getTime(), "yyyy-MM-dd"); |
| | | CokingAnalyIndEntity analyInd = cokingAnalyIndService.get(TraceProcessTypeEnum.getEumByCode(processType).getProcess(), clock); |
| | | String clockQ = StringUtils.isNotBlank(clock) ? clock : DateUtils.format(calendar.getTime(), "yyyy-MM-dd"); |
| | | CokingAnalyIndEntity analyInd = cokingAnalyIndService.get(TraceProcessTypeEnum.getEumByCode(processType.toUpperCase()).getProcess(), clockQ); |
| | | if (analyInd != null) { |
| | | relId = analyInd.getRelId(); |
| | | params.put("relId", relId); |
| | |
| | | public CommonResult<List<CokingTraceIndDTO>> getTraceIndList(@RequestParam Map<String, Object> params) { |
| | | String relId = (String) params.get("relId"); |
| | | String processType = (String) params.get("processType"); |
| | | String clock = (String) params.get("clock"); |
| | | if (StringUtils.isBlank(relId) && StringUtils.isNotBlank(processType)) { |
| | | // 查找最新的relId |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DAY_OF_YEAR, -1); |
| | | String clock = DateUtils.format(calendar.getTime(), "yyyy-MM-dd"); |
| | | CokingAnalyIndEntity analyInd = cokingAnalyIndService.get(TraceProcessTypeEnum.getEumByCode(processType).getProcess(), clock); |
| | | String clockQ = StringUtils.isNotBlank(clock) ? clock : DateUtils.format(calendar.getTime(), "yyyy-MM-dd"); |
| | | CokingAnalyIndEntity analyInd = cokingAnalyIndService.get(TraceProcessTypeEnum.getEumByCode(processType.toUpperCase()).getProcess(), clockQ); |
| | | if (analyInd != null) { |
| | | relId = analyInd.getRelId(); |
| | | params.put("relId", relId); |
| | |
| | | public CommonResult<List<CokingTraceDeviationDTO>> getTraceDeviationList(@RequestParam Map<String, Object> params) { |
| | | String relId = (String) params.get("relId"); |
| | | String processType = (String) params.get("processType"); |
| | | String clock = (String) params.get("clock"); |
| | | if (StringUtils.isBlank(relId) && StringUtils.isNotBlank(processType)) { |
| | | // 查找最新的relId |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DAY_OF_YEAR, -1); |
| | | String clock = DateUtils.format(calendar.getTime(), "yyyy-MM-dd"); |
| | | CokingAnalyIndEntity analyInd = cokingAnalyIndService.get(TraceProcessTypeEnum.getEumByCode(processType).getProcess(), clock); |
| | | String clockQ = StringUtils.isNotBlank(clock) ? clock : DateUtils.format(calendar.getTime(), "yyyy-MM-dd"); |
| | | CokingAnalyIndEntity analyInd = cokingAnalyIndService.get(TraceProcessTypeEnum.getEumByCode(processType.toUpperCase()).getProcess(), clockQ); |
| | | if (analyInd != null) { |
| | | relId = analyInd.getRelId(); |
| | | params.put("relId", relId); |
| | |
| | | @GetMapping("/trace-chart/list") |
| | | @Operation(summary = "焦化工序-异常溯源折线图") |
| | | public CommonResult<List<CokingTraceChartDTO>> getCokingTraceChartList(@RequestParam Map<String, Object> params) { |
| | | String relId = (String) params.get("relId"); |
| | | String processType = (String) params.get("processType"); |
| | | String clock = (String) params.get("clock"); |
| | | if (StringUtils.isBlank(relId) && StringUtils.isNotBlank(processType)) { |
| | | // 查找最新的relId |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DAY_OF_YEAR, -1); |
| | | String clockQ = StringUtils.isNotBlank(clock) ? clock : DateUtils.format(calendar.getTime(), "yyyy-MM-dd"); |
| | | CokingAnalyIndEntity analyInd = cokingAnalyIndService.get(TraceProcessTypeEnum.getEumByCode(processType.toUpperCase()).getProcess(), clockQ); |
| | | if (analyInd != null) { |
| | | relId = analyInd.getRelId(); |
| | | params.put("relId", relId); |
| | | } else { |
| | | return success(new ArrayList<>()); |
| | | } |
| | | } |
| | | |
| | | List<CokingTraceChartEntity> list = cokingTraceChartService.list(params); |
| | | List<CokingTraceChartDTO> result = new ArrayList<>(); |
| | | if (CollectionUtils.isEmpty(list)) { |