diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomExportToSAPImpl.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomExportToSAPImpl.java index d444065d..a9d648ae 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomExportToSAPImpl.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomExportToSAPImpl.java @@ -40,6 +40,7 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP { //是否是 一次性订单/配件销售订单 private boolean isForSale = false; private boolean is21 = false; + private boolean is31 = false; private final String dateYMD = DateUtil.format(new Date(), "yyyyMMdd"); private final Map> cmap = new HashMap<>(); @@ -59,6 +60,7 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP { public List export(Long rootBomRowId) { BomNewPbomParentEntity root = bomNewPbomParentService.getById(rootBomRowId); is21 = root.getMaterialNo().startsWith("21"); + is31 = root.getMaterialNo().startsWith("31"); List rcs = bomNewPbomChildService.lambdaQuery() .eq(BomNewPbomChildEntity::getParentRowId, root.getRowId()) .orderByAsc(BomNewPbomChildEntity::getOrderNumber) @@ -77,7 +79,7 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP { List liErrMsg = null; try { Long ddpRowId = null; - if (is21) { + if (!is31) { //选出直发包 ddpRowId = getZFBBomRowId(rcs); } @@ -85,7 +87,7 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP { BomNewPbomParentEntity cp = getParent(it); addToT1(convert(cp, it, root.getMaterialNo(), false)); if (Objects.nonNull(cp)) { - if (is21) { + if (!is31) { buildChildrenForSap(ddpRowId, cp, it, false); } else { //选出直发包