Commit e58119ba zshaohui

功能优化

1 个父辈 51e76bea
...@@ -135,7 +135,7 @@ public class LiteOrderCache { ...@@ -135,7 +135,7 @@ public class LiteOrderCache {
executeOrderTask(priority); executeOrderTask(priority);
} }
}catch (Exception e){ }catch (Exception e){
log.error("需求单定时器执行出错:",e.getMessage()); log.error("需求单定时器执行出错:",e);
}finally { }finally {
isProcessTimer = false; isProcessTimer = false;
} }
...@@ -492,7 +492,7 @@ public class LiteOrderCache { ...@@ -492,7 +492,7 @@ public class LiteOrderCache {
if (outBom) { if (outBom) {
cacheOrder.setStatus(LITEORDER_STATUS.BOM); cacheOrder.setStatus(LITEORDER_STATUS.BOM);
} else { } else {
cacheOrder.setStatus(LITEORDER_STATUS.TAILS);
} }
//liteOrderMap.put(cacheOrder.getOrderNo(), cacheOrder); //liteOrderMap.put(cacheOrder.getOrderNo(), cacheOrder);
int taskReelCount = 0; int taskReelCount = 0;
...@@ -610,6 +610,8 @@ public class LiteOrderCache { ...@@ -610,6 +610,8 @@ public class LiteOrderCache {
log.info("工单[" + orderNo + "]任务分配结束,任务数[" + taskReelCount + "]"); log.info("工单[" + orderNo + "]任务分配结束,任务数[" + taskReelCount + "]");
smfApi.onOrderStatusChange(cacheOrder); smfApi.onOrderStatusChange(cacheOrder);
//有需要出库的 //有需要出库的
cacheOrder.setStatus(LITEORDER_STATUS.TAILS);
if (taskReelCount <= 0) { if (taskReelCount <= 0) {
finishedOrderTasks(cacheOrder); finishedOrderTasks(cacheOrder);
} }
......
...@@ -335,7 +335,7 @@ public class LizhenController { ...@@ -335,7 +335,7 @@ public class LizhenController {
@ApiOperation("工单差异料上传") @ApiOperation("工单差异料上传")
@RequestMapping("/differenceReel") @RequestMapping("/differenceReel")
@AnonymousAccess @AnonymousAccess
public ResultBean differenceReel(@RequestBody List<Map<String, String>> paramList) { public synchronized ResultBean differenceReel(@RequestBody List<Map<String, String>> paramList) {
log.info("收到mes的差异料数据为:" + JSONObject.toJSONString(paramList)); log.info("收到mes的差异料数据为:" + JSONObject.toJSONString(paramList));
List<LiteOrderItem> itemList = new ArrayList<>(); List<LiteOrderItem> itemList = new ArrayList<>();
......
...@@ -571,6 +571,7 @@ public class InnerBoxRestController { ...@@ -571,6 +571,7 @@ public class InnerBoxRestController {
if (remainTaskCount <= ordrRemainingQty) { if (remainTaskCount <= ordrRemainingQty) {
log.info(export + "剩余数量:" + remainTaskCount + "小于:" + ordrRemainingQty + ",需要生成新的工单"); log.info(export + "剩余数量:" + remainTaskCount + "小于:" + ordrRemainingQty + ",需要生成新的工单");
Collection<LiteOrder> liteOrders = liteOrderCache.getAllLiteOrder(); Collection<LiteOrder> liteOrders = liteOrderCache.getAllLiteOrder();
liteOrders = liteOrders.stream().sorted(Comparator.comparing(LiteOrder :: getCreateDate)).collect(Collectors.toList());
for (LiteOrder liteOrder : liteOrders) { for (LiteOrder liteOrder : liteOrders) {
if (!liteOrder.isMaiZheng()) { if (!liteOrder.isMaiZheng()) {
if (liteOrder.isNew() || liteOrder.isTaskFinished()) { if (liteOrder.isNew() || liteOrder.isTaskFinished()) {
......
...@@ -37,7 +37,8 @@ public class StorageExportController { ...@@ -37,7 +37,8 @@ public class StorageExportController {
return ResultBean.newErrorResult(-1,"","自动出料口配置信息不能为空"); return ResultBean.newErrorResult(-1,"","自动出料口配置信息不能为空");
} }
if (maiZhengNoAutoExportList == null || maiZhengNoAutoExportList.isEmpty()){ if (maiZhengNoAutoExportList == null || maiZhengNoAutoExportList.isEmpty()){
return ResultBean.newErrorResult(-1,"","非自动出料口配置信息不能为空"); //return ResultBean.newErrorResult(-1,"","非自动出料口配置信息不能为空");
maiZhengNoAutoExportList = new ArrayList<>();
} }
log.info("修改迈征出料口配置:,自动信息为:"+ JSON.toJSONString(maiZhengAutoExportList)+",非自动出料口为:"+JSON.toJSONString(maiZhengNoAutoExportList)); log.info("修改迈征出料口配置:,自动信息为:"+ JSON.toJSONString(maiZhengAutoExportList)+",非自动出料口为:"+JSON.toJSONString(maiZhengNoAutoExportList));
List<String> commonList = maiZhengAutoExportList.stream() List<String> commonList = maiZhengAutoExportList.stream()
......
...@@ -122,7 +122,7 @@ public class StorageExportUtil { ...@@ -122,7 +122,7 @@ public class StorageExportUtil {
//判断是否为迈征 //判断是否为迈征
if (maizheng) { if (maizheng) {
//非自动 //非自动
if ("1".equals(recvIndex)) { /* if ("1".equals(recvIndex)) {
log.info("迈征数据获取出料口信息工单号为:" + orderNo); log.info("迈征数据获取出料口信息工单号为:" + orderNo);
List<String> maiZhengExportList = dataCache.getCache(StorageExportUtil.Cache_MaiZheng_NoAuto_Export); List<String> maiZhengExportList = dataCache.getCache(StorageExportUtil.Cache_MaiZheng_NoAuto_Export);
if (maiZhengExportList != null && !maiZhengExportList.isEmpty()) { if (maiZhengExportList != null && !maiZhengExportList.isEmpty()) {
...@@ -134,9 +134,9 @@ public class StorageExportUtil { ...@@ -134,9 +134,9 @@ public class StorageExportUtil {
} }
} }
} }
} }*/
//自动 //自动
else { //else {
log.info("迈征数据获取出料口信息工单号为:" + orderNo); log.info("迈征数据获取出料口信息工单号为:" + orderNo);
List<String> maiZhengExportList = dataCache.getCache(StorageExportUtil.Cache_MaiZheng_Export); List<String> maiZhengExportList = dataCache.getCache(StorageExportUtil.Cache_MaiZheng_Export);
if (maiZhengExportList != null && !maiZhengExportList.isEmpty()) { if (maiZhengExportList != null && !maiZhengExportList.isEmpty()) {
...@@ -148,7 +148,7 @@ public class StorageExportUtil { ...@@ -148,7 +148,7 @@ public class StorageExportUtil {
} }
} }
} }
} //}
return ""; return "";
} }
...@@ -192,6 +192,18 @@ public class StorageExportUtil { ...@@ -192,6 +192,18 @@ public class StorageExportUtil {
continue; continue;
} }
} }
List<String> maiZhengExportList = dataCache.getCache(StorageExportUtil.Cache_MaiZheng_Export);
if (maiZhengExportList != null && !maiZhengExportList.isEmpty()) {
if (maiZhengExportList.contains(export)){
continue;
}
}
List<String> maiZhengNoAutoExportList = dataCache.getCache(StorageExportUtil.Cache_MaiZheng_NoAuto_Export);
if (maiZhengNoAutoExportList != null && !maiZhengNoAutoExportList.isEmpty()) {
if (maiZhengNoAutoExportList.contains(export)){
continue;
}
}
if (StringUtils.isNotBlank(maizhengBoxExport)){ if (StringUtils.isNotBlank(maizhengBoxExport)){
if (export.startsWith(maizhengBoxExport)){ if (export.startsWith(maizhengBoxExport)){
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!