Commit 16f0154e LN

Merge remote-tracking branch 'origin/master'

2 个父辈 5974e839 5b4fcee9
...@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.handler.impl; ...@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.handler.impl;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.device.bean.StatusBean; import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.enums.OP_STATUS; import com.neotel.smfcore.core.device.enums.OP_STATUS;
import com.neotel.smfcore.core.order.enums.ORDER_COLOR; import com.neotel.smfcore.core.order.enums.ORDER_COLOR;
...@@ -37,7 +38,7 @@ public class AccShelfHandler extends BaseDeviceHandler{ ...@@ -37,7 +38,7 @@ public class AccShelfHandler extends BaseDeviceHandler{
ORDER_COLOR color = ORDER_COLOR.fromRgb(rgb); ORDER_COLOR color = ORDER_COLOR.fromRgb(rgb);
if (color == null) { if (color == null) {
if (queueTask.isPutInTask()) { if (queueTask.isPutInTask()) {
color = ORDER_COLOR.DARKGREEN; color = ORDER_COLOR.FORESTGREEN;
} else { } else {
if (openZhiYin && ObjectUtil.isNotEmpty(queueTask.getSourceId())) { if (openZhiYin && ObjectUtil.isNotEmpty(queueTask.getSourceId())) {
List<DataLog> dataLogList = outMap.get(queueTask.getSourceId()); List<DataLog> dataLogList = outMap.get(queueTask.getSourceId());
...@@ -58,7 +59,12 @@ public class AccShelfHandler extends BaseDeviceHandler{ ...@@ -58,7 +59,12 @@ public class AccShelfHandler extends BaseDeviceHandler{
List<DataLog> dataLogs = getLightGuideTask(outMap,statusBean.getCid()); List<DataLog> dataLogs = getLightGuideTask(outMap,statusBean.getCid());
for (DataLog task : for (DataLog task :
dataLogs) { dataLogs) {
statusBean.addData("open", task.getPosName() + "=" + ORDER_COLOR.fromRgb(task.getLightColor()).name()); if (StringUtils.isBlank(task.getLightColor())){
task.setLightColor(ORDER_COLOR.BLUE.name());
}
String colorName = ORDER_COLOR.fromRgb(task.getLightColor()).name();
statusBean.addData("open", task.getPosName() + "=" + colorName);
log.info("库位[" + task.getPosName() + "][" + task.getType() + "]+亮灯:" + colorName);
} }
return statusBean; return statusBean;
......
...@@ -6,6 +6,7 @@ import com.google.common.collect.Lists; ...@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
import com.neotel.smfcore.common.bean.ResultBean; import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.SecurityUtils; import com.neotel.smfcore.common.utils.SecurityUtils;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.barcode.bean.CodeBean; import com.neotel.smfcore.core.barcode.bean.CodeBean;
import com.neotel.smfcore.core.barcode.service.po.Barcode; import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.bean.StatusBean; import com.neotel.smfcore.core.device.bean.StatusBean;
...@@ -107,6 +108,9 @@ public class NLMShelfHandler extends BaseDeviceHandler { ...@@ -107,6 +108,9 @@ public class NLMShelfHandler extends BaseDeviceHandler {
for (DataLog task : for (DataLog task :
dataLogs) { dataLogs) {
// statusBean.addData("open", task.getPosName() + "=" + ORDER_COLOR.fromRgb(task.getLightColor()).name()); // statusBean.addData("open", task.getPosName() + "=" + ORDER_COLOR.fromRgb(task.getLightColor()).name());
if (StringUtils.isBlank(task.getLightColor())){
task.setLightColor(ORDER_COLOR.BLUE.name());
}
String color = ORDER_COLOR.fromRgb(task.getLightColor()).name(); String color = ORDER_COLOR.fromRgb(task.getLightColor()).name();
addMergeData(statusBean, task, "open", color); addMergeData(statusBean, task, "open", color);
} }
......
...@@ -246,7 +246,12 @@ public class NLPShelfHandler extends BaseDeviceHandler { ...@@ -246,7 +246,12 @@ public class NLPShelfHandler extends BaseDeviceHandler {
List<DataLog> dataLogs = getLightGuideTask(outMap,statusBean.getCid()); List<DataLog> dataLogs = getLightGuideTask(outMap,statusBean.getCid());
for (DataLog task : dataLogs) { for (DataLog task : dataLogs) {
statusBean.addData("open", task.getPosName() + "=" + ORDER_COLOR.fromRgb(task.getLightColor()).name()); if (StringUtils.isBlank(task.getLightColor())){
task.setLightColor(ORDER_COLOR.BLUE.name());
}
String colorName = ORDER_COLOR.fromRgb(task.getLightColor()).name();
statusBean.addData("open", task.getPosName() + "=" + colorName);
log.info("库位[" + task.getPosName() + "][" + task.getType() + "]+亮灯:" + colorName);
} }
return statusBean; return statusBean;
......
...@@ -95,7 +95,7 @@ public class NLShelfHandler extends BaseDeviceHandler { ...@@ -95,7 +95,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
ORDER_COLOR color = ORDER_COLOR.fromRgb(rgb); ORDER_COLOR color = ORDER_COLOR.fromRgb(rgb);
if (color == null) { if (color == null) {
if (queueTask.isPutInTask()) { if (queueTask.isPutInTask()) {
color = ORDER_COLOR.DARKGREEN; color = ORDER_COLOR.FORESTGREEN;
} else { } else {
color = ORDER_COLOR.BLUE; color = ORDER_COLOR.BLUE;
} }
...@@ -377,7 +377,7 @@ public class NLShelfHandler extends BaseDeviceHandler { ...@@ -377,7 +377,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
if (liteOrder != null && liteOrder.isTaskFinished()) { if (liteOrder != null && liteOrder.isTaskFinished()) {
//工单任务已完成 //工单任务已完成
String orderNo = liteOrder.getOrderNo(); String orderNo = liteOrder.getOrderNo();
String orderFinishedTxt = MessageUtils.getText("smfcore.order.finished", new String[]{orderNo}, request.getLocale(), "工单[0]的任务已全部完成"); String orderFinishedTxt = MessageUtils.getText("smfcore.order.finished", new String[]{orderNo}, request.getLocale(), "工单[{0}]的任务已全部完成");
dataMap.put("orderFinishedTxt",orderFinishedTxt); dataMap.put("orderFinishedTxt",orderFinishedTxt);
log.info("工单完成,返回 orderFinishedTxt, "+orderFinishedTxt); log.info("工单完成,返回 orderFinishedTxt, "+orderFinishedTxt);
} }
......
...@@ -48,6 +48,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -48,6 +48,7 @@ import javax.servlet.http.HttpServletRequest;
import java.util.*; import java.util.*;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Slf4j @Slf4j
...@@ -106,6 +107,7 @@ public class BoxKanbanController { ...@@ -106,6 +107,7 @@ public class BoxKanbanController {
} }
} }
if(boxStatusDtos.size()>0){ if(boxStatusDtos.size()>0){
boxStatusDtos = boxStatusDtos.stream().sorted(Comparator.comparing(BoxStatusDto :: getName)).collect(Collectors.toList());
GroupStatusDto groupStatusDto = new GroupStatusDto(group.getId(),group.getGroupName(),boxStatusDtos,groupType); GroupStatusDto groupStatusDto = new GroupStatusDto(group.getId(),group.getGroupName(),boxStatusDtos,groupType);
groupStatusDtos.add(groupStatusDto); groupStatusDtos.add(groupStatusDto);
} }
......
...@@ -491,7 +491,7 @@ public class LiteOrderCache { ...@@ -491,7 +491,7 @@ public class LiteOrderCache {
int remainReelCount = orderItem.getNeedReelCount() - orderItem.getTotalOutReelCount(); int remainReelCount = orderItem.getNeedReelCount() - orderItem.getTotalOutReelCount();
//此PN未完成 //此PN未完成
if (remainNum > 0) { if (remainNum > 0 || remainReelCount > 0) {
if (outBom) { if (outBom) {
//套料出库,设置剩余数量为1,这样就只会出一盘 //套料出库,设置剩余数量为1,这样就只会出一盘
remainNum = 1; remainNum = 1;
......
...@@ -31,12 +31,12 @@ public enum ORDER_COLOR { ...@@ -31,12 +31,12 @@ public enum ORDER_COLOR {
// 'magenta':[17,125,125,0] // 'magenta':[17,125,125,0]
BLUE("0000FF"), BLUE("0000FF"),
//MAGENTA("FF00FF"), //MAGENTA("FF00FF"),
//CYAN("00FFFF"), CYAN("00FFFF"),
FIREBRICK("B22222"), FIREBRICK("B22222"),
PURPLE("A020F0"), PURPLE("A020F0"),
//SKYBLUE("6CA6CD"), //SKYBLUE("6CA6CD"),
//PINK("FF1493"), //PINK("FF1493"),
//FORESTGREEN("228B22"), FORESTGREEN("228B22"),
//LIGHTBLUE("8470FF"), //LIGHTBLUE("8470FF"),
//INDIANRED("8B3A3A"), //INDIANRED("8B3A3A"),
DARKGREEN("556B2F"), DARKGREEN("556B2F"),
...@@ -73,7 +73,7 @@ public enum ORDER_COLOR { ...@@ -73,7 +73,7 @@ public enum ORDER_COLOR {
public static ORDER_COLOR nextColor(Collection<String> excludeColors){ public static ORDER_COLOR nextColor(Collection<String> excludeColors){
excludeColors.add(ORDER_COLOR.BLUE.getRgb());//手动出库 excludeColors.add(ORDER_COLOR.BLUE.getRgb());//手动出库
excludeColors.add(ORDER_COLOR.DARKGREEN.getRgb());//入库 excludeColors.add(ORDER_COLOR.FORESTGREEN.getRgb());//入库
ORDER_COLOR[] allColors = values(); ORDER_COLOR[] allColors = values();
if (excludeColors.size() >= allColors.length){ if (excludeColors.size() >= allColors.length){
......
...@@ -572,14 +572,14 @@ public class OrderController { ...@@ -572,14 +572,14 @@ public class OrderController {
findItem.setTotalOutNum(findItem.getTotalOutNum() + num); findItem.setTotalOutNum(findItem.getTotalOutNum() + num);
findItem.setOutReelCount(findItem.getOutReelCount() + 1); findItem.setOutReelCount(findItem.getOutReelCount() + 1);
findItem.setTotalOutReelCount(findItem.getTotalOutReelCount() + 1); findItem.setTotalOutReelCount(findItem.getTotalOutReelCount() + 1);
findItem.setNeedReelCount(findItem.getNeedReelCount() + 1); //findItem.setNeedReelCount(findItem.getNeedReelCount() + 1);
liteOrderItemManager.save(findItem); liteOrderItemManager.save(findItem);
liteOrder.updateOrderItems(findItem); liteOrder.updateOrderItems(findItem);
//工单未关闭的话,检查状态,全部都出完进行关闭 //工单未关闭的话,检查状态,全部都出完进行关闭
boolean closed = true; boolean closed = true;
for (LiteOrderItem liteOrderItem : liteOrder.getOrderItems()) { for (LiteOrderItem liteOrderItem : liteOrder.getOrderItems()) {
if (!liteOrderItem.isOutFinished()) { if (!liteOrderItem.isOutFinished() || !liteOrderItem.isOutReelFinished()) {
closed = false; closed = false;
break; break;
} }
......
...@@ -384,4 +384,4 @@ smfcore.neoai=Neo Ai ...@@ -384,4 +384,4 @@ smfcore.neoai=Neo Ai
smfcore.duo.offline=\u8BBE\u5907{0}\u79BB\u7EBF smfcore.duo.offline=\u8BBE\u5907{0}\u79BB\u7EBF
smfcore.msg.op.fail=\u64CD\u4F5C\u5931\u8D25 smfcore.msg.op.fail=\u64CD\u4F5C\u5931\u8D25
smfcore.equip.notExist=\u8BBE\u5907\u4E0D\u5B58\u5728 smfcore.equip.notExist=\u8BBE\u5907\u4E0D\u5B58\u5728
smfcore.order.finished=\u5DE5\u5355[0]\u7684\u4EFB\u52A1\u5DF2\u5168\u90E8\u5B8C\u6210
\ No newline at end of file \ No newline at end of file
smfcore.order.finished=\u5DE5\u5355[{0}]\u7684\u4EFB\u52A1\u5DF2\u5168\u90E8\u5B8C\u6210
\ No newline at end of file \ No newline at end of file
...@@ -375,4 +375,4 @@ smfcore.neoai=Neo Ai ...@@ -375,4 +375,4 @@ smfcore.neoai=Neo Ai
smfcore.duo.offline=Equipment {0} offline smfcore.duo.offline=Equipment {0} offline
smfcore.msg.op.fail=failure of an operation smfcore.msg.op.fail=failure of an operation
smfcore.equip.notExist=Device does not exist smfcore.equip.notExist=Device does not exist
smfcore.order.finished=workorder[0] has completed all of its tasks
\ No newline at end of file \ No newline at end of file
smfcore.order.finished=workorder[{0}] has completed all of its tasks
\ No newline at end of file \ No newline at end of file
...@@ -371,4 +371,4 @@ smfcore.neoai=Neo Ai ...@@ -371,4 +371,4 @@ smfcore.neoai=Neo Ai
smfcore.duo.offline=\u8BBE\u5907{0}\u79BB\u7EBF smfcore.duo.offline=\u8BBE\u5907{0}\u79BB\u7EBF
smfcore.msg.op.fail=\u64CD\u4F5C\u5931\u8D25 smfcore.msg.op.fail=\u64CD\u4F5C\u5931\u8D25
smfcore.equip.notExist=\u8BBE\u5907\u4E0D\u5B58\u5728 smfcore.equip.notExist=\u8BBE\u5907\u4E0D\u5B58\u5728
smfcore.order.finished=\u30EF\u30FC\u30AF\u30AA\u30FC\u30C0\u30FC[0]\u306E\u30BF\u30B9\u30AF\u306F\u3059\u3079\u3066\u5B8C\u4E86\u3057\u307E\u3057\u305F
\ No newline at end of file \ No newline at end of file
smfcore.order.finished=\u30EF\u30FC\u30AF\u30AA\u30FC\u30C0\u30FC[{0}]\u306E\u30BF\u30B9\u30AF\u306F\u3059\u3079\u3066\u5B8C\u4E86\u3057\u307E\u3057\u305F
\ No newline at end of file \ No newline at end of file
...@@ -371,4 +371,4 @@ smfcore.neoai=Neo Ai ...@@ -371,4 +371,4 @@ smfcore.neoai=Neo Ai
smfcore.duo.offline=\u8BBE\u5907{0}\u79BB\u7EBF smfcore.duo.offline=\u8BBE\u5907{0}\u79BB\u7EBF
smfcore.msg.op.fail=\u64CD\u4F5C\u5931\u8D25 smfcore.msg.op.fail=\u64CD\u4F5C\u5931\u8D25
smfcore.equip.notExist=\u8BBE\u5907\u4E0D\u5B58\u5728 smfcore.equip.notExist=\u8BBE\u5907\u4E0D\u5B58\u5728
smfcore.order.finished=\u5DE5\u5355[0]\u7684\u4EFB\u52A1\u5DF2\u5168\u90E8\u5B8C\u6210
\ No newline at end of file \ No newline at end of file
smfcore.order.finished=\u5DE5\u5355[{0}]\u7684\u4EFB\u52A1\u5DF2\u5168\u90E8\u5B8C\u6210
\ No newline at end of file \ No newline at end of file
...@@ -371,4 +371,4 @@ smfcore.neoai=Neo Ai ...@@ -371,4 +371,4 @@ smfcore.neoai=Neo Ai
smfcore.duo.offline=\u8A2D\u5099{0}\u96E2\u7DDA smfcore.duo.offline=\u8A2D\u5099{0}\u96E2\u7DDA
smfcore.msg.op.fail=\u64CD\u4F5C\u5931\u6557 smfcore.msg.op.fail=\u64CD\u4F5C\u5931\u6557
smfcore.equip.notExist=\u8A2D\u5099\u4E0D\u5B58\u5728 smfcore.equip.notExist=\u8A2D\u5099\u4E0D\u5B58\u5728
smfcore.order.finished=\u5DE5\u55AE[0]\u7684\u4EFB\u52D9\u5DF2\u5168\u90E8\u5B8C\u6210
\ No newline at end of file \ No newline at end of file
smfcore.order.finished=\u5DE5\u55AE[{0}]\u7684\u4EFB\u52D9\u5DF2\u5168\u90E8\u5B8C\u6210
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!