Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition

# Conflicts:
#	nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java
This commit is contained in:
曹鹏飞 2024-05-17 14:18:04 +08:00
commit 7ddac0bae0
2 changed files with 9 additions and 3 deletions

View File

@ -119,7 +119,11 @@ public class CheckEBomException {
// .orElse(null);
vo.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
// }
if (StrUtil.isNotBlank(vo.getMaterialNo())
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, vo.getProjectType(), true)) {
if (StrUtil.isBlank(vo.getMaterialDesc())) {
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_17.getValue());
}
} else {if (StrUtil.isNotBlank(vo.getMaterialNo())
&& (MaterialGetEnum.MaterialStateEnum.STATE_NO_4.equalsValue(vo.getMaterialState())
|| MaterialGetEnum.MaterialStateEnum.STATE_NO_5.equalsValue(vo.getMaterialState()))) {
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_2.getValue());
@ -141,9 +145,8 @@ public class CheckEBomException {
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_16.getValue());
}
else if (EBomConstant.PROJECT_TYPE_T.equalsIgnoreCase(vo.getProjectType()) && StrUtil.isBlank(vo.getMaterialDesc())){
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_17.getValue());
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_17.getValue());}
}
}
checkOther();
}

View File

@ -100,6 +100,7 @@ public class EBomEdit {
parent.setExpireEndTime( LocalDateTime.parse("9999-12-31 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") ));
parent.setRootIs(0);
parent.setUserRootIs(0);
parent.setMaterialOriginalUnit(parent.getMaterialUnit());
// Integer rootIs =SpringUtil.getBean(BomNewEbomParentService.class).getBaseMapper().checkIsRoot(parent.getMaterialNo());
// Integer userRootIs = SpringUtil.getBean(BomNewEbomParentService.class).getBaseMapper().checkIsUserRoot(parent.getMaterialNo(), parent.getCreatedBy());
@ -131,6 +132,8 @@ public class EBomEdit {
parentEntity = createParentBomInfo(createDTO.getParent());
parentEntity.setEditStatus(createDTO.getOpType());
parentEntity.setRootIs(parentEntity.getMaterialNo().startsWith("31") ? 1 : 0);
parentEntity.setUserRootIs(1);
createDTO.getDatas().forEach(k -> {
k.setParentRowId(parentEntity.getRowId());