Commit 35b514e8 zshaohui

1.工单出料逻辑修改

1 个父辈 086e21c5
package com.neotel.smfcore.core.order;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
......@@ -608,10 +609,33 @@ public class LiteOrderCache {
//PN
do {
for (String pn : partNumberSpl) {
//先挑全部的
pos = storagePosManager.findPartNumberInStorages(storageIdList, pn, excludePosIds, checkoutType, orderItem.getBrand(),cacheOrder.isMaiZheng());
if (pos != null) {
Barcode barcode = pos.getBarcode();
if (barcode == null) {
pos = null;
} else {
//如果呆滞超过3天 就直接出库
Date putInDate = barcode.getPutInDate();
if (putInDate == null) {
pos = null;
} else {
long days = DateUtil.betweenDay(putInDate, new Date(), true);
if (days < 3) {
pos = null;
} else {
log.info(barcode.getBarcode()+"的入库时间为:"+barcode.getPutInDateStr()+"呆滞超过了3天");
}
}
}
}
//先从数量少的,去挑
if (fewTasksStorageIdList != null && !fewTasksStorageIdList.isEmpty()) {
log.info("先从任务数量小于10的料仓,去挑,partNumber为[{}],工单号为[{}]",pn,orderNo);
pos = storagePosManager.findPartNumberInStorages(fewTasksStorageIdList, pn, excludePosIds, checkoutType, orderItem.getBrand(),cacheOrder.isMaiZheng());
if (pos == null) {
if (fewTasksStorageIdList != null && !fewTasksStorageIdList.isEmpty()) {
log.info("先从任务数量小于10的料仓,去挑,partNumber为[{}],工单号为[{}]", pn, orderNo);
pos = storagePosManager.findPartNumberInStorages(fewTasksStorageIdList, pn, excludePosIds, checkoutType, orderItem.getBrand(), cacheOrder.isMaiZheng());
}
}
if (pos == null){
if (secondFewTasksStorageIdList != null && !secondFewTasksStorageIdList.isEmpty()){
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!