package com.njcn.mapper.user;

import com.njcn.pojo.user.TransFormer;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface TransFormerMapper extends Mapper<TransFormer> {
	//查询变压器的所有信息
	List<TransFormer> selectAll();
	//查询
	List<TransFormer> selectOneName(@Param(value="tfName")String tfName);
	//查询序号
	int selectRank();
	//根据id查询
	TransFormer selectId(@Param(value = "tfIndex")String tfIndex);
	
	List<TransFormer> selectTwoName(@Param(value = "tfIndex")String tfIndex);
	//查询除此之外的名称
    List<TransFormer> selectName(@Param(value="tfIndex")String tfIndex);
	//修改
	int updateTrans(@Param(value="tfIndex")String tfIndex,@Param(value="tfName")String tfName,@Param(value = "subIndex")int subIndex,
    		@Param(value="wiring")String wiring,@Param(value="description")String description,@Param(value="updateTime")Date updateTime,@Param(value="userIndex")String userIndex);
	List<TransFormer> selectNameAll(@Param(value="tfName")String tfName);
	//通过供电公司过滤
	List<TransFormer> selectgd(@Param(value = "name")String name);
	//通过变电站过滤
	List<TransFormer> selectsub(@Param(value = "name")String name);
}
