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.GxtRepairOrderFlowMapper;
import com.ygtx.gxt.domain.GxtRepairOrderFlow;
import com.ygtx.gxt.service.IGxtRepairOrderFlowService;

/**
 * 维修工单流转记录Service业务层处理
 * 
 * @author ouyj
 * @date 2025-10-30
 */
@Service
public class GxtRepairOrderFlowServiceImpl implements IGxtRepairOrderFlowService 
{
    @Autowired
    private GxtRepairOrderFlowMapper gxtRepairOrderFlowMapper;

    /**
     * 查询维修工单流转记录
     * 
     * @param id 维修工单流转记录主键
     * @return 维修工单流转记录
     */
    @Override
    public GxtRepairOrderFlow selectGxtRepairOrderFlowById(Long id)
    {
        return gxtRepairOrderFlowMapper.selectGxtRepairOrderFlowById(id);
    }

    /**
     * 查询维修工单流转记录列表
     * 
     * @param gxtRepairOrderFlow 维修工单流转记录
     * @return 维修工单流转记录
     */
    @Override
    public List<GxtRepairOrderFlow> selectGxtRepairOrderFlowList(GxtRepairOrderFlow gxtRepairOrderFlow)
    {
        return gxtRepairOrderFlowMapper.selectGxtRepairOrderFlowList(gxtRepairOrderFlow);
    }

    /**
     * 新增维修工单流转记录
     * 
     * @param gxtRepairOrderFlow 维修工单流转记录
     * @return 结果
     */
    @Override
    public int insertGxtRepairOrderFlow(GxtRepairOrderFlow gxtRepairOrderFlow)
    {
        gxtRepairOrderFlow.setCreateTime(DateUtils.getNowDate());
        return gxtRepairOrderFlowMapper.insertGxtRepairOrderFlow(gxtRepairOrderFlow);
    }

    /**
     * 修改维修工单流转记录
     * 
     * @param gxtRepairOrderFlow 维修工单流转记录
     * @return 结果
     */
    @Override
    public int updateGxtRepairOrderFlow(GxtRepairOrderFlow gxtRepairOrderFlow)
    {
        return gxtRepairOrderFlowMapper.updateGxtRepairOrderFlow(gxtRepairOrderFlow);
    }

    /**
     * 批量删除维修工单流转记录
     * 
     * @param ids 需要删除的维修工单流转记录主键
     * @return 结果
     */
    @Override
    public int deleteGxtRepairOrderFlowByIds(Long[] ids)
    {
        return gxtRepairOrderFlowMapper.deleteGxtRepairOrderFlowByIds(ids);
    }

    /**
     * 删除维修工单流转记录信息
     * 
     * @param id 维修工单流转记录主键
     * @return 结果
     */
    @Override
    public int deleteGxtRepairOrderFlowById(Long id)
    {
        return gxtRepairOrderFlowMapper.deleteGxtRepairOrderFlowById(id);
    }
}
