| | |
| | | cokingTraceIndService.saveTraceInd(relId, indType, clock, collectStartDate, endDate); |
| | | |
| | | // 保存溯源折线图 |
| | | save(relId, clock, indType, startDate, endDate); |
| | | saveTraceChart(relId, clock, indType, startDate, endDate); |
| | | |
| | | } catch (Exception ex) { |
| | | logger.error("RunCokingTraceModelBMTask运行异常"); |
| | |
| | | logger.info("RunCokingTraceModelBMTask运行完成"); |
| | | } |
| | | |
| | | public void save(String relId, String clock, String indType, Date startDate, Date endDate) { |
| | | public void saveTraceChart(String relId, String clock, String indType, Date startDate, Date endDate) { |
| | | logger.info("查询需要保存chart的配置"); |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("indType", indType); |
| | | map.put("ext1", "chart"); |
| | | map.put("ext2", "chart2"); |
| | | List<CokingTraceConfEntity> list = cokingTraceConfService.list(map); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return; |
| | |
| | | |
| | | List<CokingTraceChartEntity> entityList = new ArrayList<>(); |
| | | |
| | | List<CokingTraceConfEntity> listMin = list.stream().filter(e -> e.getExt1().equals("chart")).collect(Collectors.toList()); |
| | | logger.info("listMin===", JSON.toJSON(listMin).toString()); |
| | | List<CokingTraceConfEntity> listMin = list.stream().filter(e -> e.getIndCode().equals("BMSY025")).collect(Collectors.toList()); |
| | | |
| | | listMin.forEach(value -> { |
| | | CokingTraceChartEntity cokingTraceChartEntity = new CokingTraceChartEntity(); |
| | |
| | | entityList.add(cokingTraceChartEntity); |
| | | }); |
| | | |
| | | List<CokingTraceConfEntity> listMonth = list.stream().filter(e -> e.getExt2().equals("chart2")).collect(Collectors.toList()); |
| | | logger.info("listMonth===", JSON.toJSON(listMonth).toString()); |
| | | List<CokingTraceConfEntity> listMonth = list.stream().filter(e -> e.getIndCode().equals("BMSY026")).collect(Collectors.toList()); |
| | | |
| | | listMonth.forEach(value -> { |
| | | CokingTraceChartEntity cokingTraceChartEntity = new CokingTraceChartEntity(); |