| | |
| | | ServiceModel model = service.update(gprs);
|
| | | { String msg="";
|
| | | if(gprs.getNum()==FBS9100_ComBase.CMD_ReadGPRSCSQ){
|
| | | msg="获取"+gprs.getDev_id()+"的设备系统参数";
|
| | | msg="获取"+gprs.getDev_id()+"的设备gprs信号";
|
| | | }
|
| | | User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
|
| | | uservice.add(ulog);//将用户的操作记录下来
|
| | |
| | | result = tojson(model);
|
| | | return SUCCESS;
|
| | | }
|
| | | //根据设备id读取的设备连接的gprs模块的信号值
|
| | | //获取设备进程信息
|
| | | public String update_bts_task_inf() {
|
| | | Bts_gprs_state gprs = getGson().fromJson(json, Bts_gprs_state.class);
|
| | | ServiceModel model = service.update_bts_task_inf(gprs);
|
| | | { String msg="";
|
| | | if(gprs.getNum()==FBS9100_ComBase.CMD_READGPRS_BTS_TASK_INF){
|
| | | msg="获取"+gprs.getDev_id()+"的设备进程信息";
|
| | | }
|
| | | User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
|
| | | uservice.add(ulog);//将用户的操作记录下来
|
| | | }
|
| | | result = tojson(model); |
| | | return SUCCESS; |
| | | }
|
| | | //根据设备id读取的设备连接的gprs模块的信号值/设备进程信息
|
| | | public String serchByCondition(){
|
| | | Bts_gprs_state gprs = getGson().fromJson(json, Bts_gprs_state.class);
|
| | | ServiceModel model = service.serchByCondition(gprs);
|
| | |
| | | //读取GPRS模块的信号质量
|
| | | public static final int CMD_ReadGPRSCSQ = 0x91;
|
| | | public static final int CMD_ReadGPRSCSQAck = 0x92;
|
| | | //读取设备进程信息
|
| | | public static final int CMD_READGPRS_BTS_TASK_INF = 0x17;
|
| | | public static final int CMD_READGPRS_BTS_TASK_INFACK = 0x16;
|
| | | |
| | | //gprs通讯的命令
|
| | | public static final String CSQ = "usr.cn#AT+";
|
| | |
|
| | |
| | | //根据设备id读取的设备连接的gprs模块的信号值
|
| | | public List serchByCondition(Object obj) {
|
| | | Bts_gprs_state gprs=(Bts_gprs_state) obj;
|
| | | String sql=" select distinct db_ram_db.tb_bts_gprs_state.num,dev_id,op_cmd,AT_cmd,ack_inf" +
|
| | | String sql=" select distinct db_ram_db.tb_bts_gprs_state.num,dev_id,op_cmd,AT_cmd,ack_inf,bts_task_inf" +
|
| | | " ,stationName,FBSDeviceName " +
|
| | | " from db_ram_db.tb_bts_gprs_state,db_battinf.tb_battinf " +
|
| | | " where db_ram_db.tb_bts_gprs_state.dev_id=db_battinf.tb_battinf.FBSDeviceId " +
|
| | |
| | | g.setOp_cmd(rs.getInt("op_cmd"));
|
| | | g.setAT_cmd(rs.getString("aT_cmd"));
|
| | | g.setAck_inf(rs.getString("ack_inf"));
|
| | | g.setBts_task_inf(rs.getString("bts_task_inf"));
|
| | | g.setStationName(rs.getString("stationName"));
|
| | | g.setFBSDeviceName(rs.getString("fBSDeviceName"));
|
| | | list.add(g);
|
| | |
| | | case FBS9100_ComBase.CMd_SetIp_Tem: m_cmd_ack = FBS9100_ComBase.CMd_SetIpAck; break;
|
| | | case FBS9100_ComBase.CMd_SetIp_Per: m_cmd_ack = FBS9100_ComBase.CMd_SetIpAck; break;
|
| | | case FBS9100_ComBase.CMD_ResetSystem: m_cmd_ack = FBS9100_ComBase.CMD_ResetSystemAck; break;
|
| | | case FBS9100_ComBase.CMD_READGPRS_BTS_TASK_INF: m_cmd_ack = FBS9100_ComBase.CMD_READGPRS_BTS_TASK_INFACK; break;
|
| | | default: return false;
|
| | | }
|
| | | String sql_end = "";
|
| | |
| | | private int op_cmd;
|
| | | private String AT_cmd;
|
| | | private String ack_inf;
|
| | | private String bts_task_inf;//进程信息
|
| | | private String note;
|
| | | private String stationName;
|
| | | private String FBSDeviceName;
|
| | |
| | | public void setFBSDeviceName(String fBSDeviceName) {
|
| | | FBSDeviceName = fBSDeviceName;
|
| | | }
|
| | | public String getBts_task_inf() {
|
| | | return bts_task_inf;
|
| | | }
|
| | | public void setBts_task_inf(String bts_task_inf) {
|
| | | this.bts_task_inf = bts_task_inf;
|
| | | }
|
| | | @Override
|
| | | public String toString() {
|
| | | return "Bts_gprs_state [num=" + num + ", dev_id=" + dev_id
|
| | | + ", op_cmd=" + op_cmd + ", AT_cmd=" + AT_cmd + ", ack_inf="
|
| | | + ack_inf + ", note=" + note + ", stationName=" + stationName
|
| | | + ", FBSDeviceName=" + FBSDeviceName + "]";
|
| | | + ack_inf + ", bts_task_inf=" + bts_task_inf + ", note=" + note
|
| | | + ", stationName=" + stationName + ", FBSDeviceName="
|
| | | + FBSDeviceName + "]";
|
| | | }
|
| | |
|
| | | |
| | |
|
| | |
|
| | | }
|
| | |
| | | import com.fgkj.dao.BaseDAOFactory;
|
| | | import com.fgkj.dao.FBS9100_ComBase;
|
| | | import com.fgkj.dao.impl.ram.Bts_gprs_stateImpl;
|
| | | import com.fgkj.dao.impl.ram.Fbs9100_setparamImpl;
|
| | | import com.fgkj.dto.ServiceModel;
|
| | | import com.fgkj.dto.ram.Bts_gprs_state;
|
| | |
|
| | |
| | |
|
| | | return model;
|
| | | }
|
| | | |
| | | //获取设备进程信息
|
| | | public ServiceModel update_bts_task_inf(Object obj) {
|
| | | Bts_gprs_state gprs=(Bts_gprs_state) obj;
|
| | | boolean bl=(new Fbs9100_setparamImpl()).sendCmdToFBS9100Dev(gprs.getNum(),0,gprs.getDev_id());
|
| | | if(bl){
|
| | | model.setCode(1);
|
| | | model.setMsg("获取设备进程信息成功!");
|
| | | }else{
|
| | | model.setCode(0);
|
| | | model.setMsg("获取设备进程信息失败,请检查网络!");
|
| | | }
|
| | | return model; |
| | | }
|
| | | //根据设备id读取的设备连接的gprs模块的信号值
|
| | | public ServiceModel serchByCondition(Object obj){
|
| | | List list = dao.serchByCondition(obj);
|