| | |
| | | import com.zy.asrs.entity.BasDevice; |
| | | import com.zy.asrs.entity.LocAroundBind; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.BasDeviceService; |
| | | import com.zy.asrs.service.LocAroundBindService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WorkService workService; |
| | | |
| | | /** |
| | | * 通知WCS锁定库位,及禁止当前库位的一切操作 |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R backLocs(WorkTaskParams params) { |
| | | if (Objects.isNull(params.getTaskNo())) { |
| | | if (Objects.isNull(params.getWrkNo())) { |
| | | throw new CoolException("工作号不能为空!!"); |
| | | } |
| | | String wrkCode = params.getTaskNo(); |
| | | if (wrkCode.contains("-1")) { |
| | | throw new CoolException("配对任务编码错误,请检查后重新上传!!"); |
| | | } |
| | | |
| | | WrkMast mast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_code", params.getTaskNo())); |
| | | |
| | | // String wrkCode = params.getTaskNo(); |
| | | // if (wrkCode.contains("-1")) { |
| | | // throw new CoolException("配对任务编码错误,请检查后重新上传!!"); |
| | | // } |
| | | WrkMast mast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", params.getWrkNo())); |
| | | if (Objects.isNull(mast)) { |
| | | throw new CoolException("任务不存在!!"); |
| | | } |
| | | if (!mast.getWrkSts().equals(103L)) { |
| | | throw new CoolException("当前任务并非余料出库任务!!"); |
| | | } |
| | | mast.setWrkSts(53L); |
| | | if (!wrkMastService.updateById(mast)) { |
| | | throw new CoolException("任务状态更新失败!!"); |
| | | } |
| | | // if (!mast.getWrkSts().equals(103L)) { |
| | | // throw new CoolException("当前任务并非余料出库任务!!"); |
| | | // } |
| | | // if (params.getIsSuplus() == 1) { |
| | | // mast.setIsSuplus(1); |
| | | // } |
| | | // |
| | | // if (!wrkMastService.updateById(mast)) { |
| | | // throw new CoolException("任务状态更新失败!!"); |
| | | // } |
| | | workService.backLocOperation(mast.getWrkNo() + "", mast.getAppeUser()); |
| | | |
| | | return R.ok("接收成功,执行回库中..."); |
| | | } |