|
@@ -32,7 +32,9 @@ import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.manager.entity.ArchiveTreeContract;
|
|
|
+import org.springblade.manager.entity.ProjectInfo;
|
|
|
import org.springblade.manager.feign.ArchiveTreeContractClient;
|
|
|
+import org.springblade.manager.feign.ProjectClient;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -63,7 +65,7 @@ public class ArchivesAutoController extends BladeController {
|
|
|
|
|
|
private final IArchiveAutoPdfService archiveAutoPdfService;
|
|
|
private final ArchiveTreeContractClient archiveTreeContractClient;
|
|
|
-
|
|
|
+ private ProjectClient projectClient;
|
|
|
/**
|
|
|
* 详情
|
|
|
*/
|
|
@@ -320,9 +322,23 @@ public class ArchivesAutoController extends BladeController {
|
|
|
*/
|
|
|
@PostMapping("/archiveAutoMethod")
|
|
|
public R archiveAutoMethod(Long projectId) {
|
|
|
+ //先验证当前项目是否在自动组卷中,组卷中直接返回
|
|
|
+ ProjectInfo projectInfo = projectClient.getById(String.valueOf(projectId));
|
|
|
+ Integer isArchivesAuto = projectInfo.getIsArchivesAuto();
|
|
|
+ if(isArchivesAuto!=null && isArchivesAuto==1){
|
|
|
+ return R.fail("当前项目已经在自动组卷中");
|
|
|
+ }
|
|
|
+ //设置自动组卷中
|
|
|
+ projectClient.updateIsArchivesAutoById(projectId,1);
|
|
|
+
|
|
|
+ //将项目未锁定案卷拆卷
|
|
|
archivesAutoService.splitArchvies(projectId);
|
|
|
+ //项目自动组卷入口
|
|
|
archivesAutoService.archiveAutoMethod(projectId);
|
|
|
- return R.data("");
|
|
|
+
|
|
|
+ //设置自动组卷结束
|
|
|
+ projectClient.updateIsArchivesAutoById(projectId,0);
|
|
|
+ return R.data("自动组卷结束");
|
|
|
}
|
|
|
|
|
|
/**
|