Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition
This commit is contained in:
commit
8b9bbb1ce8
|
|
@ -84,41 +84,34 @@ public class CheckEBomException {
|
||||||
*/
|
*/
|
||||||
public void initException() {
|
public void initException() {
|
||||||
//初始化物料信息
|
//初始化物料信息
|
||||||
List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
// List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||||
|
|
||||||
checkException(materialBaseInfo);
|
|
||||||
|
|
||||||
|
checkException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initException(List<Integer> unCheckException) {
|
public void initException(List<Integer> unCheckException) {
|
||||||
//初始化物料信息
|
//初始化物料信息
|
||||||
List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
// List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||||
this.unCheckExcept=unCheckException;
|
this.unCheckExcept=unCheckException;
|
||||||
checkException(materialBaseInfo);
|
checkException();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initException(String... ignorePropertyList) {
|
public void initException(String... ignorePropertyList) {
|
||||||
List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList);
|
// List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList);
|
||||||
checkException(materialBaseInfo);
|
checkException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void checkException(List<BaseMaterialVO> materialBaseInfo) {
|
public void checkException() {
|
||||||
for (BomNewEbomParentVO vo : allBomDetail) {
|
for (BomNewEbomParentVO vo : allBomDetail) {
|
||||||
// if(Objects.isNull(vo.getExceptionStatus())) {
|
|
||||||
//忽略不检查的如14
|
//忽略不检查的如14
|
||||||
if (CollectionUtil.isNotEmpty(unCheckExcept)
|
if (CollectionUtil.isNotEmpty(unCheckExcept)
|
||||||
&& vo.getExceptionStatus() != null
|
&& vo.getExceptionStatus() != null
|
||||||
&& unCheckExcept.contains(vo.getExceptionStatus())) {
|
&& unCheckExcept.contains(vo.getExceptionStatus())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// BaseMaterialVO mainVO = materialBaseInfo.stream()
|
|
||||||
// .filter(u -> StrUtil.equals(u.getMaterialNo(), vo.getMaterialNo()))
|
|
||||||
// .findFirst()
|
|
||||||
// .orElse(null);
|
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||||
// }
|
|
||||||
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, vo.getProjectType(), true)) {
|
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, vo.getProjectType(), true)) {
|
||||||
if (StrUtil.isBlank(vo.getMaterialDesc())) {
|
if (StrUtil.isBlank(vo.getMaterialDesc())) {
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
|
||||||
|
|
@ -137,7 +130,6 @@ public class CheckEBomException {
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue());
|
||||||
} else if ((!StrUtil.equals("KG", StringUtil.toUpperCase(vo.getMaterialUnit()))
|
} else if ((!StrUtil.equals("KG", StringUtil.toUpperCase(vo.getMaterialUnit()))
|
||||||
&& !StrUtil.equals(StringUtil.toUpperCase(vo.getMaterialUnit()), "PC"))
|
&& !StrUtil.equals(StringUtil.toUpperCase(vo.getMaterialUnit()), "PC"))
|
||||||
//|| (!Objects.isNull(mainVO) && !StrUtil.equals(vo.getMaterialUnit(), mainVO.getMaterialUnit()))) {
|
|
||||||
&& (StrUtil.isBlank(vo.getExceptionTag()) || (!vo.getExceptionTag().contains("16")) && !vo.getExceptionTag().contains("12"))
|
&& (StrUtil.isBlank(vo.getExceptionTag()) || (!vo.getExceptionTag().contains("16")) && !vo.getExceptionTag().contains("12"))
|
||||||
&& Objects.equals(vo.getSource(), EBomSourceEnum.FROM_BOM.getValue())) {
|
&& Objects.equals(vo.getSource(), EBomSourceEnum.FROM_BOM.getValue())) {
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_12.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_12.getValue());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue