From 0773d8ee308d81073dc43d66af29c01674af1c5b Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Tue, 4 Apr 2023 15:20:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=9021=E4=BD=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectdeclared/manage/ProjectAdjustmentManage.java | 2 -- .../pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java | 11 ++++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java index aafb2ae..0dd30c2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java @@ -112,8 +112,6 @@ public class ProjectAdjustmentManage { //先修改项目信息 Project project = new Project(); BeanUtils.copyProperties(projectDto,project); - String projectCode = generateProjectCodeUtil.generateProjectCode(projectDto); - project.setProjectCode(projectCode); project.setUpdateOn(LocalDateTime.now()); if(!projectService.updateById(project)){ throw new BusinessException("项目调整失败"); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java index e0fa5bf..0934ecb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java @@ -34,9 +34,14 @@ public class GenerateProjectCodeUtil { String fixedNumber = DeclaredProjectContant.Project.FIXED_NUMBER; // 获取公司的财政编码 CompanyFiscalCode companyFiscalCode = companyFiscalCodeService.getByOrganizationCode(projectInfo.getBuildOrgCode()); - if (Objects.isNull(companyFiscalCode)){ - throw new BizException("申报单位未配置财政编码!"); - } + + // 从表中查出单位配置的财政编码 + //if (Objects.isNull(companyFiscalCode)){ + // throw new BizException("申报单位未配置财政编码!"); + //} + + // TODO 校验财政编码是否正确 部门编码(3位) + 单位编码(3位) + String fiscalCode = companyFiscalCode.getFiscalCode(); // 获取项目编号 String projectIdStr;