| | |
| | | //查询当前最大的电池组id
|
| | | public static int searchMaxBattgroupId(){
|
| | | int battgroupid=0;
|
| | | int BattgroupId_inf=(new Batt_rtstateDAOImpl()).searchMaxBattgroupId();//当前内存中最大的电池组id
|
| | | 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+1;
|
| | | battgroupid=BattgroupId_inf;
|
| | | if(battgroupid>=BattgroupId_rtstate) {
|
| | | battgroupid=battgroupid;
|
| | | }else {
|
| | | battgroupid=BattgroupId_rtstate;
|
| | | }
|
| | | }else{
|
| | | battgroupid=BattgroupId_apply+1;
|
| | | battgroupid=BattgroupId_apply;
|
| | | if(battgroupid>=BattgroupId_rtstate) {
|
| | | battgroupid=battgroupid;
|
| | | }else {
|
| | | battgroupid=BattgroupId_rtstate;
|
| | | }
|
| | | }
|
| | | return battgroupid;
|
| | | return battgroupid+1;
|
| | | }
|
| | | //查询当前最大的stationid
|
| | | public static int searchStationId(){
|