|
|
|
@ -69,7 +69,7 @@ public class ItemWSClient {
|
|
|
|
|
//物料类型(FERT(已完成)/ROH(原始)/HALB(半成品)/KMAT(可配置)/INST(安装)/VERP(包装)/FHMI(生产资源/工具)/CSTM(自定义))
|
|
|
|
|
String itemTypeDesc = jsonObject.getString("materialType");
|
|
|
|
|
if (!"已完成".equals(itemTypeDesc) && !"原始".equals(itemTypeDesc) && !"半成品".equals(itemTypeDesc)) {
|
|
|
|
|
throw BusinessException.build("物料类型可维护的值为:FERT(已完成)、ROH(原始)、HALB(半成品)");
|
|
|
|
|
throw BusinessException.build("物料类型可维护的值为:已完成、原始、半成品");
|
|
|
|
|
}
|
|
|
|
|
String itemType = "ROH";
|
|
|
|
|
switch (itemTypeDesc) {
|
|
|
|
@ -88,19 +88,19 @@ public class ItemWSClient {
|
|
|
|
|
|
|
|
|
|
//采购类型(M(制造)/P(采购)/B(制造/采购))
|
|
|
|
|
String procurementTypeDesc = jsonObject.getString("itemType");
|
|
|
|
|
if (!"M".equals(procurementTypeDesc) && !"P".equals(procurementTypeDesc) && !"B".equals(procurementTypeDesc)) {
|
|
|
|
|
throw BusinessException.build("采购类型可维护的值为:M(制造)、P(采购)、B(制造/采购)");
|
|
|
|
|
if (!"制造".equals(procurementTypeDesc) && !"采购".equals(procurementTypeDesc) && !"制造/采购".equals(procurementTypeDesc)) {
|
|
|
|
|
throw BusinessException.build("采购类型可维护的值为:制造、采购、制造/采购");
|
|
|
|
|
}
|
|
|
|
|
String procurementType = "P";
|
|
|
|
|
switch (procurementTypeDesc) {
|
|
|
|
|
case "采购":
|
|
|
|
|
itemType = "P";
|
|
|
|
|
procurementType = "P";
|
|
|
|
|
break;
|
|
|
|
|
case "制造/采购":
|
|
|
|
|
itemType = "B";
|
|
|
|
|
procurementType = "B";
|
|
|
|
|
break;
|
|
|
|
|
case "制造":
|
|
|
|
|
itemType = "M";
|
|
|
|
|
procurementType = "M";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -146,7 +146,7 @@ public class ItemWSClient {
|
|
|
|
|
case "任意数字":
|
|
|
|
|
itemConfiguration.setQuantityRestriction(QuantityRestriction.ANY_NUMBER);
|
|
|
|
|
break;
|
|
|
|
|
case "正数":
|
|
|
|
|
case "整数":
|
|
|
|
|
itemConfiguration.setQuantityRestriction(QuantityRestriction.WHOLE_NUMBER);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|