Commit e58119ba zshaohui

功能优化

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