package com.fs.hospital.service.impl;

import java.util.List;

import com.fs.hospital.vo.HospitalProductPurchaseOrderItemHVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.hospital.mapper.HospitalProductPurchaseOrderItemMapper;
import com.fs.hospital.domain.HospitalProductPurchaseOrderItem;
import com.fs.hospital.service.IHospitalProductPurchaseOrderItemService;

/**
 * 采购单明细Service业务层处理
 *
 * @author fs
 * @date 2024-03-12
 */
@Service
public class HospitalProductPurchaseOrderItemServiceImpl implements IHospitalProductPurchaseOrderItemService
{
    @Autowired
    private HospitalProductPurchaseOrderItemMapper hospitalProductPurchaseOrderItemMapper;

    /**
     * 查询采购单明细
     *
     * @param itemId 采购单明细主键
     * @return 采购单明细
     */
    @Override
    public HospitalProductPurchaseOrderItem selectHospitalPurchaseOrderItemByItemId(Long itemId)
    {
        return hospitalProductPurchaseOrderItemMapper.selectHospitalPurchaseOrderItemByItemId(itemId);
    }

    /**
     * 查询采购单明细列表
     *
     * @param hospitalProductPurchaseOrderItem 采购单明细
     * @return 采购单明细
     */
    @Override
    public List<HospitalProductPurchaseOrderItem> selectHospitalPurchaseOrderItemList(HospitalProductPurchaseOrderItem hospitalProductPurchaseOrderItem)
    {
        return hospitalProductPurchaseOrderItemMapper.selectHospitalPurchaseOrderItemList(hospitalProductPurchaseOrderItem);
    }

    /**
     * 新增采购单明细
     *
     * @param hospitalProductPurchaseOrderItem 采购单明细
     * @return 结果
     */
    @Override
    public int insertHospitalPurchaseOrderItem(HospitalProductPurchaseOrderItem hospitalProductPurchaseOrderItem)
    {
        return hospitalProductPurchaseOrderItemMapper.insertHospitalPurchaseOrderItem(hospitalProductPurchaseOrderItem);
    }

    /**
     * 修改采购单明细
     *
     * @param hospitalProductPurchaseOrderItem 采购单明细
     * @return 结果
     */
    @Override
    public int updateHospitalPurchaseOrderItem(HospitalProductPurchaseOrderItem hospitalProductPurchaseOrderItem)
    {
        return hospitalProductPurchaseOrderItemMapper.updateHospitalPurchaseOrderItem(hospitalProductPurchaseOrderItem);
    }

    /**
     * 批量删除采购单明细
     *
     * @param itemIds 需要删除的采购单明细主键
     * @return 结果
     */
    @Override
    public int deleteHospitalPurchaseOrderItemByItemIds(Long[] itemIds)
    {
        return hospitalProductPurchaseOrderItemMapper.deleteHospitalPurchaseOrderItemByItemIds(itemIds);
    }

    /**
     * 删除采购单明细信息
     *
     * @param itemId 采购单明细主键
     * @return 结果
     */
    @Override
    public int deleteHospitalPurchaseOrderItemByItemId(Long itemId)
    {
        return hospitalProductPurchaseOrderItemMapper.deleteHospitalPurchaseOrderItemByItemId(itemId);
    }

    @Override
    public List<HospitalProductPurchaseOrderItemHVO> selectHospitalPurchaseOrderItemListPVO(HospitalProductPurchaseOrderItem hospitalProductPurchaseOrderItem) {
        return hospitalProductPurchaseOrderItemMapper.selectHospitalPurchaseOrderItemListPVO(hospitalProductPurchaseOrderItem);
    }
}
