Przeglądaj źródła

生成21位项目编号

tags/24080901
CMM 1 rok temu
rodzic
commit
0773d8ee30
2 zmienionych plików z 8 dodań i 5 usunięć
  1. +0
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java
  2. +8
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java

+ 0
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java Wyświetl plik

@@ -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("项目调整失败");


+ 8
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java Wyświetl plik

@@ -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;


Ładowanie…
Anuluj
Zapisz