Commit 9eedf462 LN

扫码亮灯修改

1 个父辈 b7df5340
...@@ -54,6 +54,11 @@ public class TaskShelfUtil { ...@@ -54,6 +54,11 @@ public class TaskShelfUtil {
} }
public static String getCid(String loc){ public static String getCid(String loc){
String[] array=loc.split("-");
if(array.length>0){
return array[0];
}
return loc; return loc;
} }
...@@ -604,7 +609,7 @@ public class TaskShelfUtil { ...@@ -604,7 +609,7 @@ public class TaskShelfUtil {
String cid=getCid(shelfLoc); String cid=getCid(shelfLoc);
Storage storage = dataCache.getStorage(cid); Storage storage = dataCache.getStorage(cid);
if (storage == null) { if (storage == null) {
log.error("OpenShelfLed 料架" + shelfInfo.getRealRfid() + " , 位置:" + shelfLoc + ",cid "+cid+" 未找到对应的亮灯料架"); log.error("OpenShelfLed 料架[" + shelfInfo.getRealRfid() + "] , 位置:[" + shelfLoc + "],cid ["+cid+" ]未找到对应的亮灯料架");
return false; return false;
} }
for (ShelfLoc loc : locs for (ShelfLoc loc : locs
...@@ -616,8 +621,8 @@ public class TaskShelfUtil { ...@@ -616,8 +621,8 @@ public class TaskShelfUtil {
if (loc.isReelLeave()) { if (loc.isReelLeave()) {
continue; continue;
} else { } else {
DevicesStatusUtil.appendOp(storage.getCid(), "open", posname + "=" + Color.GREEN.toString()); DevicesStatusUtil.appendOp(storage.getCid(), "open", posname + "=" + "green");
log.info("亮灯料架CID:" + storage.getCid() + ",料架RFID:" + shelfInfo.getRealRfid() + " ,库位: " + posname + " 亮灯 :" + Color.GREEN.toString()); log.info("亮灯料架CID:[" + storage.getCid() + "],料架RFID:[" + shelfInfo.getRealRfid() + "] ,库位: [" + posname + "=green]" );
} }
} }
return true; return true;
......
...@@ -216,11 +216,13 @@ public class CodeLightController { ...@@ -216,11 +216,13 @@ public class CodeLightController {
Storage storage = dataCache.getStorage(cid); Storage storage = dataCache.getStorage(cid);
if (storage == null) { if (storage == null) {
log.error("lightOff code["+code+"],shelfLoc["+shelfLoc+"],cid["+cid+"],posName["+posname+"]未找到料架");
return ResultBean.newErrorResult(99, "smfcore.light.error.noStorage", "未找到料架[" + cid + "]", new String[]{cid}); return ResultBean.newErrorResult(99, "smfcore.light.error.noStorage", "未找到料架[" + cid + "]", new String[]{cid});
} }
StoragePos pos = storagePosManager.getByPosName(posname); StoragePos pos = storagePosManager.getByPosName(posname);
if (pos == null) { if (pos == null) {
log.error("lightOff code["+code+"],shelfLoc["+shelfLoc+"],cid["+cid+"],posName["+posname+"]未找到库位");
return ResultBean.newErrorResult(99, "smfcore.light.error.noStoragePos", "未找到料架库位[" + posname + "]", new String[]{posname}); return ResultBean.newErrorResult(99, "smfcore.light.error.noStoragePos", "未找到料架库位[" + posname + "]", new String[]{posname});
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!