From ea7102bdbdb56abfc1201489de7ff51d0b42ff07 Mon Sep 17 00:00:00 2001 From: 星伟 <星伟@192.168.10.27> Date: 星期日, 30 九月 2018 08:47:15 +0800 Subject: [PATCH] 电池组删除添加修改时修改app——sys中值为1+配组管理 --- gx_tieta/src/com/fgkj/dao/impl/BatttestdatastopDAOImpl.java | 74 +++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 0 deletions(-) diff --git a/gx_tieta/src/com/fgkj/dao/impl/BatttestdatastopDAOImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BatttestdatastopDAOImpl.java index 7826009..9f9e6f1 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/BatttestdatastopDAOImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/BatttestdatastopDAOImpl.java @@ -420,6 +420,80 @@ } return listB; } + //鐢垫睜閰嶇粍绠$悊(閲嶈) + public List serchMakeGroup(Object obj1,Object obj2){ + BattInf binf=(BattInf) obj1; + Batttestdata_inf tinf=(Batttestdata_inf) obj2; + String sql="select num,BattGroupId,test_record_count,test_type,data_new,data_available,record_num,test_starttime,record_time,test_timelong,group_vol," + + " test_curr,test_cap,mon_num,mon_vol " + + " from db_batt_testdata.tb_batttestdatastop_"+tinf.getBattGroupId()+" " + + " where " + + "test_record_count=? and record_time=? " + + " and db_batt_testdata.tb_batttestdatastop_"+tinf.getBattGroupId()+".data_available=1 ";//tb_batttestdatastop_id琛ㄤ腑绛涢�夊嚭瀹為檯鐢靛帇>鏍囧瓨鐢靛帇*0.9鐨勬椂鐨勯偅绗旀暟鎹�,new Object[]{tdata.getTest_record_count(),tdata.getRecord_time()} + + List<Batttestdatastop> list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[]{tinf.getTest_record_count(),tinf.getRecord_time()}, new CallBack() { + + public List getResults(ResultSet rs) { + List<Batttestdatastop> list=new ArrayList<Batttestdatastop>(); + try { + while(rs.next()){ + Batttestdatastop sdata=new Batttestdatastop(); + sdata.setNum(rs.getInt("num")); + sdata.setBattGroupId(rs.getInt("BattGroupId")); + sdata.setTest_record_count(rs.getInt("test_record_count")); + sdata.setTest_type(rs.getInt("test_type")); + sdata.setData_new(rs.getInt("data_new")); + sdata.setData_available(rs.getInt("data_available")); + sdata.setRecord_num(rs.getInt("record_num")); + sdata.setTest_starttime(rs.getTimestamp("test_starttime")); + sdata.setRecord_time(rs.getTimestamp("record_time")); + sdata.setTest_timelong(rs.getInt("test_timelong")); + sdata.setGroup_vol(rs.getFloat("group_vol")); + sdata.setTest_curr(rs.getFloat("test_curr")); + sdata.setTest_cap(rs.getFloat("test_cap")); + sdata.setMon_num(rs.getInt("mon_num")); + sdata.setMon_vol(rs.getFloat("mon_vol")); + list.add(sdata); + + } + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return list; + } + }); + double realCap=0;//瀹為檯瀹归噺 + double STDAH=0;//鏍囧瓨瀹归噺 + int hourRate=0;//灏忔椂鐜� + double current=0;//褰撳墠鐢垫祦 + double SumAH=0;//娴嬭瘯瀹归噺 + double MaxMonomerVol=0;//鏈�澶х數鍘� + double MonomerVol=0; //鏈�灏忕數鍘� + double MonomerVolType=0;//鐢垫睜鐢靛帇绫诲瀷 + int flag=1;//鐢垫睜鍗曚綋鍛婅鏍囪瘑 + if(list!=null&&list.size()>0){ + for(int i=0;i<list.size();i++){ + Batttestdatastop sdata=list.get(i); + STDAH=binf.getMonCapStd(); + MonomerVolType=binf.getMonVolStd(); + + current=sdata.getTest_curr(); + SumAH=sdata.getTest_cap(); + MaxMonomerVol=tinf.getMax_monvol(); + MonomerVol=sdata.getMon_vol(); + hourRate=BattCapFactory.GetHourRate(STDAH, current); + if(sdata.getMon_vol()>binf.getMonVolStd()*BattTestData.test_stop){ + realCap=BattCapFactory.GetMonomerCap(STDAH, hourRate, SumAH, MaxMonomerVol, MonomerVol, MonomerVolType, BattCapFactory.CapType_Real); + }else{ + sdata.setMon_vol(binf.getMonVolStd()*BattTestData.test_stop); + realCap=(new BatttestdataDAOImpl()).serchRealCap(sdata); + } + sdata.setTest_cap((float)realCap); + } + } + return list; + } //鏌ヨ鎸囧畾鐢垫睜缁勬寚瀹氬崟浣撶殑瀹為檯瀹归噺 public double serchRealCapByMon_num(Object obj) { BattInf binf=(BattInf) obj; -- Gitblit v1.9.1