diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/CommonConst.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/CommonConst.java index 67df739..238f416 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/CommonConst.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/CommonConst.java @@ -21,7 +21,9 @@ public interface CommonConst { String PROJECT_DECLARE = "项目申报"; String UNIT_INNER_AUDIT = "单位内部审核"; String PRELIMINARY_PREVIEW = "项目预审"; + String DEPT_UNITED_REVIEW = "部门联审"; + String PROVINCE_UNITED_REVIEW = "省级部门联审"; String ANNUAL_PLAN = "年度计划"; String CONSTRUCTION_PLAN_REVIEW = "建设方案评审"; String PROJECT_APPROVAL = "立项批复"; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java index 7f7dae5..211df2f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java @@ -46,6 +46,12 @@ public class ProjectLibController { return projectLibManage.projectLibListWithPermission(req,user); } + @GetMapping("/history-list/{id}") + @ApiOperation("项目历史版本列表") + public List historyProjects(@PathVariable Long id) { + return projectLibManage.historyProjects(id); + } + @GetMapping("/application/list") @ApiOperation("应用列表") public PageVo applicationList(ProjectApplicationListReq req) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectRenewalFundDeclarationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectRenewalFundDeclarationController.java index 3ba4ab1..587f864 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectRenewalFundDeclarationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectRenewalFundDeclarationController.java @@ -42,42 +42,42 @@ public class ProjectRenewalFundDeclarationController { @GetMapping("/{id}") @ApiOperation("项目续建资金详情") @WebLog("项目续建资金详情") - private ProjectRenewalFundDeclarationVO detail (@PathVariable Long id){ + public ProjectRenewalFundDeclarationVO detail (@PathVariable Long id){ return projectRenewalFundManage.detail(id); } @PostMapping("/declared") @ApiOperation("项目续建资金申请") @WebLog("项目续建资金申请") - private Long declared (@Validated @RequestBody ProjectRenewalFundDeclarationDTO dto){ + public Long declared (@Validated @RequestBody ProjectRenewalFundDeclarationDTO dto){ return projectRenewalFundManage.declared(dto); } @PostMapping("/audit") @ApiOperation("续建项目审核") @WebLog("续建项目审核") - private Long audit(@Validated @RequestBody ProjectRenewalAuditReq param){ + public Long audit(@Validated @RequestBody ProjectRenewalAuditReq param){ return projectRenewalFundManage.audit(param); } @DeleteMapping("/delete/{projectRenewalId}") @ApiOperation("续建项目删除") @WebLog("续建项目删除") - private Long delete(@PathVariable("projectRenewalId") Long projectRenewalId){ + public Long delete(@PathVariable("projectRenewalId") Long projectRenewalId){ return projectRenewalFundManage.delete(projectRenewalId); } @GetMapping("/export") @ApiOperation("项目库续建项目列表导出") @WebLog("项目库续建项目列表导出") - private void exportList(ProjectRenewalListReq req, HttpServletResponse response){ + public void exportList(ProjectRenewalListReq req, HttpServletResponse response){ ExcelDownUtil.downXls(response,req,projectRenewalFundManage::exportList); } @GetMapping("/exportRenewalDeclare") @ApiOperation("申报管理续建项目资金申报列表导出") @WebLog("申报管理续建项目资金申报列表导出") - private void exportRenewalDeclareList(ProjectRenewalListReq req, HttpServletResponse response){ + public void exportRenewalDeclareList(ProjectRenewalListReq req, HttpServletResponse response){ ExcelDownUtil.downXls(response,req,projectRenewalFundManage::exportRenewalDeclareList); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java index 66b081d..6cd3a9f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java @@ -28,13 +28,13 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; * @author CMM * @since 2023/02/24 14:35 */ -@Order(5) +@Order(6) @Component public class AnnualPlanHandle extends AbstractProcessBusinessHandle { private final INdProjectStatusChangeService projectStatusChangeService; private final IProjectService projectService; - private Integer order = 5; + private Integer order = 6; /** * 项目状态为:年度计划中之前的状态 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java index 62ed5c2..75c2482 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java @@ -24,13 +24,13 @@ import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; * @author CMM * @since 2023/02/24 14:35 */ -@Order(11) +@Order(12) @Component public class ArchivedHandle extends AbstractProcessBusinessHandle { private final IProjectService projectService; private final INdProjectStatusChangeService projectStatusChangeService; - private Integer order = 11; + private Integer order = 12; public ArchivedHandle( IProjectService projectService, INdProjectStatusChangeService projectStatusChangeService){ this.projectService = projectService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java index c5ac2e7..7aca628 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java @@ -34,7 +34,7 @@ import com.wflow.workflow.service.ProcessInstanceService; * @author CMM * @since 2023/02/24 14:35 */ -@Order(6) +@Order(7) @Component public class ConstructionPlanReviewHandle extends AbstractProcessBusinessHandle { @@ -44,7 +44,7 @@ public class ConstructionPlanReviewHandle extends AbstractProcessBusinessHandle private final ProjectVersionUtil projectVersionUtil; private final IProjectService projectService; - private Integer order = 6; + private Integer order = 7; public ConstructionPlanReviewHandle(IProjectInstService projectInstService, ProcessInstanceService processInstanceService, BuildUserUtils buildUserUtils, ProjectVersionUtil projectVersionUtil, IProjectService projectService){ this.projectInstService = projectInstService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java index 7072aae..5ecc257 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java @@ -32,7 +32,7 @@ import com.wflow.workflow.service.ProcessInstanceService; * @author CMM * @since 2023/02/24 14:35 */ -@Order(4) +@Order(5) @Component public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle { @@ -43,7 +43,7 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle { private final BuildUserUtils buildUserUtils; private final ProjectVersionUtil projectVersionUtil; - private Integer order = 4; + private Integer order = 5; public DeptUnitedReviewHandle(IProjectInstService projectInstService,IProjectService projectService , ProcessInstanceService processInstanceService, BuildUserUtils buildUserUtils, diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java index 31c6392..653ec4a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java @@ -32,7 +32,7 @@ import java.util.Objects; * @author CMM * @since 2023/02/27 10:09 */ -@Order(3) +@Order(4) @Component public class PreliminaryPreviewHandle extends AbstractProcessBusinessHandle { @@ -42,7 +42,7 @@ public class PreliminaryPreviewHandle extends AbstractProcessBusinessHandle { private final ProjectVersionUtil projectVersionUtil; private final IProjectService projectService; - private Integer order = 3; + private Integer order = 4; public PreliminaryPreviewHandle(IProjectInstService projectInstService, ProcessInstanceService processInstanceService, BuildUserUtils buildUserUtils, ProjectVersionUtil projectVersionUtil, IProjectService projectService) { this.projectInstService = projectInstService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java index 30b187b..2673690 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java @@ -3,8 +3,10 @@ package com.ningdatech.pmapi.projectlib.handle; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.google.common.collect.Lists; import com.ningdatech.pmapi.common.constant.BizConst; +import com.ningdatech.pmapi.common.constant.ProjectDeclareConst; import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.statemachine.contants.RegionContant; +import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.wflow.bean.entity.WflowModels; @@ -56,17 +58,19 @@ public class ProcessExecuteChainHandle { for (AbstractProcessBusinessHandle processBusinessHandle : processBusinessHandles) { if(Objects.nonNull(project) && RegionContant.LS_LQ_CODE.equals(project.getAreaCode())) { if(processBusinessHandle instanceof AnnualPlanHandle){ - processBusinessHandle.setOrder(6); + processBusinessHandle.setOrder(7); }else if(processBusinessHandle instanceof ConstructionPlanReviewHandle){ - processBusinessHandle.setOrder(5); + processBusinessHandle.setOrder(6); } }else{ if(processBusinessHandle instanceof AnnualPlanHandle){ - processBusinessHandle.setOrder(5); - }else if(processBusinessHandle instanceof ConstructionPlanReviewHandle){ processBusinessHandle.setOrder(6); + }else if(processBusinessHandle instanceof ConstructionPlanReviewHandle){ + processBusinessHandle.setOrder(7); } } + + //建设方案 if(processBusinessHandle instanceof ConstructionPlanReviewHandle){ WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) .eq(WflowModels::getRegionCode, project.getAreaCode()) @@ -77,9 +81,15 @@ public class ProcessExecuteChainHandle { handles.add(processBusinessHandle); } } - continue; + }else if(processBusinessHandle instanceof ProvinceUnitedReviewHandle){ + //省级联审 + if (StateMachineUtils.isCityProject(project) && StateMachineUtils.judgeDeclareAmount(project, + ProjectDeclareConst.Number.DECLARE_AMOUNT_JUDGEMENT)){ + handles.add(processBusinessHandle); + } + }else{ + handles.add(processBusinessHandle); } - handles.add(processBusinessHandle); } handles = handles.stream() diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java index 4005e9b..5645ce5 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java @@ -26,14 +26,14 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; * @author CMM * @since 2023/02/24 14:35 */ -@Order(7) +@Order(8) @Component public class ProjectApprovalHandle extends AbstractProcessBusinessHandle { private final INdProjectStatusChangeService projectStatusChangeService; private final IProjectService projectService; private final AnnualPlanLibManage annualPlanLibManage; - private Integer order = 7; + private Integer order = 8; /** * 项目状态为:待立项批复之前的状态 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java index e61217d..b778224 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java @@ -31,7 +31,7 @@ import com.ningdatech.pmapi.common.constant.CommonConst; * @author CMM * @since 2023/02/24 14:35 */ -@Order(10) +@Order(11) @Component public class ProjectFinalInspectionHandle extends AbstractProcessBusinessHandle { private final IProjectInstService projectInstService; @@ -40,7 +40,7 @@ public class ProjectFinalInspectionHandle extends AbstractProcessBusinessHandle private final IProjectService projectService; - private Integer order = 10; + private Integer order = 11; public ProjectFinalInspectionHandle(IProjectInstService projectInstService, ProcessInstanceService processInstanceService, BuildUserUtils buildUserUtils,IProjectService projectService){ this.projectInstService = projectInstService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java index 81d9ed5..e71b0f8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java @@ -29,13 +29,13 @@ import com.ningdatech.pmapi.projectlib.service.IProjectService; * @author CMM * @since 2023/02/24 14:35 */ -@Order(9) +@Order(10) @Component public class ProjectPreliminaryInspectionHandle extends AbstractProcessBusinessHandle { private final INdProjectStatusChangeService projectStatusChangeService; private final IProjectService projectService; - private Integer order = 9; + private Integer order = 10; /** * 项目状态为:建设中及之后的状态 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProvinceUnitedReviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProvinceUnitedReviewHandle.java new file mode 100644 index 0000000..b2982b8 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProvinceUnitedReviewHandle.java @@ -0,0 +1,103 @@ +package com.ningdatech.pmapi.projectlib.handle; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.ningdatech.pmapi.common.constant.CommonConst; +import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange; +import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; +import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; +import org.apache.commons.lang3.StringUtils; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; +import java.util.List; +import java.util.Objects; + +/** + * 省级联审审核处理 + * + * @author CMM + * @since 2023/02/24 14:35 + */ +@Order(3) +@Component +public class ProvinceUnitedReviewHandle extends AbstractProcessBusinessHandle { + private final IProjectService projectService; + private final INdProjectStatusChangeService projectStatusChangeService; + + private Integer order = 3; + + public ProvinceUnitedReviewHandle(IProjectService projectService, + INdProjectStatusChangeService projectStatusChangeService){ + this.projectService = projectService; + this.projectStatusChangeService = projectStatusChangeService; + } + + @Override + void businessHandle(Long projectId, List processSchedule) { + ProcessDetailVO processDetailVO = new ProcessDetailVO(); + + //查询项目 + Project project = projectService.getNewProject(projectId); + List allVersionProjectId = projectService.getAllVersionProjectId(projectId); + + // 根据项目ID查询出部门联审流程的流程状态 + if (Objects.isNull(project)){ + processDetailVO.setStepStatus(StepStatusEnum.NOT_START); + processDetailVO.setProcessName(CommonConst.PROVINCE_UNITED_REVIEW); + processSchedule.add(processDetailVO); + return; + } + + Integer status = project.getStatus(); + if (ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode().equals(status)){ + processDetailVO.setStepStatus(StepStatusEnum.ON_GOING); + ProjectStatusChange startChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class) + .in(ProjectStatusChange::getProjectId, allVersionProjectId) + .eq(ProjectStatusChange::getBeforeStatus, ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()) + .eq(ProjectStatusChange::getAfterStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode())); + if(Objects.nonNull(startChange)){ + processDetailVO.setFinishTime(startChange.getCreateOn()); + } + } else if(status.compareTo(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()) > 0){ + processDetailVO.setStepStatus(StepStatusEnum.COMPLETED); + ProjectStatusChange passChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class) + .in(ProjectStatusChange::getProjectId, allVersionProjectId) + .eq(ProjectStatusChange::getBeforeStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()) + .eq(ProjectStatusChange::getAfterStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode())); + if(Objects.nonNull(passChange)){ + processDetailVO.setFinishTime(passChange.getCreateOn()); + } + }else if(status.compareTo(ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED.getCode()) > 0){ + processDetailVO.setStepStatus(StepStatusEnum.REJECTED); + ProjectStatusChange rejectChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class) + .in(ProjectStatusChange::getProjectId, allVersionProjectId) + .eq(ProjectStatusChange::getBeforeStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()) + .eq(ProjectStatusChange::getAfterStatus, ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED.getCode())); + if(Objects.nonNull(rejectChange)){ + processDetailVO.setFinishTime(rejectChange.getCreateOn()); + } + }else{ + processDetailVO.setStepStatus(StepStatusEnum.NOT_START); + processDetailVO.setProcessName(CommonConst.PROVINCE_UNITED_REVIEW); + processSchedule.add(processDetailVO); + return; + } +// processDetailVO.setProcessProgressVo(project.getSjlsResult()); + processDetailVO.setContent(project.getSjlsResult()); + processDetailVO.setProcessName(CommonConst.PROVINCE_UNITED_REVIEW); + processSchedule.add(processDetailVO); + } + + @Override + Integer getOrder() { + return order; + } + + @Override + void setOrder(Integer order) { + this.order = order; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java index 00be16a..62f99c4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java @@ -27,13 +27,13 @@ import com.ningdatech.pmapi.projectlib.service.IProjectService; * @author CMM * @since 2023/02/24 14:35 */ -@Order(8) +@Order(9) @Component public class TenderPurchaseHandle extends AbstractProcessBusinessHandle { private final INdProjectStatusChangeService projectStatusChangeService; private final IProjectService projectService; - private Integer order = 8; + private Integer order = 9; /** * 项目状态为:建设中及之后的状态 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index feaa409..03566a3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -817,4 +817,29 @@ public class ProjectLibManage { }) .collect(Collectors.toList()); } + + /** + * 历史版本 项目列表 + * @param id + * @return + */ + public List historyProjects(Long id) { + Project project = projectService.getById(id); + + if(Objects.isNull(project)){ + return Collections.emptyList(); + } + + List historyProjects = projectService.list(Wrappers.lambdaQuery(Project.class) + .eq(Project::getProjectCode, project.getProjectCode()) + .orderByDesc(Project::getCreateOn)); + + if(CollUtil.isEmpty(historyProjects)){ + return Collections.emptyList(); + } + + return historyProjects.stream() + .map(p -> BeanUtil.copyProperties(p,ProjectDetailVO.class)) + .collect(Collectors.toList()); + } } 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(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 2a9e516..994889d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -3,6 +3,7 @@ package com.ningdatech.pmapi.projectlib.model.vo; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.annotation.JSONField; import com.fasterxml.jackson.annotation.JsonFormat; +import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.common.util.BizUtils; import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; @@ -367,6 +368,18 @@ public class ProjectDetailVO { @ApiModelProperty("初审人员") private List acceptancePersons; + @ApiModelProperty("版本号str") + private String versionStr; + + public String getVersionStr() { + if (Objects.nonNull(this.newest) && this.newest) { + this.versionStr = "当前版本"; + return this.versionStr; + } + this.versionStr = "v" + NdDateUtils.format(this.createOn,"yyyyMMddHHmmss"); + return this.versionStr; + } + public String getProjectTypeName() { if (Objects.nonNull(this.projectType)) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/ProjectStatusFlowUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/ProjectStatusFlowUtil.java index e719b60..4e9127d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/ProjectStatusFlowUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/ProjectStatusFlowUtil.java @@ -41,5 +41,6 @@ public class ProjectStatusFlowUtil { intervalTimeMap.put(8,60 * 60 * 12); intervalTimeMap.put(9,60 * 60 * 24); intervalTimeMap.put(10,60 * 60 * 72); + intervalTimeMap.put(11,60 * 60 * 216); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/WorkNoticeFlowMapUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/WorkNoticeFlowMapUtil.java index 762c3f5..c5e404e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/WorkNoticeFlowMapUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/staging/utils/WorkNoticeFlowMapUtil.java @@ -37,5 +37,6 @@ public class WorkNoticeFlowMapUtil { intervalTimeMap.put(8,60 * 60 * 12); intervalTimeMap.put(9,60 * 60 * 24); intervalTimeMap.put(10,60 * 60 * 72); + intervalTimeMap.put(11,60 * 60 * 216); } } diff --git a/pmapi/src/test/resources/application-prod.yml b/pmapi/src/test/resources/application-prod.yml index f085ff9..7f9325a 100644 --- a/pmapi/src/test/resources/application-prod.yml +++ b/pmapi/src/test/resources/application-prod.yml @@ -208,7 +208,10 @@ irs: access-key: 42bcb49bea174986a3bfdfba7d005566 secret-key: bebff29877d4443abd67fc4f8fb335d8 api-url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020220309000004/seal-platform/seal/v1/rest/sign/signPdf - + app-report: + url: https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020230427000001/irs-res-bill/report/pdfUrl + appScret: BCDSGS_4ab4235d26a9a357170a39f3a13fd68c + appKey: BCDSGA_d874c8e46b541eb4e8aac6510fd3351b hostname: iZ6mx01gyeodd80imxd2gbZ login: phone-verify-code: diff --git a/pmapi/src/test/resources/application.yml b/pmapi/src/test/resources/application.yml index 3d7808a..9f96606 100644 --- a/pmapi/src/test/resources/application.yml +++ b/pmapi/src/test/resources/application.yml @@ -1,3 +1,3 @@ spring: profiles: - active: dev + active: prod diff --git a/pmapi/src/test/resources/integration/zwdd-prod.yml b/pmapi/src/test/resources/integration/zwdd-prod.yml index cc28814..6b30e1b 100644 --- a/pmapi/src/test/resources/integration/zwdd-prod.yml +++ b/pmapi/src/test/resources/integration/zwdd-prod.yml @@ -1,12 +1,12 @@ -#专有钉钉 +#浙政钉 integration: zwdd: #扫码 - app-auth-key: ls-rebuild_dingoa-rgeWs3YVr26z - app-auth-secret: 37qCe6ylNMW0N8K2741z0c2b9vJP2gtuMRQQtZ9P + app-auth-key: ls_project_managment_din-b1Y3I1g7Rr94yX76KfFkpp18Uy4WHtU0b6rINJ3 + app-auth-secret: 75e8PMHv984KYF0Mcy6v4pxt480y73dbD7kB65dD #免登/获取信息 - app-key: ls_rebuild-10c8n5X0707yFV7jURr - app-secret: gN8J3WazyXLMWKDuFmx6C4yaH5lFUY41x8rYLLo6 + app-key: ls_project-c32LNu87v60UiANZVja + app-secret: R14QgbBr21751LTGml3Vt8oX9doPl4Lk1ROzZNfG #专有钉钉在开发管理工作台,右键查看网页源码realmId: '31141',浙政钉固定196729 - tenantId: 31141 - domain: openplatform.dg-work.cn \ No newline at end of file + tenantId: 196729 + domain: openplatform-pro.ding.zj.gov.cn \ No newline at end of file