Commit c33408dc sunke

流水线修正托盘与料盘绑定信息

1 个父辈 2cfe1ffb
...@@ -1629,4 +1629,76 @@ public class QisdaDeviceController extends BaseController { ...@@ -1629,4 +1629,76 @@ public class QisdaDeviceController extends BaseController {
dataMap.put("stopOut",stopOut); dataMap.put("stopOut",stopOut);
return ResultBean.newOkResult(dataMap); return ResultBean.newOkResult(dataMap);
} }
/**
* 流水线根据条码获取物料的任务信息
*/
@RequestMapping(value = "/getTaskInfo")
@ResponseBody
public ResultBean getTaskInfo(HttpServletRequest request) {
try{
String barcodeStr = request.getParameter("barcode");
log.info("收到流水线获取["+ barcodeStr +"]的任务信息");
Collection<DataLog> allTasks = taskService.getAllTasks();
DataLog task = null;
int plateW = -1;
int plateH = -1;
Collection<CodeBean> codeBeans = dataCache.resolveCodeStr(barcodeStr);
for (CodeBean codeBean : codeBeans) {
if(codeBean.isValid()){
Barcode barcode = codeBean.getBarcode();
plateW = barcode.getPlateSize();
plateH = barcode.getHeight();
for (DataLog dataLog : allTasks) {
if (barcode.getBarcode().equals(dataLog.getBarcode())) {
if(dataLog.isFinished() && dataLog.isFinished()){
//已经完成的入库任务需要NG
log.info(dataLog.getBarcode() + "的入库任务已完成,只返回尺寸信息,流水线需要NG处理");
}else{
task = dataLog;
plateW = task.getW();
plateH = task.getH();
}
break;
}
}
}
}
if(task == null){
String msg = "未找到条码["+barcodeStr+"]任务信息";
ResultBean errorResult = ResultBean.newErrorResult(100, msg);
Map<String,Object> dataMap = new HashMap<>();
dataMap.put("plateW",plateW);
dataMap.put("plateH",plateH);
errorResult.setData(dataMap);
return errorResult;
}else{
Map<String,Object> dataMap = new HashMap<>();
dataMap.put("isPutInTask",task.isPutInTask());
dataMap.put("barcode",task.getBarcode());
dataMap.put("posId",task.getPosName());
dataMap.put("plateW",task.getW());
dataMap.put("plateH",task.getH());
dataMap.put("singleOut", task.isSingleOut());
dataMap.put("urgentReel",task.isUrgentReel());
dataMap.put("cutReel",task.isCutReel());
dataMap.put("smallReel",task.isSmallReel());
dataMap.put("rfid",task.getTempRfid());
dataMap.put("rfidLoc",task.getAppendInfo().getRfidLoc());
return ResultBean.newOkResult(dataMap);
}
}catch(Exception e){
log.error("流水线获取任务信息出错",e);
String msg = "流水线获取任务信息内部错误:" + e.getMessage();
ResultBean errorResult = ResultBean.newErrorResult(-1, msg);
Map<String,Object> dataMap = new HashMap<>();
dataMap.put("plateW",-1);
dataMap.put("plateH",-1);
errorResult.setData(dataMap);
return errorResult;
}
}
} }
...@@ -277,13 +277,13 @@ public class TaskService implements ITaskService { ...@@ -277,13 +277,13 @@ public class TaskService implements ITaskService {
storagePos = storagePosManager.get(lockPosId); storagePos = storagePosManager.get(lockPosId);
log.info(barcodeSave.getBarcode() + "入库时查找到锁定的库位["+storagePos.getPosName()+"]"); log.info(barcodeSave.getBarcode() + "入库时查找到锁定的库位["+storagePos.getPosName()+"]");
}else{ }else{
if(!dataCache.getSettings().isStopIn()){ //if(!dataCache.getSettings().isStopIn()){
storagePos = findLineEmptyPosForPutIn(storage, barcodeSave); storagePos = findLineEmptyPosForPutIn(storage, barcodeSave);
}else { // }else {
statusBean.setMsg("系统已暂停入库"); // statusBean.setMsg("系统已暂停入库");
serverMsgs.put(storage.getCid(),"系统已暂停出入库"); // serverMsgs.put(storage.getCid(),"系统已暂停出入库");
return statusBean; // return statusBean;
} // }
} }
} }
...@@ -1892,6 +1892,9 @@ public class TaskService implements ITaskService { ...@@ -1892,6 +1892,9 @@ public class TaskService implements ITaskService {
//dataLog.setRelationCodes(barcode.getRelationCodes()); //dataLog.setRelationCodes(barcode.getRelationCodes());
dataLog.setType(StorageConstants.OP.PUT_IN); dataLog.setType(StorageConstants.OP.PUT_IN);
dataLog.setNum(barcode.getInitialAmount()); dataLog.setNum(barcode.getInitialAmount());
dataLog.setW(barcode.getPlateSize());
dataLog.setH(barcode.getHeight());
//dataLog.setLocInfo(trayRfid); //dataLog.setLocInfo(trayRfid);
dataLog.setCid(storage.getCid()); dataLog.setCid(storage.getCid());
......
...@@ -92,13 +92,13 @@ ...@@ -92,13 +92,13 @@
<security:authorize ifAnyGranted="ROLE_MORE_STACK_IN"> <security:authorize ifAnyGranted="ROLE_MORE_STACK_IN">
<div class="col-md-2 col-xs-2 menuItem"> <div class="col-md-2 col-xs-2 menuItem">
<a href="#" onclick="openSystem();"> <a href="#" onclick="openSystem();">
<img src="${ctx}/images/menu/12.png" class="menuImg"/> <img src="${ctx}/images/menu/12.png?id=12" class="menuImg"/>
<div><fmt:message key="开机"/></div> <div><fmt:message key="开机"/></div>
</a> </a>
</div> </div>
<div class="col-md-2 col-xs-2 menuItem"> <div class="col-md-2 col-xs-2 menuItem">
<a href="#" onclick="closeSystem();"> <a href="#" onclick="closeSystem();">
<img src="${ctx}/images/menu/13.png" class="menuImg"/> <img src="${ctx}/images/menu/13.png?id=13" class="menuImg"/>
<div><fmt:message key="关机"/></div> <div><fmt:message key="关机"/></div>
</a> </a>
</div> </div>
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
if(data > 0){ if(data > 0){
var result = confirm("还有["+data+"]个未完成的任务,确定要关机吗?\n 执行此命令后系统将在当前的["+data+"]个任务完成后停止运行"); var result = confirm("还有["+data+"]个未完成的任务,确定要关机吗?\n 执行此命令后系统将在当前的["+data+"]个任务完成后停止运行");
if(result){ if(result){
$.post("${ctx}/service/store/closeSystem", {}, function (data) { $.post("${ctx}/service/store/closeSystem", {}, function (result) {
alert("操作成功,当前["+data+"]个任务完成后,系统将停止运行!"); alert("操作成功,当前["+data+"]个任务完成后,系统将停止运行!");
}); });
} }
......

9.5 KB | 宽: | 高:

30.9 KB | 宽: | 高:

myproject/src/main/webapp/images/menu/12.png
myproject/src/main/webapp/images/menu/12.png
myproject/src/main/webapp/images/menu/12.png
myproject/src/main/webapp/images/menu/12.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖

9.6 KB | 宽: | 高:

31.5 KB | 宽: | 高:

myproject/src/main/webapp/images/menu/13.png
myproject/src/main/webapp/images/menu/13.png
myproject/src/main/webapp/images/menu/13.png
myproject/src/main/webapp/images/menu/13.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!