New file |
| | |
| | | package com.fgkj.actions.ram; |
| | | |
| | | import com.fgkj.actions.ActionUtil; |
| | | import com.fgkj.dao.FBS9100_ComBase; |
| | | import com.fgkj.dao.UinfDaoFactory; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.User_log; |
| | | import com.fgkj.dto.ram.Fbs9100s_fod_param; |
| | | import com.fgkj.services.User_logService; |
| | | import com.fgkj.services.ram.Fbs9100s_fod_paramService; |
| | | |
| | | |
| | | public class Fbs9100s_fod_paramAction extends ActionUtil { |
| | | private Fbs9100s_fod_paramService service = new Fbs9100s_fod_paramService(); |
| | | private User_logService uservice=new User_logService(); |
| | | private String json; |
| | | private String result; |
| | | |
| | | |
| | | //发送命令修改参数 |
| | | public String update() { |
| | | Fbs9100s_fod_param fod= getGson().fromJson(json, Fbs9100s_fod_param.class); |
| | | ServiceModel model = new ServiceModel(); |
| | | { String msg=""; |
| | | if(fod.getOp_cmd()== FBS9100_ComBase.CMD_ReadFodParam){ |
| | | model = service.startOrStopTest(fod); |
| | | msg="读取"+fod.getDev_id()+"的设备养护除硫参数"; |
| | | }else if(fod.getOp_cmd()== FBS9100_ComBase.CMD_WriteFodParam){ |
| | | model = service.update(fod); |
| | | msg="设置"+fod.getDev_id()+"的设备养护除硫参数"; |
| | | }else if(fod.getOp_cmd()== FBS9100_ComBase.CMD_Start_FODCL_test){ |
| | | model = service.startOrStopTest(fod); |
| | | msg="启动"+fod.getDev_id()+"的设备启动除硫 "; |
| | | }else if(fod.getOp_cmd()== FBS9100_ComBase.CMD_Start_FODYH_test){ |
| | | model = service.startOrStopTest(fod); |
| | | msg="启动"+fod.getDev_id()+"的设备启动养护"; |
| | | }else if(fod.getOp_cmd()== FBS9100_ComBase.CMD_Stop_FOD_test){ |
| | | model = service.startOrStopTest(fod); |
| | | msg="停止"+fod.getDev_id()+"的设备养护除硫"; |
| | | } |
| | | User_log ulog= UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg); |
| | | uservice.add(ulog);//将用户的操作记录下来 |
| | | } |
| | | result = tojson(model); |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | |
| | | //根据设备id查询设备养护除硫的参数信息 |
| | | public String serchByCondition(){ |
| | | Fbs9100s_fod_param fod= getGson().fromJson(json, Fbs9100s_fod_param.class); |
| | | ServiceModel model=service.serchByCondition(fod); |
| | | result = tojson(model); |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getResult() { |
| | | return result; |
| | | } |
| | | public void setJson(String json) { |
| | | this.json = json; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.fgkj.actions.ram; |
| | | |
| | | import com.fgkj.actions.ActionUtil; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.ram.Fbs9100s_fod_state; |
| | | import com.fgkj.services.ram.Fbs9100s_fod_stateService; |
| | | |
| | | public class Fbs9100s_fod_stateAction extends ActionUtil { |
| | | private Fbs9100s_fod_stateService service = new Fbs9100s_fod_stateService(); |
| | | private String json; |
| | | private String result; |
| | | |
| | | |
| | | |
| | | //根据电池组id查询设备养护除硫的参数信息 |
| | | public String serchByCondition(){ |
| | | Fbs9100s_fod_state fod= getGson().fromJson(json, Fbs9100s_fod_state.class); |
| | | ServiceModel model=service.serchByCondition(fod); |
| | | result = tojson(model); |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | public String getResult() { |
| | | return result; |
| | | } |
| | | public void setJson(String json) { |
| | | this.json = json; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public static final int CMD_SetSYSSetParam = 0x81;//设置系统参数129
|
| | | public static final int CMD_ResetSystemAck = 0x0F;//15
|
| | | public static final int CMD_ResetSystem = 0x10;//重启16
|
| | | |
| | |
|
| | | //养护除硫
|
| | | final public static int CMD_ReadFodParam=160;//读取FOD参数
|
| | | final public static int CMD_WriteFodParam=161;//设置FOD参数
|
| | | final public static int CMD_Start_FODCL_test=162;//启动除硫
|
| | | final public static int CMD_Start_FODYH_test=163;//启动养护
|
| | | final public static int CMD_Stop_FOD_test=164;//停止除硫
|
| | | //养护除硫对应的ACK
|
| | | final public static int CMD_ReadFodParamAck=167;
|
| | | final public static int CMD_WriteFodParamAck=168;
|
| | | final public static int CMD_Start_FODCL_testAck=169;
|
| | | final public static int CMD_Start_FODYH_testAck=170;
|
| | | final public static int CMD_Stop_FOD_testAck=171;
|
| | |
|
| | | //读取GPRS模块的信号质量
|
| | | public static final int CMD_ReadGPRSCSQ = 0x91;
|
New file |
| | |
| | | package com.fgkj.dao.impl.ram; |
| | | |
| | | import com.fgkj.dao.BaseDAO; |
| | | import com.fgkj.dao.CallBack; |
| | | import com.fgkj.dao.DAOHelper; |
| | | import com.fgkj.dao.FBS9100_ComBase; |
| | | import com.fgkj.db.DBUtil; |
| | | import com.fgkj.dto.ram.Fbs9100s_fod_param; |
| | | |
| | | import java.sql.Connection; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class Fbs9100s_fod_paramImpl 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) { |
| | | Fbs9100s_fod_param fod=(Fbs9100s_fod_param) obj; |
| | | String sql=" replace into db_ram_db.tb_fbs9100s_fod_param(dev_id,GroupNum,BattGroupNum,STDCap_one,FloatVol_one,Strength_one,YHStrength_one,TimeLong_one,STDCap_two,FloatVol_two,Strength_two,YHStrength_two,TimeLong_two" |
| | | + ",STDCap_three,FloatVol_three,Strength_three,YHStrength_three,TimeLong_three,STDCap_four,FloatVol_four,Strength_four,YHStrength_four,TimeLong_four " |
| | | + ",STDCap_five,FloatVol_five,Strength_five,YHStrength_five,TimeLong_five)" |
| | | + " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; |
| | | boolean bl= DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{fod.getDev_id(),fod.getGroupNum(),fod.getBattGroupNum() |
| | | ,fod.getSTDCap_one(),fod.getFloatVol_one(),fod.getStrength_one(),fod.getYHStrength_one(),fod.getTimeLong_one() |
| | | ,fod.getSTDCap_two(),fod.getFloatVol_two(),fod.getStrength_two(),fod.getYHStrength_two(),fod.getTimeLong_two() |
| | | ,fod.getSTDCap_three(),fod.getFloatVol_three(),fod.getStrength_three(),fod.getYHStrength_three(),fod.getTimeLong_three() |
| | | ,fod.getSTDCap_four(),fod.getFloatVol_four(),fod.getStrength_four(),fod.getYHStrength_four(),fod.getTimeLong_four() |
| | | ,fod.getSTDCap_five(),fod.getFloatVol_five(),fod.getStrength_five(),fod.getYHStrength_five(),fod.getTimeLong_five()}); |
| | | return bl; |
| | | } |
| | | //启动和停止命令 |
| | | public boolean startOrStopTest(Object obj) { |
| | | Fbs9100s_fod_param fod=(Fbs9100s_fod_param) obj; |
| | | String sql=" replace into db_ram_db.tb_fbs9100s_fod_param(dev_id,GroupNum,BattGroupNum) " |
| | | + " values(?,?,?)"; |
| | | boolean bl= DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{fod.getDev_id(),fod.getGroupNum(),fod.getBattGroupNum()}); |
| | | return bl; |
| | | } |
| | | //机房命令操作设备时的cmd和ack校验 |
| | | public boolean sendCmdToFBS9100FOD(int cmd,int dev_id) |
| | | { |
| | | int m_cmd = cmd; |
| | | int m_cmd_ack = cmd; |
| | | switch(m_cmd) { |
| | | case FBS9100_ComBase.CMD_ReadFodParam: m_cmd_ack = FBS9100_ComBase.CMD_ReadFodParamAck; break; |
| | | case FBS9100_ComBase.CMD_WriteFodParam: m_cmd_ack = FBS9100_ComBase.CMD_WriteFodParamAck; break; |
| | | case FBS9100_ComBase.CMD_Start_FODCL_test: m_cmd_ack = FBS9100_ComBase.CMD_Start_FODCL_testAck; break; |
| | | case FBS9100_ComBase.CMD_Start_FODYH_test: m_cmd_ack = FBS9100_ComBase.CMD_Start_FODYH_testAck; break; |
| | | case FBS9100_ComBase.CMD_Stop_FOD_test: m_cmd_ack = FBS9100_ComBase.CMD_Stop_FOD_testAck; break; |
| | | default: return false; |
| | | } |
| | | boolean res_exe = false; |
| | | String sql = "UPDATE db_ram_db.tb_fbs9100s_fod_param SET " |
| | | + " op_cmd=? " |
| | | + " WHERE dev_id=? "; |
| | | Boolean bl= DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{m_cmd,dev_id}); |
| | | if(true == bl) |
| | | { |
| | | sql = "SELECT op_cmd FROM db_ram_db.tb_fbs9100s_fod_param "+ |
| | | " WHERE dev_id="+dev_id; |
| | | Connection conn= DBUtil.getConn(); |
| | | PreparedStatement ps = null; |
| | | ResultSet rs = null; |
| | | for(int n=0; n<40; n++) |
| | | { |
| | | try { |
| | | ps = conn.prepareStatement(sql); |
| | | rs=ps.executeQuery(); |
| | | if(rs.next()) |
| | | { |
| | | if(rs.getInt("op_cmd") == m_cmd_ack) |
| | | { |
| | | res_exe = true; |
| | | break; |
| | | } |
| | | } |
| | | } catch (SQLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | try { |
| | | Thread.sleep(250); |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | DBUtil.close(rs, ps, conn); |
| | | } |
| | | return res_exe; |
| | | } |
| | | 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) { |
| | | Fbs9100s_fod_param fod=(Fbs9100s_fod_param) obj; |
| | | String sql=" select distinct num,dev_id,GroupNum,BattGroupNum" |
| | | + ",STDCap_one,FloatVol_one,Strength_one,YHStrength_one,TimeLong_one " |
| | | + ",STDCap_two,FloatVol_two,Strength_two,YHStrength_two,TimeLong_two " |
| | | + ",STDCap_three,FloatVol_three,Strength_three,YHStrength_three,TimeLong_three " |
| | | + ",STDCap_four,FloatVol_four,Strength_four,YHStrength_four,TimeLong_four " |
| | | + ",STDCap_five,FloatVol_five,Strength_five,YHStrength_five,TimeLong_five " |
| | | + " from db_ram_db.tb_fbs9100s_fod_param where dev_id=? limit 1"; |
| | | List list= DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{fod.getDev_id()}, new CallBack() { |
| | | |
| | | public List getResults(ResultSet rs) { |
| | | List list=new ArrayList(); |
| | | try { |
| | | while(rs.next()){ |
| | | Fbs9100s_fod_param f=new Fbs9100s_fod_param(); |
| | | f.setNum(rs.getInt("num")); |
| | | f.setDev_id(rs.getInt("dev_id")); |
| | | f.setGroupNum(rs.getInt("groupNum")); |
| | | f.setBattGroupNum(rs.getInt("BattGroupNum")); |
| | | f.setSTDCap_one(rs.getInt("sTDCap_one")); |
| | | f.setFloatVol_one(rs.getFloat("floatVol_one")); |
| | | f.setStrength_one(rs.getFloat("strength_one")); |
| | | f.setYHStrength_one(rs.getFloat("yHStrength_one")); |
| | | f.setTimeLong_one(rs.getInt("timeLong_one")); |
| | | |
| | | f.setSTDCap_two(rs.getInt("sTDCap_two")); |
| | | f.setFloatVol_two(rs.getFloat("floatVol_two")); |
| | | f.setStrength_two(rs.getFloat("strength_two")); |
| | | f.setYHStrength_two(rs.getFloat("yHStrength_two")); |
| | | f.setTimeLong_two(rs.getInt("timeLong_two")); |
| | | |
| | | f.setSTDCap_three(rs.getInt("sTDCap_three")); |
| | | f.setFloatVol_three(rs.getFloat("floatVol_three")); |
| | | f.setStrength_three(rs.getFloat("strength_three")); |
| | | f.setYHStrength_three(rs.getFloat("yHStrength_three")); |
| | | f.setTimeLong_three(rs.getInt("timeLong_three")); |
| | | |
| | | f.setSTDCap_four(rs.getInt("sTDCap_four")); |
| | | f.setFloatVol_four(rs.getFloat("floatVol_four")); |
| | | f.setStrength_four(rs.getFloat("strength_four")); |
| | | f.setYHStrength_four(rs.getFloat("yHStrength_four")); |
| | | f.setTimeLong_four(rs.getInt("timeLong_four")); |
| | | |
| | | f.setSTDCap_five(rs.getInt("sTDCap_five")); |
| | | f.setFloatVol_five(rs.getFloat("floatVol_five")); |
| | | f.setStrength_five(rs.getFloat("strength_five")); |
| | | f.setYHStrength_five(rs.getFloat("yHStrength_five")); |
| | | f.setTimeLong_five(rs.getInt("timeLong_five")); |
| | | |
| | | list.add(f); |
| | | } |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | public List serchByInfo(Object obj) { |
| | | // TODO Auto-generated method stub |
| | | return null; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.fgkj.dao.impl.ram; |
| | | |
| | | 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.Fbs9100s_fod_state; |
| | | |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class Fbs9100s_fod_stateImpl 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) { |
| | | Fbs9100s_fod_state fod=(Fbs9100s_fod_state) obj; |
| | | String sql=" select distinct num,dev_id,BattGroupId,record_time," |
| | | + " RestTime_one,WorkState_one,VGroupVol_one,VpeakVol_one," |
| | | + " RestTime_two,WorkState_two,VGroupVol_two,VpeakVol_two," |
| | | + " RestTime_three,WorkState_three,VGroupVol_three,VpeakVol_three," |
| | | + " RestTime_four,WorkState_four,VGroupVol_four,VpeakVol_four," |
| | | + " RestTime_five,WorkState_five,VGroupVol_five,VpeakVol_five " |
| | | + " from db_ram_db.tb_fbs9100s_fod_state " |
| | | + " where BattGroupId=? limit 1"; |
| | | List list= DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{fod.getBattGroupId()}, new CallBack() { |
| | | |
| | | public List getResults(ResultSet rs) { |
| | | List list=new ArrayList(); |
| | | try { |
| | | while(rs.next()){ |
| | | Fbs9100s_fod_state f=new Fbs9100s_fod_state(); |
| | | f.setNum(rs.getInt("num")); |
| | | f.setDev_id(rs.getInt("dev_id")); |
| | | f.setBattGroupId(rs.getInt("BattGroupId")); |
| | | f.setRecord_time(rs.getTimestamp("record_time")); |
| | | f.setRestTime_one(rs.getInt("restTime_one")); |
| | | f.setWorkState_one(rs.getInt("workState_one")); |
| | | f.setVGroupVol_one(rs.getFloat("vGroupVol_one")); |
| | | f.setVpeakVol_one(rs.getFloat("vpeakVol_one")); |
| | | f.setRestTime_two(rs.getInt("restTime_two")); |
| | | f.setWorkState_two(rs.getInt("workState_two")); |
| | | f.setVGroupVol_two(rs.getFloat("vGroupVol_two")); |
| | | f.setVpeakVol_two(rs.getFloat("vpeakVol_two")); |
| | | f.setRestTime_three(rs.getInt("restTime_three")); |
| | | f.setWorkState_three(rs.getInt("workState_three")); |
| | | f.setVGroupVol_three(rs.getFloat("vGroupVol_three")); |
| | | f.setVpeakVol_three(rs.getFloat("vpeakVol_three")); |
| | | f.setRestTime_four(rs.getInt("restTime_four")); |
| | | f.setWorkState_four(rs.getInt("workState_four")); |
| | | f.setVGroupVol_four(rs.getFloat("vGroupVol_four")); |
| | | f.setVpeakVol_four(rs.getFloat("vpeakVol_four")); |
| | | f.setRestTime_five(rs.getInt("restTime_five")); |
| | | f.setWorkState_five(rs.getInt("workState_five")); |
| | | f.setVGroupVol_five(rs.getFloat("vGroupVol_five")); |
| | | f.setVpeakVol_five(rs.getFloat("vpeakVol_five")); |
| | | |
| | | list.add(f); |
| | | } |
| | | } catch (SQLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | public List serchByInfo(Object obj) { |
| | | // TODO Auto-generated method stub |
| | | return null; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.fgkj.dto.ram; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class Fbs9100s_fod_param implements Serializable{ |
| | | private int num; |
| | | private int dev_id; |
| | | private int op_cmd; |
| | | private int test_cmd; |
| | | private int BattGroupNum; //电池组id |
| | | private int GroupNum; |
| | | private int STDCap_one;//标称容量 |
| | | private float FloatVol_one;//浮充电压 |
| | | private float Strength_one;//除硫强度(<=30 |
| | | private float YHStrength_one;//养护强度(<=30) |
| | | private int TimeLong_one;//除硫天数 |
| | | private int STDCap_two; |
| | | private float FloatVol_two; |
| | | private float Strength_two; |
| | | private float YHStrength_two; |
| | | private int TimeLong_two; |
| | | private int STDCap_three; |
| | | private float FloatVol_three; |
| | | private float Strength_three; |
| | | private float YHStrength_three; |
| | | private int TimeLong_three; |
| | | private int STDCap_four; |
| | | private float FloatVol_four; |
| | | private float Strength_four; |
| | | private float YHStrength_four; |
| | | private int TimeLong_four; |
| | | private int STDCap_five; |
| | | private float FloatVol_five; |
| | | private float Strength_five; |
| | | private float YHStrength_five; |
| | | private int TimeLong_five; |
| | | public int getNum() { |
| | | return num; |
| | | } |
| | | public void setNum(int num) { |
| | | this.num = num; |
| | | } |
| | | 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 getTest_cmd() { |
| | | return test_cmd; |
| | | } |
| | | public void setTest_cmd(int test_cmd) { |
| | | this.test_cmd = test_cmd; |
| | | } |
| | | public int getGroupNum() { |
| | | return GroupNum; |
| | | } |
| | | |
| | | public int getBattGroupNum() { |
| | | return BattGroupNum; |
| | | } |
| | | |
| | | public void setBattGroupNum(int battGroupNum) { |
| | | BattGroupNum = battGroupNum; |
| | | } |
| | | |
| | | public void setGroupNum(int groupNum) { |
| | | GroupNum = groupNum; |
| | | } |
| | | public int getSTDCap_one() { |
| | | return STDCap_one; |
| | | } |
| | | public void setSTDCap_one(int sTDCap_one) { |
| | | STDCap_one = sTDCap_one; |
| | | } |
| | | public float getFloatVol_one() { |
| | | return FloatVol_one; |
| | | } |
| | | public void setFloatVol_one(float floatVol_one) { |
| | | FloatVol_one = floatVol_one; |
| | | } |
| | | public float getStrength_one() { |
| | | return Strength_one; |
| | | } |
| | | public void setStrength_one(float strength_one) { |
| | | Strength_one = strength_one; |
| | | } |
| | | public float getYHStrength_one() { |
| | | return YHStrength_one; |
| | | } |
| | | public void setYHStrength_one(float yHStrength_one) { |
| | | YHStrength_one = yHStrength_one; |
| | | } |
| | | public int getTimeLong_one() { |
| | | return TimeLong_one; |
| | | } |
| | | public void setTimeLong_one(int timeLong_one) { |
| | | TimeLong_one = timeLong_one; |
| | | } |
| | | public int getSTDCap_two() { |
| | | return STDCap_two; |
| | | } |
| | | public void setSTDCap_two(int sTDCap_two) { |
| | | STDCap_two = sTDCap_two; |
| | | } |
| | | public float getFloatVol_two() { |
| | | return FloatVol_two; |
| | | } |
| | | public void setFloatVol_two(float floatVol_two) { |
| | | FloatVol_two = floatVol_two; |
| | | } |
| | | public float getStrength_two() { |
| | | return Strength_two; |
| | | } |
| | | public void setStrength_two(float strength_two) { |
| | | Strength_two = strength_two; |
| | | } |
| | | public float getYHStrength_two() { |
| | | return YHStrength_two; |
| | | } |
| | | public void setYHStrength_two(float yHStrength_two) { |
| | | YHStrength_two = yHStrength_two; |
| | | } |
| | | public int getTimeLong_two() { |
| | | return TimeLong_two; |
| | | } |
| | | public void setTimeLong_two(int timeLong_two) { |
| | | TimeLong_two = timeLong_two; |
| | | } |
| | | public int getSTDCap_three() { |
| | | return STDCap_three; |
| | | } |
| | | public void setSTDCap_three(int sTDCap_three) { |
| | | STDCap_three = sTDCap_three; |
| | | } |
| | | public float getFloatVol_three() { |
| | | return FloatVol_three; |
| | | } |
| | | public void setFloatVol_three(float floatVol_three) { |
| | | FloatVol_three = floatVol_three; |
| | | } |
| | | public float getStrength_three() { |
| | | return Strength_three; |
| | | } |
| | | public void setStrength_three(float strength_three) { |
| | | Strength_three = strength_three; |
| | | } |
| | | public float getYHStrength_three() { |
| | | return YHStrength_three; |
| | | } |
| | | public void setYHStrength_three(float yHStrength_three) { |
| | | YHStrength_three = yHStrength_three; |
| | | } |
| | | public int getTimeLong_three() { |
| | | return TimeLong_three; |
| | | } |
| | | public void setTimeLong_three(int timeLong_three) { |
| | | TimeLong_three = timeLong_three; |
| | | } |
| | | public int getSTDCap_four() { |
| | | return STDCap_four; |
| | | } |
| | | public void setSTDCap_four(int sTDCap_four) { |
| | | STDCap_four = sTDCap_four; |
| | | } |
| | | public float getFloatVol_four() { |
| | | return FloatVol_four; |
| | | } |
| | | public void setFloatVol_four(float floatVol_four) { |
| | | FloatVol_four = floatVol_four; |
| | | } |
| | | public float getStrength_four() { |
| | | return Strength_four; |
| | | } |
| | | public void setStrength_four(float strength_four) { |
| | | Strength_four = strength_four; |
| | | } |
| | | public float getYHStrength_four() { |
| | | return YHStrength_four; |
| | | } |
| | | public void setYHStrength_four(float yHStrength_four) { |
| | | YHStrength_four = yHStrength_four; |
| | | } |
| | | public int getTimeLong_four() { |
| | | return TimeLong_four; |
| | | } |
| | | public void setTimeLong_four(int timeLong_four) { |
| | | TimeLong_four = timeLong_four; |
| | | } |
| | | |
| | | public int getSTDCap_five() { |
| | | return STDCap_five; |
| | | } |
| | | |
| | | public void setSTDCap_five(int STDCap_five) { |
| | | this.STDCap_five = STDCap_five; |
| | | } |
| | | |
| | | public float getFloatVol_five() { |
| | | return FloatVol_five; |
| | | } |
| | | |
| | | public void setFloatVol_five(float floatVol_five) { |
| | | FloatVol_five = floatVol_five; |
| | | } |
| | | |
| | | public float getStrength_five() { |
| | | return Strength_five; |
| | | } |
| | | |
| | | public void setStrength_five(float strength_five) { |
| | | Strength_five = strength_five; |
| | | } |
| | | |
| | | public float getYHStrength_five() { |
| | | return YHStrength_five; |
| | | } |
| | | |
| | | public void setYHStrength_five(float YHStrength_five) { |
| | | this.YHStrength_five = YHStrength_five; |
| | | } |
| | | |
| | | public int getTimeLong_five() { |
| | | return TimeLong_five; |
| | | } |
| | | |
| | | public void setTimeLong_five(int timeLong_five) { |
| | | TimeLong_five = timeLong_five; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Fbs9100s_fod_param [num=" + num + ", dev_id=" + dev_id |
| | | + ", op_cmd=" + op_cmd + ", test_cmd=" + test_cmd |
| | | + ", GroupNum=" + GroupNum + ", STDCap_one=" + STDCap_one |
| | | + ", FloatVol_one=" + FloatVol_one + ", Strength_one=" |
| | | + Strength_one + ", YHStrength_one=" + YHStrength_one |
| | | + ", TimeLong_one=" + TimeLong_one + ", STDCap_two=" |
| | | + STDCap_two + ", FloatVol_two=" + FloatVol_two |
| | | + ", Strength_two=" + Strength_two + ", YHStrength_two=" |
| | | + YHStrength_two + ", TimeLong_two=" + TimeLong_two |
| | | + ", STDCap_three=" + STDCap_three + ", FloatVol_three=" |
| | | + FloatVol_three + ", Strength_three=" + Strength_three |
| | | + ", YHStrength_three=" + YHStrength_three |
| | | + ", TimeLong_three=" + TimeLong_three + ", STDCap_four=" |
| | | + STDCap_four + ", FloatVol_four=" + FloatVol_four |
| | | + ", Strength_four=" + Strength_four + ", YHStrength_four=" |
| | | + YHStrength_four + ", TimeLong_four=" + TimeLong_four + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.fgkj.dto.ram; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class Fbs9100s_fod_state implements Serializable{ |
| | | private int num; |
| | | private int dev_id; |
| | | private int battGroupId; |
| | | private Date record_time; |
| | | private int RestTime_one; |
| | | private int WorkState_one; |
| | | private float VGroupVol_one; |
| | | private float VpeakVol_one; |
| | | private int RestTime_two; |
| | | private int WorkState_two; |
| | | private float VGroupVol_two; |
| | | private float VpeakVol_two; |
| | | private int RestTime_three; |
| | | private int WorkState_three; |
| | | private float VGroupVol_three; |
| | | private float VpeakVol_three; |
| | | private int RestTime_four ; |
| | | private int WorkState_four ; |
| | | private float VGroupVol_four ; |
| | | private float VpeakVol_four ; |
| | | private int RestTime_five ; |
| | | private int WorkState_five ; |
| | | private float VGroupVol_five ; |
| | | private float VpeakVol_five ; |
| | | |
| | | public int getRestTime_five() { |
| | | return RestTime_five; |
| | | } |
| | | |
| | | public void setRestTime_five(int restTime_five) { |
| | | RestTime_five = restTime_five; |
| | | } |
| | | |
| | | public int getWorkState_five() { |
| | | return WorkState_five; |
| | | } |
| | | |
| | | public void setWorkState_five(int workState_five) { |
| | | WorkState_five = workState_five; |
| | | } |
| | | |
| | | public float getVGroupVol_five() { |
| | | return VGroupVol_five; |
| | | } |
| | | |
| | | public void setVGroupVol_five(float VGroupVol_five) { |
| | | this.VGroupVol_five = VGroupVol_five; |
| | | } |
| | | |
| | | public float getVpeakVol_five() { |
| | | return VpeakVol_five; |
| | | } |
| | | |
| | | public void setVpeakVol_five(float vpeakVol_five) { |
| | | VpeakVol_five = vpeakVol_five; |
| | | } |
| | | |
| | | private String note; |
| | | |
| | | public int getBattGroupId() { |
| | | return battGroupId; |
| | | } |
| | | |
| | | public void setBattGroupId(int battGroupId) { |
| | | this.battGroupId = battGroupId; |
| | | } |
| | | |
| | | public int getNum() { |
| | | return num; |
| | | } |
| | | |
| | | public void setNum(int num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public int getDev_id() { |
| | | return dev_id; |
| | | } |
| | | |
| | | public void setDev_id(int dev_id) { |
| | | this.dev_id = dev_id; |
| | | } |
| | | |
| | | public Date getRecord_time() { |
| | | return record_time; |
| | | } |
| | | |
| | | public void setRecord_time(Date record_time) { |
| | | this.record_time = record_time; |
| | | } |
| | | |
| | | public int getRestTime_one() { |
| | | return RestTime_one; |
| | | } |
| | | |
| | | public void setRestTime_one(int restTime_one) { |
| | | RestTime_one = restTime_one; |
| | | } |
| | | |
| | | public int getWorkState_one() { |
| | | return WorkState_one; |
| | | } |
| | | |
| | | public void setWorkState_one(int workState_one) { |
| | | WorkState_one = workState_one; |
| | | } |
| | | |
| | | public float getVGroupVol_one() { |
| | | return VGroupVol_one; |
| | | } |
| | | |
| | | public void setVGroupVol_one(float vGroupVol_one) { |
| | | VGroupVol_one = vGroupVol_one; |
| | | } |
| | | |
| | | public float getVpeakVol_one() { |
| | | return VpeakVol_one; |
| | | } |
| | | |
| | | public void setVpeakVol_one(float vpeakVol_one) { |
| | | VpeakVol_one = vpeakVol_one; |
| | | } |
| | | |
| | | public int getRestTime_two() { |
| | | return RestTime_two; |
| | | } |
| | | |
| | | public void setRestTime_two(int restTime_two) { |
| | | RestTime_two = restTime_two; |
| | | } |
| | | |
| | | public int getWorkState_two() { |
| | | return WorkState_two; |
| | | } |
| | | |
| | | public void setWorkState_two(int workState_two) { |
| | | WorkState_two = workState_two; |
| | | } |
| | | |
| | | public float getVGroupVol_two() { |
| | | return VGroupVol_two; |
| | | } |
| | | |
| | | public void setVGroupVol_two(float vGroupVol_two) { |
| | | VGroupVol_two = vGroupVol_two; |
| | | } |
| | | |
| | | public float getVpeakVol_two() { |
| | | return VpeakVol_two; |
| | | } |
| | | |
| | | public void setVpeakVol_two(float vpeakVol_two) { |
| | | VpeakVol_two = vpeakVol_two; |
| | | } |
| | | |
| | | public int getRestTime_three() { |
| | | return RestTime_three; |
| | | } |
| | | |
| | | public void setRestTime_three(int restTime_three) { |
| | | RestTime_three = restTime_three; |
| | | } |
| | | |
| | | public int getWorkState_three() { |
| | | return WorkState_three; |
| | | } |
| | | |
| | | public void setWorkState_three(int workState_three) { |
| | | WorkState_three = workState_three; |
| | | } |
| | | |
| | | public float getVGroupVol_three() { |
| | | return VGroupVol_three; |
| | | } |
| | | |
| | | public void setVGroupVol_three(float vGroupVol_three) { |
| | | VGroupVol_three = vGroupVol_three; |
| | | } |
| | | |
| | | public float getVpeakVol_three() { |
| | | return VpeakVol_three; |
| | | } |
| | | |
| | | public void setVpeakVol_three(float vpeakVol_three) { |
| | | VpeakVol_three = vpeakVol_three; |
| | | } |
| | | |
| | | public int getRestTime_four() { |
| | | return RestTime_four; |
| | | } |
| | | |
| | | public void setRestTime_four(int restTime_four) { |
| | | RestTime_four = restTime_four; |
| | | } |
| | | |
| | | public int getWorkState_four() { |
| | | return WorkState_four; |
| | | } |
| | | |
| | | public void setWorkState_four(int workState_four) { |
| | | WorkState_four = workState_four; |
| | | } |
| | | |
| | | public float getVGroupVol_four() { |
| | | return VGroupVol_four; |
| | | } |
| | | |
| | | public void setVGroupVol_four(float vGroupVol_four) { |
| | | VGroupVol_four = vGroupVol_four; |
| | | } |
| | | |
| | | public float getVpeakVol_four() { |
| | | return VpeakVol_four; |
| | | } |
| | | |
| | | public void setVpeakVol_four(float vpeakVol_four) { |
| | | VpeakVol_four = vpeakVol_four; |
| | | } |
| | | |
| | | public String getNote() { |
| | | return note; |
| | | } |
| | | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Fbs9100s_fod_state [num=" + num + ", dev_id=" + dev_id |
| | | + ", record_time=" + record_time + ", RestTime_one=" |
| | | + RestTime_one + ", WorkState_one=" + WorkState_one |
| | | + ", VGroupVol_one=" + VGroupVol_one + ", VpeakVol_one=" |
| | | + VpeakVol_one + ", RestTime_two=" + RestTime_two |
| | | + ", WorkState_two=" + WorkState_two + ", VGroupVol_two=" |
| | | + VGroupVol_two + ", VpeakVol_two=" + VpeakVol_two |
| | | + ", RestTime_three=" + RestTime_three + ", WorkState_three=" |
| | | + WorkState_three + ", VGroupVol_three=" + VGroupVol_three |
| | | + ", VpeakVol_three=" + VpeakVol_three + ", RestTime_four=" |
| | | + RestTime_four + ", WorkState_four=" + WorkState_four |
| | | + ", VGroupVol_four=" + VGroupVol_four + ", VpeakVol_four=" |
| | | + VpeakVol_four + ", note=" + note + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.fgkj.services.ram; |
| | | |
| | | import com.fgkj.dao.BaseDAO; |
| | | import com.fgkj.dao.BaseDAOFactory; |
| | | import com.fgkj.dao.impl.ram.Fbs9100s_fod_paramImpl; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.ram.Fbs9100s_fod_param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class Fbs9100s_fod_paramService { |
| | | private ServiceModel model; |
| | | private BaseDAO dao; |
| | | |
| | | public Fbs9100s_fod_paramService() { |
| | | super(); |
| | | dao= new Fbs9100s_fod_paramImpl(); |
| | | model=new ServiceModel(); |
| | | } |
| | | |
| | | //机房命令操作设备时的cmd和ack校验 |
| | | public ServiceModel update(Object obj){ |
| | | Fbs9100s_fod_param fod=(Fbs9100s_fod_param) obj; |
| | | Boolean b=dao.update(obj); |
| | | if(b){ |
| | | boolean bl=((Fbs9100s_fod_paramImpl)dao).sendCmdToFBS9100FOD(fod.getOp_cmd(), fod.getDev_id()); |
| | | if(bl){ |
| | | model.setCode(1); |
| | | model.setMsg("修改成功!"); |
| | | }else{ |
| | | model.setCode(0); |
| | | model.setMsg("设置养护除硫参数失败,请检查网络!"); |
| | | } |
| | | }else{ |
| | | model.setCode(0); |
| | | model.setMsg("修改失败!"); |
| | | } |
| | | return model; |
| | | } |
| | | //启动和停止命令 |
| | | public ServiceModel startOrStopTest(Object obj){ |
| | | Fbs9100s_fod_param fod=(Fbs9100s_fod_param) obj; |
| | | Boolean b=((Fbs9100s_fod_paramImpl)dao).startOrStopTest(obj); |
| | | if(b){ |
| | | boolean bl=((Fbs9100s_fod_paramImpl)dao).sendCmdToFBS9100FOD(fod.getOp_cmd(), fod.getDev_id()); |
| | | if(bl){ |
| | | model.setCode(1); |
| | | model.setMsg("发送命令成功!"); |
| | | }else{ |
| | | model.setCode(0); |
| | | model.setMsg("发送命令成功失败,请检查网络!"); |
| | | } |
| | | }else{ |
| | | model.setCode(0); |
| | | model.setMsg("修改失败!"); |
| | | } |
| | | return model; |
| | | } |
| | | |
| | | //根据设备id查询参数 |
| | | public ServiceModel serchByCondition(Object obj){ |
| | | List list=dao.serchByCondition(obj); |
| | | if(list!=null&&list.size()>0){ |
| | | model.setCode(1); |
| | | model.setData(list); |
| | | model.setMsg("查询成功!"); |
| | | |
| | | }else{ |
| | | model.setCode(0); |
| | | model.setMsg("查询失败!"); |
| | | } |
| | | return model; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.fgkj.services.ram; |
| | | |
| | | import com.fgkj.dao.BaseDAO; |
| | | import com.fgkj.dao.BaseDAOFactory; |
| | | import com.fgkj.dao.impl.ram.Fbs9100s_fod_stateImpl; |
| | | import com.fgkj.dto.ServiceModel; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class Fbs9100s_fod_stateService { |
| | | private ServiceModel model; |
| | | private BaseDAO dao; |
| | | |
| | | public Fbs9100s_fod_stateService() { |
| | | super(); |
| | | dao= new Fbs9100s_fod_stateImpl(); |
| | | model=new ServiceModel(); |
| | | } |
| | | //根据电池组id查询状态 |
| | | public ServiceModel serchByCondition(Object obj){ |
| | | List list=dao.serchByCondition(obj); |
| | | if(list!=null&&list.size()>0){ |
| | | model.setCode(1); |
| | | model.setData(list); |
| | | model.setMsg("查询成功!"); |
| | | |
| | | }else{ |
| | | model.setCode(0); |
| | | model.setMsg("查询失败!"); |
| | | } |
| | | return model; |
| | | } |
| | | } |