|
@@ -4,6 +4,8 @@ package com.fdkankan.fusion.controller;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.fusion.common.ResultCode;
|
|
|
+import com.fdkankan.fusion.entity.CaseNumEntity;
|
|
|
+import com.fdkankan.fusion.entity.ScenePlus;
|
|
|
import com.fdkankan.fusion.entity.TmProject;
|
|
|
import com.fdkankan.fusion.exception.BusinessException;
|
|
|
import com.fdkankan.fusion.common.ResultData;
|
|
@@ -12,12 +14,17 @@ import com.fdkankan.fusion.request.CaseParam;
|
|
|
import com.fdkankan.fusion.response.CaseVo;
|
|
|
import com.fdkankan.fusion.service.ICaseNumService;
|
|
|
import com.fdkankan.fusion.service.ICaseService;
|
|
|
+import com.fdkankan.fusion.service.IScenePlusService;
|
|
|
import com.fdkankan.fusion.service.ITmProjectService;
|
|
|
import com.fdkankan.fusion.service.impl.CopyCaseService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
/**
|
|
|
* 案件管理
|
|
|
*/
|
|
@@ -31,6 +38,10 @@ public class CaseController extends BaseController{
|
|
|
ITmProjectService tmProjectService;
|
|
|
@Autowired
|
|
|
CopyCaseService copyCaseService;
|
|
|
+ @Autowired
|
|
|
+ ICaseNumService caseNumService;
|
|
|
+ @Autowired
|
|
|
+ IScenePlusService scenePlusService;
|
|
|
|
|
|
@PostMapping("/list")
|
|
|
public ResultData list(@RequestBody CaseParam param ){
|
|
@@ -48,7 +59,7 @@ public class CaseController extends BaseController{
|
|
|
}
|
|
|
|
|
|
@PostMapping("/addOrUpdate")
|
|
|
- public ResultData addOrUpdate(@RequestBody CaseParam param){
|
|
|
+ public ResultData addOrUpdate(@RequestBody CaseEntity param){
|
|
|
return ResultData.ok(caseService.addOrUpdate(param));
|
|
|
}
|
|
|
|
|
@@ -80,5 +91,16 @@ public class CaseController extends BaseController{
|
|
|
copyCaseService.copyCase(param.getCaseId());
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/sceneListHasAi")
|
|
|
+ public ResultData sceneListHasAi(@RequestParam(required = false) Integer caseId){
|
|
|
+ List<CaseNumEntity> caseNums = caseNumService.getByCaseId(caseId);
|
|
|
+ List<ScenePlus> collect = new ArrayList<>();
|
|
|
+ if(!caseNums.isEmpty()){
|
|
|
+ List<String> numList = caseNums.stream().map(CaseNumEntity::getNum).collect(Collectors.toList());
|
|
|
+ collect = scenePlusService.getByNumList(numList);
|
|
|
+ }
|
|
|
+ return ResultData.ok(collect);
|
|
|
+ }
|
|
|
}
|
|
|
|