Commit fe8546e1 zshaohui

单据缺料时 通知wms

1 个父辈 b11b766b
......@@ -38,11 +38,15 @@ import com.neotel.smfcore.custom.lizhen.innerBox.util.StorageExportUtil;
import com.neotel.smfcore.custom.lizhen.third.maicheng.api.MaiZhengApi;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.FetchHoldInfoRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.TicketPickLabelList;
import com.neotel.smfcore.custom.luxsan.api.bean.request.TicketPickRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.result.FetchHoldInfoResult;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.DisableBarcodeUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.LiteorderCheckType;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.TaskCurrentLoc;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BinCacheUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.wipstor.util.TaskLocUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -437,6 +441,38 @@ public class LiteOrderCache {
}
}
finishedOrderTasks(order);
//如果是单据领料的话,一盘都没有出的,通知wms,缺料
if (LiteorderCheckType.TICKET_CHECKOUT == order.getCheckType()) {
List<LiteOrderItem> orderItems = order.getOrderItems();
for (LiteOrderItem orderItem : orderItems) {
if (orderItem.getTotalOutNum() <= 0) {
log.info("行号:"+orderItem.getTicketItem()+",单据号:"+orderItem.getTicketCode()+",发料数量为0,通知wms缺料");
try {
String binCode = "";
Map<String, String> binCacheMap = BinCacheUtil.binCodeCacheMap(orderItem.getSrcWarehouse());
for (String code : binCacheMap.keySet()) {
binCode = code;
break;
}
TicketPickRequest request = new TicketPickRequest();
request.setBIN_CODE(binCode);
request.setLABEL_LIST(new ArrayList<>());
request.setPLANT_CODE(CommonUtil.plantCode);
request.setQTY(0);
request.setTICKET_CODE(orderItem.getTicketCode());
request.setTICKET_ITEM(orderItem.getTicketItem());
LuxsanApi.ticketPick(request);
} catch (Exception e) {
e.printStackTrace();
log.info("行号:"+orderItem.getTicketItem()+",单据号:"+orderItem.getTicketCode()+",通知缺料失败:"+e.getMessage());
}
}
}
}
}
liteOrderManager.save(order);
liteOrderMap.put(orderNo, order);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!