Commit 5f5121cc by wutong

自动周转海外仓FBA仓调拨入库天数配置添加按仓库编码配置

parent a60e06ab
...@@ -191,7 +191,7 @@ public class AutoTurnoverJob extends PointJob { ...@@ -191,7 +191,7 @@ public class AutoTurnoverJob extends PointJob {
} }
Integer bailunFirstLevelCatagoryId = getBailunCatagoryId(turnoverSku); //百伦第一级分类Id, 可以为null Integer bailunFirstLevelCatagoryId = getBailunCatagoryId(turnoverSku); //百伦第一级分类Id, 可以为null
// 获取调拨头程 + 调拨打包 + 海外仓入库天数 的配置 // 获取调拨头程 + 调拨打包 + 海外仓入库天数 的配置
DcAutoConfigDelivery dcAutoConfigDelivery = getDcAutoConfigDelivery(bailunSku, warehouseCode, dcBaseWarehouse, bailunFirstLevelCatagoryId); DcAutoConfigDelivery dcAutoConfigDelivery = getDcAutoConfigDelivery(bailunSku, warehouseCode, dcBaseWarehouse);
//获取周转天数计算配置, 数据来源于.net同事计算的均值 //获取周转天数计算配置, 数据来源于.net同事计算的均值
Integer turnoverDays = getTurnoverDelivery(turnoverSku, dcBaseWarehouse, dcAutoTurnover, dcAutoConfigDelivery, dcAveragePurchase, dcAverageWarehouse); Integer turnoverDays = getTurnoverDelivery(turnoverSku, dcBaseWarehouse, dcAutoTurnover, dcAutoConfigDelivery, dcAveragePurchase, dcAverageWarehouse);
if (paymentBeforeDelivery != null) { if (paymentBeforeDelivery != null) {
...@@ -1513,19 +1513,21 @@ public class AutoTurnoverJob extends PointJob { ...@@ -1513,19 +1513,21 @@ public class AutoTurnoverJob extends PointJob {
* @param bailunFirstLevelCatagoryId * @param bailunFirstLevelCatagoryId
* @return * @return
*/ */
private DcAutoConfigDelivery getDcAutoConfigDelivery(String bailunSku, String warehouseCode, DcBaseWarehouse dcBaseWarehouse, Integer private DcAutoConfigDelivery getDcAutoConfigDelivery(String bailunSku, String warehouseCode, DcBaseWarehouse dcBaseWarehouse) {
bailunFirstLevelCatagoryId) {
DcAutoConfigDelivery dcAutoConfigDelivery = null; DcAutoConfigDelivery dcAutoConfigDelivery = null;
//如果不是国内仓, 就读配置表 //如果不是国内仓, 就读配置表
if (dcBaseWarehouse != null && !dcBaseWarehouse.getHqType().equals(CommonConstant.DOMESTIC_WAREHOUSE)) { if (dcBaseWarehouse != null && !dcBaseWarehouse.getHqType().equals(CommonConstant.DOMESTIC_WAREHOUSE)) {
try { try {
DcAutoConfigDeliveryMapper dcAutoConfigDeliveryMapper = SessionUtil.getSession().getMapper(DcAutoConfigDeliveryMapper.class); DcAutoConfigDeliveryMapper dcAutoConfigDeliveryMapper = SessionUtil.getSession().getMapper(DcAutoConfigDeliveryMapper.class);
dcAutoConfigDelivery = dcAutoConfigDeliveryMapper.selectOneByExample(DcAutoConfigDeliveryExample.newAndCreateCriteria().andVariableCodeEqualTo(warehouseCode).andBailunSkuEqualTo(bailunSku).andStatusEqualTo(1).andTypeEqualTo(1).example()); dcAutoConfigDelivery = dcAutoConfigDeliveryMapper.selectOneByExample(DcAutoConfigDeliveryExample.newAndCreateCriteria().andVariableCodeEqualTo(warehouseCode).andBailunSkuEqualTo(bailunSku).andStatusEqualTo(1).andTypeEqualTo(1).example());
if (dcAutoConfigDelivery == null && bailunFirstLevelCatagoryId != null) { if (dcAutoConfigDelivery == null) {
dcAutoConfigDelivery = dcAutoConfigDeliveryMapper.selectOneByExample(DcAutoConfigDeliveryExample.newAndCreateCriteria().andVariableCodeEqualTo(dcBaseWarehouse.getHqType()).andBailunSkuEqualTo(bailunSku).andStatusEqualTo(1).andTypeEqualTo(2).example()); dcAutoConfigDelivery = dcAutoConfigDeliveryMapper.selectOneByExample(DcAutoConfigDeliveryExample.newAndCreateCriteria().andVariableCodeEqualTo(dcBaseWarehouse.getHqType()).andBailunSkuEqualTo(bailunSku).andStatusEqualTo(1).andTypeEqualTo(2).example());
} }
if (dcAutoConfigDelivery == null) { if (dcAutoConfigDelivery == null) {
dcAutoConfigDelivery = dcAutoConfigDeliveryMapper.selectOneByExample(DcAutoConfigDeliveryExample.newAndCreateCriteria().andVariableCodeEqualTo(dcBaseWarehouse.getHqType()).andStatusEqualTo(1).andTypeEqualTo(3).example()); dcAutoConfigDelivery = dcAutoConfigDeliveryMapper.selectOneByExample(DcAutoConfigDeliveryExample.newAndCreateCriteria().andVariableCodeEqualTo(warehouseCode).andStatusEqualTo(1).andTypeEqualTo(3).example());
}
if (dcAutoConfigDelivery == null) {
dcAutoConfigDelivery = dcAutoConfigDeliveryMapper.selectOneByExample(DcAutoConfigDeliveryExample.newAndCreateCriteria().andVariableCodeEqualTo(dcBaseWarehouse.getHqType()).andStatusEqualTo(1).andTypeEqualTo(4).example());
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment