|
|
@ -507,17 +507,17 @@ public class JobUtils { |
|
|
|
*/ |
|
|
|
public List<BalanceDO> selectlocationReturnManagementAccuracyToBalance(String itemcode, String packingnumber, String batch, String locationcode, List<String> inventoryStatus) { |
|
|
|
RuleRespVO managementtRule = ruleService.management(null, null, itemcode, locationcode, null, null); |
|
|
|
List<BalanceDO> balanceDO = null; |
|
|
|
List<BalanceDO> balanceDOList = null; |
|
|
|
if ("{\"ManagementPrecision\":\"BY_QUANTITY\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectNumber(itemcode, inventoryStatus, locationcode); |
|
|
|
balanceDOList = balanceService.selectByNumber(itemcode, inventoryStatus, locationcode); |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_BATCH\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectBatch(itemcode, batch, inventoryStatus, locationcode); |
|
|
|
balanceDOList = balanceService.selectByBatch(itemcode, batch, inventoryStatus, locationcode); |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_PACKAGING\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectPackaging(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
|
balanceDOList = balanceService.selectByPackaging(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
|
balanceDOList = balanceService.selectByUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
|
} |
|
|
|
return balanceDO; |
|
|
|
return balanceDOList; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -535,37 +535,37 @@ public class JobUtils { |
|
|
|
*/ |
|
|
|
public List<BalanceDO> selectlocationReturnManagementAccuracy(String itemcode, String packingnumber, String batch, String locationcode, List<String> inventoryStatus) { |
|
|
|
RuleRespVO managementtRule = ruleService.management(null, null, itemcode, locationcode, null, null); |
|
|
|
List<BalanceDO> balanceDO = null; |
|
|
|
List<BalanceDO> balanceDOList = null; |
|
|
|
if ("{\"ManagementPrecision\":\"BY_QUANTITY\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectNumber(itemcode, inventoryStatus, locationcode); |
|
|
|
if (balanceDO == null) { |
|
|
|
balanceDOList = balanceService.selectByNumber(itemcode, inventoryStatus, locationcode); |
|
|
|
if (balanceDOList == null) { |
|
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "物品代码" + itemcode + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
|
} else { |
|
|
|
return balanceDO; |
|
|
|
return balanceDOList; |
|
|
|
} |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_BATCH\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectBatch(itemcode, batch, inventoryStatus, locationcode); |
|
|
|
if (balanceDO == null) { |
|
|
|
balanceDOList = balanceService.selectByBatch(itemcode, batch, inventoryStatus, locationcode); |
|
|
|
if (balanceDOList == null) { |
|
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "物品代码" + itemcode + "批次" + batch + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
|
} else { |
|
|
|
return balanceDO; |
|
|
|
return balanceDOList; |
|
|
|
} |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_PACKAGING\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectPackaging(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
|
if (balanceDO == null) { |
|
|
|
balanceDOList = balanceService.selectByPackaging(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
|
if (balanceDOList == null) { |
|
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "物品代码" + itemcode + "箱码" + packingnumber + "批次" + batch + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
|
} else { |
|
|
|
return balanceDO; |
|
|
|
return balanceDOList; |
|
|
|
} |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
|
if (balanceDO == null) { |
|
|
|
balanceDOList = balanceService.selectByUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
|
if (balanceDOList == null) { |
|
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "唯一码" + packingnumber + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
|
} else { |
|
|
|
return balanceDO; |
|
|
|
return balanceDOList; |
|
|
|
} |
|
|
|
} |
|
|
|
return balanceDO; |
|
|
|
return balanceDOList; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -585,18 +585,18 @@ public class JobUtils { |
|
|
|
*/ |
|
|
|
public List<ExpectoutDO> selectLocatioNew(String itemcode, String packingnumber, String batch, String locationcode, List<String> inventoryStatus) { |
|
|
|
RuleRespVO managementtRule = ruleService.management(null, null, itemcode, locationcode, null, null); |
|
|
|
List<ExpectoutDO> expectoutDO = null; |
|
|
|
List<ExpectoutDO> expectoutDOList = null; |
|
|
|
if ("{\"ManagementPrecision\":\"BY_QUANTITY\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
expectoutDO = expectoutService.selectNumberNew(itemcode, inventoryStatus, locationcode); |
|
|
|
expectoutDOList = expectoutService.selectByNumberNew(itemcode, inventoryStatus, locationcode); |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_BATCH\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
expectoutDO = expectoutService.selectBatchNew(itemcode, batch, inventoryStatus, locationcode); |
|
|
|
expectoutDOList = expectoutService.selectByBatchNew(itemcode, batch, inventoryStatus, locationcode); |
|
|
|
|
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_PACKAGING\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
expectoutDO = expectoutService.selectPackingNew(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
|
expectoutDOList = expectoutService.selectByPackingNew(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
expectoutDO = expectoutService.selectUniqeIdNew(packingnumber, locationcode, inventoryStatus); |
|
|
|
expectoutDOList = expectoutService.selectByUniqeIdNew(packingnumber, locationcode, inventoryStatus); |
|
|
|
} |
|
|
|
return expectoutDO; |
|
|
|
return expectoutDOList; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -655,10 +655,10 @@ public class JobUtils { |
|
|
|
//库存不应该存在
|
|
|
|
public List<BalanceDO> warehouseStocknNotExist(String itemcode, String packingnumber, String locationcode, List<String> inventoryStatus) { |
|
|
|
RuleRespVO managementtRule = ruleService.management(null, null, itemcode, locationcode, null, null); |
|
|
|
List<BalanceDO> balanceDO = null; |
|
|
|
List<BalanceDO> balanceDOList = null; |
|
|
|
if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
|
return balanceDO; |
|
|
|
balanceDOList = balanceService.selectByUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
|
return balanceDOList; |
|
|
|
} else { |
|
|
|
return null; |
|
|
|
} |
|
|
@ -695,13 +695,13 @@ public class JobUtils { |
|
|
|
String[] splits = management.getConfiguration().split("\""); |
|
|
|
for (String split : splits) { |
|
|
|
if ("{\"ManagementPrecision\":\"BY_QUANTITY\"}".equals(management.getConfiguration())) { |
|
|
|
expectoutService.selectNumberNew(pitemcode, pinventoryStatus, plocationcode); |
|
|
|
expectoutService.selectByNumberNew(pitemcode, pinventoryStatus, plocationcode); |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_BATCH\"}".equals(management.getConfiguration())) { |
|
|
|
expectoutDO = expectoutService.selectBatchNew(pitemcode, pbatch, pinventoryStatus, plocationcode); |
|
|
|
expectoutDO = expectoutService.selectByBatchNew(pitemcode, pbatch, pinventoryStatus, plocationcode); |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_PACKAGING\"}".equals(management.getConfiguration())) { |
|
|
|
expectoutDO = expectoutService.selectPackingNew(pitemcode, ppackingnumber, pbatch, pinventoryStatus, plocationcode); |
|
|
|
expectoutDO = expectoutService.selectByPackingNew(pitemcode, ppackingnumber, pbatch, pinventoryStatus, plocationcode); |
|
|
|
} else if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(management.getConfiguration())) { |
|
|
|
expectoutDO = expectoutService.selectUniqeIdNew(ppackingnumber, plocationcode, pinventoryStatus); |
|
|
|
expectoutDO = expectoutService.selectByUniqeIdNew(ppackingnumber, plocationcode, pinventoryStatus); |
|
|
|
} |
|
|
|
return expectoutDO; |
|
|
|
} |
|
|
|