package com.yfd.platform.modules.robotapi.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yfd.platform.modules.robotapi.domain.RobotOfflineLog;
import com.yfd.platform.modules.robotapi.mapper.RobotOfflineLogMapper;
import com.yfd.platform.modules.robotapi.service.IRobotOfflineLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zhengsl
 * @since 2024-06-26
 */
@Service
public class RobotOfflineLogServiceImpl extends ServiceImpl<RobotOfflineLogMapper, RobotOfflineLog> implements IRobotOfflineLogService {

    @Resource
    private RobotOfflineLogMapper robotOfflineLogMapper;

    @Override
    public List<Map<String, Object>> getOnlineDurationList(String robotCode, String patrolServerCode) {
        return robotOfflineLogMapper.getOnlineDurationList(robotCode, patrolServerCode);
    }

    @Override
    public Page<Map<String, Object>> getOnlineDurationPage(Page<Map<String, Object>> page,String stationId,String patrolDeviceCode,String patrolDeviceName,String type) {
        return robotOfflineLogMapper.getOnlineDurationPage(page,stationId,patrolDeviceCode,patrolDeviceName,type);
    }

    @Override
    public List<Map<String, Object>> getOfflineTimes(String robotCode) {
        return robotOfflineLogMapper.getOfflineTimes(robotCode);
    }

    @Override
    public List<Map<String, Object>> normalInspectionDays(String robotCode) {
        return robotOfflineLogMapper.normalInspectionDays(robotCode);
    }

    @Override
    public List<Map<String, Object>> normalRunDays(String robotCode) {
        return robotOfflineLogMapper.normalRunDays(robotCode);
    }
}
