| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.enums.LocStsType; |
| | | import com.zy.asrs.mapper.TaskMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | |
| | | if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 14) { |
| | | throw new CoolException("当前工作档已完成"); |
| | | } |
| | | |
| | | // 入库 + 库位转移 |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType() == 11)) { |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getSourceStaNo())); |
| | | if (!Objects.isNull(station)) { |
| | | station.setLocSts(LocStsType.LOC_STS_TYPE_O.type); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("站点状态修改失败!!"); |
| | | } |
| | | } |
| | | wrkMast.setWrkSts(4L); |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | |
| | | @Override |
| | | @Transactional |
| | | public void pickWrkMast(String workNo, Long userId) { |
| | | Task wrkMast = this.selectById(workNo); |
| | | Task wrkMast = this.selectOne(new EntityWrapper<Task>().eq("wrk_no", workNo) ); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(workNo + "工作档不存在"); |
| | | } |
| | |
| | | @Override |
| | | public List<Task> selectToBeCompleteData() { |
| | | return this.baseMapper.selectToBeCompleteData(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Task> selectToBeHistoryData() { |
| | | return this.baseMapper.selectToBeHistoryData(); |
| | | } |
| | | |
| | | |
| | |
| | | if (wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103) { |
| | | List<TaskDetl> wrkDetls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | for (TaskDetl wrkDetl : wrkDetls) { |
| | | if (Cools.isEmpty(wrkDetl.getOrderNo())){ |
| | | continue; |
| | | } |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | OrderInAndOutUtil.decrease(Boolean.FALSE, wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), |
| | | wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | |
| | | boolean flag = true; |
| | | OrderPakin order = orderService.selectByNo(wrkDetl.getOrderNo()); //OrderInAndOutUtil.selectByNo(Boolean.FALSE, wrkDetl.getOrderNo()); |
| | | if (Objects.isNull(order)) { |
| | | throw new CoolException("单据信息不存在!!"); |
| | | continue; |
| | | } |
| | | List<OrderDetlPakin> orderDetls = orderDetlService.selectByOrderId(order.getId()); //OrderInAndOutUtil.selectByOrderId(Boolean.FALSE, order.getId()); |
| | | for (OrderDetlPakin orderDetl : orderDetls) { |