| | |
| | | public List searchBattBybattgroupid(Object obj) { |
| | | BattInf binf = (BattInf) obj; |
| | | //System.out.println(binf); |
| | | String sql = "select DISTINCT(StationName),BattGroupId,BattGroupName,BattProducer,MonVolStd,MonCapStd,MonCount,BattProductDate,BattInUseDate from db_battinf.tb_battinf where BattGroupId=?"; |
| | | String sql = "select DISTINCT(StationName),BattGroupId,BattGroupName,BattProducer,BattModel,MonVolStd,MonCapStd,MonCount,BattProductDate,BattInUseDate from db_battinf.tb_battinf where BattGroupId=?"; |
| | | return DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getBattGroupId()}, new CallBack() { |
| | | |
| | | public List getResults(ResultSet rs) { |
| | |
| | | b.setBattGroupId(rs.getInt("BattGroupId")); |
| | | b.setBattGroupName(rs.getString("BattGroupName")); |
| | | b.setBattProducer(rs.getString("BattProducer")); |
| | | b.setBattModel(rs.getString("BattModel")); |
| | | b.setMonVolStd(rs.getFloat("MonVolStd")); |
| | | b.setMonCapStd(rs.getFloat("MonCapStd")); |
| | | b.setMonCount(rs.getInt("MonCount")); |
| | |
| | | } |
| | | |
| | | //根据标称电压和测试容量查询出当前测试容量对应标准曲线的单体电压 |
| | | public List<Double> searchBattStandardVolList(double monvolstd,double moncapstd,float test_cap,long hourate) { |
| | | String mainSql = "select mon_vol from db_battinf.tb_battmon_testcap_"+(int)monvolstd+"_"+(int)moncapstd+"_"+hourate+" where test_cap = "; |
| | | String subSql = "select test_cap from db_battinf.tb_battmon_testcap_"+(int)monvolstd+"_"+(int)moncapstd+"_"+hourate+" where monvolstd="+monvolstd+" and abs(test_cap)<="+toFixed((Math.abs(test_cap)),1)+" and moncapstd = "+moncapstd+" ORDER BY test_cap ASC limit 1"; |
| | | public List<Double> searchBattStandardVolList(double monvolstd, double moncapstd, float test_cap, long hourate, String battProducer, String battModel) { |
| | | String mainSql = "select mon_vol from db_battinf.tb_battmon_testcap_"+(int)monvolstd+"_"+(int)moncapstd+"_"+hourate+" where battproducer ="+battProducer+" and battmodel ="+battModel+" and test_cap = "; |
| | | String subSql = "select test_cap from db_battinf.tb_battmon_testcap_"+(int)monvolstd+"_"+(int)moncapstd+"_"+hourate+" where monvolstd="+monvolstd+" and abs(test_cap)<="+toFixed((Math.abs(test_cap)),1)+" and moncapstd = "+moncapstd+" and battproducer ="+battProducer+" and battmodel ="+battModel+" ORDER BY test_cap ASC limit 1"; |
| | | String sql = mainSql+"("+subSql+")"; |
| | | List<Double> list = DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() { |
| | | @Override |
| | |
| | | }*/ |
| | | //查询出当前测试容量对应标准曲线的单体电压的第一笔,最后一笔,最小值,最大值,平均值 |
| | | String realCapStr=""; |
| | | List<Double> StandVolList = new Battmon_testcapImpl().searchBattStandardVolList(battInf.getMonVolStd(),battInf.getMonCapStd(),rtState.getBatt_test_cap(),avg_hourRate); |
| | | List<Double> StandVolList = new Battmon_testcapImpl().searchBattStandardVolList(battInf.getMonVolStd(),battInf.getMonCapStd(),rtState.getBatt_test_cap(),avg_hourRate,battInf.getBattProducer(),battInf.getBattModel()); |
| | | List<Double> volList = new LinkedList<>(); |
| | | if(StandVolList!=null) { |
| | | //求计算值 |