|
@@ -15,6 +15,8 @@ import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchImportInf
|
|
|
import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo;
|
|
|
import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
|
|
|
import com.jeeplus.modules.projectFilingBatch.service.ProjectFilingBatchService;
|
|
|
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
|
|
|
+import java.util.stream.Collectors;
|
|
|
import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
|
|
|
import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
|
|
|
import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
|
|
@@ -470,6 +472,21 @@ public class ProjectFilingBatchController extends BaseController {
|
|
|
return form(projectFilingBatch, model);
|
|
|
}
|
|
|
try{
|
|
|
+ //查询当前批量归档中对应的报告信息是否已经被提交批量归档,若已经在归档中,则不允许重复提交
|
|
|
+ if(proId.length>0){
|
|
|
+ List proIdList = Lists.newArrayList(proId);
|
|
|
+ List<ProjectReportData> processedReportList = projectFilingBatchService.getProcessedReportList(proIdList,projectFilingBatch.getId());
|
|
|
+ if(!processedReportList.isEmpty()){
|
|
|
+ String projectNumberResult = processedReportList.stream()
|
|
|
+ .map(project -> String.valueOf(project.getNumber())) // 提取 number 并转换为字符串
|
|
|
+ .collect(Collectors.joining(",")); // 逗号拼接字符串
|
|
|
+
|
|
|
+ addMessage(redirectAttributes, "该批次中,报告号:"+ projectNumberResult + " 已经完成或正在进行批量归档,无法重复归档");
|
|
|
+ return "redirect:"+Global.getAdminPath()+"/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if (projectFilingBatch.getId()!=null && StringUtils.isNotBlank(projectFilingBatch.getId())) {//编辑表单保存
|
|
|
ProjectFilingBatch t = projectFilingBatchService.get(projectFilingBatch.getId());//从数据库取出记录的值
|
|
|
if (t.getFilingStatus() == 3 ||t.getFilingStatus()==1){
|
|
@@ -510,6 +527,20 @@ public class ProjectFilingBatchController extends BaseController {
|
|
|
if (!beanValidator(model, projectFilingBatch)){
|
|
|
return form(projectFilingBatch, model);
|
|
|
}
|
|
|
+ //查询当前批量归档中对应的报告信息是否已经被提交批量归档,若已经在归档中,则不允许重复提交
|
|
|
+ if(proId.length>0){
|
|
|
+ List proIdList = Lists.newArrayList(proId);
|
|
|
+ List<ProjectReportData> processedReportList = projectFilingBatchService.getProcessedReportList(proIdList,projectFilingBatch.getId());
|
|
|
+ if(!processedReportList.isEmpty()){
|
|
|
+ String projectNumberResult = processedReportList.stream()
|
|
|
+ .map(project -> String.valueOf(project.getNumber())) // 提取 number 并转换为字符串
|
|
|
+ .collect(Collectors.joining(",")); // 逗号拼接字符串
|
|
|
+
|
|
|
+ addMessage(redirectAttributes, "该批次中,报告号:"+ projectNumberResult + " 已经完成或正在进行批量归档,无法重复归档");
|
|
|
+ return "redirect:"+Global.getAdminPath()+"/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
try{
|
|
|
if (projectFilingBatch.getId()!=null && StringUtils.isNotBlank(projectFilingBatch.getId())) {//编辑表单保存
|
|
|
ProjectFilingBatch t = projectFilingBatchService.get(projectFilingBatch.getId());//从数据库取出记录的值
|
|
@@ -639,6 +670,26 @@ public class ProjectFilingBatchController extends BaseController {
|
|
|
String taskDefKey = projectFilingBatch.getAct().getTaskDefKey();
|
|
|
//当状态为未通过时,重新修改数据
|
|
|
if ("modifyApply".equals(taskDefKey)) {
|
|
|
+ //查询当前批量归档中对应的报告信息是否已经被提交批量归档,若已经在归档中,则不允许重复提交
|
|
|
+ if(proId.length>0){
|
|
|
+ List proIdList = Lists.newArrayList(proId);
|
|
|
+ List<ProjectReportData> processedReportList = projectFilingBatchService.getProcessedReportList(proIdList,projectFilingBatch.getId());
|
|
|
+ if(!processedReportList.isEmpty()){
|
|
|
+ String projectNumberResult = processedReportList.stream()
|
|
|
+ .map(project -> String.valueOf(project.getNumber())) // 提取 number 并转换为字符串
|
|
|
+ .collect(Collectors.joining(",")); // 逗号拼接字符串
|
|
|
+
|
|
|
+ addMessage(redirectAttributes, "该批次中,报告号:"+ projectNumberResult + " 已经完成或正在进行批量归档,无法重复归档");
|
|
|
+ if (StringUtils.isNotBlank(home) && "home".equals(home)){
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/home/?repage";
|
|
|
+ }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
|
|
|
+ }else {
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
projectFilingBatch.getAct().setComment("重新申请");
|
|
|
}
|
|
|
List<User> users = UserUtils.getByProssType(projectFilingBatch.getProcessinstanceId(),1);
|
|
@@ -650,12 +701,24 @@ public class ProjectFilingBatchController extends BaseController {
|
|
|
if(null != saveAuditFlag){
|
|
|
if(1 == saveAuditFlag && t.getFilingStatus() != 4 && t.getFilingStatus() != 5){
|
|
|
addMessage(redirectAttributes, "归档批次已送审,请勿重复送审");
|
|
|
- return "redirect:"+Global.getAdminPath()+"/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ if (StringUtils.isNotBlank(home) && "home".equals(home)){
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/home/?repage";
|
|
|
+ }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
|
|
|
+ }else {
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if(t.getFilingStatus() == 5){
|
|
|
addMessage(redirectAttributes, "归档批次归档完成,无法再次送审");
|
|
|
- return "redirect:"+Global.getAdminPath()+"/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ if (StringUtils.isNotBlank(home) && "home".equals(home)){
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/home/?repage";
|
|
|
+ }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
|
|
|
+ }else {
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
String str = projectFilingBatchService.auditSave(projectFilingBatch,users,proId,proInfos,flags);
|