| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | |
| | | BigDecimal stockQuantity = stockUtils.getStockQuantity(item.getProductModelId()).get("stockQuantity"); |
| | | if(stockQuantity != null) { |
| | | // ProcurementPageDtoCopy procurementDtoCopy = result.getRecords().get(0); |
| | | if (item.getQuantity().compareTo(stockQuantity) >= 0 && item.getApproveStatus() == 0) { |
| | | if (item.getQuantity().compareTo(stockQuantity) <= 0 && item.getApproveStatus() == 0) { |
| | | item.setApproveStatus(1); |
| | | salesLedgerProductService.addOrUpdateSalesLedgerProduct(item); |
| | | } |
| | |
| | | } |
| | | return toAjax(salesLedgerProductService.deleteSalesLedgerProductByIds(ids)); |
| | | } |
| | | |
| | | //根据产品id获取bom判断库存是否充足 |
| | | @GetMapping("/judgmentInventory") |
| | | public R judgmentInventory(SalesLedgerProduct salesLedgerProduct) { |
| | | return salesLedgerProductService.judgmentInventory(salesLedgerProduct); |
| | | } |
| | | } |