parent
9af6e14072
commit
4c7efaa05a
|
|
@ -301,21 +301,26 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
|
||||||
BomNewPbomParentEntity cp = getParent(it);
|
BomNewPbomParentEntity cp = getParent(it);
|
||||||
if (Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
if (Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
||||||
if (Objects.nonNull(cRowId)) {
|
if (Objects.nonNull(cRowId)) {
|
||||||
T1ExtDTO cct = cmap.get(cRowId).stream()
|
// T1ExtDTO cct = cmap.get(cRowId).stream()
|
||||||
.filter(ct -> (StrUtil.equals(ct.getPOSTP(), BomConstant.PROJECT_TYPE_TEMPORARY, true) && StrUtil.equals(ct.getPOTX1(), it.getMaterialDesc()))
|
// .filter(ct -> (StrUtil.equals(ct.getPOSTP(), BomConstant.PROJECT_TYPE_TEMPORARY, true) && StrUtil.equals(ct.getPOTX1(), it.getMaterialDesc()))
|
||||||
|| (!StrUtil.equals(ct.getPOSTP(), BomConstant.PROJECT_TYPE_TEMPORARY, true) && StrUtil.equals(ct.getIDNRK(), it.getMaterialNo())))
|
// || (!StrUtil.equals(ct.getPOSTP(), BomConstant.PROJECT_TYPE_TEMPORARY, true) && StrUtil.equals(ct.getIDNRK(), it.getMaterialNo())))
|
||||||
.findFirst()
|
// .findFirst()
|
||||||
.orElse(null);
|
// .orElse(null);
|
||||||
if (Objects.isNull(cct)) {
|
// if (Objects.isNull(cct)) {
|
||||||
LOGGER.debug("{} 物料提层到顶级发货包 编号:{},父级编号:{},数量:{},描述:{}", TAG, it.getMaterialNo(), p.getMaterialNo(), it.getNum().toString(), it.getMaterialDesc());
|
// LOGGER.debug("{} 物料提层到顶级发货包 编号:{},父级编号:{},数量:{},描述:{}", TAG, it.getMaterialNo(), p.getMaterialNo(), it.getNum().toString(), it.getMaterialDesc());
|
||||||
cct = convert(cp, it, p, false);
|
// cct = convert(cp, it, p, false);
|
||||||
cmap.get(cRowId).add(cct);
|
// cmap.get(cRowId).add(cct);
|
||||||
addToT1(cct);
|
// addToT1(cct);
|
||||||
} else {
|
// } else {
|
||||||
//合并计算数量
|
// //合并计算数量
|
||||||
cct.setMENGE(new BigDecimal(cct.getMENGE()).add(it.getNum()).toString());
|
// cct.setMENGE(new BigDecimal(cct.getMENGE()).add(it.getNum()).toString());
|
||||||
LOGGER.debug("{} 物料提层到顶级发货包且合并 编号:{},父级编号:{},数量:{},合并后总数:{},描述:{}", TAG, it.getMaterialNo(), p.getMaterialNo(), it.getNum().toString(), cct.getMENGE(), it.getMaterialDesc());
|
// LOGGER.debug("{} 物料提层到顶级发货包且合并 编号:{},父级编号:{},数量:{},合并后总数:{},描述:{}", TAG, it.getMaterialNo(), p.getMaterialNo(), it.getNum().toString(), cct.getMENGE(), it.getMaterialDesc());
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
// 20241022 by 10001392 物料提层,相同物料号不需要合并数量,几条物料号就传几条给SAP
|
||||||
|
T1ExtDTO cct = convert(cp, it, p, false);
|
||||||
|
cmap.get(cRowId).add(cct);
|
||||||
|
addToT1(cct);
|
||||||
}
|
}
|
||||||
// } else if (!Objects.equals(it.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
// } else if (!Objects.equals(it.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,11 @@ public class CheckPBomException {
|
||||||
public void checkException() {
|
public void checkException() {
|
||||||
for (BomNewPbomParentVO vo : allBomDetail) {
|
for (BomNewPbomParentVO vo : allBomDetail) {
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||||
|
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, vo.getProjectType(), true)) {
|
||||||
|
if (StrUtil.isBlank(vo.getMaterialDesc())) {
|
||||||
|
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (StrUtil.isNotBlank(vo.getMaterialNo())
|
if (StrUtil.isNotBlank(vo.getMaterialNo())
|
||||||
&& (MaterialGetEnum.MaterialStateEnum.STATE_NO_4.equalsValue(vo.getMaterialState())
|
&& (MaterialGetEnum.MaterialStateEnum.STATE_NO_4.equalsValue(vo.getMaterialState())
|
||||||
|| MaterialGetEnum.MaterialStateEnum.STATE_NO_5.equalsValue(vo.getMaterialState()))) {
|
|| MaterialGetEnum.MaterialStateEnum.STATE_NO_5.equalsValue(vo.getMaterialState()))) {
|
||||||
|
|
@ -67,6 +71,7 @@ public class CheckPBomException {
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_7.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_7.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initExceptionYellowWarn();
|
initExceptionYellowWarn();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue