81041
2018-11-28 1e8b3ca5741b24f1701b2f59d6ccebd4b7a26c1e
电池参数
2个文件已添加
5个文件已修改
277 ■■■■ 已修改文件
gx_tieta/.settings/org.jboss.tools.jst.web.xml 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/actions/ram/Fbs9100_battparamAction.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BaseDAO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/FBS9100_ComBase.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_battparamImpl.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/.settings/org.jboss.tools.jst.web.xml
@@ -9,73 +9,73 @@
 <file-system NAME="classes" location="%workspace.home%/classes" model-entity="FileSystemFolder"/>
 <file-system NAME="fuguang" location="%eclipse.project%" model-entity="FileSystemFolder"/>
 <file-system NAME="lib-javaee.jar"
  location="D:\Program Files\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\javaee.jar" model-entity="FileSystemJar"/>
  location="D:\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\javaee.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-jsf-impl.jar"
  location="D:\Program Files\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-impl.jar" model-entity="FileSystemJar"/>
  location="D:\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-impl.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-jsf-api.jar"
  location="D:\Program Files\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-api.jar" model-entity="FileSystemJar"/>
  location="D:\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jsf-api.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-jstl-1.2.jar"
  location="D:\Program Files\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jstl-1.2.jar" model-entity="FileSystemJar"/>
  location="D:\MyEclipse\Common\plugins\com.genuitec.eclipse.j2eedt.core_10.0.0.me201110301321\data\libraryset\EE_5\jstl-1.2.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-c3p0-0.9.5.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\lib\c3p0-0.9.5.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\lib\c3p0-0.9.5.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-c3p0-oracle-thin-extras-0.9.5.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\lib\c3p0-oracle-thin-extras-0.9.5.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\lib\c3p0-oracle-thin-extras-0.9.5.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-mchange-commons-java-0.2.9.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\lib\mchange-commons-java-0.2.9.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\lib\mchange-commons-java-0.2.9.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-resources.jar"
  location="D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\resources.jar" model-entity="FileSystemJar"/>
  location="D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\resources.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-dnsns.jar"
  location="D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\dnsns.jar" model-entity="FileSystemJar"/>
  location="D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\dnsns.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-localedata.jar"
  location="D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\localedata.jar" model-entity="FileSystemJar"/>
  location="D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\localedata.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-sunjce_provider.jar"
  location="D:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\sunjce_provider.jar" model-entity="FileSystemJar"/>
  location="D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\jre\lib\ext\sunjce_provider.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-commons-beanutils-1.7.0.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-beanutils-1.7.0.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-beanutils-1.7.0.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-commons-codec-1.10.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-codec-1.10.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-codec-1.10.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-commons-collections-3.1.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-collections-3.1.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-collections-3.1.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-commons-dbcp-1.2.1.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-dbcp-1.2.1.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-dbcp-1.2.1.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-commons-fileupload-1.2.2.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-fileupload-1.2.2.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-fileupload-1.2.2.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-commons-io-2.0.1.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-commons-lang-2.5.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-lang-2.5.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-lang-2.5.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-commons-pool-1.2.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-pool-1.2.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\commons-pool-1.2.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-dom4j-1.6.1.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\dom4j-1.6.1.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\dom4j-1.6.1.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-ezmorph-1.0.3.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ezmorph-1.0.3.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ezmorph-1.0.3.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-freemarker-2.3.16.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\freemarker-2.3.16.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\freemarker-2.3.16.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-gson-2.2.4.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\gson-2.2.4.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\gson-2.2.4.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-javassist-3.11.0.GA.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\javassist-3.11.0.GA.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\javassist-3.11.0.GA.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-json-lib-2.1-jdk15.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\json-lib-2.1-jdk15.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\json-lib-2.1-jdk15.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-mysql-connector-java-5.1.33-bin.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\mysql-connector-java-5.1.33-bin.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\mysql-connector-java-5.1.33-bin.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-ognl-3.0.1.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ognl-3.0.1.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\ognl-3.0.1.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-poi-3.10.1-20140818.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\poi-3.10.1-20140818.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\poi-3.10.1-20140818.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-sqljdbc.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\sqljdbc.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\sqljdbc.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-struts2-core-2.2.3.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-core-2.2.3.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-core-2.2.3.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-struts2-json-plugin-2.2.3.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-json-plugin-2.2.3.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-json-plugin-2.2.3.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-struts2-sunspoter-stream-1.0.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-sunspoter-stream-1.0.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\struts2-sunspoter-stream-1.0.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-xwork-core-2.2.3.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\xwork-core-2.2.3.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\xwork-core-2.2.3.jar" model-entity="FileSystemJar"/>
 <file-system NAME="lib-jacob.jar"
  location="C:\Users\LiJun\git\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\jacob.jar" model-entity="FileSystemJar"/>
  location="D:\GitWorkSpace\gx_tieta\gx_tieta\WebRoot\WEB-INF\lib\jacob.jar" model-entity="FileSystemJar"/>
 <web SERVLET_VERSION="2.4" model-entity="JstWeb" model-path="/web.xml">
  <module URI="/WEB-INF/faces-config.xml" model-entity="WebJSFModule"
   model-path="/faces-config.xml" src="src" web-root="WEB-ROOT"/>
