| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.Collections; |
| | | |
| | | @Component |
| | |
| | | * @param recordType |
| | | * @param recordId |
| | | */ |
| | | public void addStock(Long productModelId, BigDecimal quantity, String recordType, Long recordId,String batchNo,String customer) { |
| | | public void addStock(Long productModelId, BigDecimal quantity, String recordType, Long recordId, String batchNo, String customer, LocalDate productionDate) { |
| | | StockInventoryDto stockInventoryDto = new StockInventoryDto(); |
| | | stockInventoryDto.setRecordId(recordId); |
| | | if (recordType != null) { |
| | |
| | | stockInventoryDto.setProductModelId(productModelId); |
| | | stockInventoryDto.setBatchNo(batchNo); |
| | | stockInventoryDto.setCustomer(customer); |
| | | if (stockInventoryDto.getProductionDate() == null) { |
| | | stockInventoryDto.setProductionDate(LocalDate.now()); |
| | | }else { |
| | | stockInventoryDto.setProductionDate(productionDate); |
| | | } |
| | | stockInventoryService.addstockInventory(stockInventoryDto); |
| | | } |
| | | |