This commit is contained in:
Vinjor 2024-10-17 15:22:54 +08:00
commit d10a19a252

View File

@ -72,6 +72,10 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
@Lazy
private DlRepairSoiService repairSoiService;
@Resource
@Lazy
private RepairWaresService repairWaresService;
/**
* 分页查询
*
@ -255,6 +259,13 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
List<DlTwItem> 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<RepairWares>()
.setSql("stock = stock - " + item.getWaresCount())
.eq(RepairWares::getId, item.getWaresId())
);
});
}
}