| | |
| | | import com.ruoyi.basic.service.CoalFieldService; |
| | | import com.ruoyi.basic.service.CoalPlanService; |
| | | import com.ruoyi.basic.service.CoalValueService; |
| | | import com.ruoyi.business.constant.InventoryRecordConstant; |
| | | import com.ruoyi.business.dto.PendingInventoryDto; |
| | | import com.ruoyi.business.entity.OfficialInventory; |
| | | import com.ruoyi.business.entity.PendingInventory; |
| | |
| | | officialInventory.setPendingId(pendingInventoryDto.getPId()); |
| | | officialInventory.setInventoryQuantity(quantity); |
| | | officialInventory.setRegistrantId(1L); |
| | | officialInventory.setType(pendingInventory.getType()); |
| | | officialInventory.setSupplierId(pendingInventoryDto.getSupplierId()); |
| | | officialInventoryMapper.insert(officialInventory); |
| | | } else { |
| | |
| | | // 2. 准备待入库记录 |
| | | Long userId = SecurityUtils.getUserId(); |
| | | PendingInventory pendingInventory = new PendingInventory(); |
| | | pendingInventory.setUnit("t"); |
| | | pendingInventory.setUnit("吨"); |
| | | pendingInventory.setRegistrantId(userId); |
| | | pendingInventory.setRegistrationDate(LocalDate.now()); |
| | | pendingInventory.setSupplierName("配煤计算器方案入库"); |
| | |
| | | |
| | | // 5. 设置价格和数量 |
| | | BigDecimal cost = safeGetBigDecimal(map, "cost"); |
| | | BigDecimal tonnage = safeGetBigDecimal(map, "totalTonnage"); |
| | | BigDecimal tonnage = safeGetBigDecimal(map, "createCoalQuantity"); |
| | | |
| | | if (cost == null || tonnage == null) { |
| | | throw new BaseException("成本或吨位不能为空"); |