package com.ozs.pm.service.impl;

import java.util.List;
import com.ozs.common.utils.DateUtils;
import com.ozs.pm.doman.PmDemandEquip;
import com.ozs.pm.mapper.PmDemandEquipMapper;
import com.ozs.pm.service.IPmDemandEquipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 采购需求装备类Service业务层处理
 *
 * @author ruoyi
 * @date 2023-01-16
 */
@Service
public class PmDemandEquipServiceImpl implements IPmDemandEquipService
{
    @Autowired
    private PmDemandEquipMapper pmDemandEquipMapper;

    /**
     * 查询采购需求装备类
     *
     * @param demandEquipId 采购需求装备类主键
     * @return 采购需求装备类
     */
    @Override
    public PmDemandEquip selectPmDemandEquipByDemandEquipId(Long demandEquipId)
    {
        return pmDemandEquipMapper.selectPmDemandEquipByDemandEquipId(demandEquipId);
    }

    /**
     * 查询采购需求装备类列表
     *
     * @param pmDemandEquip 采购需求装备类
     * @return 采购需求装备类
     */
    @Override
    public List<PmDemandEquip> selectPmDemandEquipList(PmDemandEquip pmDemandEquip)
    {
        return pmDemandEquipMapper.selectPmDemandEquipList(pmDemandEquip);
    }

    /**
     * 新增采购需求装备类
     *
     * @param pmDemandEquip 采购需求装备类
     * @return 结果
     */
    @Override
    public int insertPmDemandEquip(PmDemandEquip pmDemandEquip)
    {
        pmDemandEquip.setCreateTime(DateUtils.getNowDate());
        return pmDemandEquipMapper.insertPmDemandEquip(pmDemandEquip);
    }

    /**
     * 修改采购需求装备类
     *
     * @param pmDemandEquip 采购需求装备类
     * @return 结果
     */
    @Override
    public int updatePmDemandEquip(PmDemandEquip pmDemandEquip)
    {
        pmDemandEquip.setUpdateTime(DateUtils.getNowDate());
        return pmDemandEquipMapper.updatePmDemandEquip(pmDemandEquip);
    }


}
