package com.jjt.ws.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import com.jjt.ws.mapper.TwinWorkshopEnergyMapper;
import com.jjt.ws.domain.TwinWorkshopEnergy;
import com.jjt.ws.service.ITwinWorkshopEnergyService;
import javax.annotation.Resource;

/**
 * 车间能源管理Service业务层处理
 *
 * @author wukai
 * @date 2025-01-17
 */
@Service
public class TwinWorkshopEnergyServiceImpl implements ITwinWorkshopEnergyService {
    @Resource
    private TwinWorkshopEnergyMapper twinWorkshopEnergyMapper;

    /**
     * 查询车间能源管理
     *
     * @param energyId 车间能源管理主键
     * @return 车间能源管理
     */
    @Override
    public TwinWorkshopEnergy selectTwinWorkshopEnergyByEnergyId(Long energyId) {
        return twinWorkshopEnergyMapper.selectTwinWorkshopEnergyByEnergyId(energyId);
    }

    /**
     * 查询车间能源管理列表
     *
     * @param twinWorkshopEnergy 车间能源管理
     * @return 车间能源管理
     */
    @Override
    public List<TwinWorkshopEnergy> selectTwinWorkshopEnergyList(TwinWorkshopEnergy twinWorkshopEnergy) {
        return twinWorkshopEnergyMapper.selectTwinWorkshopEnergyList(twinWorkshopEnergy);
    }

    /**
     * 新增车间能源管理
     *
     * @param twinWorkshopEnergy 车间能源管理
     * @return 结果
     */
    @Override
    public int insertTwinWorkshopEnergy(TwinWorkshopEnergy twinWorkshopEnergy) {
            return twinWorkshopEnergyMapper.insertTwinWorkshopEnergy(twinWorkshopEnergy);
    }

    /**
     * 修改车间能源管理
     *
     * @param twinWorkshopEnergy 车间能源管理
     * @return 结果
     */
    @Override
    public int updateTwinWorkshopEnergy(TwinWorkshopEnergy twinWorkshopEnergy) {
        return twinWorkshopEnergyMapper.updateTwinWorkshopEnergy(twinWorkshopEnergy);
    }

    /**
     * 批量删除车间能源管理
     *
     * @param energyIds 需要删除的车间能源管理主键
     * @return 结果
     */
    @Override
    public int deleteTwinWorkshopEnergyByEnergyIds(Long[] energyIds) {
        return twinWorkshopEnergyMapper.deleteTwinWorkshopEnergyByEnergyIds(energyIds);
    }

    /**
     * 删除车间能源管理信息
     *
     * @param energyId 车间能源管理主键
     * @return 结果
     */
    @Override
    public int deleteTwinWorkshopEnergyByEnergyId(Long energyId) {
        return twinWorkshopEnergyMapper.deleteTwinWorkshopEnergyByEnergyId(energyId);
    }
}
