| | |
| | | * @author Ryan |
| | | * @description 上报质检列表 |
| | | * @params [items 列表] |
| | | * |
| | | * @return boolean |
| | | * @time 2025/3/7 09:12 |
| | | * 11 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | //ASN明细单据分组 |
| | | Map<Long, List<WkOrderItem>> asnIds = wkOrderItems.stream().collect(Collectors.groupingBy(WkOrderItem::getOrderId)); |
| | | ids.forEach(id -> { |
| | | int count = asnOrderService.count(new LambdaQueryWrapper<WkOrder>().in(WkOrder::getId, id)); |
| | | long count = asnOrderService.count(new LambdaQueryWrapper<WkOrder>().in(WkOrder::getId, id)); |
| | | if (count == asnIds.get(id).size()) { |
| | | if (!asnOrderService.update(new LambdaUpdateWrapper<WkOrder>().eq(WkOrder::getId, id).set(WkOrder::getNtyStatus, 1))) { |
| | | throw new CoolException("ASN主单状态修改失败!!"); |
| | |
| | | if (result.getCode() == 200) { |
| | | return R.ok().add(result.getData()); |
| | | } else { |
| | | throw new CoolException("修改失败!!"); |
| | | return R.ok(result.getMsg()).add(result.getData()); |
| | | // throw new CoolException("修改失败!!"); |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | throw new CoolException(e.getMessage()); |
| | |
| | | } |
| | | } |
| | | } |
| | | |