package com.njcn.serviceimpl.configuration;

import com.njcn.mapper.configuration.LineMapper;
import com.njcn.pojo.configuration.Line;
import com.njcn.service.configuration.ILineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LineServiceImpl implements ILineService {

	@Autowired
	private LineMapper lineMapper;

	@Override
	public Line queryLineData(Long lineid) {
		return lineMapper.queryLineData(lineid);
	}

	@Override
	public Line selectLineByIndex(Long lineId) {
		Line line = new Line();
		line.setLineIndex(lineId);
		line = lineMapper.selectOne(line);
		return line;
	}

	/**
	 * 根据事件获取监测点数据
	 * @param eventIndex 事件索引
	 */
	@Override
	public Line getLineByEventDetailIndex(String eventIndex) {
		return lineMapper.getLineByEventDetailIndex(eventIndex);
	}

	@Override
	public String getSubNameById(Long id) {
		return lineMapper.getSubNameById(id);
	}

}