gx_tieta/src/com/fgkj/actions/ram/Fbs9100_battparamAction.java
New file
@@ -0,0 +1,62 @@
package com.fgkj.actions.ram;
import java.util.List;
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.Fbs9100_battparam;
import com.fgkj.services.User_logService;
import com.fgkj.services.ram.Fbs9100_battparamService;
public class Fbs9100_battparamAction extends ActionUtil{
    private Fbs9100_battparamService service=new Fbs9100_battparamService();
    private User_logService uservice=new User_logService();
    private String json;
    private String result;
    //获取电池参数信息
    public String update() {
        Fbs9100_battparam bparam = getGson().fromJson(json, Fbs9100_battparam.class);
        ServiceModel model = service.update(bparam);
        {   String msg="";
            if(bparam.getNum()==FBS9100_ComBase.CMD_GetBattParam){
                 msg="获取"+bparam.getDev_id()+"的电池参数信息";
            }else if(bparam.getNum()==FBS9100_ComBase.CMD_SetBattParam){
                 msg="设置"+bparam.getDev_id()+"的电池参数信息";
            }
            User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
            uservice.add(ulog);//将用户的操作记录下来
        }
        result = tojson(model);
        return SUCCESS;
    }
    //根据设备id查询电池参数信息
    public String serchByCondition() {
        Fbs9100_battparam bparam = getGson().fromJson(json, Fbs9100_battparam.class);
        ServiceModel model = service.serchByCondition(bparam);
        result = tojson(model);
        return SUCCESS;
    }
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
}
gx_tieta/src/com/fgkj/dao/BaseDAO.java
@@ -198,6 +198,8 @@
    
    public static final int  BTS_GPRS_STATE=97;
    
    public static final int  FBS9100_BATTPARAM=98;
    public boolean add(Object obj); // 添加
    public boolean update(Object obj); // 更新
gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java
@@ -83,6 +83,7 @@
import com.fgkj.dao.impl.bts61850.BTS_61850_stateImpl;
import com.fgkj.dao.impl.ram.Bts_gprs_stateImpl;
import com.fgkj.dao.impl.ram.Bts_station_stateImpl;
import com.fgkj.dao.impl.ram.Fbs9100_battparamImpl;
import com.fgkj.dao.impl.ram.Fbs9100_setparamImpl;
import com.fgkj.dao.impl.ram.Fbs9100_stateImpl;
import com.fgkj.dao.impl.ram.Fbs9100_sysparamImpl;
@@ -204,6 +205,7 @@
            case 95:return new  StationtrafficImpl();
            case 96:return new  Fbs9100_sysparamImpl();
            case 97:return new  Bts_gprs_stateImpl();
            case 98:return new  Fbs9100_battparamImpl();
            default :return null;
        }
    }
gx_tieta/src/com/fgkj/dao/FBS9100_ComBase.java
@@ -45,6 +45,12 @@
    public static final int     CMD_READGPRS_BTS_TASK_INF                 =  0x17;
    public static final int     CMD_READGPRS_BTS_TASK_INFACK                 =  0x16;
    
    //读取电池参数
    public static final int        CMD_GetBattParam                =    0x36;  //获取电池参数
    public static final int        CMD_SetBattParam                =    0x37;  //设置电池参数
    public static final int        CMD_GetBattParamACK                =    0x38;
    public static final int        CMD_SetBattParamACK                =    0x39;
    //gprs通讯的命令
    public static final String   CSQ                 =   "usr.cn#AT+";
    
gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_battparamImpl.java
@@ -1,5 +1,7 @@
package com.fgkj.dao.impl.ram;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
@@ -8,6 +10,7 @@
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.Fbs9100_battparam;
import com.mysql.fabric.xmlrpc.base.Array;
@@ -23,10 +26,15 @@
        // TODO Auto-generated method stub
        return false;
    }
    //修改参数
    public boolean update(Object obj) {
        // TODO Auto-generated method stub
        return false;
        Fbs9100_battparam bparam=(Fbs9100_battparam) obj;
        /*String sql=" update db_ram_db.tb_fbs9100_battparam set STD_CAP=?,STD_RES=?,BattGroupCount=?,EachGroupBattCount=?,MonomerVol=?,GroupVol=?,BattTemp=?,FloatChargeVol=?,FloatChargeCurr=?,OnlineVolLow=?,GroupConnType=? " +
                " where dev_id=? ";*/
        String sql=" replace into db_ram_db.tb_fbs9100_battparam(dev_id,dev_ip,STD_CAP,STD_RES,BattGroupCount,EachGroupBattCount,MonomerVol,GroupVol,BattTemp,FloatChargeVol,FloatChargeCurr,OnlineVolLow,GroupConnType) values(?,?,?,?,?,?,?,?,?,?,?,?,?)";
        boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{bparam.getDev_id(),bparam.getDev_ip(),bparam.getSTD_CAP(),bparam.getSTD_RES(),bparam.getBattGroupCount(),bparam.getEachGroupBattCount(),bparam.getMonomerVol(),bparam.getGroupVol()
            ,bparam.getBattTemp(),bparam.getFloatChargeVol(),bparam.getFloatChargeCurr(),bparam.getOnlineVolLow(),bparam.getGroupConnType()});
        return bl;
    }
    public boolean del(Object obj) {
@@ -63,18 +71,81 @@
                        b.setEachGroupBattCount(rs.getInt("eachGroupBattCount"));
                        b.setMonomerVol(rs.getFloat("monomerVol"));
                        b.setGroupVol(rs.getFloat("groupVol"));
                        b.setBattTemp(rs.getFloat("battTemp"));
                        b.setFloatChargeVol(rs.getFloat("floatChargeVol"));
                        b.setFloatChargeCurr(rs.getFloat("floatChargeCurr"));
                        b.setOnlineVolLow(rs.getFloat("onlineVolLow"));
                        b.setGroupConnType(rs.getInt("groupConnType"));
                        b.setDeviceName(rs.getString("deviceName"));
                        b.setStationName(rs.getString("stationName"));
                        b.setStationName1(rs.getString("stationName1"));
                        b.setStationName2(rs.getString("stationName2"));
                        b.setStationName3(rs.getString("stationName3"));
                        b.setStationName5(rs.getString("stationName5"));
                        b.setStationId(rs.getString("stationId"));
                        list.add(b);
                    }
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                return null;
                return list;
            }
        });
        return null;
        return list;
    }
    //电池参数命令操作设备时的cmd和ack校验
    public boolean sendCmdToBattparam(int cmd,int dev_id)
    {
        int m_cmd = cmd;
        int m_cmd_ack = cmd;
        switch(m_cmd) {
            case FBS9100_ComBase.CMD_GetBattParam: m_cmd_ack = FBS9100_ComBase.CMD_GetBattParamACK; break;
            case FBS9100_ComBase.CMD_SetBattParam: m_cmd_ack = FBS9100_ComBase.CMD_SetBattParamACK; break;
            default: return false;
        }
        String sql_end = "";
        boolean res_exe = false;
        String sql = "UPDATE db_ram_db.db_ram_db.tb_fbs9100_battparam  SET "
                        + " op_cmd=? " + sql_end
                        + " 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_fbs9100_battparam "+
                        " WHERE dev_id="+dev_id;
            Connection conn=DBUtil.getConn();
            PreparedStatement ps = null;
            ResultSet rs = null;
            for(int n=0; n<20; 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 List serchByInfo(Object obj) {
        // TODO Auto-generated method stub
        return null;
gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java
New file
@@ -0,0 +1,56 @@
package com.fgkj.services.ram;
import java.util.List;
import com.fgkj.dao.BaseDAO;
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_battparamImpl;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.ram.Bts_gprs_state;
import com.fgkj.dto.ram.Fbs9100_battparam;
public class Fbs9100_battparamService {
    private BaseDAO dao;
    private ServiceModel model;
    public Fbs9100_battparamService() {
        super();
        dao=BaseDAOFactory.getBaseDAO(BaseDAO.FBS9100_BATTPARAM);
        model=new ServiceModel();
    }
    //获取电池参数信息
    public ServiceModel update(Object obj) {
        Fbs9100_battparam bparam=(Fbs9100_battparam) obj;
        boolean b=dao.update(bparam);
        if(b){
            boolean bl=((Fbs9100_battparamImpl)dao).sendCmdToBattparam(bparam.getNum(), bparam.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;
    }
}