|
@@ -84,6 +84,8 @@ public class OyeWarehouseServiceImpl implements IOyeWarehouseService {
|
|
|
BigDecimal shipperId = DataChange.dataToBigDecimal(mapValue.get("shipperId"));
|
|
BigDecimal shipperId = DataChange.dataToBigDecimal(mapValue.get("shipperId"));
|
|
|
// 收货单位
|
|
// 收货单位
|
|
|
BigDecimal receiveId = DataChange.dataToBigDecimal(mapValue.get("receiveId"));
|
|
BigDecimal receiveId = DataChange.dataToBigDecimal(mapValue.get("receiveId"));
|
|
|
|
|
+ //仓库标识
|
|
|
|
|
+ String inboundArea = mapValue.get("inboundAreaSide") == null ? null : mapValue.get("inboundAreaSide").toString();
|
|
|
if (receiveId == null || receiveId.intValue() == 0) {
|
|
if (receiveId == null || receiveId.intValue() == 0) {
|
|
|
receiveId = amsSaleOrderMapper.findReceiveIdByOye(mapValue.get("receiveName"));
|
|
receiveId = amsSaleOrderMapper.findReceiveIdByOye(mapValue.get("receiveName"));
|
|
|
if (receiveId == null) {
|
|
if (receiveId == null) {
|
|
@@ -176,14 +178,15 @@ public class OyeWarehouseServiceImpl implements IOyeWarehouseService {
|
|
|
searchInventoryMap.put("materialId",materialId);
|
|
searchInventoryMap.put("materialId",materialId);
|
|
|
searchInventoryMap.put("saleArea",saleRemark);
|
|
searchInventoryMap.put("saleArea",saleRemark);
|
|
|
searchInventoryMap.put("receiveId",receiveId);
|
|
searchInventoryMap.put("receiveId",receiveId);
|
|
|
- searchInventoryMap.put("meter",steelMeters);
|
|
|
|
|
|
|
+ //searchInventoryMap.put("meter",steelMeters);
|
|
|
searchInventoryMap.put("inboundWarehouse",inboundWarehouse);
|
|
searchInventoryMap.put("inboundWarehouse",inboundWarehouse);
|
|
|
- searchInventoryMap.put("inboundArea",map.get("inboundArea") == null ? null : map.get("inboundArea").toString());
|
|
|
|
|
|
|
+ searchInventoryMap.put("inboundArea", inboundArea);
|
|
|
BigDecimal inventoryId = DataChange.dataToBigDecimal(map.get("inventoryId"));
|
|
BigDecimal inventoryId = DataChange.dataToBigDecimal(map.get("inventoryId"));
|
|
|
|
|
+ BigDecimal q_inventoryId = amsSaleMaterialMapper.selectInventoryId(searchInventoryMap);
|
|
|
if (inventoryId == null || inventoryId.intValue() == 0) {
|
|
if (inventoryId == null || inventoryId.intValue() == 0) {
|
|
|
try {
|
|
try {
|
|
|
- inventoryId = amsSaleMaterialMapper.selectInventoryId(searchInventoryMap);
|
|
|
|
|
- if(inventoryId == null) {
|
|
|
|
|
|
|
+ inventoryId = q_inventoryId;
|
|
|
|
|
+ if(inventoryId == null || inventoryId.intValue() == 0) {
|
|
|
throw new Exception("无法匹配实时库存,请检查输入参数");
|
|
throw new Exception("无法匹配实时库存,请检查输入参数");
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -191,6 +194,10 @@ public class OyeWarehouseServiceImpl implements IOyeWarehouseService {
|
|
|
throw new Exception("无法匹配实时库存,请检查输入参数");
|
|
throw new Exception("无法匹配实时库存,请检查输入参数");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ q_inventoryId = q_inventoryId == null ? BigDecimal.ZERO : q_inventoryId;
|
|
|
|
|
+ if(inventoryId.compareTo(q_inventoryId) != 0){
|
|
|
|
|
+ throw new Exception("销售计划片区与库存片区不一致,请检查!");
|
|
|
|
|
+ }
|
|
|
map.put("inventoryId",inventoryId);
|
|
map.put("inventoryId",inventoryId);
|
|
|
if (!getRealTimeInfo(map)) {
|
|
if (!getRealTimeInfo(map)) {
|
|
|
throw new Exception("超出实时库存数量,无法通过");
|
|
throw new Exception("超出实时库存数量,无法通过");
|