| | |
| | | }); |
| | | List<AsnOrderItem> orderItems = asnOrderItemService.list(new LambdaQueryWrapper<AsnOrderItem>() |
| | | .eq(AsnOrderItem::getAsnId, params.getOrders().getId())); |
| | | double sum = orderItems.stream().mapToDouble(AsnOrderItem::getAnfme).sum(); |
| | | Double sum = orderItems.stream().mapToDouble(AsnOrderItem::getAnfme).sum(); |
| | | orders.setAnfme(sum); |
| | | if (!this.updateById(orders)) { |
| | | throw new CoolException("计划收货数量修改失败!!"); |
| | |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getMessage()); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param |
| | | * @return |
| | |
| | | throw new CoolException("主单修改失败!!"); |
| | | } |
| | | if (Objects.isNull(params.getItems()) || params.getItems().isEmpty()) { |
| | | return R.ok("明细参数不能为空!!"); |
| | | throw new CoolException("明细参数不能为空!!"); |
| | | } |
| | | |
| | | try { |
| | | svaeOrUpdateOrderItem(params, loginUserId); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getMessage()); |
| | | } |
| | | |
| | | return null; |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |