From 7b8e271ed8344866c0dbe56942625ccedb5564c7 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期五, 02 十一月 2018 17:31:00 +0800
Subject: [PATCH] 问题反馈
---
gx_tieta/src/com/fgkj/dao/impl/BatttestdatastopDAOImpl.java | 89 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 89 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..95ea981 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/BatttestdatastopDAOImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/BatttestdatastopDAOImpl.java
@@ -17,6 +17,7 @@
import com.fgkj.db.IDatabaseName;
import com.fgkj.dto.Alarm_param;
import com.fgkj.dto.BattInf;
+import com.fgkj.dto.BattInf_Rebuild;
import com.fgkj.dto.Batt_Maint_Dealarm;
import com.fgkj.dto.Batttestdata;
import com.fgkj.dto.Batttestdata_inf;
@@ -420,6 +421,94 @@
}
return listB;
}
+ //鐢垫睜閰嶇粍绠$悊(閲嶈)
+ public List serchMakeGroup(Object obj1,Object obj2){
+ BattInf binf=(BattInf) obj1;
+ List listr=(List) binf.getObj();
+ 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);
+ sdata.setNote(binf.getBattProducer());
+ for (int j = 0; j < listr.size(); j++) {
+ BattInf_Rebuild brinf=(BattInf_Rebuild) listr.get(j);
+ if(sdata.getMon_num()==brinf.getOld_monum()&&sdata.getBattGroupId()==brinf.getOld_battgroupid()){
+ sdata.setMon_num(-1);
+ break;
+ }
+ if(sdata.getMon_num()==brinf.getNew_monum()&&sdata.getBattGroupId()==brinf.getNew_battgroupid()){
+ sdata.setNote(brinf.getOld_battproducer());
+ break;
+ }
+ }
+ 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);
+ sdata.setPercent((float)(realCap/STDAH));
+ }
+ }
+ return list;
+ }
//鏌ヨ鎸囧畾鐢垫睜缁勬寚瀹氬崟浣撶殑瀹為檯瀹归噺
public double serchRealCapByMon_num(Object obj) {
BattInf binf=(BattInf) obj;
--
Gitblit v1.9.1