| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordOut; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | |
| | | private final ProcurementRecordOutMapper procurementRecordOutMapper; |
| | | |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final StockUtils stockUtils; |
| | | private final ProductModelMapper productModelMapper; |
| | | |
| | | @Override |
| | | public List<ProcurementDto> listProcurementBySalesLedgerId(ProcurementDto procurementDto) { |
| | |
| | | } |
| | | return procurementPageDtoCopyIPage; |
| | | } |
| | | @Override |
| | | public IPage<ProductModel> listPageProductionStock(Page page) { |
| | | ProductModel productModel = new ProductModel(); |
| | | IPage<ProductModel> iPage = productModelMapper.listPageProductModel(page, productModel); |
| | | iPage.getRecords().forEach(item -> { |
| | | item.setInboundNum(stockUtils.getStockQuantity(item.getId()).get("inboundNum")); |
| | | item.setOutboundNum(stockUtils.getStockQuantity(item.getId()).get("outboundNum")); |
| | | item.setStockQuantity(stockUtils.getStockQuantity(item.getId()).get("stockQuantity")); |
| | | }); |
| | | return iPage; |
| | | } |
| | | |
| | | } |