diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java index bf3b3f8..2a3088a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java @@ -25,6 +25,8 @@ import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectRenewalFundDeclarationVO; import com.ningdatech.pmapi.projectlib.service.IProjectRenewalFundDeclarationService; import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; +import com.ningdatech.pmapi.user.util.LoginUserUtil; import com.wflow.exception.BusinessException; import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; @@ -138,6 +140,10 @@ public class ProjectRenewalFundManage { public Long audit(ProjectRenewalAuditReq param) { Long projectRenewalId = param.getProjectRenewalId(); ProjectRenewalFundDeclaration projectRenewal = projectRenewalFundDeclarationService.getById(projectRenewalId); + VUtils.isTrue(Objects.isNull(projectRenewal)).throwMessage("该续建信息不存在!"); + Project project = projectService.getNewProject(projectRenewal.getProjectId()); + + VUtils.isTrue(Objects.isNull(project)).throwMessage("关联的项目已经被删除!"); if (Boolean.TRUE.equals(param.getResult())){ projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.PASS.name()); }else { @@ -148,6 +154,9 @@ public class ProjectRenewalFundManage { projectRenewal.setAuditOpinion(auditOpinion); projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.NOT_PASS.name()); } + projectRenewal.setRegionCode(project.getAreaCode()); + projectRenewal.setOrgCode(project.getBuildOrgCode()); + projectRenewal.setAuditOpinion(param.getAuditOpinion()); projectRenewal.setUpdateOn(LocalDateTime.now()); projectRenewalFundDeclarationService.updateById(projectRenewal); return projectRenewal.getId();