物料接口调整,物料类型按编码规则处理。

master
Leon 3 years ago
parent 2c2c5318dd
commit 1b9d20eaa5

@ -88,24 +88,24 @@ public class InterfaceServiceImpl implements InterfaceService {
throw BusinessException.build("物料状态可维护的值为201(可下达)、202(冻结)、203(作废)、204(保留)、205(新建)"); throw BusinessException.build("物料状态可维护的值为201(可下达)、202(冻结)、203(作废)、204(保留)、205(新建)");
} }
String statusBo = HandleEnum.STATUS.getHandle(site, status); 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)) { * Modify by Leon - 20210920
throw BusinessException.build("物料类型可维护的值为FERT(已完成)、ROH(原始)、HALB(半成品)"); * -CAPP0502/03/06
} */
//采购类型(M(制造)/P(采购)/B(制造/采购)) String itemType = null;
String procurementType = itemSyncRequest.getPROCUREMENT_TYPE(); String procurementType = null;
if (!"M".equals(procurementType) && !"P".equals(procurementType) && !"B".equals(procurementType)) { if (item.startsWith("02") || item.startsWith("03") || item.startsWith("06")) {
throw BusinessException.build("采购类型可维护的值为M(制造)、P(采购)、B(制造/采购)"); itemType = "HALB";
procurementType = "B";
} else {
itemType = "ROH";
procurementType = "P";
} }
//批次大小 //批次大小
String lotSize = itemSyncRequest.getLOT_SIZE(); String lotSize = itemSyncRequest.getLOT_SIZE();
lotSize = StringUtil.notBlank(lotSize) ? lotSize : "999999"; lotSize = StringUtil.notBlank(lotSize) ? lotSize : "999999";
//装配时要收集的数据
String assyDataType = itemSyncRequest.getASSY_DATA_TYPE();
//库存接收数据类型
String invAssyDataType = itemSyncRequest.getINV_ASSY_DATA_TYPE();
//物料标准API //物料标准API
ItemConfigurationServiceInterface itemServiceInterFace = MEServices.create("com.sap.me.productdefinition", "ItemConfigurationService", site); ItemConfigurationServiceInterface itemServiceInterFace = MEServices.create("com.sap.me.productdefinition", "ItemConfigurationService", site);

Loading…
Cancel
Save