| | |
| | | } catch (Exception e){ |
| | | return R.error("单据编号[order_id]以 "+sign_arm_sku+" 与 "+sign_arm_order+" 作为拆分标记拆分失败!!!"); |
| | | } |
| | | if (param.getArm_no()>4){ |
| | | return R.ok().add(true); |
| | | } |
| | | |
| | | boolean taskArmWorkOrderSign = openService.TaskArmWorkOrderSign(param); |
| | | return R.ok().add(taskArmWorkOrderSign); |
| | |
| | | return R.error("WMS任务号[reqCode]不能为空"); |
| | | } |
| | | String taskCode = param.getTaskCode(); |
| | | String[] split = taskCode.split("-"); |
| | | param.setTaskNo(Integer.parseInt(split[0])); |
| | | if (taskCode == null || !taskCode.matches("^\\d+-.*$")) { |
| | | throw new CoolException("taskCode 格式错误,需为 数字-xxx,例如 123-ABC"); |
| | | } |
| | | |
| | | param.setTaskNo(Integer.parseInt(taskCode.substring(0, taskCode.indexOf("-")))); |
| | | |
| | | // if (Cools.isEmpty(param.getTimestamp())) { |
| | | // return R.error("RGV任务号[timestamp]不能为空"); |
| | | // } |
| | |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | |
| | | List<AgvLocListDetlParam> list = openService.getAgvLocList(param); |
| | | if (!list.isEmpty()) { |
| | | return R.ok(list); |
| | |
| | | return R.error("库位不存在或无明细"); |
| | | } |
| | | |
| | | /** |
| | | * AGV申请过光栅 |
| | | */ |
| | | @PostMapping("/agv/arm/grating/v1/agvCallback") |
| | | @AppAuth(memo = "AGV申请过光栅") |
| | | public synchronized R agvGrating(@RequestHeader(required = false) String appkey, |
| | | @RequestBody AgvGoTheArnParam param, |
| | | HttpServletRequest request) { |
| | | // auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (Cools.isEmpty(param.getCurrentPositionCode())) { |
| | | return R.error("位置[currentPositionCode]不能为空"); |
| | | } |
| | | boolean bindCtnrAndBin = true; |
| | | List<ArmAgvGratingParam> armList = param.getArmNo(); |
| | | if (armList.isEmpty()){ |
| | | return R.error("库位不存在或无明细"); |
| | | } |
| | | for (ArmAgvGratingParam arm : armList){ |
| | | if (bindCtnrAndBin){ |
| | | bindCtnrAndBin = openService.agvApplicationPassedTheGrating(arm); |
| | | // System.out.println("请求通过光栅"+armNo); |
| | | } |
| | | } |
| | | if (bindCtnrAndBin) { |
| | | return new R(0,"成功"); |
| | | } |
| | | return R.error("库位不存在或无明细"); |
| | | } |
| | | |
| | | } |