| | |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 堆垛机执行状态上报 |
| | | * @author Ryan |
| | | * @date 2026/1/10 16:30 |
| | | * @param params |
| | | * @return com.core.common.R |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R receviceTaskFromWcs(ReceviceTaskParams params) { |
| | | if (Objects.isNull(params.getDevice())) { |
| | | throw new CoolException("设备号不能为空!!"); |
| | | } |
| | | if (Objects.isNull(params.getSuperTaskNo())) { |
| | | throw new CoolException("WMS任务号不能为空!!"); |
| | | } |
| | | if (Objects.isNull(params.getMsgType())) { |
| | | throw new CoolException("动作类型不能为空!!"); |
| | | } |
| | | WrkMast mast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_code", params.getSuperTaskNo())); |
| | | if (Objects.isNull(mast)) { |
| | | throw new CoolException("任务档不存在!!"); |
| | | } |
| | | if (!Objects.isNull(params.getMsgType()) && params.getMsgType().equals("task")) { |
| | | throw new CoolException("消息不能为空!!"); |
| | | } |
| | | |
| | | if (params.getMsgType().equals("task_complete")) { |
| | | mast.setWrkSts(4L); |
| | | if (!wrkMastService.updateById(mast)) { |
| | | throw new CoolException("任务状态修改失败!!"); |
| | | } |
| | | } else if (params.getMsgType().equals("task_cancel")){ |
| | | |
| | | } |
| | | |
| | | // if (!wrkMastService.updateById(mast)) { |
| | | // throw new CoolException("任务状态修改失败!!"); |
| | | // } |
| | | |
| | | return R.ok(); |
| | | } |
| | | } |