package com.srs.comprehensive.service.impl;

import java.util.List;

import com.srs.common.utils.DateUtils;
import com.srs.comprehensive.domain.SrsKnrdApply;
import com.srs.comprehensive.domain.SrsKnrdApprovalRecord;
import com.srs.comprehensive.domain.Vo.CphSearch;
import com.srs.comprehensive.mapper.SrsKnrdApprovalRecordMapper;
import com.srs.comprehensive.service.ISrsKnrdApprovalRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 困难审核Service业务层处理
 * 
 * @author srs
 * @date 2024-03-19
 */
@Service
public class SrsKnrdApprovalRecordServiceImpl implements ISrsKnrdApprovalRecordService
{
    @Autowired
    private SrsKnrdApprovalRecordMapper srsKnrdApprovalRecordMapper;

    /**
     * 查询困难审核
     * 
     * @param id 困难审核主键
     * @return 困难审核
     */
    @Override
    public SrsKnrdApprovalRecord selectSrsKnrdApprovalRecordById(Long id)
    {
        return srsKnrdApprovalRecordMapper.selectSrsKnrdApprovalRecordById(id);
    }

    /**
     * 查询困难审核列表
     * 
     * @param srsKnrdApprovalRecord 困难审核
     * @return 困难审核
     */
    @Override
    public List<SrsKnrdApprovalRecord> selectSrsKnrdApprovalRecordList(SrsKnrdApprovalRecord srsKnrdApprovalRecord)
    {
        return srsKnrdApprovalRecordMapper.selectSrsKnrdApprovalRecordList(srsKnrdApprovalRecord);
    }

    /**
     * 新增困难审核
     * 
     * @param srsKnrdApprovalRecord 困难审核
     * @return 结果
     */
    @Override
    public int insertSrsKnrdApprovalRecord(SrsKnrdApprovalRecord srsKnrdApprovalRecord)
    {
        srsKnrdApprovalRecord.setCreateTime(DateUtils.getNowDate());
        return srsKnrdApprovalRecordMapper.insertSrsKnrdApprovalRecord(srsKnrdApprovalRecord);
    }

    /**
     * 修改困难审核
     * 
     * @param srsKnrdApprovalRecord 困难审核
     * @return 结果
     */
    @Override
    public int updateSrsKnrdApprovalRecord(SrsKnrdApprovalRecord srsKnrdApprovalRecord)
    {
        return srsKnrdApprovalRecordMapper.updateSrsKnrdApprovalRecord(srsKnrdApprovalRecord);
    }

    /**
     * 批量删除困难审核
     * 
     * @param ids 需要删除的困难审核主键
     * @return 结果
     */
    @Override
    public int deleteSrsKnrdApprovalRecordByIds(Long[] ids)
    {
        return srsKnrdApprovalRecordMapper.deleteSrsKnrdApprovalRecordByIds(ids);
    }

    /**
     * 删除困难审核信息
     * 
     * @param id 困难审核主键
     * @return 结果
     */
    @Override
    public int deleteSrsKnrdApprovalRecordById(Long id)
    {
        return srsKnrdApprovalRecordMapper.deleteSrsKnrdApprovalRecordById(id);
    }

    @Override
    public List<SrsKnrdApply> listView(CphSearch param) {
        return srsKnrdApprovalRecordMapper.listView(param);
    }
}
