From f6bfafc3a6cd50f11fbf498ecf21498bd9112ff4 Mon Sep 17 00:00:00 2001 From: D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore <chenjingjing@LAPTOP-E51P2139> Date: 星期二, 08 一月 2019 17:37:51 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whyccjj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/WebRoot/batt-life-manage.jsp | 29 + gx_tieta/WebRoot/bat-set-test.jsp | 338 ++++++++++++++++ gx_tieta/src/com/fgkj/dao/ProcessServerDao.java | 4 gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java | 4 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class | 0 gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java | 126 ++++++ gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java | 30 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_sysparamService.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl$72.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Thread_utilImpl.class | 0 gx_tieta/WebRoot/pages/js/mylayui.js | 44 ++ gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class | 0 gx_tieta/src/com/fgkj/dao/BaseDAO.java | 2 gx_tieta/src/com/fgkj/dao/impl/Thread_utilImpl.java | 58 ++ gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/Filters/HotlinkFilter.class | 0 gx_tieta/src/com/fgkj/services/Thread_utilService.java | 29 + gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/ram/Fbs9100_battparam.class | 0 gx_tieta/src/com/fgkj/dto/BattInf.java | 109 +++-- gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/Thread_util.class | 0 gx_tieta/WebRoot/bts-comm-mon.jsp | 324 ++++++++++++++++ gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/Thread_utilAction.class | 0 gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java | 2 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_battparamService.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/BattInf.class | 0 gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/Thread_utilService.class | 0 gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java | 2 gx_tieta/src/com/fgkj/actions/Thread_utilAction.java | 30 + gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java | 2 gx_tieta/src/com/fgkj/dto/Thread_util.java | 59 ++ gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/ProcessServerDao.class | 0 32 files changed, 1,106 insertions(+), 86 deletions(-) diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/Filters/HotlinkFilter.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/Filters/HotlinkFilter.class index a67bbbe..7c5a11b 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/Filters/HotlinkFilter.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/Filters/HotlinkFilter.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/Thread_utilAction.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/Thread_utilAction.class new file mode 100644 index 0000000..440454f --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/Thread_utilAction.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class index 27960d9..27820f0 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class index adc4a25..5a8635f 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/ProcessServerDao.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/ProcessServerDao.class index 8cf67ea..5fcd355 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/ProcessServerDao.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/ProcessServerDao.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class index 69c93f4..22bf55e 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/App_bts_battgroupImpl.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl$72.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl$72.class new file mode 100644 index 0000000..aa3f1f4 --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl$72.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class index c79dd2f..89116b8 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Thread_utilImpl.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Thread_utilImpl.class new file mode 100644 index 0000000..c8ec7e1 --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Thread_utilImpl.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/BattInf.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/BattInf.class index 1e463a0..429521c 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/BattInf.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/BattInf.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/Thread_util.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/Thread_util.class new file mode 100644 index 0000000..787202e --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/Thread_util.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/ram/Fbs9100_battparam.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/ram/Fbs9100_battparam.class index cdcdcac..85953a0 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/ram/Fbs9100_battparam.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/ram/Fbs9100_battparam.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/Thread_utilService.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/Thread_utilService.class new file mode 100644 index 0000000..acffa06 --- /dev/null +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/Thread_utilService.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_battparamService.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_battparamService.class index e035d2d..678579a 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_battparamService.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_battparamService.class Binary files differ diff --git a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_sysparamService.class b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_sysparamService.class index 7c9214a..1357448 100644 --- a/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_sysparamService.class +++ b/gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/ram/Fbs9100_sysparamService.class Binary files differ diff --git a/gx_tieta/WebRoot/bat-set-test.jsp b/gx_tieta/WebRoot/bat-set-test.jsp index 9768896..8d3efec 100644 --- a/gx_tieta/WebRoot/bat-set-test.jsp +++ b/gx_tieta/WebRoot/bat-set-test.jsp @@ -68,7 +68,6 @@ <td>鍖�/鍘�</td> <!-- 甯� --> <td><s:text name="Computer_name"/></td> <!-- 鏈烘埧鍚嶇О --> <td>绯荤粺绫诲瀷</td> - </tr> <tr> <td> @@ -163,7 +162,7 @@ </div> <button class="layui-btn layui-btn-sm mrl8" id="batchAdd"><i class="fa fa-plus mrr8"></i>娣诲姞璁惧</button> <button class="layui-btn layui-btn-sm" id="sysSet">鎵归噺璁剧疆鐢垫睜鍙傛暟</button> - + <button class="layui-btn layui-btn-sm" id="batchRead">鎵归噺璇诲彇鐢垫睜鍙傛暟</button> </div> </div> <!-- 琛ㄦ牸鍐呭 --> @@ -195,15 +194,6 @@ {{d.signalNum}} {{# }else{ }} 锛燂紵锛� - {{# } }} - </script> - <script type="text/html" id="setStatus"> - {{# if(d.setCurr == 1){ }} - <button class="layui-btn layui-btn-sm">璁剧疆鎴愬姛</button> - {{# }else if(d.setCurr == 2){ }} - <button class="layui-btn layui-btn-sm layui-btn-danger">璁剧疆澶辫触</button> - {{# }else { }} - <button class="layui-btn layui-btn-sm layui-btn-normal">鏈缃�</button> {{# } }} </script> <!-- STD_CAP --> @@ -286,7 +276,28 @@ <span style="color: #FF0000;">{{ d.OnlineVolLow }}</span> {{# } }} </script> - + <!-- 鎿嶄綔鏍� --> + <script type="text/html" id="doThings"> + <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="read">璇诲彇</button> + </script> + <!-- 璇诲彇鐘舵�� --> + <script type="text/html" id="readStatus"> + {{# if(d.readStatus == 1){ }} + <button class="layui-btn layui-btn-sm layui-btn-normal">璇诲彇鎴愬姛</button> + {{# }else { }} + <button class="layui-btn layui-btn-sm layui-btn-danger">璇诲彇澶辫触</button> + {{# } }} + </script> + <!-- 璁剧疆鐘舵�� --> + <script type="text/html" id="setStatus"> + {{# if(d.setStatus == 1){ }} + <button class="layui-btn layui-btn-sm layui-btn-normal">璁剧疆鎴愬姛</button> + {{# }else if(d.setStatus == 2) { }} + <button class="layui-btn layui-btn-sm layui-btn-danger">璁剧疆澶辫触</button> + {{# }else { }} + <button class="layui-btn layui-btn-sm layui-btn-disabled">鏈缃�</button> + {{# } }} + </script> <script type="text/javascript" src="js/jquery-1.8.3.js"></script> <script type="text/javascript" src="js/echarts.js"></script> <script type="text/javascript" src="jqueryui/jquery-ui.min.js"></script> @@ -549,20 +560,21 @@ {type:'checkbox',fixed: 'left'} ,{field:'dev_id', title:'璁惧ID', align:'center', width: 160} ,{field:'StationName', title:'鏈烘埧鍚嶇О', align:'center', width: 470} + ,{field:'readStatus', title:'璇诲彇鐘舵��', templet: '#readStatus', align:'center', width: 120} + ,{field:'setStatus', title:'璁剧疆鐘舵��', templet: '#setStatus', align:'center', width: 120} ,{field:'STD_CAP', title:'鐢垫睜鏍囩О瀹归噺锛圓H锛�<i class="fa fa-refresh" title="鍚屾鐢垫睜鏍囩О瀹归噺鍙傛暟"></i>', templet: '#STD_CAP', align:'center', width: 220} ,{field:'STD_RES', title:'鐢垫睜鏍囩О鍐呴樆锛坲惟锛�<i class="fa fa-refresh" title="鍚屾鐢垫睜鏍囩О鍐呴樆鍙傛暟"></i>', templet: '#STD_RES', align:'center', width: 220} ,{field:'BattGroupCount', title:'鐢垫睜缁勭粍鏁� <i class="fa fa-refresh" title="鍚屾鐢垫睜缁勭粍鏁板弬鏁�"></i>', templet: '#BattGroupCount', align:'center', width: 180} ,{field:'EachGroupBattCount', title:'姣忕粍鐢垫睜鍗曚綋鏁伴噺 <i class="fa fa-refresh" title="鍚屾姣忕粍鐢垫睜鍗曚綋鏁伴噺鍙傛暟"></i>', templet: '#EachGroupBattCount', align:'center', width: 220} ,{field:'MonomerVol', title:'鍗曚綋鏍囩О鐢靛帇锛圴锛� <i class="fa fa-refresh" title="鍚屾鍗曚綋鏍囩О鐢靛帇鍙傛暟"></i>', templet: '#MonomerVol', align:'center', width: 220} ,{field:'StationName9', title:'璁惧鐗堟湰鍙�', align:'center', width: 180} - ,{field:'GroupVol', title:'鐢垫睜缁勭鏍囩О鐢靛帇锛圴锛� <i class="fa fa-refresh" title="鍚屾鐢垫睜缁勭鏍囩О鐢靛帇鍙傛暟"></i>', templet: '#GroupVol', align:'center', width: 220} + ,{field:'GroupVol', title:'鐢垫睜缁勭鏍囩О鐢靛帇锛圴锛�', align:'center', width: 220} ,{field:'BattTemp', title:'鐢垫睜鏍囩О娓╁害锛堚剝锛� <i class="fa fa-refresh" title="鍚屾鐢垫睜鏍囩О娓╁害鍙傛暟"></i>', templet: '#BattTemp', align:'center', width: 220} ,{field:'FloatChargeVol', title:'鐢垫睜娴厖鐢靛帇闃�鍊硷紙V锛� <i class="fa fa-refresh" title="鍚屾鐢垫睜娴厖鐢靛帇闃�鍊煎弬鏁�"></i>', templet: '#FloatChargeVol', align:'center', width: 220} ,{field:'FloatChargeCurr', title:'鐢垫睜娴厖鐢垫祦闃�鍊硷紙A锛� <i class="fa fa-refresh" title="鍚屾鐢垫睜娴厖鐢垫祦闃�鍊煎弬鏁�"></i>', templet: '#FloatChargeCurr', align:'center', width: 220} ,{field:'OnlineVolLow', title:'鍦ㄧ嚎鐢靛帇浣庨榾鍊硷紙V锛� <i class="fa fa-refresh" title="鍚屾鍦ㄧ嚎鐢靛帇浣庨榾鍊煎弬鏁�"></i>', templet: '#OnlineVolLow', align:'center', width: 220} ,{field:'GroupConnType', title:'鐢垫睜缁勮繛鎺ョ被鍨�', templet: '#GroupConnType', align:'center', width: 220} - ,{field:'doThings', fixed: 'right', title: '璁剧疆鐘舵��', toolbar: '#setStatus', align: 'center', width: 160} - + ,{field:'doThings', fixed: 'right', title: '鎿嶄綔', toolbar: '#doThings', align: 'center', width: 120} ]] ,data:[] ,limit: 10000 @@ -619,6 +631,251 @@ } + // 琛ㄦ牸宸ュ叿鏍忔搷浣� + table.on('tool(pageTbl)', function(obj){ + var event = obj.event; + switch(event) { + case 'read': // 璇诲彇鍙傛暟 + readBattParams(obj); + break; + case 'del': // 鍒犻櫎 + delItem(obj); + break; + } + }); + + // 鐢垫睜鍙傛暟鐨勫懡鍚� + var battParam = GLOBAL.CMD.batt; + // 璇诲彇鍗曡鏀剧數鍙傛暟 + function readBattParams(obj) { + var data = getCheckedData([obj.data]); + var keyIds= getKeyId([obj.data]); + // 鏋勯�犳煡璇㈡潯浠� + var tmp = { + num: 0 // 榛樿涓�0 + ,dev_id: data[0].dev_id // 璁惧id + ,op_cmd: battParam.get // 鐢垫睜鍙傛暟鑾峰彇鍛戒护 + }; + + // 璇锋眰璇诲彇鍙傛暟 + ajaxReadBattParams([tmp], keyIds); + } + + // 鐐瑰嚮鎵归噺璇诲彇鎸夐挳 + $('#batchRead').click(function() { + var checkStatus = table.checkStatus('pageTbl'); //idTest 鍗充负鍩虹鍙傛暟 id 瀵瑰簲鐨勫�� + var cData = checkStatus.data; + if(cData.length == 0) { + layer.msg('璇烽�夋嫨瑕佽鍙栫殑鏈烘埧锛�'); + return; + } + + // 璇锋眰鍚庡彴 + batchReadBattParams(cData); + }); + + // 鎵归噺璇诲彇鍙傛暟 + function batchReadBattParams(cData) { + var data = getCheckedData(cData); + var keyIds= getKeyId(cData); + var tmps = []; + // 閬嶅巻data鐨勫�硷紝鏋勯�犳煡璇㈡潯浠� + for(var i=0; i<data.length; i++) { + var _data = data[i]; + var tmp = { + num: 0 // 榛樿涓�0 + ,dev_id: _data.dev_id // 璁惧id + ,op_cmd: battParam.get // 鐢垫睜鍙傛暟鑾峰彇鍛戒护 + }; + tmps.push(tmp); + } + + // 璇锋眰璇诲彇鍙傛暟 + ajaxReadBattParams(tmps, keyIds); + } + + // 鍚戝悗鍙板彂閫佽姹傝鍙栧弬鏁� + function ajaxReadBattParams(params, keys) { + var loading = layer.load(1); + // 璇锋眰鍚庡彴 + $.ajax({ + type: 'post' + ,async: true + ,url: 'Fbs9100_battparamAction_action_readPL' + ,data: 'json='+JSON.stringify(params) + ,dataType: 'json' + ,success: function(res) { + var rs = JSON.parse(res.result); + // 鍒ゆ柇鏄惁鏈夋暟鎹� + if(rs.code == 1) { + var data = rs.data; + formaterReadDatas(data, keys); + }else { + layer.msg('璇诲彇澶辫触锛佽閲嶆柊璇锋眰'); + } + } + ,error: function() { + layer.msg('璇诲彇澶辫触锛岃妫�鏌ョ綉缁滄槸鍚︽甯革紒') + } + ,complete: function() { + layer.close(loading); + } + }); + } + + // 澶勭悊璇诲彇缁撴灉闆嗗苟杩斿洖鎸囧畾缁撴灉闆� + function formaterReadDatas(data, keys) { + var rs = []; + // 閬嶅巻data鐨勫�� + for(var i=0; i<data.length; i++) { + var _data = data[i]; + var _key_id = keys[i].key_id; // 鑾峰彇鏍囪瘑浣� + var _tmp = {}; + _tmp.key_id = _key_id; // 娣诲姞鏍囪瘑浣� + + // 鑾峰彇瀵瑰簲鐨則r鐨勫�� + var layuiData = layuiTbl.getTr('key_id', _key_id); + + // 鍒ゆ柇鏄惁瀛樺湪瀵瑰簲鐨勮〃鏍兼暟鎹� + if(layuiData.code == 1) { + // 鍒ゆ柇鏄惁璇诲彇鎴愬姛 + if(_data.num==1) { + var obj = _data.obj[0]; + _tmp = contrastData(layuiData.data, _data.obj[0]); + _tmp.readStatus = 1; // 璇诲彇鐘舵�� + _tmp.setStatus = 0; // 璁剧疆鍙傛暟鐘舵�佸垵濮嬪寲 + }else { + _tmp.num = 0; + _tmp.readStatus = 0; + _tmp.setStatus = 0; // 璁剧疆鍙傛暟鐘舵�佸垵濮嬪寲 + } + + }else { + console.log(layuiData.msg); // 杈撳嚭璇诲彇澶辫触鍘熷洜 + _tmp.num = 0; + _tmp.readStatus = 0; // 璇诲彇澶辫触 + _tmp.setStatus = 0; // 璁剧疆鍙傛暟鐘舵�佸垵濮嬪寲 + } + // 灏嗘暟鎹坊鍔犲埌缁撴灉闆嗕腑 + rs.push(_tmp); + } + // 鏇存柊琛ㄦ牸 + layuiTbl.update('key_id', rs); + } + + // 瀵规瘮琛ㄦ牸鏁版嵁鍜岃鍙栧埌鐨勬暟鎹� + function contrastData(tData, rData) { + var rs = {}; + // 閬嶅巻rData鐨勫�� + Object.keys(rData).forEach(function(key) { + // 鍒ゆ柇鏄惁涓簄um + var _data = rData[key]; + rs.key_id = tData.key_id; + if(key != 'num') { + rs[key] = _data; + // 鑾峰彇鍏朵粬杈呭姪鍊� + var bKey = key+'_b'; + var boolKey = key+'_bool'; + var bVal = tData[bKey]; + if(bVal != undefined && bVal != _data) { + rs[boolKey] = false; + } + } + }); + + return rs; + } + + // 鍒犻櫎琛ㄦ牸鐨勮 + function delItem(obj) { + // 寮瑰嚭鏄惁鍒犻櫎闈㈡澘 + layer.confirm('鏄惁鍒犻櫎褰撳墠琛�', {icon: 2, title: '鍒犻櫎鎻愮ず'}, function(index) { + layer.close(index); + layuiTbl.delTr(table.cache.pageTbl, obj); // 鍒犻櫎鎸囧畾鐨勮 + }); + } + + // 鎵归噺璁剧疆鐢垫睜鍙傛暟鐨勬寜閽� + $('#sysSet').click(function() { + var checkStatus = table.checkStatus('pageTbl'); //idTest 鍗充负鍩虹鍙傛暟 id 瀵瑰簲鐨勫�� + var cData = checkStatus.data; + if(cData.length == 0) { + layer.msg('璇烽�夋嫨瑕佹壒閲忚缃殑鏈烘埧锛�'); + return; + } + + var data = getCheckedData(cData); // 鏍煎紡鍖栬閫変腑琛屾暟鎹� + var keyIds= getKeyId(cData); // 鑾峰彇鏍囪瘑绗� + var rsData = []; + for(var i=0; i<data.length; i++) { + var _data = data[i]; + _data.op_cmd = battParam.set; + _data.num = 0; + rsData.push(_data); + } + + // 鎵归噺璁剧疆 + batchSetBattParams(rsData, keyIds); + }); + + // 鎵归噺璁剧疆鏀剧數鍙傛暟 + function batchSetBattParams(params, keys) { + // 鍒ゆ柇data鐨勫�兼槸鍚︿负绌� + if(params.length == 0) { + layer.msg('璇烽�夋嫨瑕佹壒閲忚缃殑鏈烘埧锛�'); + } + // 鍒ゆ柇鏄惁鎵归噺璁剧疆 + layer.confirm('鏄惁纭鎵归噺璁剧疆鐢垫睜鍙傛暟', {icon: 3, title: '鎵归噺璁剧疆鎻愰啋'}, function(index) { + layer.close(index); + var loading = layer.load(1); + // 璇锋眰鍚庡彴 + $.ajax({ + type: 'post' + ,async: true + ,url: 'Fbs9100_battparamAction_action_updatePro' + ,data: 'json='+JSON.stringify(params) + ,dataType: 'json' + ,success: function(res) { + var rs = JSON.parse(res.result); + var rsData= []; + if(rs.code == 1) { + var data = rs.data; + for(var i=0; i<data.length; i++) { + var _data = data[i]; + var _key = keys[i]; + var _tmp = { + key_id: _key.key_id + }; + + // 鍒ゆ柇鏄惁璁剧疆鎴愬姛 + if(_data.num == 1) { + _tmp.setStatus = 1; // 璁剧疆鎴愬姛 + }else { + _tmp.setStatus = 2; // 璁剧疆澶辫触 + } + + rsData.push(_tmp); + } + }else { + for(var i=0; i<keys.length; i++) { + var _key = keys[i]; + var _tmp = { + key_id: _key.key_id + ,setStatus: 2 + }; + rsData.push(_tmp); + } + } + + // 鏇存柊琛ㄦ牸 + layuiTbl.update('key_id', rsData); + } + ,complete: function() { + layer.close(loading); + } + }); + }); + } // 鐐瑰嚮娣诲姞鐢垫睜缁� @@ -647,7 +904,7 @@ ,dataType: 'json' ,success: function(res) { var rs = JSON.parse(res.result); - console.log(rs); + //console.log(rs); var data = []; if(rs.code == 1) { data = rs.data; @@ -656,9 +913,10 @@ layer.msg('娌℃湁鍙缃殑鐢垫睜缁�!'); } tOptions.data = data; - console.log(data); + //console.log(data); // 鐢熸垚琛ㄦ牸鏁版嵁 table.render(tOptions); + layuiTbl.setCache(table.cache.pageTbl); } ,complete:function() { layer.close(load); @@ -707,7 +965,6 @@ // 澶勭悊娣诲姞鏈烘埧淇℃伅鐨勭粨鏋� function formatSearchData(data) { - console.log(data); var rs = []; // 閬嶅巻data鐨� for(var i=0; i<data.length; i++) { @@ -716,12 +973,14 @@ var obj = _data.obj[0]; var tmp = {}; tmp.num = _data.num; // 鍒ゆ柇鏄惁璇诲彇鎴愬姛 + tmp.readStatus = _data.num; tmp.key_id = i; tmp.dev_id = obj.dev_id; // 璁惧ID tmp.dev_ip = obj.dev_ip; // 璁惧IP tmp.StationName = obj.StationName; // 鏈烘埧鍚嶇О tmp.GroupConnType = 0; // 鐢垫睜缁勮繛鎺ョ被鍨� tmp.StationName9 = _data.StationName9; // 璁惧鐗堟湰鍙� + tmp.GroupVol = obj.GroupVol; // 鐢垫睜缁勭鏍囩О鐢靛帇锛圴锛� tmp.STD_CAP = obj.STD_CAP; // 鐢垫睜鏍囩О瀹归噺(AH) @@ -770,6 +1029,49 @@ function isNumEqual(num1, num2) { return num1==num2; } + + // 鑾峰彇琚�変腑琛岀殑鏍囪瘑浣� + function getKeyId(data) { + var rs = []; + // 閬嶅巻data鐨勫�� + for(var i=0; i<data.length; i++) { + var _data = data[i]; + var tmp = {}; + tmp.key_id = _data.key_id; + rs.push(tmp); + } + return rs; + } + + + // 鑾峰彇琚�変腑鐨勮鐨勬暟鎹苟澶勭悊杩斿洖鎸囧畾鐨勫璞℃暟缁� + function getCheckedData(data) { + var rs = []; + // 澶勭悊鏁版嵁 + for(var i=0; i<data.length; i++) { + var _data = data[i]; + var tmp = {}; + tmp.num = _data.num; // 鍒ゆ柇鏄惁璇诲彇鎴愬姛 + tmp.dev_id = _data.dev_id; // 璁惧ID + tmp.dev_ip = _data.dev_ip; // 璁惧IP + tmp.StationName = _data.StationName; // 鏈烘埧鍚嶇О + tmp.GroupConnType = 0; // 鐢垫睜缁勮繛鎺ョ被鍨� + tmp.StationName9 = _data.StationName9; // 璁惧鐗堟湰鍙� + tmp.GroupVol = _data.GroupVol; // 鐢垫睜缁勭鏍囩О鐢靛帇锛圴锛� + tmp.STD_CAP = _data.STD_CAP; // 鐢垫睜鏍囩О瀹归噺(AH) + tmp.STD_RES = _data.STD_RES; // 鐢垫睜鏍囩О鍐呴樆(u惟) + tmp.BattGroupCount = _data.BattGroupCount; // 鐢垫睜缁勭粍鏁� + tmp.EachGroupBattCount = _data.EachGroupBattCount; // 姣忕粍鐢垫睜鍗曚綋鏁伴噺 + tmp.MonomerVol = _data.MonomerVol; // 鍗曚綋鏍囩О鐢靛帇锛圴锛� + tmp.BattTemp = _data.BattTemp; // 鐢垫睜鏍囩О娓╁害锛堚剝锛� + tmp.FloatChargeVol = _data.FloatChargeVol; // 鐢垫睜娴厖鐢靛帇闃�鍊硷紙V锛� + tmp.FloatChargeCurr = _data.FloatChargeCurr; // 鐢垫睜娴厖鐢垫祦闃�鍊硷紙A锛� + tmp.OnlineVolLow = _data.OnlineVolLow; // 鍦ㄧ嚎鐢靛帇浣庨榾鍊硷紙V锛� + // 灏嗘暟鎹斁鍒拌繑鍥炵殑缁撴灉闆嗕腑 + rs.push(tmp); + } + return rs; + } }); </script> </body> diff --git a/gx_tieta/WebRoot/batt-life-manage.jsp b/gx_tieta/WebRoot/batt-life-manage.jsp index 1cd616e..abb8c45 100644 --- a/gx_tieta/WebRoot/batt-life-manage.jsp +++ b/gx_tieta/WebRoot/batt-life-manage.jsp @@ -131,6 +131,7 @@ <s:text name="Goto"/><!-- 杞埌 --><input type="text" id="page_num" value="1"/> <a href="javascript:" id="go"><s:text name="Jump"/><!-- 璺宠浆 --></a> </span> + <a href="javascript:startStationThread();" class="start-station-stical">鍚姩缁埅缁熻</a> </div> </div> <!-- 琛ㄦ牸閫夐」鍐呭 --> @@ -686,6 +687,34 @@ //console.info(ArrTd); eleform.submit(); } + + //鍚姩鏈烘埧缁埅绾跨▼ + function startStationThread(){ + load = layer.load(1); + var temp = { + thread_id:2019001, + thread_en:1, + }; + $.ajax({ + type:"post", + url:"Thread_utilAction!update", + async:true, + datatype:'json', + data:"json="+JSON.stringify(temp), + success:function(data){ + layer.close(load); + //console.info(data); + var model = JSON.parse(data.result); + if(model.code == 1){ + layer.msg("鍚姩鎴愬姛"); + }else{ + layer.msg("鍚姩澶辫触"); + } + },error:function(){ + layer.msg("鍚姩澶辫触"); + } + }); + } </script> </body> </html> \ No newline at end of file diff --git a/gx_tieta/WebRoot/bts-comm-mon.jsp b/gx_tieta/WebRoot/bts-comm-mon.jsp new file mode 100644 index 0000000..bfb5580 --- /dev/null +++ b/gx_tieta/WebRoot/bts-comm-mon.jsp @@ -0,0 +1,324 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> +<%@ taglib uri="/struts-tags" prefix="s" %> +<!DOCTYPE HTML> +<html> + <head> + <base href="<%=basePath%>"> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta http-equiv="pragma" content="no-cache"> + <meta http-equiv="cache-control" content="no-cache"> + <meta http-equiv="expires" content="0"> + <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> + <meta http-equiv="description" content="This is my page"> + <title>鐢垫睜娉ㄥ唽淇℃伅鏌ヨ</title> + <link rel="stylesheet" type="text/css" href="pages/css/base.css"> + <link rel="stylesheet" type="text/css" href="jqueryui/jquery-ui.css"> + <link rel="stylesheet" type="text/css" href="src/css/layui.css"> + <link rel="stylesheet" type="text/css" href="pages/css/mylayui.css"> + <style> + .dataTypeCont { + width: 160px; + text-align: center; + } + .dataTypeCont .layui-form-switch { + min-width: 70px; + margin-top: 4px; + } + </style> + <script>"undefined"==typeof CODE_LIVE&&(!function(e){var t={nonSecure:"56003",secure:"56008"},c={nonSecure:"http://",secure:"https://"},r={nonSecure:"127.0.0.1",secure:"gapdebug.local.genuitec.com"},n="https:"===window.location.protocol?"secure":"nonSecure";script=e.createElement("script"),script.type="text/javascript",script.async=!0,script.src=c[n]+r[n]+":"+t[n]+"/codelive-assets/bundle.js",e.getElementsByTagName("head")[0].appendChild(script)}(document),CODE_LIVE=!0);</script></head> + <body data-genuitec-lp-enabled="false" data-genuitec-file-id="wc1-26" data-genuitec-path="/gx_tieta/WebRoot/bts-comm-mon.jsp"> + <!--澶撮儴鍐呭寮�濮�--> + <jsp:include page="Top.jsp" flush="true"/> + <!--澶撮儴鍐呭缁撴潫--> + <!--瀵艰埅寮�濮�--> + <jsp:include page="nav.jsp" flush="true"/> + <!-- 涓讳綋鍐呭 --> + <div class="layui-page-container" data-genuitec-lp-enabled="false" data-genuitec-file-id="wc1-26" data-genuitec-path="/gx_tieta/WebRoot/bts-comm-mon.jsp"> + <!-- 椤甸潰涓婚鍐呭 --> + <div class="layui-page-content" style="position: relative;"> + <div class="tbl-filter" lay-filter="tblFilter" style="position: absolute;z-index: 891;top: 8px; left: 15px"> + <div class="layui-form layui-form-pane" lay-filter="tblFilter"> + 璁惧ID锛� + <div class="layui-inline"> + <input class="layui-input" name="id" id="devId" autocomplete="off"> + </div> + <button class="layui-btn layui-btn-sm layui-btn-normal" id="searchById"><i class="fa fa-search"></i>鎼滅储</button> + </div> + </div> + <!-- 琛ㄦ牸鍐呭 --> + <table id="pageTbl" lay-filter="pageTbl"></table> + </div> + <div class="data-footer"> + <!-- 鍒嗛〉鍐呭 --> + <div id="paging"> + <a href="javascript:" class="search"><s:text name="Search"/></a> <!-- 鏌ヨ --> + <a href="javascript:" id="export_table"><s:text name="Export"/></a> <!-- 瀵煎嚭 --> + <span id="current">1/1</span> + <span><s:text name="Each_page"/><input type="text" id="number" value="10"/><s:text name="Item"/></span> + <s:text name="Total_data"/><!-- 鏁版嵁鎬婚噺 --><span id="total">0</span> + <a href="javascript:" id="page_home"><s:text name="HomePage"/></a> + <a href="javascript:" id="page_pre"><s:text name="Page_Up"/></a> + <a href="javascript:" id="page_next_p"><s:text name="Page_Down"/></a> + <a href="javascript:" id="page_last"><s:text name="End_Page"/></a> + <span id="cont"> + <s:text name="Goto"/><input type="text" id="page_num" value="1"/> + <a href="javascript:" id="page_go"><s:text name="Jump"/></a> + </span> + </div> + </div> + </div> + <script type="text/html" id="breakTypeTpl"> + {{# if(d.break_type == 0){ }} + <span style="color: #01AAED">鎴愬姛杩炴帴</span> + {{# }else if(d.break_type == 1) { }} + <span style="color: #FF5722">鎵句笉鍒板搴旇澶嘔D</span> + {{# }else if(d.break_type == 2) { }} + <span style="color: #FF5722">閫氫俊寮傚父鏂紑</span> + {{# }else { }} + <span style="color: #FFB800">鏈煡绫诲瀷</span> + {{# } }} + </script> + <script type="text/javascript" src="js/jquery-1.8.3.js"></script> + <script type="text/javascript" src="js/echarts.js"></script> + <script type="text/javascript" src="jqueryui/jquery-ui.min.js"></script> + <script type="text/javascript" src="src/layui.js"></script> + <script type="text/javascript" src="pages/js/mylayui.js"></script> + <script type="text/javascript" src="pages/js/common.js"></script> + <script type="text/javascript"> + layui.use(['form', 'table', 'layer', 'element'], function() { + var table = layui.table; // 鑾峰彇琛ㄦ牸妯″潡 + var form = layui.form; // 鑾峰彇琛ㄥ崟妯″潡 + var layer = layui.layer; // 鑾峰彇寮瑰嚭妗嗘ā鍧� + var element = layui.element; // 鑾峰彇鍏冪礌鎿嶄綔妯″潡 + + // 琛ㄦ牸妯″潡 + var tOptions = { + elem: '#pageTbl' + ,toolbar: true + ,defaultToolbar: [] + ,cellMinWidth: 80 + ,cols: [[ + {field: 'Staionanme', title: '鏈烘埧鍚嶇О', align: 'center', width: 450} + ,{field:'dev_id', title:'璁惧id', align:'center', width: 260} + ,{field:'battgroup_id', title:'鐢垫睜缁刬d', align:'center', width: 260} + ,{field:'battgroup_index', title:'鐢垫睜缁勭储寮�', align:'center', width: 260} + ,{field:'battgroup_mon_cnt', title:'鐢垫睜缁勫崟浣撲釜鏁�', align:'center', width: 260} + + ]] + ,data:[] + ,limit: 1000 + ,page: false + ,height: 'full-190' + }; + + // 鐢熸垚琛ㄦ牸鏁版嵁 + table.render(tOptions); + + var Page = new TblPage(); + Page.set(1, 0, 10); + //console.log(Page); + + // 鏌ヨ鍚庡彴鏁版嵁 + search(createSearchParam(), true); + function search(temp, newLoad) { + var load; + if(newLoad) { + load = layer.load(1); + } + //console.log(temp); + $.ajax({ + type:'post', + async:true, + url: 'App_bts_battgroupAction!serchByCondition', + data: "json="+JSON.stringify(temp), + dataType: 'json', + success:function(result) { + var model = JSON.parse(result.result); + console.info(model); + var arr_td = new Array(); + if(model.code == 1){ + for(var i=0;i<model.data.length;i++){ + var _data = model.data[i]; + var _tmp = {}; + // console.log(_data); + _tmp.Staionanme = _data.stationName?_data.stationName:'鈥斺��'; + _tmp.dev_id = _data.dev_id; + _tmp.battgroup_id = _data.battgroup_id; + _tmp.battgroup_index = _data.battgroup_index; + _tmp.battgroup_mon_cnt = _data.battgroup_mon_cnt; + + arr_td.push(_tmp); + Page.setAll(_data.num); + } + } + //console.info(tOptions); + tOptions.data = arr_td; + // 鐢熸垚琛ㄦ牸鏁版嵁 + table.render(tOptions); + setPageVal(Page); + layer.close(load); + },error:function(e){ + layer.close(load); + } + }); + + } + + + + + // 鏋勯�犳煡璇㈡潯浠� + function createSearchParam() { + var temp = { + FBSDeviceId: 0 + ,page: Page.getPage() + }; + // console.log(temp); + return temp; + } + + // 鐐瑰嚮涓婃柟鐨勮澶噄d鎼滅储 + $('#searchById').click(function() { + var dev_id = $('#devId').val(); + + // 鍒ゆ柇鏁版嵁鍚堟硶鏂� + if(!isNumber(dev_id)) { + layer.msg('瀛樺湪杩濇硶瀛楃涓�'); + }else{ + dev_id = dev_id.length==0?0:dev_id; + Page.setCurr(1); + // 鏋勯�犳煡璇㈡潯浠� + var temp = { + FBSDeviceId: dev_id + ,page: Page.getPage() + }; + search(temp, true); + } + }); + + + //鐐瑰嚮鏌ヨ鎸夐挳 + $('#paging .search').click(function(){ + search(createSearchParam(), false); + }); + + //棣栭〉 + $('#page_home').click(function(){ + if(Page != undefined){ + if(Page.curr != 1){ + Page.setCurr(1); + search(createSearchParam(), true); + } + } + }); + + //鐐瑰嚮涓婁竴椤� + $("#page_pre").click(function(){ + if(Page != undefined){ + if(Page.curr > 1){ + Page.setCurr(Page.curr-1); + search(createSearchParam(), true); + } + } + }); + + //鐐瑰嚮涓嬩竴椤� + $("#page_next_p").click(function(){ + if(Page != undefined){ + if(Page.num > Page.curr){ + Page.setCurr(Page.curr+1); + search(createSearchParam(), true); + } + } + }); + + //灏鹃〉 + $('#page_last').click(function(){ + if(Page != undefined){ + if(Page.curr < Page.num){ + Page.setCurr(Page.num); + search(createSearchParam(), true); + } + } + }); + + //璁剧疆姣忛〉琛屾暟 + $('#number').blur(function(){ + var value=$('#number').val(); + //褰撹緭鍏ョ殑鏁板ぇ浜�0鏃� + if(value>0){ + if(value != Page.size){ + Page.setSize(parseInt(value)); + Page.setCurr(1); + } + }else{ + //褰撹緭鍏ラ潪娉曟暟瀛楁椂 + alert("璇疯緭鍏ュ悎娉曠殑鏁板瓧"); /* 璇疯緭鍏ュ悎娉曠殑鏁存暟 */ + $('#number').val(Page.size); + } + }); + + //鐐瑰嚮璺宠浆 + $('#page_go').click(function(){ + var tarpage=$('#page_num').attr('value'); + if(tarpage > Page.num){ + Page.setCurr(Page.num); + search(createSearchParam(), true); + }else if(tarpage > 0 && tarpage!= Page.curr){ + Page.setCurr(parseInt(tarpage)); + search(createSearchParam(), true); + } + + }); + + // 璁剧疆椤甸潰Page + function setPageVal(page) { + $('#current').text(page.curr+'/'+page.num); + $('#total').text(page.all); + } + + //鐐瑰嚮瀵煎嚭鎶ヨ〃 + $('#export_table').click(function(){ + var tblData = GLOBAL.Table.cTblData(tOptions); + GLOBAL.Table.expExcel.xls(tblData); + }); + + //鏋勯�犲鍑鸿〃鏍煎璞� + function createTableData(tOptions){ + var thead_arr = new Array(); //琛ㄥご鏁版嵁鏁扮粍 + var thody_arr = new Array(); //琛ㄦ牸鏁版嵁鏁扮粍 + var proname_arr = new Array(); //灞炴�у悕鏁扮粍 + //console.info(tOptions); + if(tOptions != undefined){ + //鏋勯�犺〃澶存暟缁� + for(var i = 0;i< tOptions.cols.length;i++){ + var _th = tOptions.cols[i]; + for(var k=0;k<_th.length;k++){ + if(_th[k].field != undefined){ + proname_arr.push(_th[k].field); + thead_arr.push(_th[k].title); + } + } + } + //鏋勯�犺〃鏍煎唴閮ㄦ暟鎹暟缁� + for(var j = 0;j < tOptions.data.length;j++){ + var _data = tOptions.data[j]; + for(var k=0;k<proname_arr.length;k++){ + thody_arr.push(_data[proname_arr[k]]); + } + } + } + return { + thead: [thead_arr], + tbody:[thody_arr] + } + } + }); + </script> + </body> +</html> \ No newline at end of file diff --git a/gx_tieta/WebRoot/pages/js/mylayui.js b/gx_tieta/WebRoot/pages/js/mylayui.js index 5d26de4..e1a8557 100644 --- a/gx_tieta/WebRoot/pages/js/mylayui.js +++ b/gx_tieta/WebRoot/pages/js/mylayui.js @@ -401,7 +401,7 @@ // 璁剧疆鍘熷瀷鍑芥暟 LayuiTbl.prototype = { - updateTr: function(index, data) { + updateTr: function(index, data) { var layui = this.layui; var preData = this.cache[index]; var _data = $.extend(preData||{}, data||{}); @@ -445,6 +445,23 @@ } } + ,update: function(field, data) { + for(var i=0; i<data.length; i++) { + var _data = data[i]; + if(field in _data) { // 鍒ゆ柇瀵硅薄涓槸鍚﹀瓨鍦ㄦ爣璇嗕綅 + var _field = _data[field]; // 鑾峰彇鏍囪瘑浣嶇殑鍊� + var index = this.getIndex(field, _field); // 鑾峰彇瀵硅薄鎵�鍦ㄧ殑琛� + if(index != undefined) { // 鍒ゆ柇鏄惁鑾峰彇鍒颁簡琛屽彿 + this.updateTr(index, _data); // 鏇存柊鎸囧畾鐨勮 + }else { + console.log(' 绗�'+i+'涓璞℃病鏈夊璞$殑琛ㄦ牸琛�'); + console.log(_data); + } + }else { + console.log(' 绗�'+i+'涓璞$殑'+field+'涓婚敭鏍囪瘑涓嶅瓨鍦�'); + } + } + } ,_getBodyTds: function(index) { var layuiTableView = $(this.ele).next('.layui-table-view'); var layuiTableBody = layuiTableView.find('.layui-table-body .layui-table tbody'); @@ -485,13 +502,13 @@ return false; } - ,getIndex: function(field, value) { + ,getIndex: function(field, value) { // 鑾峰彇tr鐨勪笅鏍� // 閬嶅巻cache鐨勫�� var cache = this.cache; var index = undefined; for(var i=0; i<cache.length; i++) { var _cache = cache[i]; - console.log(_cache) + // console.log(_cache) if(field in _cache && _cache[field] == value) { index = i; break; @@ -500,6 +517,27 @@ return index; } + ,getTr: function(field, value) { // 鑾峰彇Tr鐨勬暟鎹� + // 閬嶅巻cache鐨勫�� + var cache = this.cache; + var rs = { + code: 0 + ,data: {} + ,msg: '鑾峰彇鏍囪瘑浣�'+field+'锛屽�间负'+value+'瀵瑰簲鐨則r鐨勬暟鎹け璐�' + }; + // 閬嶅巻cache鐨勫�� + for(var i=0; i<cache.length; i++) { + var _cache = cache[i]; + if(field in _cache && _cache[field] == value) { + rs.code = 1; + rs.data = _cache; + rs.msg = '鑾峰彇鏍囪瘑浣�'+field+'锛屽�间负'+value+'瀵瑰簲鐨則r鐨勬暟鎹垚鍔�' + break; + } + } + + return rs; + } ,setCache: function(cache) { this.cache = cache; } diff --git a/gx_tieta/src/com/fgkj/actions/Thread_utilAction.java b/gx_tieta/src/com/fgkj/actions/Thread_utilAction.java new file mode 100644 index 0000000..f18cf3f --- /dev/null +++ b/gx_tieta/src/com/fgkj/actions/Thread_utilAction.java @@ -0,0 +1,30 @@ +package com.fgkj.actions; + +import com.fgkj.dto.ServiceModel; +import com.fgkj.dto.Thread_util; +import com.fgkj.services.Thread_utilService; + +public class Thread_utilAction extends ActionUtil{ + private Thread_utilService service=new Thread_utilService(); + private String json; + private String result; + + //鍚姩绾跨▼ + public String update() { + Thread_util util=getGson().fromJson(json, Thread_util.class); + ServiceModel model=service.update(util); + result=tojson(model); + return SUCCESS; + } + + + public String getResult() { + return result; + } + public void setJson(String json) { + this.json = json; + } + + + +} diff --git a/gx_tieta/src/com/fgkj/dao/BaseDAO.java b/gx_tieta/src/com/fgkj/dao/BaseDAO.java index 65cfc4e..fc9c5ea 100644 --- a/gx_tieta/src/com/fgkj/dao/BaseDAO.java +++ b/gx_tieta/src/com/fgkj/dao/BaseDAO.java @@ -206,6 +206,8 @@ public static final int APP_BTS_BATTGROUP=101; + public static final int THREAD_UTIL=102; + public boolean add(Object obj); // 娣诲姞 public boolean update(Object obj); // 鏇存柊 diff --git a/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java b/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java index 6c83c04..eaed7ec 100644 --- a/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java +++ b/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java @@ -54,6 +54,7 @@ import com.fgkj.dao.impl.Positiomap_usrImpl; import com.fgkj.dao.impl.Process_surveyImpl; import com.fgkj.dao.impl.StationtrafficImpl; +import com.fgkj.dao.impl.Thread_utilImpl; import com.fgkj.dao.impl.UserDAOImpl; import com.fgkj.dao.impl.User_ChartImpl; import com.fgkj.dao.impl.User_battgroup_baojigroupImpl; @@ -212,6 +213,7 @@ case 99:return new App_bts_comm_taskImpl(); case 100:return new Battinf_applyImpl(); case 101:return new App_bts_battgroupImpl(); + case 102:return new Thread_utilImpl(); default :return null; } } diff --git a/gx_tieta/src/com/fgkj/dao/ProcessServerDao.java b/gx_tieta/src/com/fgkj/dao/ProcessServerDao.java index 8a2dd2e..bc8472c 100644 --- a/gx_tieta/src/com/fgkj/dao/ProcessServerDao.java +++ b/gx_tieta/src/com/fgkj/dao/ProcessServerDao.java @@ -18,4 +18,8 @@ //榛樿閲嶅惎瀵嗙爜 public static String RESTART_PWD="123456"; + + //杩涚▼id + public static Integer THREAD_XUHANG=2019001;//鏈烘埧缁埅绾跨▼ + public static Integer THREAD_LUOHOU=2019002;//钀藉悗鍗曚綋绾跨▼ } diff --git a/gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java b/gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java index e08d26e..412f992 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/App_bts_battgroupImpl.java @@ -78,7 +78,7 @@ String orderSql=" order by dev_id limit ?,? "; sql+=orderSql; //System.out.println(sql); //"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationId()+"%","%"+binf.getStationName5()+"%",binf.getNum() - List<App_bts_comm_task> list=DAOHelper.executeQueryLimit(sql, conn,new Object[]{binf.getFBSDeviceId(),(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() { + List<App_bts_battgroup> list=DAOHelper.executeQueryLimit(sql, conn,new Object[]{binf.getFBSDeviceId(),(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() { public List getResults(ResultSet rs) { List list=new ArrayList(); diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java index fdeffd5..a88ed4e 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java @@ -4596,6 +4596,122 @@ }*/ return list; } + //鎵归噺璁剧疆绯荤粺鍙傛暟鏃讹紝鏍规嵁鐪佸競鍖猴紝鐢垫睜鍗曚綋鍨嬪彿锛堜紡鏁帮級锛岀粍鏁扮瓫閫夊嚭鐢垫睜缁�<杩橀渶瑕佽幏鍙栧疄闄呭閲�> + public List serchBySys_param(Object obj) { + BattInf binf=(BattInf) obj; + //Page page=binf.getPage(); + /*Connection conn=DBUtil.getConn(); + String numberSql=" SELECT FOUND_ROWS() number";SQL_CALC_FOUND_ROWS*/ + String sql=" select distinct(tb_battinf.StationId),StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId," + + "FBSDeviceName,count(FBSDeviceId) as batt_num" + + ",MonCount,monVolStd,monResStd,MonSerStd,Load_curr,DisCurrMax,montmpstd,floatVolLevel,offlineVolLevel,battFloatCurrent" + + ",GROUP_CONCAT(tb_battinf.MonCapStd order by groupIndexInFBSDevice separator '/' ) as moncapstds " + + ",db_ram_db.tb_fbs9100_state.dev_version" + + ",web_site.tb_batt_endurance.real_cap_group1 ,web_site.tb_batt_endurance.real_cap_group2,web_site.tb_batt_endurance.real_cap_group3,web_site.tb_batt_endurance.real_cap_group4 " + + " from db_battinf.tb_battinf,db_ram_db.tb_fbs9100_state,web_site.tb_batt_endurance " + + " where db_battinf.tb_battinf.FBSDeviceId=db_ram_db.tb_fbs9100_state.dev_id " + + " and db_battinf.tb_battinf.FBSDeviceId=web_site.tb_batt_endurance.deviceid " + + " and MonVolStd=? and Station_install=1 "; + //+ " limit ?,? ";StationName1 like ? and StationName2 like ? and StationName3 like ? and StationName5 like ? " + //,(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%", + //鏉′欢 + String sql0=" and stationid=? "; //鍏蜂綋鏈烘埧 + String sql1=" and stationname1=? ";//鐪� + String sql2=" and stationname2=? ";//甯� + String sql5=" and stationname5=? ";//鍖哄幙 + switch (binf.getNum()) { + case 0: + sql+=sql0; + break; + case 1: + sql+=sql1; + break; + case 2: + sql+=sql2; + break; + case 5: + sql+=sql5; + break; + default: + return null; + } + + //鎺掑簭 + String orderSql=" GROUP BY FBSDeviceId order by StationId asc,GroupIndexInFBSDevice asc "; + sql+=orderSql; + //System.out.println(sql); + List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[] {binf.getMonVolStd(),binf.getStationName()}, new CallBack() { + + @Override + public List getResults(ResultSet rs) { + List list=new ArrayList(); + try { + while(rs.next()) { + BattInf binf = new BattInf(); + binf.setNum(0); + binf.setStationId(rs.getString("stationId")); + binf.setStationName(rs.getString("stationName")); + binf.setStationName1(rs.getString("stationName1")); + binf.setStationName2(rs.getString("stationName2")); + binf.setStationName3(rs.getString("stationName3")); + binf.setStationName4(rs.getString("stationName4")); + binf.setStationName5(rs.getString("stationName5")); + binf.setStationIp(rs.getString("stationIp")); + binf.setFBSDeviceId(rs.getInt("fBSDeviceId")); + + /*binf.setFbsDeviceIp(rs.getString("fbsDeviceIp")); + binf.setFbsDeviceIp_YM(rs.getString("fbsDeviceIp_YM")); + binf.setFbsDeviceIp_WG(rs.getString("fbsDeviceIp_WG"));*/ + binf.setFBSDeviceName(rs.getString("fBSDeviceName")); + binf.setBattGroupNum(rs.getInt("batt_num")); + + binf.setFloatVolLevel(rs.getFloat("floatVolLevel")); + binf.setOfflineVolLevel(rs.getFloat("offlineVolLevel")); + binf.setBattFloatCurrent(rs.getFloat("battFloatCurrent")); + binf.setMonCount(rs.getInt("monCount")); + //binf.setMonCapStd(rs.getFloat("monCapStd")); + + binf.setMoncapstds(rs.getString("moncapstds")); + binf.setReal_cap_group1(rs.getFloat("real_cap_group1")); + binf.setReal_cap_group2(rs.getFloat("real_cap_group2")); + binf.setReal_cap_group3(rs.getFloat("real_cap_group3")); + binf.setReal_cap_group4(rs.getFloat("real_cap_group4")); + + binf.setMonVolStd(rs.getFloat("monVolStd")); + binf.setMonResStd(rs.getFloat("monResStd")); + binf.setMonSerStd(rs.getFloat("monSerStd")); + binf.setMonTmpStd(rs.getFloat("monTmpStd")); + /*binf.setMonVolLowToAvg(rs.getFloat("monVolLowToAvg")); + binf.setBattProducer(rs.getString("battProducer")); + binf.setBattModel(rs.getString("battModel")); + binf.setBattProductDate(rs.getDate("battProductDate")); + binf.setBattInUseDate(rs.getDate("battInUseDate")); + binf.setInstall_user(rs.getString("install_user"));*/ + binf.setLoad_curr(rs.getFloat("load_curr")); + + binf.setDisCurrMax(rs.getFloat("disCurrMax")); + /*binf.setStation_phone(rs.getString("station_phone")); + binf.setStation_install(rs.getInt("station_install"));*/ + + + binf.setStationName9(rs.getString("dev_version")); + list.add(binf); + } + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return list; + } + }); + /*//鍘绘帀limit鏉′欢鍚庣殑鎬绘暟 + int number=LimitNumberFactory.GetLimtitNumber(conn, numberSql); + //System.out.println("number: "+number); + if(list!=null&&list.size()>0){ + list.get(list.size()-1).setNum(number); + }*/ + return list; + } public static void main(String[] args) throws ParseException { //new BattInfImpl().searchAll(); @@ -4603,7 +4719,7 @@ BattInf binf = new BattInf(); binf.setNum(2); binf.setBattGroupId(1000001); - binf.setStationName("骞胯タ鐪�-鐜夋灄-鐜夋灄鐜夊窞鍖鸿タ鍩庨噷-BTS璁惧"); + binf.setStationName("鐧捐壊"); binf.setStationName1(""); binf.setStationName2(""); binf.setStationName3(""); @@ -4651,16 +4767,16 @@ System.out.println(nums);*/ /*boolean bl=biml.judgeBattInOrNot(binf); System.out.println(bl);*/ - /*List<BattInf> list=biml.serchByBatt_param(binf); + List<BattInf> list=biml.serchBySys_param(binf); for (BattInf b : list) { System.out.println(b); - }*/ + } /*List<BattInf> list=biml.serchByDischarge(binf); for (BattInf b : list) { System.out.println(b); }*/ - List list=biml.judgeBatt(binf); - System.out.println(list); + /*List list=biml.judgeBatt(binf); + System.out.println(list);*/ //System.out.println(list.size()); } diff --git a/gx_tieta/src/com/fgkj/dao/impl/Thread_utilImpl.java b/gx_tieta/src/com/fgkj/dao/impl/Thread_utilImpl.java new file mode 100644 index 0000000..c742eb5 --- /dev/null +++ b/gx_tieta/src/com/fgkj/dao/impl/Thread_utilImpl.java @@ -0,0 +1,58 @@ +package com.fgkj.dao.impl; + +import java.sql.ResultSet; +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.Thread_util; + +public class Thread_utilImpl implements BaseDAO,CallBack{ + + @Override + public List getResults(ResultSet rs) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean add(Object obj) { + // TODO Auto-generated method stub + return false; + } + //鍚姩绾跨▼ + @Override + public boolean update(Object obj) { + Thread_util util=(Thread_util) obj; + String sql=" update web_site.tb_thread_util set thread_en=? where thread_id=? "; + boolean bl=DAOHelper.executeUpdate( DBUtil.getConn(), sql,new Object[] {util.getThread_en(),util.getThread_id()}); + return bl; + } + + @Override + public boolean del(Object obj) { + // TODO Auto-generated method stub + return false; + } + + @Override + public List searchAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List serchByCondition(Object obj) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List serchByInfo(Object obj) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/gx_tieta/src/com/fgkj/dto/BattInf.java b/gx_tieta/src/com/fgkj/dto/BattInf.java index 643d9ee..f017289 100644 --- a/gx_tieta/src/com/fgkj/dto/BattInf.java +++ b/gx_tieta/src/com/fgkj/dto/BattInf.java @@ -55,7 +55,15 @@ private String DeviceId; private String DeviceName; private Integer MonCount; + private Float MonCapStd; //鏍囧瓨瀹归噺 + private String moncapstds; + private float real_cap_group1; + private float real_cap_group2; + private float real_cap_group3; + private float real_cap_group4; + + private Float MonResStd; private Float MonSerStd; private Float MonTmpStd; @@ -79,7 +87,7 @@ private Integer Size; private Page page; private Object obj; - private String station_phone; + private String station_phone; private String install_user; //瀹夎浜� @@ -568,51 +576,66 @@ public void setCharge_curr_max(float charge_curr_max) { this.charge_curr_max = charge_curr_max; } + public String getMoncapstds() { + return moncapstds; + } + public void setMoncapstds(String moncapstds) { + this.moncapstds = moncapstds; + } + public float getReal_cap_group2() { + return real_cap_group2; + } + public void setReal_cap_group2(float real_cap_group2) { + this.real_cap_group2 = real_cap_group2; + } + public float getReal_cap_group3() { + return real_cap_group3; + } + public void setReal_cap_group3(float real_cap_group3) { + this.real_cap_group3 = real_cap_group3; + } + public float getReal_cap_group4() { + return real_cap_group4; + } + public void setReal_cap_group4(float real_cap_group4) { + this.real_cap_group4 = real_cap_group4; + } + public float getReal_cap_group1() { + return real_cap_group1; + } + public void setReal_cap_group1(float real_cap_group1) { + this.real_cap_group1 = real_cap_group1; + } @Override public String toString() { - return "BattInf [num=" + num + ", StationId=" + StationId - + ", StationId_ex=" + StationId_ex + ", StationName=" - + StationName + ", StationName1=" + StationName1 - + ", StationName2=" + StationName2 + ", StationName3=" - + StationName3 + ", StationName4=" + StationName4 - + ", StationName5=" + StationName5 + ", StationName6=" - + StationName6 + ", StationName7=" + StationName7 - + ", StationName8=" + StationName8 + ", StationName9=" - + StationName9 + ", StationIp=" + StationIp + ", FBSDeviceId=" - + FBSDeviceId + ", FbsDeviceIp=" + FbsDeviceIp - + ", FbsDeviceIp_YM=" + FbsDeviceIp_YM + ", FbsDeviceIp_WG=" - + FbsDeviceIp_WG + ", FbsDeviceIp_old=" + FbsDeviceIp_old - + ", FbsDeviceIp_YM_old=" + FbsDeviceIp_YM_old - + ", FbsDeviceIp_WG_old=" + FbsDeviceIp_WG_old - + ", FBSDeviceName=" + FBSDeviceName - + ", GroupIndexInFBSDevice=" + GroupIndexInFBSDevice - + ", BattModel=" + BattModel + ", BattGroupId=" + BattGroupId - + ", BattGroupNum=" + BattGroupNum + ", BattGroupName=" - + BattGroupName + ", BattGroupName1=" + BattGroupName1 - + ", BattGroupName2=" + BattGroupName2 + ", BattGroupName3=" - + BattGroupName3 + ", BattGroupName4=" + BattGroupName4 - + ", BattGroupName5=" + BattGroupName5 + ", BattGroupName6=" - + BattGroupName6 + ", FloatVolLevel=" + FloatVolLevel - + ", OfflineVolLevel=" + OfflineVolLevel - + ", BattFloatCurrent=" + BattFloatCurrent + ", DeviceId=" - + DeviceId + ", DeviceName=" + DeviceName + ", MonCount=" - + MonCount + ", MonCapStd=" + MonCapStd + ", MonResStd=" - + MonResStd + ", MonSerStd=" + MonSerStd + ", MonTmpStd=" - + MonTmpStd + ", MonVolStd=" + MonVolStd + ", MonVolLowToAvg=" - + MonVolLowToAvg + ", MonNum=" + MonNum + ", BattProducer=" - + BattProducer + ", BattProductDate=" + BattProductDate - + ", BattProductDate1=" + BattProductDate1 + ", BattInUseDate=" - + BattInUseDate + ", BattInUseDate1=" + BattInUseDate1 - + ", BattGuarantDayCount=" + BattGuarantDayCount - + ", SignalId=" + SignalId + ", CInterFaceId=" + CInterFaceId - + ", Load_curr=" + Load_curr + ", DisCurrMax=" + DisCurrMax - + ", SignalName=" + SignalName + ", StartNum=" + StartNum - + ", Station_install=" + Station_install + ", Size=" + Size - + ", page=" + page + ", obj=" + obj + ", station_phone=" - + station_phone + ", install_user=" + install_user - + ", binf_ex=" + binf_ex + ", charge_curr_max=" - + charge_curr_max + ", VideoOrImage=" + VideoOrImage + "]"; + return "BattInf [num=" + num + ", StationId=" + StationId + ", StationId_ex=" + StationId_ex + ", StationName=" + + StationName + ", StationName1=" + StationName1 + ", StationName2=" + StationName2 + ", StationName3=" + + StationName3 + ", StationName4=" + StationName4 + ", StationName5=" + StationName5 + ", StationName6=" + + StationName6 + ", StationName7=" + StationName7 + ", StationName8=" + StationName8 + ", StationName9=" + + StationName9 + ", StationIp=" + StationIp + ", FBSDeviceId=" + FBSDeviceId + ", FbsDeviceIp=" + + FbsDeviceIp + ", FbsDeviceIp_YM=" + FbsDeviceIp_YM + ", FbsDeviceIp_WG=" + FbsDeviceIp_WG + + ", FbsDeviceIp_old=" + FbsDeviceIp_old + ", FbsDeviceIp_YM_old=" + FbsDeviceIp_YM_old + + ", FbsDeviceIp_WG_old=" + FbsDeviceIp_WG_old + ", FBSDeviceName=" + FBSDeviceName + + ", GroupIndexInFBSDevice=" + GroupIndexInFBSDevice + ", BattModel=" + BattModel + ", BattGroupId=" + + BattGroupId + ", BattGroupNum=" + BattGroupNum + ", BattGroupName=" + BattGroupName + + ", BattGroupName1=" + BattGroupName1 + ", BattGroupName2=" + BattGroupName2 + ", BattGroupName3=" + + BattGroupName3 + ", BattGroupName4=" + BattGroupName4 + ", BattGroupName5=" + BattGroupName5 + + ", BattGroupName6=" + BattGroupName6 + ", FloatVolLevel=" + FloatVolLevel + ", OfflineVolLevel=" + + OfflineVolLevel + ", BattFloatCurrent=" + BattFloatCurrent + ", DeviceId=" + DeviceId + + ", DeviceName=" + DeviceName + ", MonCount=" + MonCount + ", MonCapStd=" + MonCapStd + ", moncapstds=" + + moncapstds + ", real_cap_group1=" + real_cap_group1 + ", real_cap_group2=" + real_cap_group2 + + ", real_cap_group3=" + real_cap_group3 + ", real_cap_group4=" + real_cap_group4 + ", MonResStd=" + + MonResStd + ", MonSerStd=" + MonSerStd + ", MonTmpStd=" + MonTmpStd + ", MonVolStd=" + MonVolStd + + ", MonVolLowToAvg=" + MonVolLowToAvg + ", MonNum=" + MonNum + ", BattProducer=" + BattProducer + + ", BattProductDate=" + BattProductDate + ", BattProductDate1=" + BattProductDate1 + ", BattInUseDate=" + + BattInUseDate + ", BattInUseDate1=" + BattInUseDate1 + ", BattGuarantDayCount=" + BattGuarantDayCount + + ", SignalId=" + SignalId + ", CInterFaceId=" + CInterFaceId + ", Load_curr=" + Load_curr + + ", DisCurrMax=" + DisCurrMax + ", SignalName=" + SignalName + ", StartNum=" + StartNum + + ", Station_install=" + Station_install + ", Size=" + Size + ", page=" + page + ", obj=" + obj + + ", station_phone=" + station_phone + ", install_user=" + install_user + ", binf_ex=" + binf_ex + + ", charge_curr_max=" + charge_curr_max + ", VideoOrImage=" + VideoOrImage + "]"; } + } diff --git a/gx_tieta/src/com/fgkj/dto/Thread_util.java b/gx_tieta/src/com/fgkj/dto/Thread_util.java new file mode 100644 index 0000000..c2cde1f --- /dev/null +++ b/gx_tieta/src/com/fgkj/dto/Thread_util.java @@ -0,0 +1,59 @@ +package com.fgkj.dto; + +import java.io.Serializable; +import java.util.Date; + +import com.fgkj.dao.CallBack; + +public class Thread_util implements Serializable{ + private int num; + private int thread_id; + private String thread_name; + private Date thread_starttime; + private int thread_en; + private String note; + public int getNum() { + return num; + } + public void setNum(int num) { + this.num = num; + } + public int getThread_id() { + return thread_id; + } + public void setThread_id(int thread_id) { + this.thread_id = thread_id; + } + public String getThread_name() { + return thread_name; + } + public void setThread_name(String thread_name) { + this.thread_name = thread_name; + } + public Date getThread_starttime() { + return thread_starttime; + } + public void setThread_starttime(Date thread_starttime) { + this.thread_starttime = thread_starttime; + } + public int getThread_en() { + return thread_en; + } + public void setThread_en(int thread_en) { + this.thread_en = thread_en; + } + public String getNote() { + return note; + } + public void setNote(String note) { + this.note = note; + } + @Override + public String toString() { + return "Thread_util [num=" + num + ", thread_id=" + thread_id + ", thread_name=" + thread_name + + ", thread_starttime=" + thread_starttime + ", thread_en=" + thread_en + ", note=" + note + "]"; + } + + + +} diff --git a/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java b/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java index 17f9b83..59e52a8 100644 --- a/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java +++ b/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_battparam.java @@ -27,6 +27,8 @@ private String StationName3; private String StationName5; private String StationId; + + private Object obj; public int getNum() { return num; } @@ -165,22 +167,22 @@ public void setStationId(String stationId) { StationId = stationId; } + public Object getObj() { + return obj; + } + public void setObj(Object obj) { + this.obj = obj; + } @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 - + "]"; + 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 + ", obj=" + obj + "]"; } } diff --git a/gx_tieta/src/com/fgkj/services/Thread_utilService.java b/gx_tieta/src/com/fgkj/services/Thread_utilService.java new file mode 100644 index 0000000..254346e --- /dev/null +++ b/gx_tieta/src/com/fgkj/services/Thread_utilService.java @@ -0,0 +1,29 @@ +package com.fgkj.services; + +import com.fgkj.dao.BaseDAO; +import com.fgkj.dao.BaseDAOFactory; +import com.fgkj.dto.ServiceModel; + +public class Thread_utilService { + private BaseDAO dao; + private ServiceModel model; + + public Thread_utilService() { + super(); + model=new ServiceModel(); + dao=BaseDAOFactory.getBaseDAO(BaseDAO.THREAD_UTIL); + } + //鍚姩绾跨▼ + public ServiceModel update(Object obj) { + boolean bl=dao.update(obj); + if(bl) { + model.setCode(1); + model.setMsg("淇敼鎴愬姛!"); + }else { + model.setData(0); + model.setMsg("淇敼澶辫触!"); + } + return model; + } + +} diff --git a/gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java b/gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java index 2a03418..ca71748 100644 --- a/gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java +++ b/gx_tieta/src/com/fgkj/services/ram/Fbs9100_battparamService.java @@ -180,6 +180,8 @@ if(b) { success+=1; list.get(i).setNum(1); + List listbatt=dao.serchByCondition(fs); + list.get(i).setObj(listbatt); } } } diff --git a/gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java b/gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java index 45d92bb..cddb552 100644 --- a/gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java +++ b/gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java @@ -122,7 +122,7 @@ } //鎵归噺璁剧疆绯荤粺鍙傛暟鏃讹紝鏍规嵁鐪佸競鍖猴紝鐢垫睜鍗曚綋鍨嬪彿锛堜紡鏁帮級锛岀粍鏁扮瓫閫夊嚭鐢垫睜缁勫苟璇诲彇瀹冪殑瀹為檯绯荤粺鍙傛暟 public ServiceModel serchBattinfAndParam(Object obj) { - List<BattInf> list=(new BattInfImpl()).serchByBatt_param(obj); + List<BattInf> list=(new BattInfImpl()).serchBySys_param(obj); if(list!=null&&list.size()>0) { Calendar c = Calendar.getInstance(); //鐜板湪鐨勬椂闂�(鍗曚綅锛氭绉�) @@ -202,7 +202,7 @@ ServiceModel model=fs.serchBattinfAndParam(binf); List list=(List)model.getData(); for (int i = 0; i < list.size(); i++) { - System.out.println(((BattInf)list.get(i)).getObj()); + System.out.println(((BattInf)list.get(i))); } } } -- Gitblit v1.9.1