| | |
| | | while(rs.next()){ |
| | | BattInf binf=new BattInf(); |
| | | binf.setBattGroupId(rs.getInt("battGroupId")); |
| | | binf.setStationId(rs.getString("StationId")); |
| | | binf.setStationName1(rs.getString("stationName1")); |
| | | binf.setStationName(rs.getString("stationName")); |
| | | binf.setBattProducer(rs.getString("battProducer")); |
| | |
| | | MySqlPool.makeManualCommit(m_ConnPool.getConn(), sql_str); |
| | | } |
| | | //计算出落后单体 |
| | | public List calculatorBadBatt(int battGroupId,double monCapStd,double monVolStd,double maxVol,List<Batttestdatastop> stopList,MySqlPool m_ConnPool) { |
| | | public List calculatorBadBatt(int battGroupId,int monCount,double monCapStd,double monVolStd,double maxVol,List<Batttestdatastop> stopList,MySqlPool m_ConnPool) { |
| | | //查询告警落后和更换的参数值 |
| | | float aparam=1; |
| | | int Caplevel=1; |
| | |
| | | BattInf binf=new BattInf(); |
| | | binf.setBattGroupId(battGroupId); |
| | | binf.setMonCapStd((float) monCapStd); |
| | | binf.setMonCount(monCount); |
| | | insertUnjudge(binf,"2",4,m_ConnPool); |
| | | } |
| | | try { |
| | |
| | | + " values "; |
| | | for(int i=0;i<badList.size();i++){ |
| | | BadbattMon badMon=badList.get(i); |
| | | //System.out.println(badMon.toString()); |
| | | if(i>0){ |
| | | insertbadbatt_monSql+=" , "; |
| | | }else { |
| | |
| | | //3.计算每个单体的实际容量并判断是否为告警或更换或优秀(1,2,3) |
| | | List<Batttestdatastop> stopList=Batt_selectBadSql(binf.getBattGroupId(), tinf.getTest_record_count(),tinf.getRecord_num(),BadBatt_thread.sdf.format(tinf.getRecord_time()), m_ConnPool ); |
| | | //计算出落后单体 |
| | | List<BadbattMon> badList=calculatorBadBatt(binf.getBattGroupId(),binf.getMonCapStd(),binf.getMonVolStd(),tinf.getMax_monvol(),stopList,m_ConnPool); |
| | | List<BadbattMon> badList=calculatorBadBatt(binf.getBattGroupId(),binf.getMonCount(),binf.getMonCapStd(),binf.getMonVolStd(),tinf.getMax_monvol(),stopList,m_ConnPool); |
| | | //4.将数据插入badBattMon表 |
| | | insertBadBatt(badList,m_ConnPool); |
| | | if(badList.size()>0) { |
| | | insertBadBatt(badList,m_ConnPool); |
| | | } |
| | | }else { |
| | | //标记为无法判断:flag为4并插入 |
| | | insertUnjudge(binf,"0",4,m_ConnPool); |