81041
2019-01-05 b833d27b6de862bb32d6ca6a1bde0c74473dc11c
修改电池参数
1个文件已添加
4个文件已修改
126 ■■■■■ 已修改文件
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl$71.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_battparamService.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl$71.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_battparamService.class
Binary files differ
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -4489,24 +4489,128 @@
        }*/
        return list;
    }
    //批量设置放电参数时,根据省市区,电池单体型号(伏数),组数筛选出电池组
    public List serchByBatt_param(Object obj) {
        BattInf binf=(BattInf) obj;
        //Page page=binf.getPage();
        /*Connection conn=DBUtil.getConn();
        String numberSql=" SELECT FOUND_ROWS() number";SQL_CALC_FOUND_ROWS*/
        String sql=" select  distinct(StationId),StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,"
                + "FBSDeviceName,battGroupNum" +
                 ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,Load_curr,DisCurrMax,montmpstd,floatVolLevel,offlineVolLevel,battFloatCurrent"
                 + ",db_ram_db.tb_fbs9100_state.dev_version  "
                + " from db_battinf.tb_battinf,db_ram_db.tb_fbs9100_state "
                + " where db_battinf.tb_battinf.FBSDeviceId=db_ram_db.tb_fbs9100_state.dev_id "
                + "  and MonVolStd=?  and Station_install=1 ";
                //+ "  limit ?,? ";StationName1 like ? and StationName2 like ? and StationName3 like ? and StationName5 like ? "
        //,(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%",
        //条件
        String sql0=" and stationid=? "; //具体机房
        String sql1=" and stationname1=? ";//省
        String sql2=" and stationname2=? ";//市
        String sql5=" and stationname5=? ";//区县
        switch (binf.getNum()) {
        case 0:
            sql+=sql0;
            break;
        case 1:
            sql+=sql1;
            break;
        case 2:
            sql+=sql2;
            break;
        case 5:
            sql+=sql5;
             break;
        default:
            return null;
        }
        //排序
        String orderSql="  order by StationId asc,GroupIndexInFBSDevice asc ";
        sql+=orderSql;
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[] {binf.getMonVolStd(),binf.getStationName()}, new CallBack() {
            @Override
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                try {
                    while(rs.next()) {
                        BattInf binf = new BattInf();
                        binf.setNum(0);
                        binf.setStationId(rs.getString("stationId"));
                        binf.setStationName(rs.getString("stationName"));
                        binf.setStationName1(rs.getString("stationName1"));
                        binf.setStationName2(rs.getString("stationName2"));
                        binf.setStationName3(rs.getString("stationName3"));
                        binf.setStationName4(rs.getString("stationName4"));
                        binf.setStationName5(rs.getString("stationName5"));
                        binf.setStationIp(rs.getString("stationIp"));
                        binf.setFBSDeviceId(rs.getInt("fBSDeviceId"));
                        /*binf.setFbsDeviceIp(rs.getString("fbsDeviceIp"));
                        binf.setFbsDeviceIp_YM(rs.getString("fbsDeviceIp_YM"));
                        binf.setFbsDeviceIp_WG(rs.getString("fbsDeviceIp_WG"));*/
                        binf.setFBSDeviceName(rs.getString("fBSDeviceName"));
                        binf.setBattGroupNum(rs.getInt("battGroupNum"));
                        binf.setFloatVolLevel(rs.getFloat("floatVolLevel"));
                        binf.setOfflineVolLevel(rs.getFloat("offlineVolLevel"));
                        binf.setBattFloatCurrent(rs.getFloat("battFloatCurrent"));
                        binf.setMonCount(rs.getInt("monCount"));
                        binf.setMonCapStd(rs.getFloat("monCapStd"));
                        binf.setMonVolStd(rs.getFloat("monVolStd"));
                        binf.setMonResStd(rs.getFloat("monResStd"));
                        binf.setMonSerStd(rs.getFloat("monSerStd"));
                        binf.setMonTmpStd(rs.getFloat("monTmpStd"));
                        /*binf.setMonVolLowToAvg(rs.getFloat("monVolLowToAvg"));
                        binf.setBattProducer(rs.getString("battProducer"));
                        binf.setBattModel(rs.getString("battModel"));
                        binf.setBattProductDate(rs.getDate("battProductDate"));
                        binf.setBattInUseDate(rs.getDate("battInUseDate"));
                        binf.setInstall_user(rs.getString("install_user"));*/
                        binf.setLoad_curr(rs.getFloat("load_curr"));
                        binf.setDisCurrMax(rs.getFloat("disCurrMax"));
                        /*binf.setStation_phone(rs.getString("station_phone"));
                        binf.setStation_install(rs.getInt("station_install"));*/
                        binf.setStationName9(rs.getString("dev_version"));
                        list.add(binf);
                    }
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                return list;
            }
        });
        /*//去掉limit条件后的总数
        int number=LimitNumberFactory.GetLimtitNumber(conn, numberSql);
        //System.out.println("number: "+number);
        if(list!=null&&list.size()>0){
            list.get(list.size()-1).setNum(number);
        }*/
        return list;
    }
    public static void main(String[] args) throws ParseException {
        //new BattInfImpl().searchAll();
        
        BattInfImpl biml = new BattInfImpl();
        BattInf binf = new BattInf();
        binf.setNum(1);
        binf.setNum(2);
        binf.setBattGroupId(1000001);
        binf.setStationName("广西省");
        binf.setStationName("百色");
        binf.setStationName1("");
        binf.setStationName2("百色");
        binf.setStationName2("");
        binf.setStationName3("");
        binf.setStationName5("");
        binf.setBattGroupName("");
        binf.setBattProducer("1");
        binf.setStationId("42000575");
        binf.setGroupIndexInFBSDevice(0);
        binf.setMonVolStd(2f);
        binf.setMonVolStd(12f);
        User_inf uinf=new User_inf();
        uinf.setUId(1002);
        
@@ -4545,10 +4649,14 @@
        System.out.println(nums);*/
        /*boolean bl=biml.judgeBattInOrNot(binf);
        System.out.println(bl);*/
        List<BattInf> list=biml.serchByDischarge(binf);
        List<BattInf> list=biml.serchByBatt_param(binf);
        for (BattInf b : list) {
            System.out.println(b);
        }
        /*List<BattInf> list=biml.serchByDischarge(binf);
        for (BattInf b : list) {
            System.out.println(b);
        }*/
        System.out.println(list.size());
    }
    
gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java
@@ -100,7 +100,7 @@
    }
    //批量设置电池参数时,根据省市区,电池单体型号(伏数),组数筛选出电池组并读取它的实际电池参数
    public ServiceModel serchBattinfAndParam(Object obj) {
        List<BattInf> list=(new BattInfImpl()).serchByDischarge(obj);
        List<BattInf> list=(new BattInfImpl()).serchByBatt_param(obj);
        if(list!=null&&list.size()>0) {
              Calendar c = Calendar.getInstance(); 
              //现在的时间(单位:毫秒) 
@@ -163,8 +163,8 @@
        BattInf binf=new BattInf();
        binf.setNum(2);
        binf.setStationName("百色");
        binf.setGroupIndexInFBSDevice(0);
        binf.setMonVolStd(12f);
        binf.setGroupIndexInFBSDevice(100);
        binf.setMonVolStd(2f);
        ServiceModel model=service.serchBattinfAndParam(binf);
        List list=(List)model.getData();
        for (int i = 0; i < list.size(); i++) {