package com.inspect.metadata.montdata.service.impl;

import com.inspect.metadata.montdata.domain.BasedataMontPatDevPatRoute;
import com.inspect.metadata.montdata.mapper.BasedataMontPatDevPatRouteMapper;
import com.inspect.metadata.montdata.service.IBasedataMontPatDevPatRouteService;
import com.inspect.metadata.montdatamqhandle.vo.CoordAndRoute;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class BasedataMontPatDevPatRouteServiceImpl implements IBasedataMontPatDevPatRouteService {
    @Resource
    private BasedataMontPatDevPatRouteMapper basedataMontPatdevpatrouteMapper;

    public BasedataMontPatDevPatRoute selectBasedataMontPatDevPatRouteByMontPatDevRouteId(Long montPatDevCoordId) {
        return this.basedataMontPatdevpatrouteMapper.selectBasedataMontPatDevPatRouteByMontPatDevPatRouteId(montPatDevCoordId);
    }

    public List<BasedataMontPatDevPatRoute> selectBasedataMontPatDevPatRouteList(BasedataMontPatDevPatRoute basedataMontPatDevPatRoute) {
        return this.basedataMontPatdevpatrouteMapper.selectBasedataMontPatDevPatRouteList(basedataMontPatDevPatRoute);
    }

    public int insertBasedataMontPatDevPatRoute(BasedataMontPatDevPatRoute basedataMontPatDevPatRoute) {
        return this.basedataMontPatdevpatrouteMapper.insertBasedataMontPatDevPatRoute(basedataMontPatDevPatRoute);
    }

    public int updateBasedataMontPatDevPatRoute(BasedataMontPatDevPatRoute basedataMontPatDevPatRoute) {
        return this.basedataMontPatdevpatrouteMapper.updateBasedataMontPatDevPatRoute(basedataMontPatDevPatRoute);
    }

    public int deleteBasedataMontPatDevPatRouteByMontPatDevPatRouteIds(Long[] montPatDevCoordIds) {
        return this.basedataMontPatdevpatrouteMapper.deleteBasedataMontPatDevPatRouteByMontPatDevPatRouteIds(montPatDevCoordIds);
    }

    public int deleteBasedataMontPatDevPatRouteByMontPatDevPatRouteId(Long montPatDevCoordId) {
        return this.basedataMontPatdevpatrouteMapper.deleteBasedataMontPatDevPatRouteByMontPatDevPatRouteId(montPatDevCoordId);
    }

    public CoordAndRoute queryCoordAndRouteList(String patrolDeviceCode) {
        CoordAndRoute coordAndRoute = new CoordAndRoute();
        coordAndRoute.setCoordList(this.basedataMontPatdevpatrouteMapper.getCoordList(patrolDeviceCode));
        coordAndRoute.setRouteList(this.basedataMontPatdevpatrouteMapper.getRouteList(patrolDeviceCode));
        return coordAndRoute;
    }
}
