Browse Source

modify:

1. 项目评审提交修改;
tags/24093001
WendyYang 3 months ago
parent
commit
cc8111f703
1 changed files with 6 additions and 10 deletions
  1. +6
    -10
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java

+ 6
- 10
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java View File

@@ -10,6 +10,7 @@ import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.helper.UserInfoHelper; import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.BizConst; import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.ExistsSqlConst; import com.hz.pm.api.common.model.constant.ExistsSqlConst;
import com.hz.pm.api.common.model.constant.MhUnitConst;
import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent; import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent;
import com.hz.pm.api.common.statemachine.util.ProjectStateMachineUtil; import com.hz.pm.api.common.statemachine.util.ProjectStateMachineUtil;
import com.hz.pm.api.common.util.BizUtils; import com.hz.pm.api.common.util.BizUtils;
@@ -102,7 +103,6 @@ public class ProjectReviewManage {
String instanceId = processInstanceService.startProcessLs(model, processParam, orgMap); String instanceId = processInstanceService.startProcessLs(model, processParam, orgMap);


BeanUtils.copyProperties(reqProj, project); BeanUtils.copyProperties(reqProj, project);
projectStateMachineUtil.pass(project);
if (projectService.updateById(project)) { if (projectService.updateById(project)) {
projectSaveHelper.saveApplication(reqProj, project, null); projectSaveHelper.saveApplication(reqProj, project, null);
projectSaveHelper.savePaymentPlans(project, reqProj.getPaymentPlanList()); projectSaveHelper.savePaymentPlans(project, reqProj.getPaymentPlanList());
@@ -282,7 +282,7 @@ public class ProjectReviewManage {
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> {
projectIds.add(w.getId()); projectIds.add(w.getId());
ProjectLibListItemVO item = BeanUtil.copyProperties(w, ProjectLibListItemVO.class); ProjectLibListItemVO item = BeanUtil.copyProperties(w, ProjectLibListItemVO.class);
if (!ProjectStatus.EXPERT_REVIEW_PASSED.eq(w.getStatus())
if (!ProjectStatus.EXPERT_REVIEW_FAILED.eq(w.getStatus())
&& !ProjectStatus.COMPLIANCE_REVIEW_PASSED.eq(w.getStatus()) && !ProjectStatus.COMPLIANCE_REVIEW_PASSED.eq(w.getStatus())
&& !ProjectStatus.WITHOUT_EXPERT_REVIEW.eq(w.getStatus()) && !ProjectStatus.WITHOUT_EXPERT_REVIEW.eq(w.getStatus())
&& !ProjectStatus.ON_EXPERT_REVIEW.eq(w.getStatus()) && !ProjectStatus.ON_EXPERT_REVIEW.eq(w.getStatus())
@@ -329,18 +329,14 @@ public class ProjectReviewManage {
} }
List<String> viewUnitIdList = CollUtils.convert(childUnitIds, String::valueOf); List<String> viewUnitIdList = CollUtils.convert(childUnitIds, String::valueOf);
//单位管理员 看到自己单位去申报的 + 待预审的主管单位是自己单位的项目 //单位管理员 看到自己单位去申报的 + 待预审的主管单位是自己单位的项目
query.and(q1 -> q1.in(Project::getBuildOrgCode, viewUnitIdList)
.or(q2 -> q2.eq(Project::getStage, ProjectStatus.NOT_APPROVED.getCode())
.in(Project::getSuperOrgCode, viewUnitIdList)));
query.in(Project::getBuildOrgCode, viewUnitIdList);
} }
break; break;
case SUPER_ADMIN: { case SUPER_ADMIN: {
if (declaredUnitId != null) {
if (declaredUnitId != null && MhUnitConst.ROOT_UNIT_ID != declaredUnitId) {
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(declaredUnitId); List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(declaredUnitId);
List<String> viewUnitIdList = CollUtils.convert(viewUnitIds, String::valueOf); List<String> viewUnitIdList = CollUtils.convert(viewUnitIds, String::valueOf);
query.and(q1 -> q1.in(Project::getBuildOrgCode, viewUnitIdList)
.or(q2 -> q2.eq(Project::getStage, ProjectStatus.NOT_APPROVED.getCode())
.in(Project::getSuperOrgCode, viewUnitIdList)));
query.in(Project::getBuildOrgCode, viewUnitIdList);
} }
} }
break; break;
@@ -360,7 +356,7 @@ public class ProjectReviewManage {


public void uploadConstructionPlanSealFile(UploadConstructionPlanSealFileReq req) { public void uploadConstructionPlanSealFile(UploadConstructionPlanSealFileReq req) {
Project project = projectService.getNewProject(req.getProjectId()); Project project = projectService.getNewProject(req.getProjectId());
if (project == null || (ProjectStatus.WITHOUT_EXPERT_REVIEW.eq(project.getStatus())
if (project == null || (!ProjectStatus.WITHOUT_EXPERT_REVIEW.eq(project.getStatus())
&& !ProjectStatus.EXPERT_REVIEW_FAILED.eq(project.getStatus()))) { && !ProjectStatus.EXPERT_REVIEW_FAILED.eq(project.getStatus()))) {
throw ReturnException.wrap("项目不存在或项目状态异常"); throw ReturnException.wrap("项目不存在或项目状态异常");
} }


Loading…
Cancel
Save