package com.ruoyi.inventory.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.inventory.domain.HealthcareInventoryDrugoutType;
import com.ruoyi.inventory.mapper.HealthcareInventoryDrugoutTypeMapper;
import com.ruoyi.inventory.service.IHealthcareInventoryDrugoutTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 仓库调拨记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-08
 */
@Service
public class HealthcareInventoryDrugoutTypeServiceImpl implements IHealthcareInventoryDrugoutTypeService
{
    @Autowired
    private HealthcareInventoryDrugoutTypeMapper healthcareInventoryDrugoutTypeMapper;

    /**
     * 查询仓库调拨记录
     *
     * @param outTypeId 仓库调拨记录主键
     * @return 仓库调拨记录
     */
    @Override
    public HealthcareInventoryDrugoutType selectHealthcareInventoryDrugoutTypeByOutTypeId(Long outTypeId)
    {
        return healthcareInventoryDrugoutTypeMapper.selectHealthcareInventoryDrugoutTypeByOutTypeId(outTypeId);
    }
    /**
     * 查询仓库调拨记录
     *
     * @param DrugOutId 出库记录Id
     * @return 仓库调拨记录
     */
    @Override
    public HealthcareInventoryDrugoutType selectHealthcareInventoryDrugoutTypeByOutTypeDrugOutId(Long DrugOutId) {
        return healthcareInventoryDrugoutTypeMapper.selectHealthcareInventoryDrugoutTypeByDrugOutId(DrugOutId);
    }

    /**
     * 查询仓库调拨记录列表
     *
     * @param healthcareInventoryDrugoutType 仓库调拨记录
     * @return 仓库调拨记录
     */
    @Override
    public List<HealthcareInventoryDrugoutType> selectHealthcareInventoryDrugoutTypeList(HealthcareInventoryDrugoutType healthcareInventoryDrugoutType)
    {
        return healthcareInventoryDrugoutTypeMapper.selectHealthcareInventoryDrugoutTypeList(healthcareInventoryDrugoutType);
    }

    /**
     * 新增仓库调拨记录
     *
     * @param healthcareInventoryDrugoutType 仓库调拨记录
     * @return 结果
     */
    @Override
    public int insertHealthcareInventoryDrugoutType(HealthcareInventoryDrugoutType healthcareInventoryDrugoutType)
    {
        healthcareInventoryDrugoutType.setCreateTime(DateUtils.getNowDate());
        return healthcareInventoryDrugoutTypeMapper.insertHealthcareInventoryDrugoutType(healthcareInventoryDrugoutType);
    }

    /**
     * 修改仓库调拨记录
     *
     * @param healthcareInventoryDrugoutType 仓库调拨记录
     * @return 结果
     */
    @Override
    public int updateHealthcareInventoryDrugoutType(HealthcareInventoryDrugoutType healthcareInventoryDrugoutType)
    {
        healthcareInventoryDrugoutType.setUpdateTime(DateUtils.getNowDate());
        return healthcareInventoryDrugoutTypeMapper.updateHealthcareInventoryDrugoutType(healthcareInventoryDrugoutType);
    }

    /**
     * 批量删除仓库调拨记录
     *
     * @param outTypeIds 需要删除的仓库调拨记录主键
     * @return 结果
     */
    @Override
    public int deleteHealthcareInventoryDrugoutTypeByOutTypeIds(Long[] outTypeIds)
    {
        return healthcareInventoryDrugoutTypeMapper.deleteHealthcareInventoryDrugoutTypeByOutTypeIds(outTypeIds);
    }

    /**
     * 删除仓库调拨记录信息
     *
     * @param outTypeId 仓库调拨记录主键
     * @return 结果
     */
    @Override
    public int deleteHealthcareInventoryDrugoutTypeByOutTypeId(Long outTypeId)
    {
        return healthcareInventoryDrugoutTypeMapper.deleteHealthcareInventoryDrugoutTypeByOutTypeId(outTypeId);
    }
}
