|
@@ -421,7 +421,81 @@ public class DashboardService extends BaseService {
|
|
nwpAnalysisDto.setChannelStatus(nwpStatus);
|
|
nwpAnalysisDto.setChannelStatus(nwpStatus);
|
|
nwpAnalysisDto.setTips(nwpTips);
|
|
nwpAnalysisDto.setTips(nwpTips);
|
|
analysisList.add(nwpAnalysisDto);
|
|
analysisList.add(nwpAnalysisDto);
|
|
|
|
+
|
|
|
|
+ // 短期一期
|
|
|
|
+ List<FileAnalysisRecord> dqList1 = fileAnalysisRecordList.stream().filter(w -> "DQ1".equals(w.getFileType())).collect(Collectors.toList());
|
|
|
|
+ String dqStatus1 = "0";
|
|
|
|
+ String dqTips1 = "";
|
|
|
|
+ if (dqList1.size() > 0) {
|
|
|
|
+ dqList1.sort(Comparator.comparing(FileAnalysisRecord::getCreateTime).reversed());
|
|
|
|
+ dqStatus1 = dqList1.get(0).getFileStatus();
|
|
|
|
+ dqTips1 = "最后解析短期一期时间:" + DateFormatUtils.format(dqList1.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ } else {
|
|
|
|
+ dqTips1 = "今日未解析过短期一期文件";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ChannelStatusDto dqAnalysisDto1 = new ChannelStatusDto();
|
|
|
|
+ dqAnalysisDto1.setChannelId("DQYQ");
|
|
|
|
+ dqAnalysisDto1.setChannelName("短期一期文件");
|
|
|
|
+ dqAnalysisDto1.setChannelStatus(dqStatus1);
|
|
|
|
+ dqAnalysisDto1.setTips(dqTips1);
|
|
|
|
+ analysisList.add(dqAnalysisDto1);
|
|
|
|
+ // NWP一期
|
|
|
|
+ List<FileAnalysisRecord> nwpList1 = fileAnalysisRecordList.stream().filter(w -> "NWP1".equals(w.getFileType())).collect(Collectors.toList());
|
|
|
|
+ String nwpStatus1 = "0";
|
|
|
|
+ String nwpTips1 = "";
|
|
|
|
+ if (nwpList1.size() > 0) {
|
|
|
|
+ nwpList1.sort(Comparator.comparing(FileAnalysisRecord::getCreateTime).reversed());
|
|
|
|
+ nwpStatus1 = nwpList1.get(0).getFileStatus();
|
|
|
|
+ nwpTips1 = "最后解析NWP一期时间:" + DateFormatUtils.format(nwpList1.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ } else {
|
|
|
|
+ nwpTips1 = "今日未解析过NWP一期文件";
|
|
|
|
+ }
|
|
|
|
+ ChannelStatusDto nwpAnalysisDto1 = new ChannelStatusDto();
|
|
|
|
+ nwpAnalysisDto1.setChannelId("NWPYQ");
|
|
|
|
+ nwpAnalysisDto1.setChannelName("NWP一期文件");
|
|
|
|
+ nwpAnalysisDto1.setChannelStatus(nwpStatus1);
|
|
|
|
+ nwpAnalysisDto1.setTips(nwpTips1);
|
|
|
|
+ analysisList.add(nwpAnalysisDto1);
|
|
|
|
+
|
|
|
|
+ // 短期二期
|
|
|
|
+ List<FileAnalysisRecord> dqList2 = fileAnalysisRecordList.stream().filter(w -> "DQ2".equals(w.getFileType())).collect(Collectors.toList());
|
|
|
|
+ String dqStatus2 = "0";
|
|
|
|
+ String dqTips2 = "";
|
|
|
|
+ if (dqList2.size() > 0) {
|
|
|
|
+ dqList2.sort(Comparator.comparing(FileAnalysisRecord::getCreateTime).reversed());
|
|
|
|
+ dqStatus2 = dqList2.get(0).getFileStatus();
|
|
|
|
+ dqTips2 = "最后解析短期二期时间:" + DateFormatUtils.format(dqList2.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ } else {
|
|
|
|
+ dqTips2 = "今日未解析过短期二期文件";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ChannelStatusDto dqAnalysisDto2 = new ChannelStatusDto();
|
|
|
|
+ dqAnalysisDto2.setChannelId("DQEQ");
|
|
|
|
+ dqAnalysisDto2.setChannelName("短期二期文件");
|
|
|
|
+ dqAnalysisDto2.setChannelStatus(dqStatus2);
|
|
|
|
+ dqAnalysisDto2.setTips(dqTips2);
|
|
|
|
+ analysisList.add(dqAnalysisDto2);
|
|
|
|
+ // NWP二期
|
|
|
|
+ List<FileAnalysisRecord> nwpList2 = fileAnalysisRecordList.stream().filter(w -> "NWP2".equals(w.getFileType())).collect(Collectors.toList());
|
|
|
|
+ String nwpStatus2 = "0";
|
|
|
|
+ String nwpTips2 = "";
|
|
|
|
+ if (nwpList2.size() > 0) {
|
|
|
|
+ nwpList2.sort(Comparator.comparing(FileAnalysisRecord::getCreateTime).reversed());
|
|
|
|
+ nwpStatus2 = nwpList2.get(0).getFileStatus();
|
|
|
|
+ nwpTips2 = "最后解析NWP二期时间:" + DateFormatUtils.format(nwpList2.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ } else {
|
|
|
|
+ nwpTips2 = "今日未解析过NWP二期文件";
|
|
|
|
+ }
|
|
|
|
+ ChannelStatusDto nwpAnalysisDto2 = new ChannelStatusDto();
|
|
|
|
+ nwpAnalysisDto2.setChannelId("NWPEQ");
|
|
|
|
+ nwpAnalysisDto2.setChannelName("NWP二期文件");
|
|
|
|
+ nwpAnalysisDto2.setChannelStatus(nwpStatus2);
|
|
|
|
+ nwpAnalysisDto2.setTips(nwpTips2);
|
|
|
|
+ analysisList.add(nwpAnalysisDto2);
|
|
|
|
+
|
|
resultMap.put("analysisList", analysisList);
|
|
resultMap.put("analysisList", analysisList);
|
|
|
|
+
|
|
return resultMap;
|
|
return resultMap;
|
|
}
|
|
}
|
|
/**
|
|
/**
|