From 51dcddc40bc4607db43d26285d1e73b26ad489cd Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期三, 28 十一月 2018 08:59:36 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whychdw@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java | 186 +++++++++++++++++++++++++++++++++++++ gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_battparamImpl.java | 83 ++++++++++++++++ 2 files changed, 269 insertions(+), 0 deletions(-) diff --git a/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_battparamImpl.java b/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_battparamImpl.java new file mode 100644 index 0000000..9a86fc6 --- /dev/null +++ b/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_battparamImpl.java @@ -0,0 +1,83 @@ +package com.fgkj.dao.impl.ram; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.fgkj.dao.BaseDAO; +import com.fgkj.dao.CallBack; +import com.fgkj.dao.DAOHelper; +import com.fgkj.db.DBUtil; +import com.fgkj.dto.ram.Fbs9100_battparam; +import com.mysql.fabric.xmlrpc.base.Array; + +public class Fbs9100_battparamImpl implements BaseDAO,CallBack{ + + public List getResults(ResultSet rs) { + // TODO Auto-generated method stub + return null; + } + + public boolean add(Object obj) { + // TODO Auto-generated method stub + return false; + } + + public boolean update(Object obj) { + // TODO Auto-generated method stub + return false; + } + + public boolean del(Object obj) { + // TODO Auto-generated method stub + return false; + } + + public List searchAll() { + // TODO Auto-generated method stub + return null; + } + //鏍规嵁璁惧id鏌ヨ鐢垫睜鍙傛暟淇℃伅 + public List serchByCondition(Object obj) { + Fbs9100_battparam bparam=(Fbs9100_battparam) obj; + String sql=" select distinct num,dev_ip,dev_id,op_cmd,STD_CAP,STD_RES,BattGroupCount,EachGroupBattCount,MonomerVol,GroupVol,BattTemp,FloatChargeVol,FloatChargeCurr,OnlineVolLow,GroupConnType " + + " ,db_battinf.tb_battinf.DeviceName,StationName,StationName1,StationName2,StationName3,StationName5,StationId " + + " from db_ram_db.tb_fbs9100_battparam,db_battinf.tb_battinf " + + " where dev_id=? and db_ram_db.tb_fbs9100_battparam.dev_id=db_battinf.tb_battinf.fbsdeviceid" + + " limit 1 "; + List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{bparam.getDev_id()}, new CallBack() { + + public List getResults(ResultSet rs) { + List list=new ArrayList(); + try { + while(rs.next()){ + Fbs9100_battparam b=new Fbs9100_battparam(); + b.setNum(rs.getInt("num")); + b.setDev_ip(rs.getString("dev_ip")); + b.setDev_id(rs.getInt("dev_id")); + b.setOp_cmd(rs.getInt("op_cmd")); + b.setSTD_CAP(rs.getInt("sTD_CAP")); + b.setSTD_RES(rs.getInt("sTD_RES")); + b.setBattGroupCount(rs.getInt("battGroupCount")); + b.setEachGroupBattCount(rs.getInt("eachGroupBattCount")); + b.setMonomerVol(rs.getFloat("monomerVol")); + b.setGroupVol(rs.getFloat("groupVol")); + list.add(b); + } + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return null; + } + }); + return null; + } + + public List serchByInfo(Object obj) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java b/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java new file mode 100644 index 0000000..17f9b83 --- /dev/null +++ b/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java @@ -0,0 +1,186 @@ +package com.fgkj.dto.ram; + +import java.io.Serializable; + +public class Fbs9100_battparam implements Serializable{ + private int num; + private String dev_ip; + private int dev_id; + private int op_cmd; + private int STD_CAP; //鐢垫睜鏍囩О瀹归噺(AH) + private int STD_RES; //鐢垫睜鏍囩О鍐呴樆(u惟) + private int BattGroupCount;//鐢垫睜缁勬暟 + private int EachGroupBattCount;//姣忕粍鐢垫睜鍗曚綋鏁伴噺 + private float MonomerVol;//鍗曚綋鏍囩О鐢靛帇锛圴锛� + private float GroupVol;//鐢垫睜缁勭鏍囩О鐢靛帇锛圴锛� + private float BattTemp;//鐢垫睜鏍囩О娓╁害锛堚剝锛� + private float FloatChargeVol;//鐢垫睜娴厖鐢靛帇闃�鍊硷紙V锛� + private float FloatChargeCurr;//鐢垫睜娴厖鐢垫祦闃�鍊硷紙A锛� + private float OnlineVolLow;//鍦ㄧ嚎鐢靛帇浣庨榾鍊硷紙V锛� + private int GroupConnType;//鐢垫睜缁勮繛鎺ョ被鍨� + private String note; + + private String DeviceName; + private String StationName; + private String StationName1; + private String StationName2; + private String StationName3; + private String StationName5; + private String StationId; + public int getNum() { + return num; + } + public void setNum(int num) { + this.num = num; + } + public String getDev_ip() { + return dev_ip; + } + public void setDev_ip(String dev_ip) { + this.dev_ip = dev_ip; + } + public int getDev_id() { + return dev_id; + } + public void setDev_id(int dev_id) { + this.dev_id = dev_id; + } + public int getOp_cmd() { + return op_cmd; + } + public void setOp_cmd(int op_cmd) { + this.op_cmd = op_cmd; + } + public int getSTD_CAP() { + return STD_CAP; + } + public void setSTD_CAP(int sTD_CAP) { + STD_CAP = sTD_CAP; + } + public int getSTD_RES() { + return STD_RES; + } + public void setSTD_RES(int sTD_RES) { + STD_RES = sTD_RES; + } + public int getBattGroupCount() { + return BattGroupCount; + } + public void setBattGroupCount(int battGroupCount) { + BattGroupCount = battGroupCount; + } + public int getEachGroupBattCount() { + return EachGroupBattCount; + } + public void setEachGroupBattCount(int eachGroupBattCount) { + EachGroupBattCount = eachGroupBattCount; + } + public float getMonomerVol() { + return MonomerVol; + } + public void setMonomerVol(float monomerVol) { + MonomerVol = monomerVol; + } + public float getGroupVol() { + return GroupVol; + } + public void setGroupVol(float groupVol) { + GroupVol = groupVol; + } + public float getBattTemp() { + return BattTemp; + } + public void setBattTemp(float battTemp) { + BattTemp = battTemp; + } + public float getFloatChargeVol() { + return FloatChargeVol; + } + public void setFloatChargeVol(float floatChargeVol) { + FloatChargeVol = floatChargeVol; + } + public float getFloatChargeCurr() { + return FloatChargeCurr; + } + public void setFloatChargeCurr(float floatChargeCurr) { + FloatChargeCurr = floatChargeCurr; + } + public float getOnlineVolLow() { + return OnlineVolLow; + } + public void setOnlineVolLow(float onlineVolLow) { + OnlineVolLow = onlineVolLow; + } + public int getGroupConnType() { + return GroupConnType; + } + public void setGroupConnType(int groupConnType) { + GroupConnType = groupConnType; + } + public String getNote() { + return note; + } + public void setNote(String note) { + this.note = note; + } + public String getDeviceName() { + return DeviceName; + } + public void setDeviceName(String deviceName) { + DeviceName = deviceName; + } + public String getStationName() { + return StationName; + } + public void setStationName(String stationName) { + StationName = stationName; + } + public String getStationName1() { + return StationName1; + } + public void setStationName1(String stationName1) { + StationName1 = stationName1; + } + public String getStationName2() { + return StationName2; + } + public void setStationName2(String stationName2) { + StationName2 = stationName2; + } + public String getStationName3() { + return StationName3; + } + public void setStationName3(String stationName3) { + StationName3 = stationName3; + } + public String getStationName5() { + return StationName5; + } + public void setStationName5(String stationName5) { + StationName5 = stationName5; + } + public String getStationId() { + return StationId; + } + public void setStationId(String stationId) { + StationId = stationId; + } + @Override + public String toString() { + return "Fbs9100_battparam [num=" + num + ", dev_ip=" + dev_ip + + ", dev_id=" + dev_id + ", op_cmd=" + op_cmd + ", STD_CAP=" + + STD_CAP + ", STD_RES=" + STD_RES + ", BattGroupCount=" + + BattGroupCount + ", EachGroupBattCount=" + EachGroupBattCount + + ", MonomerVol=" + MonomerVol + ", GroupVol=" + GroupVol + + ", BattTemp=" + BattTemp + ", FloatChargeVol=" + + FloatChargeVol + ", FloatChargeCurr=" + FloatChargeCurr + + ", OnlineVolLow=" + OnlineVolLow + ", GroupConnType=" + + GroupConnType + ", note=" + note + ", DeviceName=" + + DeviceName + ", StationName=" + StationName + + ", StationName1=" + StationName1 + ", StationName2=" + + StationName2 + ", StationName3=" + StationName3 + + ", StationName5=" + StationName5 + ", StationId=" + StationId + + "]"; + } + +} -- Gitblit v1.9.1