|
@@ -60,6 +60,10 @@ public class CopyCaseService {
|
|
|
ITmProjectService projectService;
|
|
|
@Autowired
|
|
|
ITmMessageService tmMessageService;
|
|
|
+ @Autowired
|
|
|
+ ICaseScriptService caseScriptService;
|
|
|
+ @Autowired
|
|
|
+ ICaseImgTagService caseImgTagService;
|
|
|
|
|
|
|
|
|
@Autowired
|
|
@@ -80,6 +84,8 @@ public class CopyCaseService {
|
|
|
this.cpCaseVideo(oldCaseId,newCaseId);
|
|
|
this.cpCaseViewByCaseId(oldCaseId,newCaseId);
|
|
|
this.cpFusionGuide(oldCaseId,newCaseId);
|
|
|
+ this.cpCaseScript(oldCaseId,newCaseId);
|
|
|
+ this.cpImgTag(oldCaseId,newCaseId);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -200,6 +206,34 @@ public class CopyCaseService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 复制案件脚本
|
|
|
+ */
|
|
|
+ private void cpCaseScript(Integer oldCaseId, Integer newCaseId) {
|
|
|
+ CaseScript entity = caseScriptService.getByCaseId(oldCaseId);
|
|
|
+ if(entity == null ){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ entity.setId(null);
|
|
|
+ entity.setCaseId(newCaseId);
|
|
|
+ caseScriptService.save(entity);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 复制案件图片标注
|
|
|
+ */
|
|
|
+ private void cpImgTag(Integer oldCaseId, Integer newCaseId) {
|
|
|
+ CaseImgTag entity = caseImgTagService.getByCaseId(oldCaseId);
|
|
|
+ if(entity == null ){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ entity.setId(null);
|
|
|
+ entity.setCaseId(newCaseId);
|
|
|
+ caseImgTagService.save(entity);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
* 复制案件场景关系
|
|
|
*/
|
|
|
private void cpCaseNum(Integer oldCaseId, Integer newCaseId) {
|