whycxzp
2021-11-08 fbf497e2cf7e36002c343486064884a219e395eb
更新设备最大值接口
1个文件已修改
33 ■■■■■ 已修改文件
gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java
@@ -157,6 +157,39 @@
        }
        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;