From 1b9d20eaa5dea727acef0be5befca6ff1141fc26 Mon Sep 17 00:00:00 2001 From: Leon <3066758958@qq.com> Date: Mon, 20 Sep 2021 10:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8C=E7=89=A9=E6=96=99=E7=B1=BB=E5=9E=8B=E6=8C=89?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E8=A7=84=E5=88=99=E5=A4=84=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InterfaceServiceImpl.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/InterfaceServiceImpl.java b/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/InterfaceServiceImpl.java index 62384765..4b61f140 100644 --- a/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/InterfaceServiceImpl.java +++ b/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/InterfaceServiceImpl.java @@ -88,24 +88,24 @@ public class InterfaceServiceImpl implements InterfaceService { throw BusinessException.build("物料状态可维护的值为:201(可下达)、202(冻结)、203(作废)、204(保留)、205(新建)"); } String statusBo = HandleEnum.STATUS.getHandle(site, status); - //物料类型(FERT(已完成)/ROH(原始)/HALB(半成品)/KMAT(可配置)/INST(安装)/VERP(包装)/FHMI(生产资源/工具)/CSTM(自定义)) - String itemType = itemSyncRequest.getITEM_TYPE(); - if (!"FERT".equals(itemType) && !"ROH".equals(itemType) && !"HALB".equals(itemType)) { - throw BusinessException.build("物料类型可维护的值为:FERT(已完成)、ROH(原始)、HALB(半成品)"); - } - //采购类型(M(制造)/P(采购)/B(制造/采购)) - String procurementType = itemSyncRequest.getPROCUREMENT_TYPE(); - if (!"M".equals(procurementType) && !"P".equals(procurementType) && !"B".equals(procurementType)) { - throw BusinessException.build("采购类型可维护的值为:M(制造)、P(采购)、B(制造/采购)"); + + /** + * Modify by Leon - 20210920 + * 物料类型-根据物料编码来判断,CAPP传过来为空(编码05开头为原始,02/03/06开头的为半成品) + */ + String itemType = null; + String procurementType = null; + if (item.startsWith("02") || item.startsWith("03") || item.startsWith("06")) { + itemType = "HALB"; + procurementType = "B"; + } else { + itemType = "ROH"; + procurementType = "P"; } //批次大小 String lotSize = itemSyncRequest.getLOT_SIZE(); lotSize = StringUtil.notBlank(lotSize) ? lotSize : "999999"; - //装配时要收集的数据 - String assyDataType = itemSyncRequest.getASSY_DATA_TYPE(); - //库存接收数据类型 - String invAssyDataType = itemSyncRequest.getINV_ASSY_DATA_TYPE(); //物料标准API ItemConfigurationServiceInterface itemServiceInterFace = MEServices.create("com.sap.me.productdefinition", "ItemConfigurationService", site);