package com.inspur.service.impl;

import java.util.List;
import com.inspur.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.inspur.mapper.ElevatorWorkOrderMapper;
import com.inspur.domain.ElevatorWorkOrder;
import com.inspur.service.IElevatorWorkOrderService;

/**
 * 工单系统Service业务层处理
 * 
 * @author inspur
 * @date 2024-09-20
 */
@Service
public class ElevatorWorkOrderServiceImpl implements IElevatorWorkOrderService 
{
    @Autowired
    private ElevatorWorkOrderMapper elevatorWorkOrderMapper;

    /**
     * 查询工单系统
     * 
     * @param id 工单系统主键
     * @return 工单系统
     */
    @Override
    public ElevatorWorkOrder selectElevatorWorkOrderById(Long id)
    {
        return elevatorWorkOrderMapper.selectElevatorWorkOrderById(id);
    }

    /**
     * 查询工单系统列表
     * 
     * @param elevatorWorkOrder 工单系统
     * @return 工单系统
     */
    @Override
    public List<ElevatorWorkOrder> selectElevatorWorkOrderList(ElevatorWorkOrder elevatorWorkOrder)
    {
        return elevatorWorkOrderMapper.selectElevatorWorkOrderList(elevatorWorkOrder);
    }

    /**
     * 新增工单系统
     * 
     * @param elevatorWorkOrder 工单系统
     * @return 结果
     */
    @Override
    public int insertElevatorWorkOrder(ElevatorWorkOrder elevatorWorkOrder)
    {
        elevatorWorkOrder.setCreateTime(DateUtils.getNowDate());
        return elevatorWorkOrderMapper.insertElevatorWorkOrder(elevatorWorkOrder);
    }

    /**
     * 修改工单系统
     * 
     * @param elevatorWorkOrder 工单系统
     * @return 结果
     */
    @Override
    public int updateElevatorWorkOrder(ElevatorWorkOrder elevatorWorkOrder)
    {
        elevatorWorkOrder.setUpdateTime(DateUtils.getNowDate());
        return elevatorWorkOrderMapper.updateElevatorWorkOrder(elevatorWorkOrder);
    }

    /**
     * 批量删除工单系统
     * 
     * @param ids 需要删除的工单系统主键
     * @return 结果
     */
    @Override
    public int deleteElevatorWorkOrderByIds(Long[] ids)
    {
        return elevatorWorkOrderMapper.deleteElevatorWorkOrderByIds(ids);
    }

    /**
     * 删除工单系统信息
     * 
     * @param id 工单系统主键
     * @return 结果
     */
    @Override
    public int deleteElevatorWorkOrderById(Long id)
    {
        return elevatorWorkOrderMapper.deleteElevatorWorkOrderById(id);
    }
}
