语料结果分析入参修改
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.volvo.ai.analytic.center.dto.req;
|
package com.volvo.ai.analytic.center.dto.req;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -7,6 +8,6 @@ public class SummaryQuestionRequestDTO {
|
|||||||
|
|
||||||
private String summaryReportId;
|
private String summaryReportId;
|
||||||
|
|
||||||
private String preliminarySummaryResults;
|
private JSONObject preliminarySummaryResults;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
@RestController()
|
@RestController()
|
||||||
@@ -66,6 +69,7 @@ public class AiAnalysisDifyController {
|
|||||||
log.info("aiAnalyze query data: {}", analysisQueryReq);
|
log.info("aiAnalyze query data: {}", analysisQueryReq);
|
||||||
return aiAnalysisDifyService.query(analysisQueryReq);
|
return aiAnalysisDifyService.query(analysisQueryReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/callback")
|
@PostMapping("/callback")
|
||||||
@ApiOperation(value = "Ai解析结果查询")
|
@ApiOperation(value = "Ai解析结果查询")
|
||||||
public AnalysisResp<Object> testCallback(@RequestBody AnalysisResp analysisResp) {
|
public AnalysisResp<Object> testCallback(@RequestBody AnalysisResp analysisResp) {
|
||||||
@@ -74,13 +78,10 @@ public class AiAnalysisDifyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/corpusSummaryQuestion")
|
@PostMapping("/corpusSummaryQuestion")
|
||||||
@ApiOperation(value = "单条语料分析结论入库")
|
@ApiOperation(value = "单条语料分析结论入库")
|
||||||
public AnalysisResp<Object> corpusSummaryQuestion(@RequestBody String requestDTO1) {
|
public AnalysisResp<Object> corpusSummaryQuestion(@RequestBody SummaryQuestionRequestDTO requestDTO) {
|
||||||
log.info("aiAnalyze corpusSummaryQuestion requestDTO: {}", JSON.toJSONString(requestDTO1));
|
log.info("aiAnalyze corpusSummaryQuestion requestDTO: {}", JSON.toJSONString(requestDTO));
|
||||||
|
|
||||||
SummaryQuestionRequestDTO requestDTO = new SummaryQuestionRequestDTO();
|
|
||||||
// 打印接收到的参数
|
// 打印接收到的参数
|
||||||
userQuestionSummaryService.updateSummery(requestDTO);
|
userQuestionSummaryService.updateSummery(requestDTO);
|
||||||
return AnalysisResp.success("ok");
|
return AnalysisResp.success("ok");
|
||||||
|
|||||||
@@ -89,10 +89,10 @@ public class UserQuestionSummaryServiceImpl extends ServiceImpl<TmCorpusQuestion
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateSummery(SummaryQuestionRequestDTO summaryQuestionRequestDTO) {
|
public void updateSummery(SummaryQuestionRequestDTO summaryQuestionRequestDTO) {
|
||||||
if (summaryQuestionRequestDTO == null || summaryQuestionRequestDTO.getSummaryReportId() == null || StringUtils.isBlank(summaryQuestionRequestDTO.getPreliminarySummaryResults())) {
|
if (summaryQuestionRequestDTO == null || summaryQuestionRequestDTO.getSummaryReportId() == null || summaryQuestionRequestDTO.getPreliminarySummaryResults() ==null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tmCorpusQuestionSummaryReportMapper.updateBySummaryReportId(summaryQuestionRequestDTO.getSummaryReportId(), summaryQuestionRequestDTO.getPreliminarySummaryResults());
|
tmCorpusQuestionSummaryReportMapper.updateBySummaryReportId(summaryQuestionRequestDTO.getSummaryReportId(), summaryQuestionRequestDTO.getPreliminarySummaryResults().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processItem(Date statTime, Date endTime, String mainCategoryString) {
|
private void processItem(Date statTime, Date endTime, String mainCategoryString) {
|
||||||
|
|||||||
Reference in New Issue
Block a user