浏览代码

modify:

1. 终止异常替换;
tags/24090601
WendyYang 2 个月前
父节点
当前提交
2139cb47c9
共有 5 个文件被更改,包括 14 次插入13 次删除
  1. +2
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AmountApprovalManage.java
  2. +2
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AnnualPlanLibManage.java
  3. +2
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectChangeManage.java
  4. +3
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectStoppedManage.java
  5. +5
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/QxProjectManage.java

+ 2
- 4
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AmountApprovalManage.java 查看文件

@@ -1,12 +1,11 @@
package com.hz.pm.api.projectlib.manage;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.util.DecimalUtil;
import com.hz.pm.api.datascope.model.DataScopeDTO;
@@ -22,7 +21,6 @@ import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.user.helper.MhUnitCache;
import com.hz.pm.api.user.security.model.UserFullInfoDTO;
import com.hz.pm.api.user.util.LoginUserUtil;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import lombok.RequiredArgsConstructor;
@@ -158,7 +156,7 @@ public class AmountApprovalManage {
Project project = projectService.getNewestNoNull(req.getProjectId());
if (ProjectStatus.STOPPED.eq(project.getStage())
|| ProjectStatus.CHANGE.eq(project.getStage())) {
throw BizException.wrap("暂不允许下达资金");
throw ReturnException.wrap("暂不允许下达资金");
}
Wrapper<Project> wrapper = Wrappers.lambdaUpdate(Project.class)
.set(Project::getApprovalAmountFile, req.getApprovalAmountFile())


+ 2
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AnnualPlanLibManage.java 查看文件

@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.enumeration.CommonEnum;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.CommonConst;
import com.hz.pm.api.common.model.constant.ExistsSqlConst;
@@ -129,7 +130,7 @@ public class AnnualPlanLibManage {
List<Project> projects = projectService.listByIds(req.getProjectIds());
projects.forEach(w -> {
if (!ON_ANNUAL_PLAN.eq(w.getStatus())) {
throw BizException.wrap("开启方案申报失败");
throw ReturnException.wrap("开启方案申报失败");
}
});
projects.forEach(w -> {


+ 2
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectChangeManage.java 查看文件

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.enumeration.ProjectProcessType;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.external.model.enumeration.MhUnitStripEnum;
import com.hz.pm.api.projectdeclared.model.entity.ProjectChangeHistory;
import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper;
@@ -86,7 +87,7 @@ public class ProjectChangeManage {
Project project = projectService.getNewProject(reqProj.getId());
if (ProjectStatus.ON_CHANGE_APPLY.eq(project.getStatus()) ||
ProjectStatus.STOPPED_PASSED.eq(project.getStatus())) {
throw BizException.wrap("暂无法提交变更申请");
throw ReturnException.wrap("暂无法提交变更申请");
}
ProjectDetailVO projDetailOld = projectLibManage.getProjectDetail(project);
List<FieldDiff> projDiffs = ProjectDetailDiffUtil.diff(projDetailOld, projJsonObj, true,


+ 3
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectStoppedManage.java 查看文件

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.enumeration.ProjectProcessType;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.util.BizUtils;
import com.hz.pm.api.external.model.enumeration.MhUnitStripEnum;
import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper;
@@ -69,7 +70,7 @@ public class ProjectStoppedManage {
Project project = projectService.getNewProject(req.getProjectId());
if (ProjectStatus.STOPPED_PASSED.eq(project.getStatus()) ||
ProjectStatus.ON_STOPPED_APPLY.eq(project.getStatus())) {
throw BizException.wrap("暂无法提交终止申请");
throw ReturnException.wrap("暂无法提交终止申请");
}
project.setStoppedFiles(req.getStoppedFiles());
project.setStoppedReason(req.getStoppedReason());
@@ -156,7 +157,7 @@ public class ProjectStoppedManage {
public ProjectStoppedDetailVO detail(Long projectId) {
Project project = projectService.getById(projectId);
if (project == null) {
throw BizException.wrap("项目不存在");
throw ReturnException.wrap("项目不存在");
}
return ProjectStoppedDetailVO.builder()
.projectId(project.getId())


+ 5
- 5
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/QxProjectManage.java 查看文件

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.util.BizUtils;
import com.hz.pm.api.projectlib.entity.*;
import com.hz.pm.api.projectlib.model.dto.MhSystemReplaceInfoVO;
@@ -22,7 +23,6 @@ import com.hz.pm.api.projectlib.service.*;
import com.hz.pm.api.user.helper.MhUnitQueryHelper;
import com.hz.pm.api.user.helper.MhUnitQueryHelper.UnitQueryState;
import com.hz.pm.api.user.util.LoginUserUtil;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import lombok.RequiredArgsConstructor;
@@ -59,7 +59,7 @@ public class QxProjectManage {
.eq(QxProject::getProjectName, projectName)
.eq(QxProject::getBuildOrgCode, buildOrgCode);
if (qxProjectService.count(query) > 0) {
throw BizException.wrap("项目已存在");
throw ReturnException.wrap("项目已存在");
}
}

@@ -124,7 +124,7 @@ public class QxProjectManage {
public synchronized void submitPurchaseRecord(QxPurchaseRecordReq req) {
QxProject project = qxProjectService.getById(req.getProjectId());
if (!QxProjectStatus.DECLARED.eq(project.getStatus())) {
throw BizException.wrap("当前状态不允许采购备案");
throw ReturnException.wrap("当前状态不允许采购备案");
}
QxPurchase purchase = qxPurchaseService.getByProjectId(req.getProjectId());
if (purchase == null) {
@@ -146,7 +146,7 @@ public class QxProjectManage {
public void submitAcceptRecord(QxAcceptRecordReq req) {
QxProject project = qxProjectService.getById(req.getProjectId());
if (!QxProjectStatus.UPGRADED.eq(project.getStatus())) {
throw BizException.wrap("当前状态不允许验收备案");
throw ReturnException.wrap("当前状态不允许验收备案");
}
Wrapper<QxPurchase> update = Wrappers.lambdaUpdate(QxPurchase.class)
.eq(QxPurchase::getProjectId, req.getProjectId())
@@ -164,7 +164,7 @@ public class QxProjectManage {
public void submitUpgradeRecord(QxUpgradeRecordReq req) {
QxProject project = qxProjectService.getById(req.getProjectId());
if (!QxProjectStatus.PURCHASED.eq(project.getStatus())) {
throw BizException.wrap("当前状态不允许改造提升备案");
throw ReturnException.wrap("当前状态不允许改造提升备案");
}
List<QxProjectSystemReplaceInfosDTO> replaceInfos = req.getSystemReplaceInfos();
List<QxProjectSystemReplaceInfos> projectSystemReplaceInfos = new ArrayList<>();


正在加载...
取消
保存