package com.ztmap.project.zhny.electricpowerquota.service.impl;

import java.util.List;
import com.ztmap.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztmap.project.zhny.electricpowerquota.mapper.TElectricPowerQuotaMapper;
import com.ztmap.project.zhny.electricpowerquota.domain.TElectricPowerQuota;
import com.ztmap.project.zhny.electricpowerquota.service.ITElectricPowerQuotaService;
import com.ztmap.common.utils.text.Convert;

/**
 * 发电量指标Service业务层处理
 * 
 * @author ztmap
 * @date 2023-10-09
 */
@Service
public class TElectricPowerQuotaServiceImpl implements ITElectricPowerQuotaService 
{
    @Autowired
    private TElectricPowerQuotaMapper tElectricPowerQuotaMapper;

    /**
     * 查询发电量指标
     * 
     * @param id 发电量指标ID
     * @return 发电量指标
     */
    @Override
    public TElectricPowerQuota selectTElectricPowerQuotaById(Long id)
    {
        return tElectricPowerQuotaMapper.selectTElectricPowerQuotaById(id);
    }

    /**
     * 查询发电量指标列表
     * 
     * @param tElectricPowerQuota 发电量指标
     * @return 发电量指标
     */
    @Override
    public List<TElectricPowerQuota> selectTElectricPowerQuotaList(TElectricPowerQuota tElectricPowerQuota)
    {
        return tElectricPowerQuotaMapper.selectTElectricPowerQuotaList(tElectricPowerQuota);
    }

    /**
     * 新增发电量指标
     * 
     * @param tElectricPowerQuota 发电量指标
     * @return 结果
     */
    @Override
    public int insertTElectricPowerQuota(TElectricPowerQuota tElectricPowerQuota)
    {
        tElectricPowerQuota.setCreateTime(DateUtils.getNowDate());
        return tElectricPowerQuotaMapper.insertTElectricPowerQuota(tElectricPowerQuota);
    }

    /**
     * 修改发电量指标
     * 
     * @param tElectricPowerQuota 发电量指标
     * @return 结果
     */
    @Override
    public int updateTElectricPowerQuota(TElectricPowerQuota tElectricPowerQuota)
    {
        return tElectricPowerQuotaMapper.updateTElectricPowerQuota(tElectricPowerQuota);
    }

    /**
     * 删除发电量指标对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTElectricPowerQuotaByIds(String ids)
    {
        return tElectricPowerQuotaMapper.deleteTElectricPowerQuotaByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除发电量指标信息
     * 
     * @param id 发电量指标ID
     * @return 结果
     */
    @Override
    public int deleteTElectricPowerQuotaById(Long id)
    {
        return tElectricPowerQuotaMapper.deleteTElectricPowerQuotaById(id);
    }
}
