| | |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import com.ruoyi.stock.dto.StockInRecordDto; |
| | | import com.ruoyi.stock.pojo.StockInRecord; |
| | | import com.ruoyi.stock.service.StockInRecordService; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | private final StockInRecordService stockInRecordService; |
| | | private final StockUtils stockUtils; |
| | | private final ApprovalTemplateMapper approvalTemplateMapper; |
| | | private final StockUtils stockUtils; |
| | | |
| | | @Override |
| | | public List<PurchaseLedger> selectPurchaseLedgerList(PurchaseLedger purchaseLedger) { |
| | |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | if (!pendingIds.isEmpty()) { |
| | | stockInRecordService.batchApprove(pendingIds, ReviewStatusEnum.APPROVED.getCode()); |
| | | List<StockInRecordDto.StockInRecordApproveItemDto> approveItems = pendingIds.stream() |
| | | .map(id -> { |
| | | StockInRecordDto.StockInRecordApproveItemDto item = new StockInRecordDto.StockInRecordApproveItemDto(); |
| | | item.setId(id); |
| | | return item; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | stockInRecordService.batchApprove(ReviewStatusEnum.APPROVED.getCode(), approveItems); |
| | | } |
| | | } |
| | | |