package com.zd.laboratory.service.impl;

import java.util.List;
import com.zd.common.core.utils.DateUtils;
import com.zd.common.security.utils.SaveUtil;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zd.laboratory.mapper.LabSecurityMaterialrelationMapper;
import com.zd.laboratory.domain.LabSecurityMaterialrelation;
import com.zd.laboratory.service.ILabSecurityMaterialrelationService;

/**
 * 安全准入申请材料关系Service业务层处理
 *
 * @author zd
 * @date 2022-01-25
 */
@Service
public class LabSecurityMaterialrelationServiceImpl implements ILabSecurityMaterialrelationService
{
    @Autowired
    private LabSecurityMaterialrelationMapper labSecurityMaterialrelationMapper;

    /**
     * 查询安全准入申请材料关系
     *
     * @param id 安全准入申请材料关系主键
     * @return 安全准入申请材料关系
     */
    @Override
    public LabSecurityMaterialrelation selectLabSecurityMaterialrelationById(Long id)
    {
        return labSecurityMaterialrelationMapper.selectLabSecurityMaterialrelationById(id);
    }

    /**
     * 查询安全准入申请材料关系列表
     *
     * @param labSecurityMaterialrelation 安全准入申请材料关系
     * @return 安全准入申请材料关系
     */
    @Override
    public List<LabSecurityMaterialrelation> selectLabSecurityMaterialrelationList(LabSecurityMaterialrelation labSecurityMaterialrelation)
    {
        return labSecurityMaterialrelationMapper.selectLabSecurityMaterialrelationList(labSecurityMaterialrelation);
    }

    /**
     * 新增安全准入申请材料关系
     *
     * @param labSecurityMaterialrelation 安全准入申请材料关系
     * @return 结果
     */
    @Override
    public int insertLabSecurityMaterialrelation(LabSecurityMaterialrelation labSecurityMaterialrelation)
    {
        //设置其他公共字段
        SaveUtil.setCommonAttr(labSecurityMaterialrelation);
        return labSecurityMaterialrelationMapper.insertLabSecurityMaterialrelation(labSecurityMaterialrelation);
    }

    /**
     * 修改安全准入申请材料关系
     *
     * @param labSecurityMaterialrelation 安全准入申请材料关系
     * @return 结果
     */
    @Override
    public int updateLabSecurityMaterialrelation(LabSecurityMaterialrelation labSecurityMaterialrelation)
    {
        return labSecurityMaterialrelationMapper.updateLabSecurityMaterialrelation(labSecurityMaterialrelation);
    }

    /**
     * 批量删除安全准入申请材料关系
     *
     * @param ids 需要删除的安全准入申请材料关系主键
     * @return 结果
     */
    @Override
    public int deleteLabSecurityMaterialrelationByIds(Long[] ids)
    {
        return labSecurityMaterialrelationMapper.deleteLabSecurityMaterialrelationByIds(ids);
    }

    /**
     * 删除安全准入申请材料关系信息
     *
     * @param id 安全准入申请材料关系主键
     * @return 结果
     */
    @Override
    public int deleteLabSecurityMaterialrelationById(Long id)
    {
        return labSecurityMaterialrelationMapper.deleteLabSecurityMaterialrelationById(id);
    }
}