三重一大、重大经济决策调查表数据生成优化
This commit is contained in:
@@ -14,7 +14,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import com.gxwebsoft.ai.service.AiCloudDocService;
|
||||
import com.gxwebsoft.ai.service.AiCloudFileService;
|
||||
import com.gxwebsoft.ai.service.AuditContentService3;
|
||||
import com.gxwebsoft.ai.service.AuditContent3TripleService;
|
||||
import com.gxwebsoft.ai.service.AuditContent3DecisionService;
|
||||
import com.gxwebsoft.ai.service.KnowledgeBaseService;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -27,16 +28,19 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 审计内容3控制器 - 三重一大制度对比分析
|
||||
* 审计内容3控制器 - 三重一大制度对比分析 & 重大经济决策调查表
|
||||
*/
|
||||
@Slf4j
|
||||
@Tag(name = "审计内容3-三重一大制度对比")
|
||||
@Tag(name = "审计内容3-三重一大制度")
|
||||
@RestController
|
||||
@RequestMapping("/api/ai/auditContent3")
|
||||
public class AuditContentController3 extends BaseController {
|
||||
public class AuditContent3Controller extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private AuditContentService3 auditContentService3;
|
||||
private AuditContent3TripleService auditContent3TripleService;
|
||||
|
||||
@Autowired
|
||||
private AuditContent3DecisionService auditContent3DecisionService;
|
||||
|
||||
@Autowired
|
||||
private AiCloudDocService aiCloudDocService;
|
||||
@@ -64,7 +68,7 @@ public class AuditContentController3 extends BaseController {
|
||||
|
||||
// 生成三重一大制度对比分析表数据
|
||||
String knowledgeBaseId = StrUtil.isNotBlank(kbIdTmp) ? kbIdTmp : request.getKbIds();
|
||||
JSONObject result = auditContentService3.generateTripleOneTableData(
|
||||
JSONObject result = auditContent3TripleService.generateTripleOneTableData(
|
||||
knowledgeBaseId,
|
||||
request.getLibraryIds(),
|
||||
request.getProjectLibrary(),
|
||||
@@ -82,6 +86,42 @@ public class AuditContentController3 extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成重大经济决策调查表数据
|
||||
*/
|
||||
@Operation(summary = "生成重大经济决策调查表")
|
||||
@PostMapping("/generateDecisionTable")
|
||||
public ApiResult<?> generateDecisionTable(@RequestBody AuditContentRequest request) {
|
||||
final User loginUser = getLoginUser();
|
||||
String kbIdTmp = "";
|
||||
|
||||
try {
|
||||
// 创建临时知识库(如果需要)
|
||||
if (!request.getDocList().isEmpty() || !request.getFileList().isEmpty()) {
|
||||
kbIdTmp = createTempKnowledgeBase(request);
|
||||
}
|
||||
|
||||
// 生成重大经济决策调查表数据
|
||||
String knowledgeBaseId = StrUtil.isNotBlank(kbIdTmp) ? kbIdTmp : request.getKbIds();
|
||||
JSONObject result = auditContent3DecisionService.generateDecisionTableData(
|
||||
knowledgeBaseId,
|
||||
request.getLibraryIds(),
|
||||
request.getProjectLibrary(),
|
||||
loginUser.getUsername(),
|
||||
request.getHistory(),
|
||||
request.getSuggestion(),
|
||||
request.getData()
|
||||
);
|
||||
|
||||
return success(result);
|
||||
} catch (Exception e) {
|
||||
log.error("生成重大经济决策调查表失败", e);
|
||||
return fail("生成重大经济决策调查表失败: " + e.getMessage());
|
||||
} finally {
|
||||
cleanupTempKnowledgeBase(kbIdTmp);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建临时知识库并提交文档
|
||||
*/
|
||||
Reference in New Issue
Block a user