@@ -1,12 +1,11 @@ | |||||
package com.hz.pm.api.projectlib.manage; | package com.hz.pm.api.projectlib.manage; | ||||
import cn.hutool.core.collection.CollUtil; | 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.Wrapper; | ||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 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.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 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.helper.UserInfoHelper; | ||||
import com.hz.pm.api.common.util.DecimalUtil; | import com.hz.pm.api.common.util.DecimalUtil; | ||||
import com.hz.pm.api.datascope.model.DataScopeDTO; | 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.helper.MhUnitCache; | ||||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | import com.hz.pm.api.user.security.model.UserFullInfoDTO; | ||||
import com.hz.pm.api.user.util.LoginUserUtil; | import com.hz.pm.api.user.util.LoginUserUtil; | ||||
import com.ningdatech.basic.exception.BizException; | |||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
@@ -158,7 +156,7 @@ public class AmountApprovalManage { | |||||
Project project = projectService.getNewestNoNull(req.getProjectId()); | Project project = projectService.getNewestNoNull(req.getProjectId()); | ||||
if (ProjectStatus.STOPPED.eq(project.getStage()) | if (ProjectStatus.STOPPED.eq(project.getStage()) | ||||
|| ProjectStatus.CHANGE.eq(project.getStage())) { | || ProjectStatus.CHANGE.eq(project.getStage())) { | ||||
throw BizException.wrap("暂不允许下达资金"); | |||||
throw ReturnException.wrap("暂不允许下达资金"); | |||||
} | } | ||||
Wrapper<Project> wrapper = Wrappers.lambdaUpdate(Project.class) | Wrapper<Project> wrapper = Wrappers.lambdaUpdate(Project.class) | ||||
.set(Project::getApprovalAmountFile, req.getApprovalAmountFile()) | .set(Project::getApprovalAmountFile, req.getApprovalAmountFile()) | ||||
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
import com.hz.pm.api.common.enumeration.CommonEnum; | 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.helper.UserInfoHelper; | ||||
import com.hz.pm.api.common.model.constant.CommonConst; | import com.hz.pm.api.common.model.constant.CommonConst; | ||||
import com.hz.pm.api.common.model.constant.ExistsSqlConst; | import com.hz.pm.api.common.model.constant.ExistsSqlConst; | ||||
@@ -129,7 +130,7 @@ public class AnnualPlanLibManage { | |||||
List<Project> projects = projectService.listByIds(req.getProjectIds()); | List<Project> projects = projectService.listByIds(req.getProjectIds()); | ||||
projects.forEach(w -> { | projects.forEach(w -> { | ||||
if (!ON_ANNUAL_PLAN.eq(w.getStatus())) { | if (!ON_ANNUAL_PLAN.eq(w.getStatus())) { | ||||
throw BizException.wrap("开启方案申报失败"); | |||||
throw ReturnException.wrap("开启方案申报失败"); | |||||
} | } | ||||
}); | }); | ||||
projects.forEach(w -> { | projects.forEach(w -> { | ||||
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
import com.hz.pm.api.common.enumeration.ProjectProcessType; | 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.external.model.enumeration.MhUnitStripEnum; | ||||
import com.hz.pm.api.projectdeclared.model.entity.ProjectChangeHistory; | import com.hz.pm.api.projectdeclared.model.entity.ProjectChangeHistory; | ||||
import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper; | import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper; | ||||
@@ -86,7 +87,7 @@ public class ProjectChangeManage { | |||||
Project project = projectService.getNewProject(reqProj.getId()); | Project project = projectService.getNewProject(reqProj.getId()); | ||||
if (ProjectStatus.ON_CHANGE_APPLY.eq(project.getStatus()) || | if (ProjectStatus.ON_CHANGE_APPLY.eq(project.getStatus()) || | ||||
ProjectStatus.STOPPED_PASSED.eq(project.getStatus())) { | ProjectStatus.STOPPED_PASSED.eq(project.getStatus())) { | ||||
throw BizException.wrap("暂无法提交变更申请"); | |||||
throw ReturnException.wrap("暂无法提交变更申请"); | |||||
} | } | ||||
ProjectDetailVO projDetailOld = projectLibManage.getProjectDetail(project); | ProjectDetailVO projDetailOld = projectLibManage.getProjectDetail(project); | ||||
List<FieldDiff> projDiffs = ProjectDetailDiffUtil.diff(projDetailOld, projJsonObj, true, | List<FieldDiff> projDiffs = ProjectDetailDiffUtil.diff(projDetailOld, projJsonObj, true, | ||||
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
import com.hz.pm.api.common.enumeration.ProjectProcessType; | 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.common.util.BizUtils; | ||||
import com.hz.pm.api.external.model.enumeration.MhUnitStripEnum; | import com.hz.pm.api.external.model.enumeration.MhUnitStripEnum; | ||||
import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper; | import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper; | ||||
@@ -69,7 +70,7 @@ public class ProjectStoppedManage { | |||||
Project project = projectService.getNewProject(req.getProjectId()); | Project project = projectService.getNewProject(req.getProjectId()); | ||||
if (ProjectStatus.STOPPED_PASSED.eq(project.getStatus()) || | if (ProjectStatus.STOPPED_PASSED.eq(project.getStatus()) || | ||||
ProjectStatus.ON_STOPPED_APPLY.eq(project.getStatus())) { | ProjectStatus.ON_STOPPED_APPLY.eq(project.getStatus())) { | ||||
throw BizException.wrap("暂无法提交终止申请"); | |||||
throw ReturnException.wrap("暂无法提交终止申请"); | |||||
} | } | ||||
project.setStoppedFiles(req.getStoppedFiles()); | project.setStoppedFiles(req.getStoppedFiles()); | ||||
project.setStoppedReason(req.getStoppedReason()); | project.setStoppedReason(req.getStoppedReason()); | ||||
@@ -156,7 +157,7 @@ public class ProjectStoppedManage { | |||||
public ProjectStoppedDetailVO detail(Long projectId) { | public ProjectStoppedDetailVO detail(Long projectId) { | ||||
Project project = projectService.getById(projectId); | Project project = projectService.getById(projectId); | ||||
if (project == null) { | if (project == null) { | ||||
throw BizException.wrap("项目不存在"); | |||||
throw ReturnException.wrap("项目不存在"); | |||||
} | } | ||||
return ProjectStoppedDetailVO.builder() | return ProjectStoppedDetailVO.builder() | ||||
.projectId(project.getId()) | .projectId(project.getId()) | ||||
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 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.common.util.BizUtils; | ||||
import com.hz.pm.api.projectlib.entity.*; | import com.hz.pm.api.projectlib.entity.*; | ||||
import com.hz.pm.api.projectlib.model.dto.MhSystemReplaceInfoVO; | 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; | ||||
import com.hz.pm.api.user.helper.MhUnitQueryHelper.UnitQueryState; | import com.hz.pm.api.user.helper.MhUnitQueryHelper.UnitQueryState; | ||||
import com.hz.pm.api.user.util.LoginUserUtil; | import com.hz.pm.api.user.util.LoginUserUtil; | ||||
import com.ningdatech.basic.exception.BizException; | |||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
@@ -59,7 +59,7 @@ public class QxProjectManage { | |||||
.eq(QxProject::getProjectName, projectName) | .eq(QxProject::getProjectName, projectName) | ||||
.eq(QxProject::getBuildOrgCode, buildOrgCode); | .eq(QxProject::getBuildOrgCode, buildOrgCode); | ||||
if (qxProjectService.count(query) > 0) { | if (qxProjectService.count(query) > 0) { | ||||
throw BizException.wrap("项目已存在"); | |||||
throw ReturnException.wrap("项目已存在"); | |||||
} | } | ||||
} | } | ||||
@@ -124,7 +124,7 @@ public class QxProjectManage { | |||||
public synchronized void submitPurchaseRecord(QxPurchaseRecordReq req) { | public synchronized void submitPurchaseRecord(QxPurchaseRecordReq req) { | ||||
QxProject project = qxProjectService.getById(req.getProjectId()); | QxProject project = qxProjectService.getById(req.getProjectId()); | ||||
if (!QxProjectStatus.DECLARED.eq(project.getStatus())) { | if (!QxProjectStatus.DECLARED.eq(project.getStatus())) { | ||||
throw BizException.wrap("当前状态不允许采购备案"); | |||||
throw ReturnException.wrap("当前状态不允许采购备案"); | |||||
} | } | ||||
QxPurchase purchase = qxPurchaseService.getByProjectId(req.getProjectId()); | QxPurchase purchase = qxPurchaseService.getByProjectId(req.getProjectId()); | ||||
if (purchase == null) { | if (purchase == null) { | ||||
@@ -146,7 +146,7 @@ public class QxProjectManage { | |||||
public void submitAcceptRecord(QxAcceptRecordReq req) { | public void submitAcceptRecord(QxAcceptRecordReq req) { | ||||
QxProject project = qxProjectService.getById(req.getProjectId()); | QxProject project = qxProjectService.getById(req.getProjectId()); | ||||
if (!QxProjectStatus.UPGRADED.eq(project.getStatus())) { | if (!QxProjectStatus.UPGRADED.eq(project.getStatus())) { | ||||
throw BizException.wrap("当前状态不允许验收备案"); | |||||
throw ReturnException.wrap("当前状态不允许验收备案"); | |||||
} | } | ||||
Wrapper<QxPurchase> update = Wrappers.lambdaUpdate(QxPurchase.class) | Wrapper<QxPurchase> update = Wrappers.lambdaUpdate(QxPurchase.class) | ||||
.eq(QxPurchase::getProjectId, req.getProjectId()) | .eq(QxPurchase::getProjectId, req.getProjectId()) | ||||
@@ -164,7 +164,7 @@ public class QxProjectManage { | |||||
public void submitUpgradeRecord(QxUpgradeRecordReq req) { | public void submitUpgradeRecord(QxUpgradeRecordReq req) { | ||||
QxProject project = qxProjectService.getById(req.getProjectId()); | QxProject project = qxProjectService.getById(req.getProjectId()); | ||||
if (!QxProjectStatus.PURCHASED.eq(project.getStatus())) { | if (!QxProjectStatus.PURCHASED.eq(project.getStatus())) { | ||||
throw BizException.wrap("当前状态不允许改造提升备案"); | |||||
throw ReturnException.wrap("当前状态不允许改造提升备案"); | |||||
} | } | ||||
List<QxProjectSystemReplaceInfosDTO> replaceInfos = req.getSystemReplaceInfos(); | List<QxProjectSystemReplaceInfosDTO> replaceInfos = req.getSystemReplaceInfos(); | ||||
List<QxProjectSystemReplaceInfos> projectSystemReplaceInfos = new ArrayList<>(); | List<QxProjectSystemReplaceInfos> projectSystemReplaceInfos = new ArrayList<>(); | ||||