|
|
|
@ -85,7 +85,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(partMap == null || partMap.size() == 0) { |
|
|
|
if(partMap == null || partMap.isEmpty()) { |
|
|
|
//调用api |
|
|
|
Map<String, String> resultMap = InventoryPartApi.insertInventoryPart(srv, inData); |
|
|
|
//设置ifs 信息 |
|
|
|
@ -123,7 +123,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(partMap == null || partMap.size() == 0) { |
|
|
|
if(partMap == null || partMap.isEmpty()) { |
|
|
|
throw new APException("域:"+contract+"库存件:"+partNo+"不存在!"); |
|
|
|
}else { |
|
|
|
//设置ifs 信息 |
|
|
|
@ -199,7 +199,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> partMap = InventoryPartApi.getInventoryPartConfig(srv, contract, partNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(partMap == null || partMap.size() == 0) { |
|
|
|
if(partMap == null || partMap.isEmpty()) { |
|
|
|
throw new APException("域:"+contract+"库存件:"+partNo+"不存在!"); |
|
|
|
}else { |
|
|
|
//设置ifs 信息 |
|
|
|
@ -238,7 +238,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(partMap == null || partMap.size() == 0) { |
|
|
|
if(partMap == null || partMap.isEmpty()) { |
|
|
|
throw new APException("域:"+contract+"库存件:"+partNo+"不存在!"); |
|
|
|
}else { |
|
|
|
//获取库存件Plan配置的信息 |
|
|
|
@ -279,7 +279,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> partMap = InventoryPartApi.getInventoryPartByPartNo(srv, contract, partNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(partMap == null || partMap.size() == 0) { |
|
|
|
if(partMap == null || partMap.isEmpty()) { |
|
|
|
throw new APException("域:" + contract + "库存件:" + partNo + "不存在!"); |
|
|
|
} |
|
|
|
//编辑处理需要处理的数据 |
|
|
|
@ -318,7 +318,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(locationMap == null || locationMap.size() == 0) { |
|
|
|
if(locationMap == null || locationMap.isEmpty()) { |
|
|
|
throw new APException("域:" + contract + "库存件:" + partNo + "库位编码:" + locationNo +"不存在!"); |
|
|
|
} |
|
|
|
//设置ifs 信息 |
|
|
|
@ -357,7 +357,7 @@ public class InventoryServiceBean { |
|
|
|
//获取库存件Plan配置的信息 |
|
|
|
Map<String, String> locationMap = InventoryPartApi.getInventoryPartLocation(srv, contract, partNo, locationNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(locationMap == null || locationMap.size() == 0) { |
|
|
|
if(locationMap == null || locationMap.isEmpty()) { |
|
|
|
throw new APException("域:" + contract + "库存件:" + partNo + "库位编码:" + locationNo +"不存在!"); |
|
|
|
} |
|
|
|
//设置ifs 信息 |
|
|
|
@ -394,7 +394,7 @@ public class InventoryServiceBean { |
|
|
|
//查询制造商信息 |
|
|
|
Map<String, String> manufMap = InventoryPartApi.getInventoryManufacture(srv, contract, partNo); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(manufMap == null || manufMap.size() == 0) { |
|
|
|
if(manufMap == null || manufMap.isEmpty()) { |
|
|
|
throw new APException("域:"+contract+"库存件:"+partNo+"不存在制造商信息!"); |
|
|
|
}else { |
|
|
|
//设置ifs 信息 |
|
|
|
@ -434,7 +434,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(revisionMap == null || revisionMap.size() == 0) { |
|
|
|
if(revisionMap == null || revisionMap.isEmpty()) { |
|
|
|
revisionMap.put("resultCode", "400"); |
|
|
|
revisionMap.put("resultMsg", "当前版本信息不存在!"); |
|
|
|
}else{ |
|
|
|
@ -511,7 +511,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(revisionMap == null || revisionMap.size() == 0) { |
|
|
|
if(revisionMap == null || revisionMap.isEmpty()) { |
|
|
|
throw new APException("当前版本信息不存在!"); |
|
|
|
} |
|
|
|
//设置ifs 信息 |
|
|
|
@ -551,7 +551,7 @@ public class InventoryServiceBean { |
|
|
|
//获取数据 |
|
|
|
Map<String, String> revisionMap = InventoryPartApi.getInventoryPartRevision(srv, contract, partNo, engChgLevel); |
|
|
|
//判断是否需要插入到ifs |
|
|
|
if(revisionMap == null || revisionMap.size() == 0) { |
|
|
|
if(revisionMap == null || revisionMap.isEmpty()) { |
|
|
|
throw new APException("当前版本信息不存在!"); |
|
|
|
} |
|
|
|
//设置ifs 信息 |
|
|
|
@ -589,7 +589,7 @@ public class InventoryServiceBean { |
|
|
|
for(PartIfsInventoryProperty characteristic : inDatas) { |
|
|
|
String characteristicCode = characteristic.getCharacteristicCode(); |
|
|
|
Map<String, String> characteristicMap = InventoryPartApi.getInventoryPartCharacteristicCode(srv, contract, partNo, characteristicCode); |
|
|
|
if(characteristicMap != null && characteristicMap.size() > 0) { |
|
|
|
if(characteristicMap != null && !characteristicMap.isEmpty()) { |
|
|
|
throw new APException("属性编码已存在!"); |
|
|
|
} |
|
|
|
//校验通过继续新增 |
|
|
|
@ -627,7 +627,7 @@ public class InventoryServiceBean { |
|
|
|
//查询当前物料的属性 先删除物料属性 再删除库存件 |
|
|
|
List<PartIfsInventoryProperty> characteristicList = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); |
|
|
|
//如果存在就批量删掉数据 |
|
|
|
if(characteristicList != null && characteristicList.size() > 0) { |
|
|
|
if(!characteristicList.isEmpty()) { |
|
|
|
for(PartIfsInventoryProperty characteristic : characteristicList) { |
|
|
|
//一个一个删掉库存件的属性 |
|
|
|
InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic); |
|
|
|
@ -662,7 +662,7 @@ public class InventoryServiceBean { |
|
|
|
//按照条件查询Bom的相关信息 按照海波的要求 删除Bom Header |
|
|
|
List<BomIfsHeader> bomHeaders = BomApi.getBomHeadersByPartNo(srv, contract, partNo); |
|
|
|
//判断是否存在 |
|
|
|
if(bomHeaders != null && bomHeaders.size() > 0) { |
|
|
|
if(!bomHeaders.isEmpty()) { |
|
|
|
for(BomIfsHeader bomHeader : bomHeaders) { |
|
|
|
//执行删除的操作 |
|
|
|
BomApi.removeBomHeader(srv, bomHeader); |
|
|
|
@ -672,7 +672,7 @@ public class InventoryServiceBean { |
|
|
|
//按照条件查询Routing的相关信息 按照海波的要求 |
|
|
|
List<RoutingIfsHeader> routingHeaders = RoutingApi.getRoutingHeadersByPartNo(srv, contract, partNo); |
|
|
|
//判断是否存在 |
|
|
|
if(routingHeaders != null && routingHeaders.size() > 0) { |
|
|
|
if(!routingHeaders.isEmpty()) { |
|
|
|
for(RoutingIfsHeader routingHeader : routingHeaders) { |
|
|
|
//执行删除的操作 |
|
|
|
RoutingApi.removeRoutingHeader(srv, routingHeader); |
|
|
|
@ -686,7 +686,7 @@ public class InventoryServiceBean { |
|
|
|
//查询当前物料的属性 先删除物料属性 再删除库存件 |
|
|
|
List<PartIfsInventoryProperty> characteristicCodes = InventoryPartApi.getInventoryPartCharacteristicCodes(srv, contract, partNo); |
|
|
|
//如果存在就批量删掉数据 |
|
|
|
if(characteristicCodes.size() > 0) { |
|
|
|
if(!characteristicCodes.isEmpty()) { |
|
|
|
for(PartIfsInventoryProperty characteristic : characteristicCodes) { |
|
|
|
//一个一个删掉库存件的属性 |
|
|
|
InventoryPartApi.removeInventoryPartCharacteristic(srv, characteristic); |
|
|
|
|