| | |
| | | WaitPakinLog pakinLog = new WaitPakinLog();
|
| | | BeanUtils.copyProperties(waitPakin, pakinLog);
|
| | | pakinLog.setIoStatus(1);
|
| | | pakinLog.setId(null);
|
| | | if (!waitPakinLogService.saveOrUpdate(pakinLog)) {
|
| | | throw new CoolException("组拖历史档更新失败");
|
| | | }
|
| | |
| | | List<Order> orders = orderService.list(new LambdaQueryWrapper<Order>().in(Order::getId, list));
|
| | | //订单入历史档
|
| | | orders.forEach(order -> {
|
| | | if (order.getOrderType() != OrderType.PK_IN_ORDER.id) {
|
| | | throw new CoolException("当前订单类型:" + order.getOrderType() + ",不可做平库上架操作!!");
|
| | | }
|
| | | // 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);
|
| | | orderLog.setId(null);
|
| | | if (!orderLogService.save(orderLog)) {
|
| | | throw new CoolException("历史单据更新失败!!");
|
| | | }
|
| | |
| | | BeanUtils.copyProperties(delt, detlLog);
|
| | | detlLog.setQty(delt.getWorkQty());
|
| | | detlLog.setWorkQty(0.0);
|
| | | detlLog.setId(null);
|
| | | detlLogs.add(detlLog);
|
| | | });
|
| | |
|
| | |
| | | if (Objects.isNull(order)) {
|
| | | throw new CoolException("绑定订单不存在!!");
|
| | | }
|
| | | siteNo.setOrderNo(order.getOrderNo()).setOrderId(order.getId()).setSiteStatus(CacheSiteStatusType.R.id).setBarcode(param.get("barcode").toString());
|
| | | siteNo.setOrderNo(order.getOrderNo())
|
| | | .setOrderId(order.getId())
|
| | | .setSiteStatus(CacheSiteStatusType.R.id)
|
| | | .setBarcode(param.get("barcode").toString());
|
| | | if (cacheSiteMapper.updateById(siteNo) < 1) {
|
| | | throw new CoolException("订单播种位绑定失败!!" );
|
| | | }
|
| | |
| | | if (StringUtil.isNullOrEmpty(siteNo.getOrderNo())) {
|
| | | throw new CoolException("当前播种站点未绑定订单!!");
|
| | | }
|
| | | siteNo.setOrderId(null).setOrderNo(null).setSiteNo("0");
|
| | | siteNo.setOrderId(null).setOrderNo(null).setBarcode(null).setSiteNo("0");
|
| | | if (cacheSiteMapper.updateById(siteNo) < 1) {
|
| | | throw new CoolException("订单与播种位解绑失败!!" );
|
| | | }
|
| | |
| | | return R.ok("发货完成!!");
|
| | | }
|
| | |
|
| | | /**
|
| | | * @author Ryan
|
| | | * @date 2025/6/28
|
| | | * @description: 获取平库推荐库位
|
| | | * @version 1.0
|
| | | */
|
| | | @Override
|
| | | public R getRecommendLocs() {
|
| | | return locService.getRecommengLocs();
|
| | | }
|
| | |
|
| | | /**
|
| | | * @author Ryan
|
| | | * @date 2025/6/28
|
| | | * @description: 查询物料信息
|
| | | * @version 1.0
|
| | | */
|
| | | @Override
|
| | | public R getMatsByCode(String matnr) {
|
| | | return R.ok().add(matService.list(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, matnr)));
|
| | | }
|
| | |
|
| | | }
|