Merge remote-tracking branch 'origin/feature/DM/nflg-bom-transition' into nflg-bom-transition-home-lhj0807

This commit is contained in:
10002327 2024-08-08 14:40:47 +08:00
commit f386e7ad5b
5 changed files with 16 additions and 16 deletions

View File

@ -48,7 +48,7 @@ public class BomNewEbomExportToSAP {
BomNewEbomParentEntity root = bomNewEbomParentService.getById(rootBomRowId);
// VUtils.isTure(Objects.isNull(root)).throwMessage("数据不存在");
if (Objects.isNull(root)) return Collections.emptyList();
VUtils.isTure(root.getUserRootIs() != 1).throwMessage("请选择根节点");
// VUtils.isTure(root.getUserRootIs() != 1).throwMessage("请选择根节点");
VUtils.isTure(Objects.equals(root.getSapState(), SapStatusEnum.PUB_RUNNING.getValue()))
.throwMessage("正在导入中,请等待操作完成");

View File

@ -442,6 +442,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
}
}
child.setChildBomRowId(child.getRowId());
child.setSapState(null);
}
}
}
@ -2181,6 +2182,14 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
EBomExceptionStatusEnum.EXCEPT_NO_10.getValue()
});
if (CollectionUtil.isNotEmpty(eBomEdit.childEntities)) {
List<BomNewEbomParentVO> allBom = Convert.convert(new TypeReference<List<BomNewEbomParentVO>>() {
}, eBomEdit.childEntities);
CheckEBomException checkEBomException = new CheckEBomException(allBom);
checkEBomException.checkContainExcept(checkStatus);
}
if (eBomEdit.getParentEntity() != null) {
@ -2191,13 +2200,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
}
if (CollectionUtil.isNotEmpty(eBomEdit.childEntities)) {
List<BomNewEbomParentVO> allBom = Convert.convert(new TypeReference<List<BomNewEbomParentVO>>() {
}, eBomEdit.childEntities);
CheckEBomException checkEBomException = new CheckEBomException(allBom);
checkEBomException.checkContainExcept(checkStatus);
}
if (CollectionUtil.isNotEmpty(eBomEdit.childEntities)) {

View File

@ -37,7 +37,6 @@ import com.nflg.product.bomnew.util.*;
import lombok.extern.slf4j.Slf4j;
import nflg.product.common.constant.STATE;
import nflg.product.common.vo.ResultVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
@ -356,6 +355,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
child.setSapOrderNum(BomUtil.generateSapOrderNum(child.getProjectType(), child.getMaterialCategoryCode()
, child.getFacCode(), child.getMaterialNo(), child.getBomExist()));
child.setSapState(null);
}
}
}

View File

@ -130,7 +130,7 @@ public class CheckEBomException {
&& (MaterialGetEnum.MaterialStateEnum.STATE_NO_4.equalsValue(vo.getMaterialState())
|| MaterialGetEnum.MaterialStateEnum.STATE_NO_5.equalsValue(vo.getMaterialState()))) {
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_2.getValue());
} else if (StrUtil.isBlank(vo.getMaterialNo()) || Objects.isNull(vo.getNum()) || BigDecimal.ZERO.compareTo(vo.getNum()) >= 0) {
} else if (StrUtil.isBlank(vo.getMaterialNo()) || Objects.isNull(vo.getNum())) {
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
} else if (StrUtil.isNotBlank(vo.getMaterialNo()) && Objects.isNull(vo.getMaterialState())) {
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_7.getValue());

View File

@ -203,11 +203,12 @@ public class EBomEdit {
if(StrUtil.isEmpty(child.getOrderNumber())){
child.setOrderNumber("001");
}
if (dto.getOpType() == 2) {
if (dto.getOpType() == EbomEditStatusEnum.HANDLER_FINISHED.getValue()) {
child.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
// parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
checkExcept(dto.getParent(), child);
}
if (StrUtil.isNotBlank(child.getProjectType())) {
child.setProjectType(child.getProjectType().toUpperCase());
}
@ -241,8 +242,7 @@ public class EBomEdit {
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
}
} else {
if (StrUtil.isBlank(child.getMaterialNo()) || Objects.isNull(child.getNum())
|| BigDecimal.ZERO.compareTo(child.getNum()) >= 0) {
if (StrUtil.isBlank(child.getMaterialNo()) || Objects.isNull(child.getNum())) {
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
} else if (StrUtil.isEmpty(child.getProjectType())) {
child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue());
@ -251,9 +251,7 @@ public class EBomEdit {
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());
// }
}
}