| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.model.MesPakinParam; |
| | |
| | | @Autowired |
| | | private OrderDetlPakinService orderDetlPakinService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | |
| | |
| | | |
| | | /** |
| | | * 上报单据转执行单据 |
| | | * |
| | | * @author Ryan |
| | | * @date 2026/1/5 14:07 |
| | | */ |
| | |
| | | List<OrderDetlPakin> pakinOrderDetls = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>().eq("order_id", pakinOrder.getId())); |
| | | if (!Objects.isNull(pakinOrderDetls) && !pakinOrderDetls.isEmpty()) { |
| | | pakinOrderDetls.forEach(orderDetl -> { |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",orderDetl.getBarcode())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",orderDetl.getBarcode())); |
| | | int coutPakin = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", orderDetl.getBarcode())); |
| | | if (countLoc > 0 || countWrk > 0 || coutPakin > 0) { |
| | | throw new CoolException(CodeRes.EXIST_500); |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | BeanUtils.copyProperties(orderDetl, waitPakin); |
| | | Mat matnr = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", orderDetl.getMatnr())); |
| | |
| | | OrderInAndOutUtil.updateOrder(order.getPakinPakoutStatus$(),order.getId(),6L,null); |
| | | return SUCCESS; |
| | | } |
| | | |
| | | @Transactional |
| | | public ReturnT<String> startOrderReport(Order order) { |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | } catch (Exception e) { |
| | | log.error("", e); |
| | | } |
| | | } |
| | | } |
| | | // 出库完成上报 |
| | |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | } catch (Exception e) { |
| | | log.error("", e); |
| | | } |
| | | } |
| | | } |
| | | return SUCCESS; |