Commit 174d18dc zshaohui

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

2.增加异常任务 显示红色
1 个父辈 6b350dbf
...@@ -81,5 +81,9 @@ public enum OP_STATUS { ...@@ -81,5 +81,9 @@ public enum OP_STATUS {
* 线体扫码位置 * 线体扫码位置
*/ */
ON_LINE, ON_LINE,
;
/**
* 异常
*/
ABNORMAL;
} }
...@@ -869,6 +869,9 @@ public class BaseDeviceHandler implements IDeviceHandler { ...@@ -869,6 +869,9 @@ public class BaseDeviceHandler implements IDeviceHandler {
} }
if(ObjectUtil.isNotEmpty(mergeMsgList)&& mergeMsgList.size()>0) { if(ObjectUtil.isNotEmpty(mergeMsgList)&& mergeMsgList.size()>0) {
DevicesStatusUtil.updateClientMsg(statusBean.getCid(), mergeMsgList); DevicesStatusUtil.updateClientMsg(statusBean.getCid(), mergeMsgList);
} else {
//如果消息为空,直接置为空
DevicesStatusUtil.updateClientMsg(statusBean.getCid(), new ArrayList<>());
} }
//状态变化 //状态变化
......
...@@ -6,6 +6,7 @@ import com.google.common.base.Strings; ...@@ -6,6 +6,7 @@ import com.google.common.base.Strings;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.Constants; 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.common.utils.StringUtils;
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.BoxStatusBean; import com.neotel.smfcore.core.device.bean.BoxStatusBean;
...@@ -13,6 +14,7 @@ import com.neotel.smfcore.core.device.bean.StatusBean; ...@@ -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.BOX_STATUS;
import com.neotel.smfcore.core.device.enums.OP; import com.neotel.smfcore.core.device.enums.OP;
import com.neotel.smfcore.core.device.enums.OP_STATUS; 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.enums.DeviceType;
import com.neotel.smfcore.core.storage.service.po.Storage; import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.storage.service.po.StoragePos; import com.neotel.smfcore.core.storage.service.po.StoragePos;
...@@ -335,6 +337,10 @@ public class XLRBoxHandler extends BaseDeviceHandler { ...@@ -335,6 +337,10 @@ public class XLRBoxHandler extends BaseDeviceHandler {
log.info("UM口对应的feeder为:" + feeder + ",当前任务的feeder为:" + feederInfo); log.info("UM口对应的feeder为:" + feeder + ",当前任务的feeder为:" + feederInfo);
if (feederInfo.startsWith(feeder)) { if (feederInfo.startsWith(feeder)) {
needOutTaskList.add(dataLog); 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 { ...@@ -100,4 +100,7 @@ public class BoxTaskDto {
@ApiModelProperty("出料口") @ApiModelProperty("出料口")
private String export = ""; private String export = "";
@ApiModelProperty("备注")
private String remark = "";
} }
...@@ -266,6 +266,8 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog> ...@@ -266,6 +266,8 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
private String mpn = ""; private String mpn = "";
private String remark = "";
public String getBarcode() { public String getBarcode() {
if(barcode == null){ if(barcode == null){
return ""; return "";
...@@ -467,7 +469,7 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog> ...@@ -467,7 +469,7 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
* 判断任务是否异常,执行中,且10分钟未更新的认为异常 * 判断任务是否异常,执行中,且10分钟未更新的认为异常
*/ */
public boolean isAbnormal(){ public boolean isAbnormal(){
if(isExecuting() ||isInLine()||isInRobot()||isBoxdoor()||isOutBox() ){ if(!isWait() && !isFinished() && !isCancel() ){
if(System.currentTimeMillis() - super.getUpdateDate().getTime() > 10 * 60 * 1000){ if(System.currentTimeMillis() - super.getUpdateDate().getTime() > 10 * 60 * 1000){
return true; return true;
} }
......
...@@ -58,7 +58,10 @@ public class StackerController { ...@@ -58,7 +58,10 @@ public class StackerController {
int msd = 0; int msd = 0;
MJPartNumber mjPartNumber = partNumberManager.findByJkemPartNumber(partNumber); MJPartNumber mjPartNumber = partNumberManager.findByJkemPartNumber(partNumber);
if (mjPartNumber != null){ if (mjPartNumber != null){
log.info("料串"+stacker+",partNumber:"+partNumber+"找到的msd信息为:"+JSON.toJSONString(mjPartNumber));
msd = mjPartNumber.getMsd() < 0 ? 0 : mjPartNumber.getMsd(); msd = mjPartNumber.getMsd() < 0 ? 0 : mjPartNumber.getMsd();
} else {
log.info("料串"+stacker+",partNumber:"+partNumber+"未找到对应的msd信息");
} }
StackerUtil.updateStacker(stacker,h,w,msd); StackerUtil.updateStacker(stacker,h,w,msd);
return ResultBean.newOkResult(""); return ResultBean.newOkResult("");
......
...@@ -165,6 +165,23 @@ public class StorageExportController { ...@@ -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); storageExport.setDetailList(resultList);
outDetailList.add(storageExport); outDetailList.add(storageExport);
} }
......
...@@ -38,14 +38,14 @@ public class StackerUtil { ...@@ -38,14 +38,14 @@ public class StackerUtil {
} else { } else {
StackerCache cache = null; StackerCache cache = null;
for (StackerCache stackerCache : cacheList) { 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); stackerCache.setCount(stackerCache.getCount()+1);
cache = stackerCache; cache = stackerCache;
break; break;
} }
} }
if (cache == null) { if (cache == null) {
cache = new StackerCache(stacker, h, w, msd, 0); cache = new StackerCache(stacker, h, w, msd, 1);
cacheList.add(cache); cacheList.add(cache);
} }
} }
......
...@@ -406,3 +406,4 @@ smfcore.order.quantityBeforeIssuance=\u51FA\u5E93\u524D\u6570\u91CF ...@@ -406,3 +406,4 @@ smfcore.order.quantityBeforeIssuance=\u51FA\u5E93\u524D\u6570\u91CF
smfcore.order.quantityIssued=\u51FA\u5E93\u6570\u91CF smfcore.order.quantityIssued=\u51FA\u5E93\u6570\u91CF
smfcore.order.quantityAfterIssuance=\u56DE\u5E93\u540E\u6570\u91CF smfcore.order.quantityAfterIssuance=\u56DE\u5E93\u540E\u6570\u91CF
smfcore.order.lackOfQuantity=\u7F3A\u5C11\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
...@@ -395,4 +395,5 @@ smfcore.order.noInventory=Is Inventory Unavailable ...@@ -395,4 +395,5 @@ smfcore.order.noInventory=Is Inventory Unavailable
smfcore.order.quantityBeforeIssuance =Pre-issuance quantity smfcore.order.quantityBeforeIssuance =Pre-issuance quantity
smfcore.order.quantityIssued =Issued quantity smfcore.order.quantityIssued =Issued quantity
smfcore.order.quantityAfterIssuance =Remaining quantity after issuance smfcore.order.quantityAfterIssuance =Remaining quantity after issuance
smfcore.order.lackOfQuantity=Insufficient Quantity
\ No newline at end of file \ No newline at end of file
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 \ No newline at end of file
...@@ -391,4 +391,5 @@ smfcore.order.noInventory=\u5728\u5EAB\u306A\u3057\u304B ...@@ -391,4 +391,5 @@ smfcore.order.noInventory=\u5728\u5EAB\u306A\u3057\u304B
smfcore.order.quantityBeforeIssuance=\u51FA\u5EAB\u524D\u306E\u6570\u91CF smfcore.order.quantityBeforeIssuance=\u51FA\u5EAB\u524D\u306E\u6570\u91CF
smfcore.order.quantityIssued=\u51FA\u5EAB\u6570\u91CF smfcore.order.quantityIssued=\u51FA\u5EAB\u6570\u91CF
smfcore.order.quantityAfterIssuance=\u51FA\u5EAB\u5F8C\u306E\u6570\u91CF smfcore.order.quantityAfterIssuance=\u51FA\u5EAB\u5F8C\u306E\u6570\u91CF
smfcore.order.lackOfQuantity=\u6570\u91CF\u4E0D\u8DB3
\ No newline at end of file \ No newline at end of file
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 \ No newline at end of file
...@@ -391,4 +391,5 @@ smfcore.order.noInventory=\u662F\u5426\u65E0\u5E93\u5B58 ...@@ -391,4 +391,5 @@ smfcore.order.noInventory=\u662F\u5426\u65E0\u5E93\u5B58
smfcore.order.quantityBeforeIssuance=\u51FA\u5E93\u524D\u6570\u91CF smfcore.order.quantityBeforeIssuance=\u51FA\u5E93\u524D\u6570\u91CF
smfcore.order.quantityIssued=\u51FA\u5E93\u6570\u91CF smfcore.order.quantityIssued=\u51FA\u5E93\u6570\u91CF
smfcore.order.quantityAfterIssuance=\u56DE\u5E93\u540E\u6570\u91CF smfcore.order.quantityAfterIssuance=\u56DE\u5E93\u540E\u6570\u91CF
smfcore.order.lackOfQuantity=\u7F3A\u5C11\u6570\u91CF
\ No newline at end of file \ No newline at end of file
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 \ No newline at end of file
...@@ -391,4 +391,5 @@ smfcore.order.noInventory=\u662F\u5426\u7121\u5EAB\u5B58 ...@@ -391,4 +391,5 @@ smfcore.order.noInventory=\u662F\u5426\u7121\u5EAB\u5B58
smfcore.order.quantityBeforeIssuance=\u51FA\u5EAB\u524D\u6578\u91CF smfcore.order.quantityBeforeIssuance=\u51FA\u5EAB\u524D\u6578\u91CF
smfcore.order.quantityIssued=\u51FA\u5EAB\u6578\u91CF smfcore.order.quantityIssued=\u51FA\u5EAB\u6578\u91CF
smfcore.order.quantityAfterIssuance=\u56DE\u5EAB\u5F8C\u6578\u91CF smfcore.order.quantityAfterIssuance=\u56DE\u5EAB\u5F8C\u6578\u91CF
smfcore.order.lackOfQuantity=\u7F3A\u5C11\u6578\u91CF
\ No newline at end of file \ No newline at end of file
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 \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!