Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition
This commit is contained in:
commit
b40728514f
|
|
@ -209,12 +209,25 @@ public class EBomEdit {
|
|||
if(StrUtil.isEmpty(child.getOrderNumber())){
|
||||
child.setOrderNumber("00");
|
||||
}
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||
// parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||
checkExcept(dto.getParent(), child);
|
||||
if (dto.getOpType() == 2) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||
// parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||
checkExcept(dto.getParent(), child);
|
||||
}
|
||||
if (StrUtil.isNotBlank(child.getProjectType())) {
|
||||
child.setProjectType(child.getProjectType().toUpperCase());
|
||||
}
|
||||
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, child.getProjectType(), true)) {
|
||||
if (StrUtil.isBlank(child.getMaterialUnit())) {
|
||||
child.setMaterialUnit("PC");
|
||||
}
|
||||
if (StrUtil.isBlank(child.getMaterialOriginalUnit())) {
|
||||
child.setMaterialOriginalUnit("PC");
|
||||
}
|
||||
if (Objects.isNull(child.getNum())) {
|
||||
child.setNum(BigDecimal.ONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -224,23 +237,27 @@ public class EBomEdit {
|
|||
|
||||
|
||||
private void checkExcept(BomNewEbomParentVO parent, BomNewEbomChildEntity child) {
|
||||
|
||||
if (StrUtil.isBlank(child.getMaterialNo()) || Objects.isNull(child.getNum())
|
||||
|| BigDecimal.ZERO.compareTo(child.getNum()) >= 0) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
|
||||
} else if (StrUtil.isEmpty(child.getProjectType())) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue());
|
||||
} else if (StrUtil.isNotBlank(parent.getProjectType())
|
||||
&& StrUtil.containsAny(parent.getProjectType(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue())) {
|
||||
if (StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(), child.getProjectType())) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_9.getValue());
|
||||
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, child.getProjectType(), true)) {
|
||||
if (StrUtil.isBlank(child.getMaterialDesc())) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
|
||||
}
|
||||
if (StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue(), child.getProjectType())) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_10.getValue());
|
||||
} else {
|
||||
if (StrUtil.isBlank(child.getMaterialNo()) || Objects.isNull(child.getNum())
|
||||
|| BigDecimal.ZERO.compareTo(child.getNum()) >= 0) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
|
||||
} else if (StrUtil.isEmpty(child.getProjectType())) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue());
|
||||
} else if (StrUtil.isNotBlank(parent.getProjectType())
|
||||
&& StrUtil.containsAny(parent.getProjectType(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(), ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue())) {
|
||||
if (StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(), child.getProjectType())) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_9.getValue());
|
||||
}
|
||||
if (StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue(), child.getProjectType())) {
|
||||
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_10.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void checkDataRule(BomNewEBomParentEditDTO dto) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue