Commit aa23f2d3 LN

AGV接口

1 个父辈 a0fc7ca2
......@@ -37,6 +37,7 @@ public class GreeDeviceController {
protected final static Logger log = LogManager.getLogger(QisdaDeviceController.class);
/**
* /rest/api/dcs/device/getShelfEmptySlot
* 获取当前任务数及料架的剩余空位
* 参数:rfids 料架rfid列表,逗号分割,未发送rfids只返回当前剩余任务数量
*/
......@@ -63,24 +64,26 @@ public class GreeDeviceController {
List<String> usedRfidList = InquiryShelfBean.getUsedRfidList(hSerial);
Map<String,Integer> rfidMap = new HashMap<>();
if (!Strings.isBlank(rfids)) {
Integer emptyPos=0;
for (String rfid : rfids.split(",")) {
Integer emptyPos=0;
ShelfInfo shelfInfo = InquiryShelfBean.findShelfByRealRfid(rfid);
if(shelfInfo != null){
if (shelfInfo != null) {
Map<Integer, ShelfLoc> locMap = shelfInfo.getLocMap();
for (ShelfLoc shelfLoc : locMap.values()) {
if(shelfLoc.isEmpty()){
if (shelfLoc.isEmpty()) {
emptyPos++;
}
}
}else{
Integer hSerialTaskCount = hSerialTaskMap.get(shelfInfo.gethSerial());
if (hSerialTaskCount == null) {
emptyPos = 0;
}
} else {
//空料架
emptyPos = 100;
}
Integer hSerialTaskCount = hSerialTaskMap.get(shelfInfo.gethSerial());
if(hSerialTaskCount == null){
emptyPos = 0;
}
rfidMap.put(rfid,emptyPos);
}
}
......@@ -93,8 +96,13 @@ public class GreeDeviceController {
}
/**
* 获取rfid目的地出错
* /rest/api/dcs/device/getRfidTargetP
* 获取rfid目的地
* 参数:rfid 料架rfid
* 返回 json格式:
* code: 结果码,0为正常,其他值表示异常
* msg:提示信息 ok为成功,其他表示异常
* data:表示目标位置
*/
@RequestMapping(value = "/getRfidTargetP")
@ResponseBody
......@@ -126,8 +134,15 @@ public class GreeDeviceController {
}
return ResultBean.newErrorResult(3003,"位置获取失败");
}
/**
* /rest/api/dcs/device/agvRemoveRfid
* 料架放上AGV时,根据RFID清理料架的缓存信息,使料架可以重复使用
* 参数:rfid 料架rfid
* 返回 json格式:
* code: 结果码,0为正常,其他值表示异常
* msg:提示信息 ok为成功,其他表示异常
* data:
*/
@RequestMapping(value = "/agvRemoveRfid")
@ResponseBody
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!