| | |
| | | }
|
| | | return dev_id;
|
| | | }
|
| | |
|
| | | //查询当前最大的dev_id
|
| | | public static int searchNewMaxDeviceId(Integer deviceIdRightLike){
|
| | | int devId=0;
|
| | | int devId_inf=(new BattInfImpl()).searchMaxDevice(deviceIdRightLike);
|
| | | int devId_apply=(new Battinf_applyImpl()).searchMaxDevice(deviceIdRightLike);
|
| | | devId = Math.max(devId_inf, devId_apply);
|
| | | if(devId==0){
|
| | | int length = String.valueOf(deviceIdRightLike).length();
|
| | | switch (length){
|
| | | case 3:
|
| | | devId = deviceIdRightLike*1000000;break;
|
| | | case 4:
|
| | | devId = deviceIdRightLike*100000;break;
|
| | | case 5:
|
| | | devId = deviceIdRightLike*10000;break;
|
| | | case 6:
|
| | | devId = deviceIdRightLike*1000;break;
|
| | | /*case 9100:
|
| | | case 9110:
|
| | | case 9120:
|
| | | case 9605:
|
| | | devId = fbsDeviceId*100000;break;
|
| | | case 61850:
|
| | | case 71850:
|
| | | devId = fbsDeviceId*10000;break;
|
| | | default:
|
| | | devId= fbsDeviceId*100000;break;*/
|
| | | }
|
| | | }
|
| | | return devId+1;
|
| | | }
|
| | |
|
| | | //当对battinf表中数据进行增删改的操作时,先备份db_battinf.tb_battinf
|
| | | public static boolean backup_battinf(){
|
| | | boolean en=false;
|