whycxzp
2025-04-14 8e85ad8e022d2885c410d0654bce08e2a392b08f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.whyc.mapper;
 
import com.whyc.pojo.db_batt.PowerInf;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
 
public interface PowerInfMapper extends CustomMapper<PowerInf>{
    Integer selectMaxBattGroupId();
 
    int getMaxPowerId();
 
    @Select("select distinct producer from db_batt.power_inf where producer is not null")
    List<String> getProducerList();
 
    @Select("SELECT s.sinf_name as station_name,p.*,p.binf_id as battGroupId,p.binf_name as battGroupName from db_batt.power_inf p,db_batt.sinf_pinf sp,db_batt.station_inf s\n" +
            "where p.power_id = sp.pinf_id and sp.sinf_id = s.sinf_id")
    List<PowerInf> getList();
 
    @Select("SELECT s.sinf_name as station_name,p.*,p.binf_id as battGroupId,p.binf_name as battGroupName from db_batt.power_inf p,db_batt.sinf_pinf sp,db_batt.station_inf s\n" +
            "where p.power_id = sp.pinf_id and sp.sinf_id = s.sinf_id and power_id = #{powerId}")
    PowerInf getById(int powerId);
 
}