|
@@ -361,7 +361,7 @@ public class RyTask
|
|
|
|
|
|
|
|
|
|
|
|
- private String buildShowValueYJ(TXinyiWarningRecord tXinyiWarningRecord, TXinyiIndustry tXinyiIndustry, TXinyiNormConfig normConfig) {
|
|
|
+ private String buildShowValueDeviceErr(TXinyiWarningRecord tXinyiWarningRecord, TXinyiIndustry tXinyiIndustry, TXinyiNormConfig normConfig) {
|
|
|
JSONObject result = new JSONObject();
|
|
|
JSONObject basic = new JSONObject();
|
|
|
Integer status = tXinyiWarningRecord.getStatus();
|
|
@@ -517,7 +517,7 @@ public class RyTask
|
|
|
|
|
|
|
|
|
|
|
|
- private void addChatRecordByWarning(TXinyiWarningRecord tXinyiWarningRecord, TXinyiIndustry tXinyiIndustry, TXinyiNormConfig normConfig) {
|
|
|
+ private void addChatRecordByDeviceErr(TXinyiWarningRecord tXinyiWarningRecord, TXinyiIndustry tXinyiIndustry, TXinyiNormConfig normConfig) {
|
|
|
ChatReq chatReq = new ChatReq();
|
|
|
//保存聊天记录
|
|
|
//将问答更新到数据库中
|
|
@@ -527,7 +527,7 @@ public class RyTask
|
|
|
/*String userId = SecurityUtils.getUserId().toString();
|
|
|
String username = SecurityUtils.getUsername();*/
|
|
|
chatReq.setUserId(WARNING_DEFAULT_CREATE);
|
|
|
- String showVal = this.buildShowValueYJ(tXinyiWarningRecord, tXinyiIndustry, normConfig);
|
|
|
+ String showVal = this.buildShowValueDeviceErr(tXinyiWarningRecord, tXinyiIndustry, normConfig);
|
|
|
chatReq.setShowVal(showVal);//前端展示的数据和提问的数据不一致
|
|
|
chatReq.setQuestion(WARNING_DEFAULT_QUESTION);//本地问题
|
|
|
chatReq.setAnswer(tXinyiWarningRecord.getReason() + ",请检查设备是否正常运行");
|
|
@@ -1167,7 +1167,7 @@ public class RyTask
|
|
|
this.xinyiWarningRecordMapper.insertTXinyiWarningRecord(tXinyiWarningRecord);
|
|
|
if(WARNING_LEVEL_NO_DATE.equals(tXinyiWarningRecord.getLevel())){
|
|
|
//只保存一个普通的问答记录 不需要调用决策信息,但是实时数据还是要记录的
|
|
|
- this.addChatRecordByWarning(tXinyiWarningRecord, tXinyiIndustry, normConfig);
|
|
|
+ this.addChatRecordByDeviceErr(tXinyiWarningRecord, tXinyiIndustry, normConfig);
|
|
|
}else {
|
|
|
//继续调用大模型prompt
|
|
|
this.askBigModelForYC(tXinyiWarningRecord, tXinyiIndustry, normConfig, chartsDataList, date, yjHour);
|
|
@@ -1177,7 +1177,7 @@ public class RyTask
|
|
|
for (TXinyiWarningRecord xinyiWarningRecord : tXinyiWarningRecords) {//理论上只有一个的
|
|
|
if(WARNING_LEVEL_NO_DATE.equals(tXinyiWarningRecord.getLevel())){
|
|
|
//只保存一个普通的问答记录 不需要调用决策信息,但是实时数据还是要记录的
|
|
|
- this.addChatRecordByWarning(tXinyiWarningRecord, tXinyiIndustry, normConfig);
|
|
|
+ this.addChatRecordByDeviceErr(tXinyiWarningRecord, tXinyiIndustry, normConfig);
|
|
|
}else {
|
|
|
//2024年6月25日11:32:13 预测的相对特殊:因为前端不展示次数,所以这里把 超标时间+现在值+预测值更新一下
|
|
|
xinyiWarningRecord.setForecastVal(tXinyiWarningRecord.getForecastVal());
|