Commit ec3c1b3a LN

增加料仓客户端取消任务接口。NL料架界面显示库位号。

1 个父辈 93cd73cd
......@@ -32,7 +32,7 @@ import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
@Api(tags = "智能料架/亮灯料架/普通料架")
@Api(tags = "SHELF: NL(智能料架/亮灯料架/普通料架)")
@RestController
@Slf4j
public class NLShelfHandler extends BaseDeviceHandler {
......@@ -44,8 +44,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
@Autowired
private TokenProvider tokenProvider;
@Autowired
private TaskService taskService;
@Autowired
private ILiteOrderManager liteOrderManager;
......@@ -173,7 +172,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
@PostMapping("/api/nlShelf/codeIn")
@PreAuthorize("@el.check('NLShelf:putIn')")
public ResultBean codeIn(@RequestBody Map<String, String> mapValues,HttpServletRequest request) {
String code = mapValues.get("code");
String code = mapValues.get("code").trim();
String groupId = mapValues.get("group");
String storageId = mapValues.get("storageId");
String sourceId=mapValues.get("sourceId");
......@@ -193,9 +192,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
if (currentStorage == null || !currentStorage.isNLShelf()) {
return ResultBean.newErrorResult(1, "smfcore.shelf.notFound", "未找到料架");
}
if (currentStorage != null) {
groupId = currentStorage.getGroupId();
}
groupId = currentStorage.getGroupId();
}
if (groupId != null && groupId.equals("-1")) {
groupId = "";
......@@ -240,7 +237,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
operateBean.setNextPosId(null);
shelfPutInBeanMap.put(token, operateBean);
log.info(ptoken + ":库位[" + pos.getPosName() + "]操作成功,请扫描要放入的物料");
return ResultBean.newOkResult("smfcore.shelf.msg.tipScanReel", "库位[" + pos.getPosName() + "]操作成功,请扫描要放入的物料", new String[]{pos.getPosName()},"");
return ResultBean.newOkResult("smfcore.shelf.msg.tipScanReel", "库位[" + pos.getPosName() + "]操作成功,请扫描要放入的物料", new String[]{pos.getPosName()},pos.getPosName());
}
} else {
//扫的是物料条码
......@@ -313,6 +310,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
Collection<String> operatingPosIds = taskService.excludePosIds();
StoragePos nextPos = storagePosManager.autoFindNextEmptyPos(currentStorage, operatingPosIds, currentPos);
String nextPosId = nextPos == null ? "null" : nextPos.getId() + "[" + nextPos.getPosName() + "]";
String data=nextPos == null ? "" : nextPos.getPosName();
//
operateBean.setNextPosId(null);
if (nextPos != null) {
......@@ -321,7 +319,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
shelfPutInBeanMap.put(token, operateBean);
log.info(ptoken + ":条码[" + code + "]入库操作成功,请放入库位 [" + currentPos.getPosName() + "],下一个库位号:" + nextPosId);
return ResultBean.newOkResult("smfcore.shelf.msg.inOk", "操作成功,请放入库位[" + currentPos.getPosName() + "]", new String[]{currentPos.getPosName()}, "");
return ResultBean.newOkResult("smfcore.shelf.msg.inOk", "操作成功,请放入库位[" + currentPos.getPosName() + "]", new String[]{currentPos.getPosName()}, data);
}
}
......@@ -340,6 +338,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
Collection<String> operatingPosIds = taskService.excludePosIds();
StoragePos nextPos = storagePosManager.autoFindNextEmptyPos(currentStorage, operatingPosIds, opPos);
String nextPosId = nextPos == null ? "null" : nextPos.getId() + "[" + nextPos.getPosName() + "]";
String data=nextPos == null ? "" : nextPos.getPosName();
//
operateBean.setNextPosId(null);
if (nextPos != null) {
......@@ -347,7 +346,7 @@ public class NLShelfHandler extends BaseDeviceHandler {
}
shelfPutInBeanMap.put(token, operateBean);
log.info(ptoken + ":条码["+code+"]入库操作成功,请放入库位 ["+opPos.getPosName()+"],下一个库位号:" + nextPosId);
return ResultBean.newOkResult("smfcore.shelf.msg.inOk", "操作成功,请放入库位["+opPos.getPosName()+"]", new String[]{opPos.getPosName()},"");
return ResultBean.newOkResult("smfcore.shelf.msg.inOk", "操作成功,请放入库位["+opPos.getPosName()+"]", new String[]{opPos.getPosName()},data);
}
} catch (ValidateException e) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!