diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java index 6aa69705..50c14dab 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java @@ -72,6 +72,10 @@ public class DlTicketWaresServiceImpl extends ServiceImpl list1 = list.stream().filter(item -> item.getWaresStatus().equals("01")).collect(Collectors.toList()); respVO.setStatus(list1.size() == list.size() ? "03" : "04"); baseMapper.updateById(respVO); + // 操作库存 + list.forEach(item -> { + repairWaresService.update(new LambdaUpdateWrapper() + .setSql("stock = stock - " + item.getWaresCount()) + .eq(RepairWares::getId, item.getWaresId()) + ); + }); } }