Merge branch 'dev_lxw' of https://whyclj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
| | |
| | | </div>
|
| | | <!-- 存储iframe -->
|
| | | <div id="iframeEdit"></div>
|
| | | <div id="iframeAddData"></div>
|
| | | <!-- 关闭页面中iframe弹出层 -->
|
| | | <div id="iframeClose"></div>
|
| | | <script type="text/html" id="battGrouptools">
|
| | |
| | | font-size: 20px;
|
| | | color: #FF5722;
|
| | | }
|
| | | .layui-not-show {
|
| | | display: none;
|
| | | }
|
| | | </style>
|
| | | </head>
|
| | | <body>
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">设备ID<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">设备IP</label>
|
| | | <div class="layui-input-block">
|
| | |
| | | {{# }); }}
|
| | | </div>
|
| | | </script>
|
| | | <script type="text/html" id="msgTpl">
|
| | | <div style="width: 380px;" class="layui-form layui-form-pane">
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label">设备ID</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="FBSDeviceId" disabled="" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input layui-bg-gray" value="{{d.FBSDeviceId}}">
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label">设备IP</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="FBSDeviceIP" disabled="" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input layui-bg-gray" value="{{d.FbsDeviceIp}}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </script>
|
| | | <script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
|
| | | <script type="text/javascript" src="../js/base.js"></script>
|
| | | <script type="text/javascript" src="../src/layui.js"></script>
|
| | |
| | | var monCapStds = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 1000];
|
| | | var battProducers = ['圣阳', '理士', '银泰', '南都', '双登', 'SENRY', '艾默生', '科士达', '丰日', '中兴能派', '光宇', '郎达', '艾诺斯华达', '雄韬', '风帆', '文隆', '中山'];
|
| | | var monNums = [4, 24]
|
| | | |
| | | // 添加完成后提示信息的模板
|
| | | var msgTpl = $('#msgTpl').html();
|
| | |
|
| | | editInfo.FbsDeviceIp = getDevIp(editInfo.FBSDeviceId); // 设置设备IP
|
| | | editInfo.monCapStds = monCapStds; // 标称容量列表
|
| | |
| | | ,useDate: '2018-09-18 00:00:00'
|
| | | ,install_user: '呵呵'
|
| | | };
|
| | | |
| | | |
| | | // 渲染内容
|
| | | laytpl(battInfoTpl).render(editInfo, function(html) {
|
| | | $('#battInfo').html(html);
|
| | |
| | | var model = eval('('+data.result+')');
|
| | | //console.info(model);
|
| | | if(model.code ==1){
|
| | | layer.msg('添加成功!3秒后面板自动关闭');
|
| | | setTimeout(function() {
|
| | | parent.$('#iframeClose').click();
|
| | | parent.$('#paging .search').click();
|
| | | }, 3000);
|
| | | parent.layer.msg('添加成功!3秒后面板自动关闭');
|
| | | // 提示信息
|
| | | laytpl(msgTpl).render(temp[0], function(html) {
|
| | | parent.layer.open({
|
| | | title: '重要信息'
|
| | | ,area: ['420px', 'auto']
|
| | | ,content: html
|
| | | });
|
| | | });
|
| | | |
| | | parent.$('#iframeClose').click();
|
| | | parent.$('#paging .search').click();
|
| | | }else{
|
| | | layer.msg('添加失败!');
|
| | | }
|
| | |
| | | cleanCookie("username", "password");
|
| | | alert(model.msg+"请重新登录");
|
| | | exitUser();
|
| | | window.location.href="zzlogin1.jsp"; |
| | | window.location.href="login.jsp"; |
| | | }else{
|
| | | alert(model.msg);
|
| | | }
|
| | |
| | | }
|
| | | maxb++;
|
| | | sql_str.add(sql);
|
| | | String baoji_sql="REPLACE into db_user.tb_user_battgroup_baojigroup_battgroup(baoji_group_id,StationId,BattGroupId) " + |
| | | " SELECT baoji_group_id,'"+binf.getStationId()+"',"+binf.getBattGroupId()+" from db_user.tb_user_battgroup_baojigroup_usr where uid="+((User_inf)ActionUtil.getUser()).getUId();
|
| | | sql_str.add(baoji_sql);
|
| | | {
|
| | | String msg="添加"+binf.getStationName()+"机房"+binf.getBattGroupId()+"电池组的信息";
|
| | | User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Increase, msg);
|
| | |
| | | ",'"+binf.getBattProducer()+"','"+binf.getBattModel()+"','"+DAOHelper.sdf.format(binf.getBattProductDate())+"','"+DAOHelper.sdf.format(binf.getBattInUseDate())+"',"+binf.getLoad_curr()+",'"+binf.getInstall_user()+"',"+binf.getDisCurrMax()+",'"+binf.getStation_phone()+"',"+binf.getStation_install()+")";
|
| | | sql_str.add(sql_insert_binf);
|
| | | String baoji_sql="REPLACE into db_user.tb_user_battgroup_baojigroup_battgroup(baoji_group_id,StationId,BattGroupId) " +
|
| | | " SELECT baoji_group_id,'"+binf.getStationId()+"',"+binf.getBattGroupId()+" from db_user.tb_user_battgroup_baojigroup ";
|
| | | " SELECT baoji_group_id,'"+binf.getStationId()+"',"+binf.getBattGroupId()+" from db_user.tb_user_battgroup_baojigroup_usr where uid="+bapply.getApply_uid();
|
| | | sql_str.add(baoji_sql);
|
| | | {
|
| | | String msg="确认添加"+binf.getStationName()+"机房"+binf.getBattGroupId()+"电池组的信息";
|
| | |
| | | import com.fgkj.dao.CallBack;
|
| | | import com.fgkj.dao.DAOHelper;
|
| | | import com.fgkj.dao.FBS9100_ComBase;
|
| | | import com.fgkj.dao.UinfDaoFactory;
|
| | | import com.fgkj.db.DBUtil;
|
| | | import com.fgkj.dto.User_log;
|
| | | import com.fgkj.dto.ram.Fbs9100_setparam;
|
| | | import com.fgkj.dto.ram.Fbs9100_sysparam;
|
| | | import com.fgkj.services.User_logService;
|
| | |
|
| | | public class Fbs9100_sysparamImpl implements BaseDAO,CallBack{
|
| | |
|
| | |
| | | "where dev_id=? ";
|
| | | boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{sys.getIPADDR(),sys.getSubIPADDR(),sys.getNetGateADDR(),sys.getGroupVolRange(),sys.getGroupVolSorce(),sys.getCurrentRange(),sys.getCurrentTyte(),sys.getMonomerOrder(),sys.getBackLightTime()
|
| | | ,sys.getMACADDR(),sys.getLoaderCount(),sys.getDtCardCount(),sys.getPowerBreakChargeCurr(),sys.getMajorBattGroupNum(),sys.getPOF_BG_Boost_Cnt(),sys.getPOF_BG_Boost_VolStop(),sys.getPOF_BG_Boost_VolStart(),sys.getDev_id()});
|
| | | return bl;
|
| | | }
|
| | | //批量设置系统参数
|
| | | public boolean updatePro(Object obj) {
|
| | | List<Fbs9100_sysparam> list=(List<Fbs9100_sysparam>) obj;
|
| | | ArrayList sql_str=new ArrayList();
|
| | | List<User_log> listU=new ArrayList<User_log>();//存放user_log
|
| | | if(list!=null&&list.size()>0){
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | Fbs9100_sysparam fs=list.get(i);
|
| | | String sql="REPLACE into db_ram_db.tb_fbs9100_sysparam(dev_id,IPADDR,SubIPADDR,NetGateADDR,GroupVolRange,GroupVolSorce,CurrentRange,CurrentTyte,MonomerOrder,BackLightTime"
|
| | | + ",MACADDR,LoaderCount,DtCardCount,PowerBreakChargeCurr,MajorBattGroupNum,POF_BG_Boost_Cnt,POF_BG_Boost_VolStop,POF_BG_Boost_VolStart) "
|
| | | + " values()";
|
| | | sql_str.add(sql);
|
| | | {
|
| | | String msg="修改"+fs.getDev_id()+"机房系统参数";
|
| | | User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
|
| | | listU.add(ulog);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | Boolean bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
|
| | | (new User_logService()).addPro(listU);//将用户的操作记录下来
|
| | | return bl;
|
| | | }
|
| | | //查询系统参数前(如果没有默认数据要用REPLACE 添加一笔数据)
|
| | |
| | | }
|
| | | return res_exe;
|
| | | }
|
| | | |
| | | //批量设置系统参数成功后读取命令的ACK
|
| | | public boolean getCmdAck(int cmd,int dev_id) {
|
| | | int m_cmd = cmd;
|
| | | int m_cmd_ack = cmd;
|
| | | switch(m_cmd) {
|
| | | case FBS9100_ComBase.CMD_GetSYSSetParam: m_cmd_ack = FBS9100_ComBase.CMD_GetSYSSetParamAck; break;
|
| | | case FBS9100_ComBase.CMD_SetSYSSetParam: m_cmd_ack = FBS9100_ComBase.CMD_SetSYSSetParamAck; break;
|
| | | default: return false;
|
| | | }
|
| | | String sql = "SELECT op_cmd FROM db_ram_db.tb_fbs9100_sysparam "+
|
| | | " WHERE dev_id="+dev_id;
|
| | | Connection conn=DBUtil.getConn();
|
| | | PreparedStatement ps = null;
|
| | | ResultSet rs = null;
|
| | | boolean res_exe=false;
|
| | | try {
|
| | | ps = conn.prepareStatement(sql);
|
| | | rs=ps.executeQuery();
|
| | | if(rs.next())
|
| | | {
|
| | | if(rs.getInt("op_cmd") == m_cmd_ack)
|
| | | {
|
| | | res_exe = true;
|
| | | }
|
| | | }
|
| | | } catch (SQLException 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;
|