Commit 174d18dc zshaohui

1.agv获取目的地错误修改

2.增加异常任务 显示红色
1 个父辈 6b350dbf
......@@ -81,5 +81,9 @@ public enum OP_STATUS {
* 线体扫码位置
*/
ON_LINE,
;
/**
* 异常
*/
ABNORMAL;
}
......@@ -869,6 +869,9 @@ public class BaseDeviceHandler implements IDeviceHandler {
}
if(ObjectUtil.isNotEmpty(mergeMsgList)&& mergeMsgList.size()>0) {
DevicesStatusUtil.updateClientMsg(statusBean.getCid(), mergeMsgList);
} else {
//如果消息为空,直接置为空
DevicesStatusUtil.updateClientMsg(statusBean.getCid(), new ArrayList<>());
}
//状态变化
......
......@@ -6,6 +6,7 @@ import com.google.common.base.Strings;
import com.google.common.collect.Maps;
import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.Constants;
import com.neotel.smfcore.common.utils.SecurityUtils;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.bean.BoxStatusBean;
......@@ -13,6 +14,7 @@ import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.enums.BOX_STATUS;
import com.neotel.smfcore.core.device.enums.OP;
import com.neotel.smfcore.core.device.enums.OP_STATUS;
import com.neotel.smfcore.core.language.util.MessageUtils;
import com.neotel.smfcore.core.storage.enums.DeviceType;
import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
......@@ -335,6 +337,10 @@ public class XLRBoxHandler extends BaseDeviceHandler {
log.info("UM口对应的feeder为:" + feeder + ",当前任务的feeder为:" + feederInfo);
if (feederInfo.startsWith(feeder)) {
needOutTaskList.add(dataLog);
} else {
//smfcore.barcode.noMatchFeeder=出料口feeder[{0}]与当前物料feeder[{1}]不匹配
dataLog.setRemark(MessageUtils.getText("smfcore.barcode.noMatchFeeder",new String[]{feeder,feederInfo},new Locale(SecurityUtils.getCurrentUserLanguage()),"出料口feeder[{0}]与当前物料feeder[{1}]不匹配"));
taskService.updateQueueTask(dataLog);
}
}
}
......
......@@ -100,4 +100,7 @@ public class BoxTaskDto {
@ApiModelProperty("出料口")
private String export = "";
@ApiModelProperty("备注")
private String remark = "";
}
......@@ -266,6 +266,8 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
private String mpn = "";
private String remark = "";
public String getBarcode() {
if(barcode == null){
return "";
......@@ -467,7 +469,7 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
* 判断任务是否异常,执行中,且10分钟未更新的认为异常
*/
public boolean isAbnormal(){
if(isExecuting() ||isInLine()||isInRobot()||isBoxdoor()||isOutBox() ){
if(!isWait() && !isFinished() && !isCancel() ){
if(System.currentTimeMillis() - super.getUpdateDate().getTime() > 10 * 60 * 1000){
return true;
}
......
......@@ -58,7 +58,10 @@ public class StackerController {
int msd = 0;
MJPartNumber mjPartNumber = partNumberManager.findByJkemPartNumber(partNumber);
if (mjPartNumber != null){
log.info("料串"+stacker+",partNumber:"+partNumber+"找到的msd信息为:"+JSON.toJSONString(mjPartNumber));
msd = mjPartNumber.getMsd() < 0 ? 0 : mjPartNumber.getMsd();
} else {
log.info("料串"+stacker+",partNumber:"+partNumber+"未找到对应的msd信息");
}
StackerUtil.updateStacker(stacker,h,w,msd);
return ResultBean.newOkResult("");
......
......@@ -165,6 +165,23 @@ public class StorageExportController {
}
}
}
//判断是否展示红色
for (StorageExportOutDetail detail : resultList) {
String barcode = detail.getBarcode();
DataLog task = null;
List<DataLog> allTasks = taskService.getAllTasks();
for (DataLog dataLog : allTasks) {
if (dataLog.isCheckOutTask() && dataLog.getBarcode().equals(barcode)){
task = dataLog;
break;
}
}
if (task != null) {
if (task.isAbnormal()){
detail.setStatus(OP_STATUS.ABNORMAL.name());
}
}
}
storageExport.setDetailList(resultList);
outDetailList.add(storageExport);
}
......
......@@ -38,14 +38,14 @@ public class StackerUtil {
} else {
StackerCache cache = null;
for (StackerCache stackerCache : cacheList) {
if (stackerCache.getH() == h && stackerCache.getW() == w && stackerCache.getMsd() == stackerCache.getMsd()) {
if (stackerCache.getH() == h && stackerCache.getW() == w && stackerCache.getMsd() == msd) {
stackerCache.setCount(stackerCache.getCount()+1);
cache = stackerCache;
break;
}
}
if (cache == null) {
cache = new StackerCache(stacker, h, w, msd, 0);
cache = new StackerCache(stacker, h, w, msd, 1);
cacheList.add(cache);
}
}
......
......@@ -406,3 +406,4 @@ smfcore.order.quantityBeforeIssuance=\u51FA\u5E93\u524D\u6570\u91CF
smfcore.order.quantityIssued=\u51FA\u5E93\u6570\u91CF
smfcore.order.quantityAfterIssuance=\u56DE\u5E93\u540E\u6570\u91CF
smfcore.order.lackOfQuantity=\u7F3A\u5C11\u6570\u91CF
smfcore.barcode.noMatchFeeder=\u51FA\u6599\u53E3feeder[{0}]\u4E0E\u5F53\u524D\u7269\u6599feeder[{1}]\u4E0D\u5339\u914D
......@@ -396,3 +396,4 @@ smfcore.order.quantityBeforeIssuance =Pre-issuance quantity
smfcore.order.quantityIssued =Issued quantity
smfcore.order.quantityAfterIssuance =Remaining quantity after issuance
smfcore.order.lackOfQuantity=Insufficient Quantity
smfcore.barcode.noMatchFeeder=The feeder [{0}] at the outlet does not match the current material feeder [{1}]
\ No newline at end of file
......@@ -392,3 +392,4 @@ smfcore.order.quantityBeforeIssuance=\u51FA\u5EAB\u524D\u306E\u6570\u91CF
smfcore.order.quantityIssued=\u51FA\u5EAB\u6570\u91CF
smfcore.order.quantityAfterIssuance=\u51FA\u5EAB\u5F8C\u306E\u6570\u91CF
smfcore.order.lackOfQuantity=\u6570\u91CF\u4E0D\u8DB3
smfcore.barcode.noMatchFeeder=\u51FA\u529B\u53E3\u306E\u30D5\u30A3\u30FC\u30C0\u30FC[{0}]\u304C\u73FE\u5728\u306E\u6750\u6599\u30D5\u30A3\u30FC\u30C0\u30FC[{1}]\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093
\ No newline at end of file
......@@ -392,3 +392,4 @@ smfcore.order.quantityBeforeIssuance=\u51FA\u5E93\u524D\u6570\u91CF
smfcore.order.quantityIssued=\u51FA\u5E93\u6570\u91CF
smfcore.order.quantityAfterIssuance=\u56DE\u5E93\u540E\u6570\u91CF
smfcore.order.lackOfQuantity=\u7F3A\u5C11\u6570\u91CF
smfcore.barcode.noMatchFeeder=\u51FA\u6599\u53E3feeder[{0}]\u4E0E\u5F53\u524D\u7269\u6599feeder[{1}]\u4E0D\u5339\u914D
\ No newline at end of file
......@@ -392,3 +392,4 @@ smfcore.order.quantityBeforeIssuance=\u51FA\u5EAB\u524D\u6578\u91CF
smfcore.order.quantityIssued=\u51FA\u5EAB\u6578\u91CF
smfcore.order.quantityAfterIssuance=\u56DE\u5EAB\u5F8C\u6578\u91CF
smfcore.order.lackOfQuantity=\u7F3A\u5C11\u6578\u91CF
smfcore.barcode.noMatchFeeder=\u51FA\u6599\u53E3feeder[{0}]\u8207\u7576\u524D\u7269\u6599feeder[{1}]\u4E0D\u5339\u914D
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!