package com.ygtx.gxt.service.impl;

import java.util.List;
import com.ygtx.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ygtx.gxt.mapper.GxtRepairOrderPersonMapper;
import com.ygtx.gxt.domain.GxtRepairOrderPerson;
import com.ygtx.gxt.service.IGxtRepairOrderPersonService;

/**
 * 维修工单工作组员名单Service业务层处理
 * 
 * @author ouyj
 * @date 2025-11-01
 */
@Service
public class GxtRepairOrderPersonServiceImpl implements IGxtRepairOrderPersonService 
{
    @Autowired
    private GxtRepairOrderPersonMapper gxtRepairOrderPersonMapper;

    /**
     * 查询维修工单工作组员名单
     * 
     * @param id 维修工单工作组员名单主键
     * @return 维修工单工作组员名单
     */
    @Override
    public GxtRepairOrderPerson selectGxtRepairOrderPersonById(Long id)
    {
        return gxtRepairOrderPersonMapper.selectGxtRepairOrderPersonById(id);
    }

    /**
     * 查询维修工单工作组员名单列表
     * 
     * @param gxtRepairOrderPerson 维修工单工作组员名单
     * @return 维修工单工作组员名单
     */
    @Override
    public List<GxtRepairOrderPerson> selectGxtRepairOrderPersonList(GxtRepairOrderPerson gxtRepairOrderPerson)
    {
        return gxtRepairOrderPersonMapper.selectGxtRepairOrderPersonList(gxtRepairOrderPerson);
    }

    /**
     * 新增维修工单工作组员名单
     * 
     * @param gxtRepairOrderPerson 维修工单工作组员名单
     * @return 结果
     */
    @Override
    public int insertGxtRepairOrderPerson(GxtRepairOrderPerson gxtRepairOrderPerson)
    {
        gxtRepairOrderPerson.setCreateTime(DateUtils.getNowDate());
        return gxtRepairOrderPersonMapper.insertGxtRepairOrderPerson(gxtRepairOrderPerson);
    }

    /**
     * 修改维修工单工作组员名单
     * 
     * @param gxtRepairOrderPerson 维修工单工作组员名单
     * @return 结果
     */
    @Override
    public int updateGxtRepairOrderPerson(GxtRepairOrderPerson gxtRepairOrderPerson)
    {
        gxtRepairOrderPerson.setUpdateTime(DateUtils.getNowDate());
        return gxtRepairOrderPersonMapper.updateGxtRepairOrderPerson(gxtRepairOrderPerson);
    }

    /**
     * 批量删除维修工单工作组员名单
     * 
     * @param ids 需要删除的维修工单工作组员名单主键
     * @return 结果
     */
    @Override
    public int deleteGxtRepairOrderPersonByIds(Long[] ids)
    {
        return gxtRepairOrderPersonMapper.deleteGxtRepairOrderPersonByIds(ids);
    }

    /**
     * 删除维修工单工作组员名单信息
     * 
     * @param id 维修工单工作组员名单主键
     * @return 结果
     */
    @Override
    public int deleteGxtRepairOrderPersonById(Long id)
    {
        return gxtRepairOrderPersonMapper.deleteGxtRepairOrderPersonById(id);
    }
}
