|
@@ -17,9 +17,11 @@ import com.ningdatech.pmapi.common.util.ExcelExportStyle; |
|
|
import com.ningdatech.pmapi.gov.model.entity.GovBizProjectApply; |
|
|
import com.ningdatech.pmapi.gov.model.entity.GovBizProjectApply; |
|
|
import com.ningdatech.pmapi.gov.model.entity.GovBizProjectApprove; |
|
|
import com.ningdatech.pmapi.gov.model.entity.GovBizProjectApprove; |
|
|
import com.ningdatech.pmapi.gov.model.entity.GovBizProjectBaseinfo; |
|
|
import com.ningdatech.pmapi.gov.model.entity.GovBizProjectBaseinfo; |
|
|
|
|
|
import com.ningdatech.pmapi.gov.model.entity.GovOperationProjectBaseinfo; |
|
|
import com.ningdatech.pmapi.gov.service.IGovBizProjectApplyService; |
|
|
import com.ningdatech.pmapi.gov.service.IGovBizProjectApplyService; |
|
|
import com.ningdatech.pmapi.gov.service.IGovBizProjectApproveService; |
|
|
import com.ningdatech.pmapi.gov.service.IGovBizProjectApproveService; |
|
|
import com.ningdatech.pmapi.gov.service.IGovBizProjectBaseinfoService; |
|
|
import com.ningdatech.pmapi.gov.service.IGovBizProjectBaseinfoService; |
|
|
|
|
|
import com.ningdatech.pmapi.gov.service.IGovOperationProjectBaseinfoService; |
|
|
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectRenewalDeclareExportDTO; |
|
|
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectRenewalDeclareExportDTO; |
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectRenewalApprovalStatusEnum; |
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectRenewalApprovalStatusEnum; |
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
@@ -69,6 +71,8 @@ public class ProjectRenewalFundManage { |
|
|
|
|
|
|
|
|
private final IGovBizProjectBaseinfoService baseinfoService; |
|
|
private final IGovBizProjectBaseinfoService baseinfoService; |
|
|
|
|
|
|
|
|
|
|
|
private final IGovOperationProjectBaseinfoService operationProjectBaseinfoService; |
|
|
|
|
|
|
|
|
private final IGovBizProjectApplyService applyService; |
|
|
private final IGovBizProjectApplyService applyService; |
|
|
|
|
|
|
|
|
private final IGovBizProjectApproveService approveService; |
|
|
private final IGovBizProjectApproveService approveService; |
|
@@ -198,11 +202,14 @@ public class ProjectRenewalFundManage { |
|
|
GovBizProjectBaseinfo baseinfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
GovBizProjectBaseinfo baseinfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
.eq(GovBizProjectBaseinfo::getBaseProjId, projectCode) |
|
|
.eq(GovBizProjectBaseinfo::getBaseProjId, projectCode) |
|
|
.last(BizConst.LIMIT_1)); |
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
|
|
GovOperationProjectBaseinfo operationBaseinfo = operationProjectBaseinfoService.getOne(Wrappers.lambdaQuery(GovOperationProjectBaseinfo.class) |
|
|
|
|
|
.eq(GovOperationProjectBaseinfo::getBaseProjId, projectCode) |
|
|
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
GovBizProjectApply apply = applyService.getOne(Wrappers.lambdaQuery(GovBizProjectApply.class) |
|
|
GovBizProjectApply apply = applyService.getOne(Wrappers.lambdaQuery(GovBizProjectApply.class) |
|
|
.eq(GovBizProjectApply::getBaseProjId, projectCode) |
|
|
.eq(GovBizProjectApply::getBaseProjId, projectCode) |
|
|
.last(BizConst.LIMIT_1)); |
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
|
|
|
|
|
VUtils.isTrue(Objects.isNull(project) && Objects.isNull(baseinfo)).throwMessage(String.format("关联的项目【%s】不存在 提交失败!",projectCode)); |
|
|
|
|
|
|
|
|
VUtils.isTrue(Objects.isNull(project) && Objects.isNull(baseinfo) && Objects.isNull(operationBaseinfo)).throwMessage(String.format("关联的项目【%s】不存在 提交失败!",projectCode)); |
|
|
ProjectRenewalFundDeclaration declaration = new ProjectRenewalFundDeclaration(); |
|
|
ProjectRenewalFundDeclaration declaration = new ProjectRenewalFundDeclaration(); |
|
|
//如果是重新申报 |
|
|
//如果是重新申报 |
|
|
if(Objects.nonNull(dto.getId())){ |
|
|
if(Objects.nonNull(dto.getId())){ |
|
@@ -251,6 +258,9 @@ public class ProjectRenewalFundManage { |
|
|
}else if(Objects.nonNull(baseinfo)){ |
|
|
}else if(Objects.nonNull(baseinfo)){ |
|
|
declaration.setRegionCode(StringUtils.isNotBlank(baseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); |
|
|
declaration.setRegionCode(StringUtils.isNotBlank(baseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); |
|
|
declaration.setOrgCode(baseinfo.getBaseBuildDeprtDing()); |
|
|
declaration.setOrgCode(baseinfo.getBaseBuildDeprtDing()); |
|
|
|
|
|
}else if(Objects.nonNull(operationBaseinfo)){ |
|
|
|
|
|
declaration.setRegionCode(StringUtils.isNotBlank(operationBaseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); |
|
|
|
|
|
declaration.setOrgCode(operationBaseinfo.getBaseBuildDeprtDing()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(!projectRenewalFundDeclarationService.saveOrUpdate(declaration)){ |
|
|
if(!projectRenewalFundDeclarationService.saveOrUpdate(declaration)){ |
|
@@ -268,9 +278,14 @@ public class ProjectRenewalFundManage { |
|
|
Long projectRenewalId = param.getProjectRenewalId(); |
|
|
Long projectRenewalId = param.getProjectRenewalId(); |
|
|
ProjectRenewalFundDeclaration projectRenewal = projectRenewalFundDeclarationService.getById(projectRenewalId); |
|
|
ProjectRenewalFundDeclaration projectRenewal = projectRenewalFundDeclarationService.getById(projectRenewalId); |
|
|
VUtils.isTrue(Objects.isNull(projectRenewal)).throwMessage("该续建信息不存在!"); |
|
|
VUtils.isTrue(Objects.isNull(projectRenewal)).throwMessage("该续建信息不存在!"); |
|
|
Project project = projectService.getNewProject(projectRenewal.getProjectId()); |
|
|
|
|
|
|
|
|
|
|
|
VUtils.isTrue(Objects.isNull(project)).throwMessage("关联的项目已经被删除!"); |
|
|
|
|
|
|
|
|
Project project = projectService.getProjectByCode(projectRenewal.getProjectCode()); |
|
|
|
|
|
GovBizProjectBaseinfo baseinfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
|
|
|
.eq(GovBizProjectBaseinfo::getBaseProjId, projectRenewal.getProjectCode()) |
|
|
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
|
|
GovOperationProjectBaseinfo operationBaseinfo = operationProjectBaseinfoService.getOne(Wrappers.lambdaQuery(GovOperationProjectBaseinfo.class) |
|
|
|
|
|
.eq(GovOperationProjectBaseinfo::getBaseProjId, projectRenewal.getProjectCode()) |
|
|
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
|
|
VUtils.isTrue(Objects.isNull(project) && Objects.isNull(baseinfo) && Objects.isNull(operationBaseinfo)).throwMessage("关联的项目已经被删除!"); |
|
|
if (Boolean.TRUE.equals(param.getResult())){ |
|
|
if (Boolean.TRUE.equals(param.getResult())){ |
|
|
projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.PASS.name()); |
|
|
projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.PASS.name()); |
|
|
}else { |
|
|
}else { |
|
@@ -281,8 +296,16 @@ public class ProjectRenewalFundManage { |
|
|
projectRenewal.setAuditOpinion(auditOpinion); |
|
|
projectRenewal.setAuditOpinion(auditOpinion); |
|
|
projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.NOT_PASS.name()); |
|
|
projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.NOT_PASS.name()); |
|
|
} |
|
|
} |
|
|
projectRenewal.setRegionCode(project.getAreaCode()); |
|
|
|
|
|
projectRenewal.setOrgCode(project.getBuildOrgCode()); |
|
|
|
|
|
|
|
|
if(Objects.nonNull(project)){ |
|
|
|
|
|
projectRenewal.setRegionCode(project.getAreaCode()); |
|
|
|
|
|
projectRenewal.setOrgCode(project.getBuildOrgCode()); |
|
|
|
|
|
}else if(Objects.nonNull(baseinfo)){ |
|
|
|
|
|
projectRenewal.setRegionCode(StringUtils.isNotBlank(baseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); |
|
|
|
|
|
projectRenewal.setOrgCode(baseinfo.getBaseBuildDeprtDing()); |
|
|
|
|
|
}else if(Objects.nonNull(operationBaseinfo)){ |
|
|
|
|
|
projectRenewal.setRegionCode(StringUtils.isNotBlank(operationBaseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); |
|
|
|
|
|
projectRenewal.setOrgCode(operationBaseinfo.getBaseBuildDeprtDing()); |
|
|
|
|
|
} |
|
|
projectRenewal.setAuditOpinion(param.getAuditOpinion()); |
|
|
projectRenewal.setAuditOpinion(param.getAuditOpinion()); |
|
|
projectRenewal.setUpdateOn(LocalDateTime.now()); |
|
|
projectRenewal.setUpdateOn(LocalDateTime.now()); |
|
|
projectRenewalFundDeclarationService.updateById(projectRenewal); |
|
|
projectRenewalFundDeclarationService.updateById(projectRenewal); |
|
|