Explorar el Código

生成21位项目编号

tags/24080901
CMM hace 1 año
padre
commit
0773d8ee30
Se han modificado 2 ficheros con 8 adiciones y 5 borrados
  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 Ver fichero

@@ -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 Ver fichero

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


Cargando…
Cancelar
Guardar