| | |
| | | taskWrk.setWrkNo(workNo1); |
| | | taskWrk.setStatus(TaskStatusType.RECEIVE.id);//任务状态:接收 |
| | | taskWrk.setCreateTime(now); |
| | | taskWrk.setModiTime(now); |
| | | taskWrk.setAssignTime(new Date()); |
| | | taskWrk.setModiUser(6666L); |
| | | try{ |
| | | if (param.getIoType()>1){ |
| | | if (Utils.locNoRowBoolean(locMast.getRow1())){ |
| | | param.setTaskPriority(11); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | } |
| | | taskWrk.setIoType(param.getIoType());//任务类型 |
| | | taskWrk.setIoPri(param.getTaskPriority());//优先级 |
| | | taskWrk.setBarcode(param.getBarcode());//条码 |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public R getAgvPickAndPlaceV1(TaskOverParam param) { |
| | | BasDevp basDevp = basDevpService.selectById(param.getStaNo()); |
| | | if (Cools.isEmpty(basDevp)){ |
| | | return R.error("站点号有误"+param.getStaNo()); |
| | | } |
| | | if (param.getType()==0 && basDevp.getAgvStartPick()==1){ |
| | | return R.ok(); |
| | | }else if (param.getType()==1 && basDevp.getAgvStartPlace()==1){ |
| | | return R.ok(); |
| | | }else { |
| | | return R.error("不允许"); |
| | | } |
| | | } |
| | | // @Override |
| | | // public R getAgvPickAndPlaceV1(TaskOverParam param) { |
| | | // BasDevp basDevp = basDevpService.selectById(param.getStaNo()); |
| | | // if (Cools.isEmpty(basDevp)){ |
| | | // return R.error("站点号有误"+param.getStaNo()); |
| | | // } |
| | | // if (param.getType()==0 && basDevp.getAgvStartPick()==1){ |
| | | // return R.ok(); |
| | | // }else if (param.getType()==1 && basDevp.getAgvStartPlace()==1){ |
| | | // return R.ok(); |
| | | // }else { |
| | | // return R.error("不允许"); |
| | | // } |
| | | // } |
| | | |
| | | @Override |
| | | public R getAgvPickAndPlaceV2(TaskOverParam param) { |
| | | BasDevp basDevp = basDevpService.selectById(param.getStaNo()); |
| | | if (Cools.isEmpty(basDevp)){ |
| | | return R.error("站点号有误"+param.getStaNo()); |
| | | } |
| | | if (param.getType()==0){ |
| | | basDevp.setAgvTargetPick(1); |
| | | basDevpService.updateById(basDevp); |
| | | return R.ok(); |
| | | }else if (param.getType()==1){ |
| | | basDevp.setAgvTargetPlace(1); |
| | | basDevpService.updateById(basDevp); |
| | | return R.ok(); |
| | | }else { |
| | | return R.error("请求类型异常"+param.getType()); |
| | | } |
| | | } |
| | | // @Override |
| | | // public R getAgvPickAndPlaceV2(TaskOverParam param) { |
| | | // BasDevp basDevp = basDevpService.selectById(param.getStaNo()); |
| | | // if (Cools.isEmpty(basDevp)){ |
| | | // return R.error("站点号有误"+param.getStaNo()); |
| | | // } |
| | | // if (param.getType()==0){ |
| | | // basDevp.setAgvTargetPick(1); |
| | | // basDevpService.updateById(basDevp); |
| | | // return R.ok(); |
| | | // }else if (param.getType()==1){ |
| | | // basDevp.setAgvTargetPlace(1); |
| | | // basDevpService.updateById(basDevp); |
| | | // return R.ok(); |
| | | // }else { |
| | | // return R.error("请求类型异常"+param.getType()); |
| | | // } |
| | | // } |
| | | |
| | | public List<Integer> getInEnableRoadway(){ |
| | | int[] roadway = null; |