| | |
| | | }
|
| | | //查询当前最大的电池组id
|
| | | public static int searchMaxBattgroupId(){
|
| | | int BattgroupId_max=(new Batt_rtstateDAOImpl()).searchMaxBattgroupId();//当前内存中最大的电池组id
|
| | | int BattgroupId_next=BattgroupId_max+1;
|
| | | return BattgroupId_next;
|
| | | int battgroupid=0;
|
| | | int BattgroupId_rtstate=(new Batt_rtstateDAOImpl()).searchMaxBattgroupId();//当前内存中最大的电池组id
|
| | | int BattgroupId_apply=(new Battinf_applyImpl()).searchMaxBattgroupId_apply();//当前内存中最大的电池组id
|
| | | int BattgroupId_inf=(new BattInfImpl()).searchMaxBattgroupId();//当前内存中最大的电池组id
|
| | | if(BattgroupId_inf>=BattgroupId_apply){
|
| | | battgroupid=BattgroupId_inf;
|
| | | if(battgroupid>=BattgroupId_rtstate) {
|
| | | battgroupid=battgroupid;
|
| | | }else {
|
| | | battgroupid=BattgroupId_rtstate;
|
| | | }
|
| | | }else{
|
| | | battgroupid=BattgroupId_apply;
|
| | | if(battgroupid>=BattgroupId_rtstate) {
|
| | | battgroupid=battgroupid;
|
| | | }else {
|
| | | battgroupid=BattgroupId_rtstate;
|
| | | }
|
| | | }
|
| | | return battgroupid+1;
|
| | | }
|
| | | //查询当前最大的stationid
|
| | | public static int searchStationId(){
|
| | | int station_max=(new BattInfImpl()).searchMaxId();//当前最大的stationid
|
| | | int station_next=station_max+1;
|
| | | return station_next;
|
| | | int stationid=0;
|
| | | int stationid_inf=(new BattInfImpl()).searchMaxId();//当前最大的stationid
|
| | | int stationid_apply=(new Battinf_applyImpl()).searchMaxId_apply();//当前最大的stationid
|
| | | if(stationid_inf>=stationid_apply){
|
| | | stationid=stationid_inf+1;
|
| | | }else{
|
| | | stationid=stationid_apply+1;
|
| | | }
|
| | | return stationid;
|
| | | }
|
| | | //查询当前最大的dev_id
|
| | | public static int searchmaxdev_id(){
|