| | |
| | | import com.zy.asrs.wms.asrs.entity.param.GeneratePakInParam;
|
| | | import com.zy.asrs.wms.asrs.entity.param.PakinOnShelvesParams;
|
| | | import com.zy.asrs.wms.asrs.mapper.CacheSiteMapper;
|
| | | import com.zy.asrs.wms.asrs.mapper.OrderDetlLogMapper;
|
| | | import com.zy.asrs.wms.asrs.mapper.OrderDetlMapper;
|
| | | import com.zy.asrs.wms.asrs.mapper.SeedSitesMapper;
|
| | | import com.zy.asrs.wms.asrs.service.*;
|
| | |
| | | @Autowired
|
| | | private OrderDetlMapper orderDetlMapper;
|
| | |
|
| | | @Autowired
|
| | | private OrderDetlLogService orderDetlLogService;
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public boolean batchMergeOrders(BatchMergeOrdersParam ordersParam) {
|
| | |
| | | if (workService.generatePakIn(generatePakInParam)) {
|
| | | return true;
|
| | | }
|
| | | } else {
|
| | | //fixme 平库是否需要预约入库
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | waitPakins.forEach(waitPakin -> {
|
| | | WaitPakinLog pakinLog = new WaitPakinLog();
|
| | | BeanUtils.copyProperties(waitPakin, pakinLog);
|
| | | pakinLog.setIoStatus(1);
|
| | | if (!waitPakinLogService.saveOrUpdate(pakinLog)) {
|
| | | throw new CoolException("组拖历史档更新失败");
|
| | | }
|
| | |
| | | if (order.getOrderType() != OrderType.PK_IN_ORDER.id) {
|
| | | throw new CoolException("当前订单类型:" + order.getOrderType() + ",不可做平库上架操作!!");
|
| | | }
|
| | | //修改订单状态为已完成
|
| | | order.setOrderSettle(OrderSettleType.COMPLETE.val());
|
| | |
|
| | | OrderLog orderLog = new OrderLog();
|
| | | BeanUtils.copyProperties(order, orderLog);
|
| | | if (!orderLogService.save(orderLog)) {
|
| | |
| | | if (!orderService.removeBatchByIds(orders)) {
|
| | | throw new CoolException("订单删除失败!!");
|
| | | }
|
| | | // //删除订单明细数据
|
| | | // if (orderDetlMapper.delete(new LambdaQueryWrapper<OrderDetl>().in(OrderDetl::getOrderId, list)) < 1) {
|
| | | // throw new CoolException("订单明细删除失败!!");
|
| | | // }
|
| | |
|
| | | List<OrderDetl> detls = orderDetlMapper.selectList(new LambdaQueryWrapper<OrderDetl>().in(OrderDetl::getOrderId, list));
|
| | | List<OrderDetlLog> detlLogs = new ArrayList<>();
|
| | | detls.forEach(delt ->{
|
| | | OrderDetlLog detlLog = new OrderDetlLog();
|
| | | BeanUtils.copyProperties(delt, detlLog);
|
| | | detlLogs.add(detlLog);
|
| | | });
|
| | |
|
| | | //订单明细转历史档
|
| | | if (!orderDetlLogService.saveBatch(detlLogs)) {
|
| | | throw new CoolException("订单明细转历史失败!!");
|
| | | }
|
| | |
|
| | | //删除订单明细数据
|
| | | if (!orderDetlService.remove(new LambdaQueryWrapper<OrderDetl>().in(OrderDetl::getOrderId, list))) {
|
| | | throw new CoolException("订单明细删除失败!!");
|
| | | }
|
| | |
|
| | | return true;
|
| | | }
|
| | |
| | | if (!remove) {
|
| | | throw new CoolException("原始订单明细删除失败!!");
|
| | | }
|
| | | if (orderService.remove(new LambdaQueryWrapper<Order>().in(Order::getId, list))) {
|
| | | if (!orderService.remove(new LambdaQueryWrapper<Order>().in(Order::getId, list))) {
|
| | | throw new CoolException("原始订单删除失败!!");
|
| | | }
|
| | |
|