|
@@ -1093,13 +1093,15 @@ public class TodoCenterManage { |
|
|
.eq(ProjectApplication::getProjectCode, project.getProjectCode())); |
|
|
.eq(ProjectApplication::getProjectCode, project.getProjectCode())); |
|
|
}else { |
|
|
}else { |
|
|
//采取批量删除 批量添加的方式 批量删除建设方案申报后的应用信息 |
|
|
//采取批量删除 批量添加的方式 批量删除建设方案申报后的应用信息 |
|
|
List<Long> projectIdList = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
|
|
|
.eq(Project::getProjectCode, projectInfo.getProjectCode()) |
|
|
|
|
|
|
|
|
//采取批量删除 批量添加的方式 批量删除建设方案申报后的应用信息 |
|
|
|
|
|
List<String> projectCodeList = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
|
|
|
.eq(Project::getProjectCode, project.getProjectCode()) |
|
|
.eq(Project::getIsConstruct, Boolean.TRUE)).stream() |
|
|
.eq(Project::getIsConstruct, Boolean.TRUE)).stream() |
|
|
.map(Project::getId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
.map(Project::getProjectCode).collect(Collectors.toList()); |
|
|
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
.eq(ProjectApplication::getProjectCode,projectInfo.getProjectCode()) |
|
|
|
|
|
.in(ProjectApplication::getProjectId,projectIdList)); |
|
|
|
|
|
|
|
|
.eq(ProjectApplication::getProjectCode,project.getProjectCode()) |
|
|
|
|
|
.in(CollUtil.isNotEmpty(projectCodeList),ProjectApplication::getProjectCode,projectCodeList) |
|
|
|
|
|
.eq(ProjectApplication::getIsConstruct,Boolean.TRUE)); |
|
|
} |
|
|
} |
|
|
if(isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())){ |
|
|
if(isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())){ |
|
|
//批量添加 |
|
|
//批量添加 |
|
@@ -1148,12 +1150,6 @@ public class TodoCenterManage { |
|
|
String areaCode = project.getAreaCode(); |
|
|
String areaCode = project.getAreaCode(); |
|
|
String areaName = project.getArea(); |
|
|
String areaName = project.getArea(); |
|
|
Long pretrialFileId = project.getPretrialFileId(); |
|
|
Long pretrialFileId = project.getPretrialFileId(); |
|
|
// 如果项目关联的预审文件ID不为空,说明已经提交过审核意见,直接返回文件ID |
|
|
|
|
|
if (Objects.nonNull(pretrialFileId)){ |
|
|
|
|
|
notSealedInfoVo.setFileId(pretrialFileId); |
|
|
|
|
|
notSealedInfoVo.setIsCommit(Boolean.TRUE); |
|
|
|
|
|
return notSealedInfoVo; |
|
|
|
|
|
} |
|
|
|
|
|
Region region = regionService.getOne(Wrappers.lambdaQuery(Region.class) |
|
|
Region region = regionService.getOne(Wrappers.lambdaQuery(Region.class) |
|
|
.eq(Region::getRegionCode, areaCode) |
|
|
.eq(Region::getRegionCode, areaCode) |
|
|
.eq(Region::getRegionName,areaName)); |
|
|
.eq(Region::getRegionName,areaName)); |
|
@@ -1172,6 +1168,10 @@ public class TodoCenterManage { |
|
|
switch (regionLevel) { |
|
|
switch (regionLevel) { |
|
|
// 市级预审(市本级) |
|
|
// 市级预审(市本级) |
|
|
case RegionConst.RL_CITY: |
|
|
case RegionConst.RL_CITY: |
|
|
|
|
|
// 如果项目关联的预审文件ID不为空,说明已经提交过审核意见,直接返回文件ID |
|
|
|
|
|
if (Boolean.TRUE.equals(getCityNotSealedInfoVO(pretrialFileId, notSealedInfoVo))) { |
|
|
|
|
|
return notSealedInfoVo; |
|
|
|
|
|
} |
|
|
String cityTemplateName = TodoCenterConstant.SealTemplate.CITY_TEMPLATE; |
|
|
String cityTemplateName = TodoCenterConstant.SealTemplate.CITY_TEMPLATE; |
|
|
// 设置pdf模板参数 |
|
|
// 设置pdf模板参数 |
|
|
JSONObject cityParamsMap = assemblyPdfParams(project,cityTemplateName); |
|
|
JSONObject cityParamsMap = assemblyPdfParams(project,cityTemplateName); |
|
@@ -1185,9 +1185,7 @@ public class TodoCenterManage { |
|
|
} |
|
|
} |
|
|
Long cityPdfId = generateNotSealedPdf(projectId, cityTemplateName, cityParamsMap); |
|
|
Long cityPdfId = generateNotSealedPdf(projectId, cityTemplateName, cityParamsMap); |
|
|
notSealedInfoVo.setFileId(cityPdfId); |
|
|
notSealedInfoVo.setFileId(cityPdfId); |
|
|
if (StringUtils.isNotBlank(auditOpinion)) { |
|
|
|
|
|
notSealedInfoVo.setIsCommit(Boolean.TRUE); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
checkAuditOpinion(auditOpinion, notSealedInfoVo); |
|
|
return notSealedInfoVo; |
|
|
return notSealedInfoVo; |
|
|
// 区县预审 |
|
|
// 区县预审 |
|
|
case RegionConst.RL_COUNTY: |
|
|
case RegionConst.RL_COUNTY: |
|
@@ -1199,6 +1197,11 @@ public class TodoCenterManage { |
|
|
// 以是否有上级主管单位的维度判断(有上级条线主管单位,才有可能需要盖两次章) |
|
|
// 以是否有上级主管单位的维度判断(有上级条线主管单位,才有可能需要盖两次章) |
|
|
if (CommonEnum.YES.getCode().equals(isHigherSuperOrg)) { |
|
|
if (CommonEnum.YES.getCode().equals(isHigherSuperOrg)) { |
|
|
// 盖章审核登录用户所在单位为上级条线主管单位,此时为区县预审盖章流程第一个章 |
|
|
// 盖章审核登录用户所在单位为上级条线主管单位,此时为区县预审盖章流程第一个章 |
|
|
|
|
|
// 如果项目关联的预审文件ID和上级条线审核意见不为空,说明已经提交过审核意见,直接返回文件ID |
|
|
|
|
|
if (Boolean.TRUE.equals(getCountryNotSealedInfoVO(pretrialFileId, notSealedInfoVo, |
|
|
|
|
|
project.getCountrySealAuditOpinion()))){ |
|
|
|
|
|
return notSealedInfoVo; |
|
|
|
|
|
} |
|
|
if (empPosUnitCode.equals(higherSuperOrgCode)) { |
|
|
if (empPosUnitCode.equals(higherSuperOrgCode)) { |
|
|
// 有上级条线主管单位信息且登录用户所在单位是上级条线主管单位, |
|
|
// 有上级条线主管单位信息且登录用户所在单位是上级条线主管单位, |
|
|
countryParamsMap.put("higherOrgOpinion", auditOpinion); |
|
|
countryParamsMap.put("higherOrgOpinion", auditOpinion); |
|
@@ -1245,6 +1248,10 @@ public class TodoCenterManage { |
|
|
} |
|
|
} |
|
|
// 没有上级主管条线单位 |
|
|
// 没有上级主管条线单位 |
|
|
else if (CommonEnum.NO.getCode().equals(isHigherSuperOrg)) { |
|
|
else if (CommonEnum.NO.getCode().equals(isHigherSuperOrg)) { |
|
|
|
|
|
// 如果项目关联的预审文件ID不为空,说明已经提交过审核意见,直接返回文件ID |
|
|
|
|
|
if (Boolean.TRUE.equals(getCityNotSealedInfoVO(pretrialFileId, notSealedInfoVo))) { |
|
|
|
|
|
return notSealedInfoVo; |
|
|
|
|
|
} |
|
|
// 有本级主管单位信息 |
|
|
// 有本级主管单位信息 |
|
|
if (CommonEnum.YES.getCode().equals(isSuperOrg)) { |
|
|
if (CommonEnum.YES.getCode().equals(isSuperOrg)) { |
|
|
// 登录用户所在单位是本级主管单位,装配本级主管单位审核意见 |
|
|
// 登录用户所在单位是本级主管单位,装配本级主管单位审核意见 |
|
@@ -1265,9 +1272,7 @@ public class TodoCenterManage { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
notSealedInfoVo.setFileId(notSealedId); |
|
|
notSealedInfoVo.setFileId(notSealedId); |
|
|
if (StringUtils.isNotBlank(auditOpinion)) { |
|
|
|
|
|
notSealedInfoVo.setIsCommit(Boolean.TRUE); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
checkAuditOpinion(auditOpinion, notSealedInfoVo); |
|
|
return notSealedInfoVo; |
|
|
return notSealedInfoVo; |
|
|
default: |
|
|
default: |
|
|
throw new IllegalStateException("Unexpected value: " + regionLevel); |
|
|
throw new IllegalStateException("Unexpected value: " + regionLevel); |
|
@@ -1277,9 +1282,7 @@ public class TodoCenterManage { |
|
|
else if (InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode().equals(instType)){ |
|
|
else if (InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode().equals(instType)){ |
|
|
Long constructFileId = project.getConstructFileId(); |
|
|
Long constructFileId = project.getConstructFileId(); |
|
|
// 如果项目关联的建设方案文件ID不为空,说明已经提交过审核意见,直接返回文件ID |
|
|
// 如果项目关联的建设方案文件ID不为空,说明已经提交过审核意见,直接返回文件ID |
|
|
if (Objects.nonNull(constructFileId)){ |
|
|
|
|
|
notSealedInfoVo.setFileId(constructFileId); |
|
|
|
|
|
notSealedInfoVo.setIsCommit(Boolean.TRUE); |
|
|
|
|
|
|
|
|
if (Boolean.TRUE.equals(getCityNotSealedInfoVO(constructFileId, notSealedInfoVo))) { |
|
|
return notSealedInfoVo; |
|
|
return notSealedInfoVo; |
|
|
} |
|
|
} |
|
|
// 设置pdf模板参数 |
|
|
// 设置pdf模板参数 |
|
@@ -1291,14 +1294,36 @@ public class TodoCenterManage { |
|
|
constructParamsMap.put("bigDataBureauAuditDate",auditDate); |
|
|
constructParamsMap.put("bigDataBureauAuditDate",auditDate); |
|
|
Long constructNotFileId = generateNotSealedPdf(projectId, constructTemplateName, constructParamsMap); |
|
|
Long constructNotFileId = generateNotSealedPdf(projectId, constructTemplateName, constructParamsMap); |
|
|
notSealedInfoVo.setFileId(constructNotFileId); |
|
|
notSealedInfoVo.setFileId(constructNotFileId); |
|
|
if (StringUtils.isNotBlank(auditOpinion)) { |
|
|
|
|
|
notSealedInfoVo.setIsCommit(Boolean.TRUE); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
checkAuditOpinion(auditOpinion, notSealedInfoVo); |
|
|
return notSealedInfoVo; |
|
|
return notSealedInfoVo; |
|
|
} |
|
|
} |
|
|
return notSealedInfoVo; |
|
|
return notSealedInfoVo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void checkAuditOpinion(String auditOpinion, NotSealedInfoVO notSealedInfoVo) { |
|
|
|
|
|
if (StringUtils.isNotBlank(auditOpinion)) { |
|
|
|
|
|
notSealedInfoVo.setIsCommit(Boolean.TRUE); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Boolean getCityNotSealedInfoVO(Long fileId,NotSealedInfoVO notSealedInfoVo) { |
|
|
|
|
|
if (Objects.nonNull(fileId)){ |
|
|
|
|
|
notSealedInfoVo.setFileId(fileId); |
|
|
|
|
|
notSealedInfoVo.setIsCommit(Boolean.TRUE); |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Boolean getCountryNotSealedInfoVO(Long fileId,NotSealedInfoVO notSealedInfoVo,String auditOpinion) { |
|
|
|
|
|
if (Objects.nonNull(fileId) && StringUtils.isNotBlank(auditOpinion)){ |
|
|
|
|
|
notSealedInfoVo.setFileId(fileId); |
|
|
|
|
|
notSealedInfoVo.setIsCommit(Boolean.TRUE); |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private SealInfoDTO getHigherSealInfoDTO(Project project, JSONObject countryParamsMap) { |
|
|
private SealInfoDTO getHigherSealInfoDTO(Project project, JSONObject countryParamsMap) { |
|
|
String countrySealAuditOpinion = project.getCountrySealAuditOpinion(); |
|
|
String countrySealAuditOpinion = project.getCountrySealAuditOpinion(); |
|
|
String countrySealAuditDate = project.getCountrySealAuditDate(); |
|
|
String countrySealAuditDate = project.getCountrySealAuditDate(); |
|
@@ -1683,4 +1708,18 @@ public class TodoCenterManage { |
|
|
} |
|
|
} |
|
|
return tasks.get(0).getId(); |
|
|
return tasks.get(0).getId(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Object saveAuditOpinion(ReqProcessHandlerDTO param) { |
|
|
|
|
|
// 获取登录用户ID |
|
|
|
|
|
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); |
|
|
|
|
|
// 获取登录用户浙政钉code |
|
|
|
|
|
String employeeCode = user.getEmployeeCode(); |
|
|
|
|
|
|
|
|
|
|
|
//前置判断前端传的taskId是否存在不存在的情况 有可能是 或签被别人审批掉了 |
|
|
|
|
|
Task task = taskService.createTaskQuery().taskId(param.getTaskId()).active().singleResult(); |
|
|
|
|
|
if (ObjectUtil.isNull(task)) { |
|
|
|
|
|
return TodoCenterConstant.Handler.TASKID_ERROR; |
|
|
|
|
|
} |
|
|
|
|
|
return processTaskService.saveAuditOpinion(param,employeeCode); |
|
|
|
|
|
} |
|
|
} |
|
|
} |