|
@@ -752,6 +752,9 @@ public class RyTask
|
|
|
decisionReq.setB(jsBod5.divide(tnIn, 4, RoundingMode.HALF_UP));
|
|
|
}
|
|
|
}
|
|
|
+ //2024年6月1日08:37:09 内回流加上
|
|
|
+ decisionReq.setR(daily.getNhlR());
|
|
|
+ decisionReq.setRR(daily.getWhlR());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1249,17 +1252,17 @@ public class RyTask
|
|
|
* 定时生成每日简报数据
|
|
|
*
|
|
|
*/
|
|
|
- public void generageShortReport(){
|
|
|
+ public void generateShortReport(){
|
|
|
log.info("进入了定时生成每日简报数据");
|
|
|
- List<TXinyiDaily> dailyTwoRecords = this.xinyiDailyMapper.selectNRecords(2);
|
|
|
+ List<TXinyiDaily> dailyTwoRecords = this.xinyiDailyMapper.selectNRecords(DAILY_REPORT_COUNT_RECORD);
|
|
|
//正常不会有这种问题 因为日报有很多条
|
|
|
- if(CollectionUtils.isEmpty(dailyTwoRecords) || dailyTwoRecords.size() < 2){
|
|
|
- log.error("进入了定时生成每日简报数据 获取最新的2条数据不足,终止");
|
|
|
+ if(CollectionUtils.isEmpty(dailyTwoRecords) || dailyTwoRecords.size() < DAILY_REPORT_COUNT_RECORD){
|
|
|
+ log.error("进入了定时生成每日简报数据 获取最新的{}条数据不足,终止", DAILY_REPORT_COUNT_RECORD);
|
|
|
return;
|
|
|
}
|
|
|
//暂时不考虑因为没有填写日报 导致生成重复数据的问题(后续需要的话再添加)
|
|
|
//处理数据 并 拼装
|
|
|
- String queryData = buildShortReportQueryData(dailyTwoRecords);
|
|
|
+ String queryData = buildShortReportQueryDataNew(dailyTwoRecords);
|
|
|
log.info("定时生成简报,组装好的请求大模型的参数为:{}", queryData);
|
|
|
if(StringUtils.isBlank(queryData)){
|
|
|
log.error("无法拼装请求数据!!!!!!");
|
|
@@ -2024,6 +2027,46 @@ public class RyTask
|
|
|
return originStr;
|
|
|
}
|
|
|
|
|
|
+ //2024年6月23日19:58:21 简报生成的prompt调整。
|
|
|
+ private String buildShortReportQueryDataNew(List<TXinyiDaily> dailyTwoRecords) {
|
|
|
+ //查询配置信息
|
|
|
+ List<TXinyiNormConfig> tXinyiNormConfigs = this.xinyiNormConfigMapper.selectTXinyiNormConfigList(null);
|
|
|
+ if(CollectionUtils.isEmpty(tXinyiNormConfigs))
|
|
|
+ return null;
|
|
|
+ TXinyiNormConfig normConfig = tXinyiNormConfigs.get(0);
|
|
|
+ //获取数据
|
|
|
+ TXinyiDaily yesterdayData = dailyTwoRecords.get(0);
|
|
|
+ String originStr = SHORT_REPORT_BEGIN.replace("#{0}", yesterdayData.getTestDate());
|
|
|
+ StringBuilder sb = new StringBuilder(originStr);
|
|
|
+ for (TXinyiDaily dailyTwoRecord : dailyTwoRecords) {
|
|
|
+ sb.append("进水:");
|
|
|
+ sb.append("进水COD").append(dailyTwoRecord.getJsCod()).append("mg/L");
|
|
|
+ sb.append("进水总氮").append(dailyTwoRecord.getJsTn()).append("mg/L");
|
|
|
+ sb.append("进水总磷").append(dailyTwoRecord.getJsTp()).append("mg/L");
|
|
|
+ sb.append("进水氨氮").append(dailyTwoRecord.getJsNh3()).append("mg/L");
|
|
|
+ sb.append("进水SS").append(dailyTwoRecord.getJsSs()).append("mg/L");
|
|
|
+ sb.append("进水水量").append(dailyTwoRecord.getJSL()).append("m³/d").append(";");
|
|
|
+ sb.append("出水:");
|
|
|
+ sb.append("出水COD").append(dailyTwoRecord.getCsCod()).append("mg/L");
|
|
|
+ sb.append("出水总氮").append(dailyTwoRecord.getCsTn()).append("mg/L");
|
|
|
+ sb.append("出水总磷").append(dailyTwoRecord.getCsTp()).append("mg/L");
|
|
|
+ sb.append("出水氨氮").append(dailyTwoRecord.getCsNh3()).append("mg/L");
|
|
|
+ sb.append("出水SS").append(dailyTwoRecord.getCsSs()).append("mg/L");
|
|
|
+ sb.append("出水水量").append(dailyTwoRecord.getCSL()).append("m³/d").append("。");
|
|
|
+ }
|
|
|
+ sb.append(SHORT_REPORT_END);
|
|
|
+ sb.append("进水COD:").append(normConfig.getJscodSjz()).append("mg/L");
|
|
|
+ sb.append("进水总氮:").append(normConfig.getJszdSjz()).append("mg/L");
|
|
|
+ sb.append("进水总磷:").append(normConfig.getJszlSjz()).append("mg/L");
|
|
|
+ sb.append("进水氨氮:").append(normConfig.getJsadSjz()).append("mg/L");
|
|
|
+ sb.append("进水SS:").append(normConfig.getJsssSjz()).append("mg/L");
|
|
|
+ sb.append("出水COD:").append(normConfig.getCscodBzz()).append("mg/L");
|
|
|
+ sb.append("出水总氮:").append(normConfig.getCszzBzz()).append("mg/L");
|
|
|
+ sb.append("出水总磷:").append(normConfig.getCszlBzz()).append("mg/L");
|
|
|
+ sb.append("出水氨氮:").append(normConfig.getCsadBzz()).append("mg/L");
|
|
|
+ sb.append("出水SS:").append(normConfig.getCsssBzz()).append("mg/L").append("。");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
|
|
|
public static String handleDate(String str){
|
|
|
StringBuilder sb = new StringBuilder();
|