package com.inspur.service.impl;

import java.util.List;
import com.inspur.common.utils.DateUtils;
import com.inspur.domain.ElevatorWorkNode;
import com.inspur.mapper.ElevatorWorkNodeMapper;
import com.inspur.service.IElevatorWorkNodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 工单节点信息Service业务层处理
 * 
 * @author inspur
 * @date 2024-09-18
 */
@Service
public class ElevatorWorkNodeServiceImpl implements IElevatorWorkNodeService
{
    @Autowired
    private ElevatorWorkNodeMapper elevatorWorkNodeMapper;

    /**
     * 查询工单节点信息
     * 
     * @param id 工单节点信息主键
     * @return 工单节点信息
     */
    @Override
    public ElevatorWorkNode selectElevatorWorkNodeById(Long id)
    {
        return elevatorWorkNodeMapper.selectElevatorWorkNodeById(id);
    }

    /**
     * 查询工单节点信息列表
     * 
     * @param elevatorWorkNode 工单节点信息
     * @return 工单节点信息
     */
    @Override
    public List<ElevatorWorkNode> selectElevatorWorkNodeList(ElevatorWorkNode elevatorWorkNode)
    {
        return elevatorWorkNodeMapper.selectElevatorWorkNodeList(elevatorWorkNode);
    }

    /**
     * 新增工单节点信息
     * 
     * @param elevatorWorkNode 工单节点信息
     * @return 结果
     */
    @Override
    public int insertElevatorWorkNode(ElevatorWorkNode elevatorWorkNode)
    {
        elevatorWorkNode.setCreateTime(DateUtils.getNowDate());
        return elevatorWorkNodeMapper.insertElevatorWorkNode(elevatorWorkNode);
    }

    /**
     * 修改工单节点信息
     * 
     * @param elevatorWorkNode 工单节点信息
     * @return 结果
     */
    @Override
    public int updateElevatorWorkNode(ElevatorWorkNode elevatorWorkNode)
    {
        return elevatorWorkNodeMapper.updateElevatorWorkNode(elevatorWorkNode);
    }

    /**
     * 批量删除工单节点信息
     * 
     * @param ids 需要删除的工单节点信息主键
     * @return 结果
     */
    @Override
    public int deleteElevatorWorkNodeByIds(Long[] ids)
    {
        return elevatorWorkNodeMapper.deleteElevatorWorkNodeByIds(ids);
    }

    /**
     * 删除工单节点信息信息
     * 
     * @param id 工单节点信息主键
     * @return 结果
     */
    @Override
    public int deleteElevatorWorkNodeById(Long id)
    {
        return elevatorWorkNodeMapper.deleteElevatorWorkNodeById(id);
    }
}
