| | |
| | | taskWrk.setWrkNo(workNo1); |
| | | taskWrk.setStatus(TaskStatusType.RECEIVE.id);//任务状态:接收 |
| | | taskWrk.setCreateTime(now); |
| | | try { |
| | | if (param.getIoType() > 1) { |
| | | if (Utils.locNoRowBoolean(locMast.getRow1())) { |
| | | param.setTaskPriority(11); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | taskWrk.setAssignTime(now); |
| | | taskWrk.setIoType(param.getIoType());//任务类型 |
| | | taskWrk.setIoPri(param.getTaskPriority());//优先级 |
| | | taskWrk.setBarcode(param.getBarcode());//条码 |
| | |
| | | |
| | | } else if (param.getIoType() == 2) { |
| | | taskWrk.setWrkSts(11); |
| | | if (!Cools.isEmpty(param.getStartPoint())) { |
| | | // if (!Cools.isEmpty(param.getStartPoint())) { |
| | | taskWrk.setStartPoint(param.getStartPoint());//起点 |
| | | taskWrk.setTargetPoint(param.getTargetPoint()); |
| | | } |
| | | taskWrk.setTargetPoint(param.getTargetPoint()); |
| | | taskWrk.setTargetPoint(String.valueOf(Integer.parseInt(param.getTargetPoint())-1)); |
| | | // } |
| | | // taskWrk.setTargetPoint(param.getTargetPoint()); |
| | | } else if (param.getIoType() == 3) { |
| | | taskWrk.setWrkSts(11); |
| | | if (!Cools.isEmpty(param.getStartPoint())) { |
| | |
| | | // 根据输送线plc遍历 |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("stn_desc", param.getWharfCode())); |
| | | .eq("stn_desc", param.getStartPoint())); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | throw new RuntimeException("未查询到站点信息"); |
| | | } |
| | |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | Short workNo = staProtocol.getWorkNo(); |
| | | if (wharfCode1.contains(param.getWharfCode())) { |
| | | if (wharfCode1.contains(param.getStartPoint())) { |
| | | if (!staProtocol.isLoading() && !staProtocol.isCar() && staProtocol.getWorkNo() > 0) { |
| | | //AGV出库完成以后 |
| | | staProtocol.setWorkNo((short) 0); |
| | |
| | | |
| | | @Override |
| | | public R getAgvPickAndPlaceV1(TaskOverParam param) { |
| | | BasDevp basDevp = basDevpService.selectById(param.getStaNo()); |
| | | BasDevp basDevp = basDevpService.selectById(param.getStartPoint()); |
| | | if (Cools.isEmpty(basDevp)) { |
| | | return R.error("站点号有误" + param.getStaNo()); |
| | | return R.error("站点号有误" + param.getStartPoint()); |
| | | } |
| | | if (Cools.isEmpty(param.getHeight())) { |
| | | return R.error("高度不能为空" + param.getStartPoint()); |
| | | } |
| | | if (param.getType() == 0 && basDevp.getAgvStartPick() == 1) { |
| | | basDevp.setInreq2(param.getHeight().toString()); |
| | | return R.ok(); |
| | | } else if (param.getType() == 1 && basDevp.getAgvStartPlace() == 1) { |
| | | return R.ok(); |
| | |
| | | |
| | | @Override |
| | | public R getAgvPickAndPlaceV2(TaskOverParam param) { |
| | | BasDevp basDevp = basDevpService.selectById(param.getStaNo()); |
| | | BasDevp basDevp = basDevpService.selectById(param.getStartPoint()); |
| | | if (Cools.isEmpty(basDevp)) { |
| | | return R.error("站点号有误" + param.getStaNo()); |
| | | return R.error("站点号有误" + param.getStartPoint()); |
| | | } |
| | | if (param.getType() == 0) { |
| | | basDevp.setAgvTargetPick(1); |