|
@ -2,7 +2,6 @@ package com.win.module.wms.util; |
|
|
|
|
|
|
|
|
import cn.hutool.json.JSONObject; |
|
|
import cn.hutool.json.JSONObject; |
|
|
import cn.hutool.json.JSONUtil; |
|
|
import cn.hutool.json.JSONUtil; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
|
import com.win.module.wms.controller.rule.vo.RuleRespVO; |
|
|
import com.win.module.wms.controller.rule.vo.RuleRespVO; |
|
|
import com.win.module.wms.dal.dataobject.balance.BalanceDO; |
|
|
import com.win.module.wms.dal.dataobject.balance.BalanceDO; |
|
|
import com.win.module.wms.dal.dataobject.businesstype.BusinesstypeDO; |
|
|
import com.win.module.wms.dal.dataobject.businesstype.BusinesstypeDO; |
|
@ -130,13 +129,13 @@ public class JobUtils { |
|
|
if ("TRUE".equals(allowBiggerQty)) { |
|
|
if ("TRUE".equals(allowBiggerQty)) { |
|
|
result = true; |
|
|
result = true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(QTY_EXCEPTION,"实际数量" + handleQty + " 不允许大于推荐数量" + recommendQty); |
|
|
throw exception(QTY_EXCEPTION, "实际数量" + handleQty + " 不允许大于推荐数量" + recommendQty); |
|
|
} |
|
|
} |
|
|
} else if (handleQty.compareTo(recommendQty) == -1) { |
|
|
} else if (handleQty.compareTo(recommendQty) == -1) { |
|
|
if ("TRUE".equals(allowSmallerQty)) { |
|
|
if ("TRUE".equals(allowSmallerQty)) { |
|
|
result = true; |
|
|
result = true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(QTY_EXCEPTION,"实际数量" + handleQty + " 不允许小于推荐数量" + recommendQty); |
|
|
throw exception(QTY_EXCEPTION, "实际数量" + handleQty + " 不允许小于推荐数量" + recommendQty); |
|
|
} |
|
|
} |
|
|
} else if (handleQty.compareTo(recommendQty) == 0) { |
|
|
} else if (handleQty.compareTo(recommendQty) == 0) { |
|
|
result = true; |
|
|
result = true; |
|
@ -157,13 +156,13 @@ public class JobUtils { |
|
|
if ("TRUE".equals(allowModifyBatch)) { |
|
|
if ("TRUE".equals(allowModifyBatch)) { |
|
|
result = true; |
|
|
result = true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(QTY_EXCEPTION,"实际数量" + jobDetailBatch + " 不允许大于推荐数量" + recordDetailBatch); |
|
|
throw exception(QTY_EXCEPTION, "实际数量" + jobDetailBatch + " 不允许大于推荐数量" + recordDetailBatch); |
|
|
} |
|
|
} |
|
|
} else if (jobDetailBatch.compareTo(recordDetailBatch) == -1) { |
|
|
} else if (jobDetailBatch.compareTo(recordDetailBatch) == -1) { |
|
|
if ("TRUE".equals(allowModifyBatch)) { |
|
|
if ("TRUE".equals(allowModifyBatch)) { |
|
|
result = true; |
|
|
result = true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(QTY_EXCEPTION,"实际数量" + jobDetailBatch + " 不允许小于推荐数量" + recordDetailBatch); |
|
|
throw exception(QTY_EXCEPTION, "实际数量" + jobDetailBatch + " 不允许小于推荐数量" + recordDetailBatch); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (jobDetailBatch.compareTo(recordDetailBatch) == 0) { |
|
|
if (jobDetailBatch.compareTo(recordDetailBatch) == 0) { |
|
@ -172,7 +171,7 @@ public class JobUtils { |
|
|
if ("TRUE".equals(allowModifyBatch)) { |
|
|
if ("TRUE".equals(allowModifyBatch)) { |
|
|
result = true; |
|
|
result = true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(BATCH_EXCEPTION,"实际批次" + jobDetailBatch + " 与任务推荐批次" + recordDetailBatch + "不一致"); |
|
|
throw exception(BATCH_EXCEPTION, "实际批次" + jobDetailBatch + " 与任务推荐批次" + recordDetailBatch + "不一致"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return result; |
|
|
return result; |
|
@ -288,8 +287,8 @@ public class JobUtils { |
|
|
if (ifInType) { |
|
|
if (ifInType) { |
|
|
return true; |
|
|
return true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(ITEMBASIC_EXCEPTION,"物料类型" + pitemCode + "的类型" + itembasicDO.getType() + " 与业务类型" + businesstypeDO.getName() |
|
|
throw exception(ITEMBASIC_EXCEPTION, "物料类型" + pitemCode + "的类型" + itembasicDO.getType() + " 与业务类型" + businesstypeDO.getName() |
|
|
+ "的物料类型" + businesstypeDO.getItemTypes() +"不一致"); |
|
|
+ "的物料类型" + businesstypeDO.getItemTypes() + "不一致"); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -306,9 +305,10 @@ public class JobUtils { |
|
|
if (ifInType) { |
|
|
if (ifInType) { |
|
|
return true; |
|
|
return true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(ITEMBASIC_EXCEPTION,"物料类型" + pitemType + " 与业务类型" + businesstypeDO.getName() + "的物料类型" + businesstypeDO.getItemTypes() +"不一致"); |
|
|
throw exception(ITEMBASIC_EXCEPTION, "物料类型" + pitemType + " 与业务类型" + businesstypeDO.getName() + "的物料类型" + businesstypeDO.getItemTypes() + "不一致"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//DBT---DBT2---IS 物料状态检验是否一致
|
|
|
//DBT---DBT2---IS 物料状态检验是否一致
|
|
|
public boolean ifInStatus(String pitemCode, BusinesstypeDO businesstypeDO) { |
|
|
public boolean ifInStatus(String pitemCode, BusinesstypeDO businesstypeDO) { |
|
|
ItembasicDO itembasicDO = itembasicService.selectItembasic(pitemCode); |
|
|
ItembasicDO itembasicDO = itembasicService.selectItembasic(pitemCode); |
|
@ -320,13 +320,13 @@ public class JobUtils { |
|
|
ifInStatus = true; |
|
|
ifInStatus = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}else { |
|
|
} else { |
|
|
throw exception(ITEMBASIC_EXCEPTION,"物料代码" + pitemCode + "无效"); |
|
|
throw exception(ITEMBASIC_EXCEPTION, "物料代码" + pitemCode + "无效"); |
|
|
} |
|
|
} |
|
|
if (ifInStatus == true) { |
|
|
if (ifInStatus) { |
|
|
return true; |
|
|
return true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(ITEMBASIC_EXCEPTION,"物料" + pitemCode + "的状态" + itembasicDO.getStatus() + "与业务类型" + |
|
|
throw exception(ITEMBASIC_EXCEPTION, "物料" + pitemCode + "的状态" + itembasicDO.getStatus() + "与业务类型" + |
|
|
businesstypeDO.getName() + "的物料状态" + businesstypeDO.getItemStatuses() + "不一致"); |
|
|
businesstypeDO.getName() + "的物料状态" + businesstypeDO.getItemStatuses() + "不一致"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -342,14 +342,13 @@ public class JobUtils { |
|
|
ifInLocationType = true; |
|
|
ifInLocationType = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
throw exception(LOCATION_EXCEPTION, "库位" + plocationCode + "无效"); |
|
|
} |
|
|
} |
|
|
else { |
|
|
if (ifInLocationType) { |
|
|
throw exception(LOCATION_EXCEPTION,"库位" + plocationCode + "无效"); |
|
|
|
|
|
} |
|
|
|
|
|
if (ifInLocationType == true) { |
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(LOCATION_EXCEPTION,"入库库位" + plocationCode + "的库位类型" + locationDO.getType() + "与业务类型" + |
|
|
throw exception(LOCATION_EXCEPTION, "入库库位" + plocationCode + "的库位类型" + locationDO.getType() + "与业务类型" + |
|
|
businesstypeDO.getName() + "的入库库位类型" + businesstypeDO.getInLocationTypes() + "不一致"); |
|
|
businesstypeDO.getName() + "的入库库位类型" + businesstypeDO.getInLocationTypes() + "不一致"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -365,14 +364,13 @@ public class JobUtils { |
|
|
ifOutLocationType = true; |
|
|
ifOutLocationType = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
throw exception(LOCATION_EXCEPTION, "库位" + plocationCode + "无效"); |
|
|
} |
|
|
} |
|
|
else { |
|
|
if (ifOutLocationType) { |
|
|
throw exception(LOCATION_EXCEPTION,"库位" + plocationCode + "无效"); |
|
|
|
|
|
} |
|
|
|
|
|
if (ifOutLocationType == true) { |
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(LOCATION_EXCEPTION,"出库库位" + plocationCode + "的库位类型" + locationDO.getType() + "与业务类型与业务类型" + |
|
|
throw exception(LOCATION_EXCEPTION, "出库库位" + plocationCode + "的库位类型" + locationDO.getType() + "与业务类型与业务类型" + |
|
|
businesstypeDO.getName() + "的出库库位类型" + businesstypeDO.getOutLocationTypes() + "不一致"); |
|
|
businesstypeDO.getName() + "的出库库位类型" + businesstypeDO.getOutLocationTypes() + "不一致"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -387,14 +385,13 @@ public class JobUtils { |
|
|
ifInInventoryStatuses = true; |
|
|
ifInInventoryStatuses = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
throw exception(WAREHOUSE_STOCK_EXCEPTION, "入库库存状态" + pinventoryStatus + "为空"); |
|
|
} |
|
|
} |
|
|
else { |
|
|
if (ifInInventoryStatuses) { |
|
|
throw exception(WAREHOUSE_STOCK_EXCEPTION,"入库库存状态" + pinventoryStatus + "为空"); |
|
|
|
|
|
} |
|
|
|
|
|
if (ifInInventoryStatuses == true) { |
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(LOCATION_INVENTORY_EXCEPTION,"入库库存状态" + pinventoryStatus + "与业务类型" + |
|
|
throw exception(LOCATION_INVENTORY_EXCEPTION, "入库库存状态" + pinventoryStatus + "与业务类型" + |
|
|
businesstypeDO.getName() + "的入库库存状态" + businesstypeDO.getInInventoryStatuses() + "不一致"); |
|
|
businesstypeDO.getName() + "的入库库存状态" + businesstypeDO.getInInventoryStatuses() + "不一致"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -409,14 +406,13 @@ public class JobUtils { |
|
|
ifOutInventoryStatuses = true; |
|
|
ifOutInventoryStatuses = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
throw exception(LOCATION_INVENTORY_EXCEPTION, "出库库存状态" + pinventoryStatus + "为空"); |
|
|
} |
|
|
} |
|
|
else { |
|
|
if (ifOutInventoryStatuses) { |
|
|
throw exception(LOCATION_INVENTORY_EXCEPTION,"出库库存状态" + pinventoryStatus + "为空"); |
|
|
|
|
|
} |
|
|
|
|
|
if (ifOutInventoryStatuses == true) { |
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} else { |
|
|
} else { |
|
|
throw exception(LOCATION_INVENTORY_EXCEPTION,"出库库存状态" + pinventoryStatus + "与业务类型" + |
|
|
throw exception(LOCATION_INVENTORY_EXCEPTION, "出库库存状态" + pinventoryStatus + "与业务类型" + |
|
|
businesstypeDO.getName() + "的出库库存状态" + businesstypeDO.getOutInventoryStatuses() + "不一致"); |
|
|
businesstypeDO.getName() + "的出库库存状态" + businesstypeDO.getOutInventoryStatuses() + "不一致"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -424,6 +420,7 @@ public class JobUtils { |
|
|
/** |
|
|
/** |
|
|
* TB------TB4 |
|
|
* TB------TB4 |
|
|
* 先获取管理模式,再根据管理模式查询库存余额,返回查询结果 |
|
|
* 先获取管理模式,再根据管理模式查询库存余额,返回查询结果 |
|
|
|
|
|
* |
|
|
* @param itemcode 零件号 |
|
|
* @param itemcode 零件号 |
|
|
* @param packingnumber 包装号 |
|
|
* @param packingnumber 包装号 |
|
|
* @param batch 批次 |
|
|
* @param batch 批次 |
|
@ -437,19 +434,21 @@ public class JobUtils { |
|
|
List<BalanceDO> balanceDO = null; |
|
|
List<BalanceDO> balanceDO = null; |
|
|
if ("{\"ManagementPrecision\":\"BY_QUANTITY\"}".equals(managementtRule.getConfiguration())) { |
|
|
if ("{\"ManagementPrecision\":\"BY_QUANTITY\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectNumber(itemcode, inventoryStatus, locationcode); |
|
|
balanceDO = balanceService.selectNumber(itemcode, inventoryStatus, locationcode); |
|
|
}else if ("{\"ManagementPrecision\":\"BY_BATCH\"}".equals(managementtRule.getConfiguration())) { |
|
|
} else if ("{\"ManagementPrecision\":\"BY_BATCH\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectBatch(itemcode, batch, inventoryStatus, locationcode); |
|
|
balanceDO = balanceService.selectBatch(itemcode, batch, inventoryStatus, locationcode); |
|
|
}else if("{\"ManagementPrecision\":\"BY_PACKAGING\"}".equals(managementtRule.getConfiguration())) { |
|
|
} else if ("{\"ManagementPrecision\":\"BY_PACKAGING\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectPackaging(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
balanceDO = balanceService.selectPackaging(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
}else if("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
} else if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
} |
|
|
} |
|
|
return balanceDO; |
|
|
return balanceDO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* TB-------TB1 |
|
|
* TB-------TB1 |
|
|
* 查询库存返回管理精度 |
|
|
* 查询库存返回管理精度 |
|
|
* 先获取管理模式,再根据管理模式查询库存余额,返回校验结果 |
|
|
* 先获取管理模式,再根据管理模式查询库存余额,返回校验结果 |
|
|
|
|
|
* |
|
|
* @param itemcode 零件号 |
|
|
* @param itemcode 零件号 |
|
|
* @param packingnumber 包装号 |
|
|
* @param packingnumber 包装号 |
|
|
* @param batch 批次 |
|
|
* @param batch 批次 |
|
@ -464,30 +463,30 @@ public class JobUtils { |
|
|
List<BalanceDO> balanceDO = null; |
|
|
List<BalanceDO> balanceDO = null; |
|
|
if ("{\"ManagementPrecision\":\"BY_QUANTITY\"}".equals(managementtRule.getConfiguration())) { |
|
|
if ("{\"ManagementPrecision\":\"BY_QUANTITY\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectNumber(itemcode, inventoryStatus, locationcode); |
|
|
balanceDO = balanceService.selectNumber(itemcode, inventoryStatus, locationcode); |
|
|
if(balanceDO == null){ |
|
|
if (balanceDO == null) { |
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "物品代码" + itemcode + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "物品代码" + itemcode + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
}else { |
|
|
} else { |
|
|
return balanceDO; |
|
|
return balanceDO; |
|
|
} |
|
|
} |
|
|
}else if ("{\"ManagementPrecision\":\"BY_BATCH\"}".equals(managementtRule.getConfiguration())) { |
|
|
} else if ("{\"ManagementPrecision\":\"BY_BATCH\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectBatch(itemcode, batch, inventoryStatus, locationcode); |
|
|
balanceDO = balanceService.selectBatch(itemcode, batch, inventoryStatus, locationcode); |
|
|
if(balanceDO == null){ |
|
|
if (balanceDO == null) { |
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "物品代码" + itemcode + "批次" + batch + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "物品代码" + itemcode + "批次" + batch + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
}else { |
|
|
} else { |
|
|
return balanceDO; |
|
|
return balanceDO; |
|
|
} |
|
|
} |
|
|
}else if("{\"ManagementPrecision\":\"BY_PACKAGING\"}".equals(managementtRule.getConfiguration())) { |
|
|
} else if ("{\"ManagementPrecision\":\"BY_PACKAGING\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectPackaging(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
balanceDO = balanceService.selectPackaging(itemcode, packingnumber, batch, inventoryStatus, locationcode); |
|
|
if(balanceDO == null){ |
|
|
if (balanceDO == null) { |
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION,"物品代码" + itemcode + "箱码" + packingnumber + "批次" + batch + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "物品代码" + itemcode + "箱码" + packingnumber + "批次" + batch + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
}else { |
|
|
} else { |
|
|
return balanceDO; |
|
|
return balanceDO; |
|
|
} |
|
|
} |
|
|
}else if("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
} else if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
if(balanceDO == null){ |
|
|
if (balanceDO == null) { |
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "唯一码" + packingnumber + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
throw exception(MANAGEMENTPRECISION_EXCEPTION, "唯一码" + packingnumber + "库存状态" + inventoryStatus + "在" + locationcode + "库位中未查找到库存记录"); |
|
|
}else { |
|
|
} else { |
|
|
return balanceDO; |
|
|
return balanceDO; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -587,7 +586,7 @@ public class JobUtils { |
|
|
if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
if ("{\"ManagementPrecision\":\"BY_UNIQUE_ID\"}".equals(managementtRule.getConfiguration())) { |
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
balanceDO = balanceService.selectUniqueId(packingnumber, locationcode, inventoryStatus); |
|
|
return balanceDO; |
|
|
return balanceDO; |
|
|
}else { |
|
|
} else { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -600,7 +599,7 @@ public class JobUtils { |
|
|
if (locationService.selectLocation(fromlocationcode) != null) { |
|
|
if (locationService.selectLocation(fromlocationcode) != null) { |
|
|
return warehouseStockExist(itemcode, packingnumber, batch, fromlocationcode, inventoryStatus, requstqty); |
|
|
return warehouseStockExist(itemcode, packingnumber, batch, fromlocationcode, inventoryStatus, requstqty); |
|
|
} else { |
|
|
} else { |
|
|
throw exception(LOCATION_NOT_CUST,fromlocationcode); |
|
|
throw exception(LOCATION_NOT_CUST, fromlocationcode); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -670,20 +669,20 @@ public class JobUtils { |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public List<BalanceDO> fromInventoryEffective(String itemCode, String packingNumber, String batch, String locationCode, List<String> inventoryStatus) { |
|
|
public List<BalanceDO> fromInventoryEffective(String itemCode, String packingNumber, String batch, String locationCode, List<String> inventoryStatus) { |
|
|
List<BalanceDO> balanceDOList = selectlocationReturnManagementAccuracy(itemCode, packingNumber, batch, locationCode, inventoryStatus); |
|
|
return selectlocationReturnManagementAccuracy(itemCode, packingNumber, batch, locationCode, inventoryStatus); |
|
|
return balanceDOList; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* DBT3 |
|
|
* DBT3 |
|
|
* 根据单据设置查询业务类型 |
|
|
* 根据单据设置查询业务类型 |
|
|
* @author chenfang |
|
|
* |
|
|
* @param pcode |
|
|
* @param pcode |
|
|
* @return |
|
|
* @return |
|
|
|
|
|
* @author chenfang |
|
|
*/ |
|
|
*/ |
|
|
public BusinesstypeDO selectDocumentSettingFromBusinessType(String pcode){ |
|
|
public BusinesstypeDO selectDocumentSettingFromBusinessType(String pcode) { |
|
|
DocumentsettingDO documentsettingDO = documentsettingService.selectDocumentsettingExist(pcode); |
|
|
DocumentsettingDO documentsettingDO = documentsettingService.selectDocumentsettingExist(pcode); |
|
|
if(documentsettingDO == null || documentsettingDO.getBusinessType() == null) { |
|
|
if (documentsettingDO == null || documentsettingDO.getBusinessType() == null) { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
return businesstypeService.selectBusinesstypeExist(documentsettingDO.getBusinessType()); |
|
|
return businesstypeService.selectBusinesstypeExist(documentsettingDO.getBusinessType()); |
|
@ -692,13 +691,14 @@ public class JobUtils { |
|
|
/** |
|
|
/** |
|
|
* DBT4 |
|
|
* DBT4 |
|
|
* 根据单据设置查询业务类型 |
|
|
* 根据单据设置查询业务类型 |
|
|
* @author chenfang |
|
|
* |
|
|
* @param pcode |
|
|
* @param pcode |
|
|
* @return |
|
|
* @return |
|
|
|
|
|
* @author chenfang |
|
|
*/ |
|
|
*/ |
|
|
public TransactiontypeDO selectDocumentFromTransactionType(String pcode){ |
|
|
public TransactiontypeDO selectDocumentFromTransactionType(String pcode) { |
|
|
TransactiontypeDO transactionType = transactiontypeService.selectTransactiontype(pcode); |
|
|
TransactiontypeDO transactionType = transactiontypeService.selectTransactiontype(pcode); |
|
|
if(transactionType == null || transactionType.getCode() == null) { |
|
|
if (transactionType == null || transactionType.getCode() == null) { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
return transactionType; |
|
|
return transactionType; |
|
@ -717,9 +717,9 @@ public class JobUtils { |
|
|
*/ |
|
|
*/ |
|
|
public Boolean fromInventoryEffectiveCustomer(String locationCode, String itemCode, String packingNumber, String batch, List<String> inventoryStatus) { |
|
|
public Boolean fromInventoryEffectiveCustomer(String locationCode, String itemCode, String packingNumber, String batch, List<String> inventoryStatus) { |
|
|
Boolean returnRes = false; |
|
|
Boolean returnRes = false; |
|
|
if (locationService.selectLocation(locationCode) != null) { |
|
|
if (locationService.selectLocation(locationCode) != null) { |
|
|
fromInventoryEffective(itemCode, packingNumber, batch, locationCode, inventoryStatus); |
|
|
fromInventoryEffective(itemCode, packingNumber, batch, locationCode, inventoryStatus); |
|
|
} else{ |
|
|
} else { |
|
|
return returnRes; |
|
|
return returnRes; |
|
|
} |
|
|
} |
|
|
return true; |
|
|
return true; |
|
|