| | |
| | | import com.ruoyi.business.dto.PendingInventoryDto; |
| | | import com.ruoyi.business.entity.OutputInventoryRecord; |
| | | import com.ruoyi.business.mapper.OutputInventoryRecordMapper; |
| | | import com.ruoyi.business.service.InventorySummaryService; |
| | | import com.ruoyi.business.service.OutputInventoryRecordService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public class OutputInventoryRecordServiceImpl extends ServiceImpl<OutputInventoryRecordMapper, OutputInventoryRecord> implements OutputInventoryRecordService { |
| | | private final OutputInventoryRecordMapper outputInventoryRecordMapper; |
| | | |
| | | private final InventorySummaryService inventorySummaryService; |
| | | |
| | | @Override |
| | | public int insertOutputInventoryRecord(PendingInventoryDto pendingInventoryDto, OfficialInventoryDto officialInventoryDto, BigDecimal quantity) { |
| | | if ((pendingInventoryDto != null && officialInventoryDto != null) || (pendingInventoryDto == null && officialInventoryDto == null)) { |
| | |
| | | } |
| | | outputInventoryRecord.setQuantity(quantity); |
| | | |
| | | return outputInventoryRecordMapper.insert(outputInventoryRecord); |
| | | outputInventoryRecordMapper.insert(outputInventoryRecord); |
| | | |
| | | // 变更原库存信息 |
| | | // return inventorySummaryService.updateInventory(pendingInventoryDto, officialInventoryDto); |
| | | return inventorySummaryService.updateInventory(pendingInventoryDto, officialInventoryDto); |
| | | } |
| | | } |