From b8f449dca8e53bbd5c0e424befe07c8207c10032 Mon Sep 17 00:00:00 2001
From: didiyu <1293722656@qq.com>
Date: 星期二, 11 十二月 2018 13:48:50 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://didiyu@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
---
gx_tieta/WebRoot/mobil/battM.html | 10
gx_tieta/WebRoot/mobil/selectbatt.html | 6
gx_tieta/src/com/fgkj/dto/Battinf_apply.java | 64 +++
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java | 36 +
gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html | 526 +++++++++++++++++++++++++
gx_tieta/src/com/fgkj/services/Battinf_applyService.java | 43 ++
gx_tieta/WebRoot/WEB-INF/web.xml | 1
gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java | 7
gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java | 312 ++++++++++++++
gx_tieta/WebRoot/mobil/ele-param1.html | 2
gx_tieta/WebRoot/iframe/batt-info-add.html | 5
gx_tieta/src/com/fgkj/dao/BaseDAO.java | 2
gx_tieta/WebRoot/ele-param1.jsp | 88 ++-
gx_tieta/src/com/fgkj/actions/BattInfAction.java | 10
gx_tieta/WebRoot/mobil/ele-param.html | 17
gx_tieta/WebRoot/mobil/selectcity.html | 2
gx_tieta/src/com/fgkj/actions/Battinf_applyAction.java | 45 ++
gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java | 2
gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java | 14
gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html | 2
gx_tieta/WebRoot/mobil/selectcounty.html | 4
gx_tieta/WebRoot/mobil/index.html | 12
gx_tieta/src/com/fgkj/Filters/LoginFilter.java | 18
gx_tieta/src/com/fgkj/services/BattInfServices.java | 10
gx_tieta/WebRoot/mobil/elegroup-batt-conf-temp1.html | 17
25 files changed, 1,181 insertions(+), 74 deletions(-)
diff --git a/gx_tieta/WebRoot/WEB-INF/web.xml b/gx_tieta/WebRoot/WEB-INF/web.xml
index b923bf3..9868da3 100644
--- a/gx_tieta/WebRoot/WEB-INF/web.xml
+++ b/gx_tieta/WebRoot/WEB-INF/web.xml
@@ -59,6 +59,7 @@
<filter-mapping>
<filter-name>LoginFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
+ <url-pattern>*.html</url-pattern>
</filter-mapping>
<filter>
<filter-name>HotlinkFilter</filter-name>
diff --git a/gx_tieta/WebRoot/ele-param1.jsp b/gx_tieta/WebRoot/ele-param1.jsp
index 8949974..aee382c 100644
--- a/gx_tieta/WebRoot/ele-param1.jsp
+++ b/gx_tieta/WebRoot/ele-param1.jsp
@@ -653,38 +653,68 @@
if(len) {
_rsData = tOptions.data[len-1];
}
-
- // 鎵撳紑闈㈡澘璁剧疆鏂板缓鐢垫睜缁勪釜鏁�
- layer.open({
- type: 1
- ,title: '閫夋嫨鏂板缓鐢垫睜缁勪釜鏁�'
- ,content: addGroupContent
- ,fixed: true
- ,resize: false
- ,btn:['纭畾', '鍙栨秷']
- ,yes: function(index) {
- var groupNum = $('#addGroupnum').val();
- layer.close(index);
- // 鐢熸垚鏁扮粍
- var _arr = [];
- for(var i=0; i<groupNum; i++) {
- _arr.push(i+1);
+ getMaxDevId(function(id) {
+ // 鎵撳紑闈㈡澘璁剧疆鏂板缓鐢垫睜缁勪釜鏁�
+ layer.open({
+ type: 1
+ ,title: '閫夋嫨鏂板缓鐢垫睜缁勪釜鏁�'
+ ,content: addGroupContent
+ ,fixed: true
+ ,resize: false
+ ,btn:['纭畾', '鍙栨秷']
+ ,yes: function(index) {
+ var groupNum = $('#addGroupnum').val();
+ layer.close(index);
+ // 鐢熸垚鏁扮粍
+ var _arr = [];
+ for(var i=0; i<groupNum; i++) {
+ _arr.push(i+1);
+ }
+
+ _rsData.addGroupNum = _arr;
+ _rsData.FBSDeviceId = id;
+ $('#iframeEdit').data('data', _rsData);
+
+ iframePopup = layer.open({
+ type: 2
+ ,title: '鏂板缓鐢垫睜缁�'
+ ,area:['1200px', '520px']
+ ,resize: false
+ ,content: 'iframe/batt-info-add.html'
+ });
}
-
- _rsData.addGroupNum = _arr;
- $('#iframeEdit').data('data', _rsData);
-
- iframePopup = layer.open({
- type: 2
- ,title: '鏂板缓鐢垫睜缁�'
- ,area:['1200px', '520px']
- ,resize: false
- ,content: 'iframe/batt-info-add.html'
- });
- }
- });
+ });
+ });
+
});
+ // 鑾峰彇鏈�澶ц澶噄d
+ function getMaxDevId(callback) {
+ var load = layer.load(1);
+ // 鏌ヨ鍚庡彴
+ $.ajax({
+ type: 'post'
+ ,async: true
+ ,url: 'BattInfAction!searchmaxdev_id'
+ ,data:null
+ ,dataType: 'json'
+ ,success:function(res) {
+ var rs = JSON.parse(res.result);
+ if(rs.data.length != 0) {
+ if(isFunction(callback)) {
+ callback(rs.data);
+ }
+ }else {
+ layer.msg('璁$畻璁惧id澶辫触锛�')
+ }
+ }
+ ,complete: function() {
+ layer.close(load);
+ }
+
+ });
+ }
+
// 鏌ヨ鐢垫睜缁勪俊鎭�
function search(temp, newLoad) {
diff --git a/gx_tieta/WebRoot/iframe/batt-info-add.html b/gx_tieta/WebRoot/iframe/batt-info-add.html
index 2ff4046..8f73e6c 100644
--- a/gx_tieta/WebRoot/iframe/batt-info-add.html
+++ b/gx_tieta/WebRoot/iframe/batt-info-add.html
@@ -96,7 +96,7 @@
<div class="layui-block">
<label class="layui-form-label">璁惧ID<span class="red">*</span></label>
<div class="layui-input-block">
- <input type="text" name="FBSDeviceId" lay-verify="devid" id="devid" autocomplete="off" class="layui-input" value="{{= d.FBSDeviceId }}">
+ <input type="text" name="FBSDeviceId" lay-verify="devid" id="devid" autocomplete="off" disabled="" class="layui-input layui-bg-gray" value="{{= d.FBSDeviceId }}">
</div>
</div>
</div>
@@ -358,6 +358,9 @@
var battInfoTpl = $('#battInfoTpl').html();
var editInfo = parent.$('#iframeEdit').data('data');
+
+
+ editInfo.FbsDeviceIp = getDevIp(editInfo.FBSDeviceId);
//console.log(editInfo);
var data = {
StationId: '4011100'
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
index 2dd6000..14af2d2 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
- <title>鐢垫睜缁勪俊鎭厤缃ā鏉�</title>
+ <title>鐢垫睜缁勫畨瑁呮彁浜ょ敵璇�</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
new file mode 100644
index 0000000..cb693bc
--- /dev/null
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
@@ -0,0 +1,526 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>鐢垫睜缁勫畨瑁呮彁浜ょ敵璇�</title>
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
+ <link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
+ <link href="mobilCss/mobiscroll.core-2.5.2.css" rel="stylesheet" type="text/css" />
+ <link href="mobilCss/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css" />
+ <link rel="stylesheet" type="text/css" href="css/tbl.css">
+ <script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
+ <script src="mobilJs/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
+ <script src="mobilJs/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
+ <script src="mobilJs/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
+ <script src="mobilJs/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
+ <script type="text/javascript" src="js/tbl.js"></script>
+ <script type="text/javascript" src="mobilJs/base.js"></script>
+ <script type="text/javascript">
+ function creatAllView(num){
+ var allString=''
+ ,i=0;
+ if(num>4){return false}
+ for(i=0;i<num;i++){
+ allString+=creatBattView(i);
+ }
+ $("#battdata").html(allString);
+ }
+
+
+ function creatBattView(index){
+ var count=index+1
+ ,battTitle='<div>'+'<h1 class="hbg">'+'鐢垫睜缁�'+count+'</h1>'+
+ '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'璁惧绱㈠紩'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select>'
+ ,allOption=selectedIndex(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>'
+ ,battName='<tr>'+'<td>'+'鐢垫睜缁勫悕绉�'+'</td>'+'<td>'+'<input type="text" '+'id='+'battname'+index+' data-mini="true"'+'value='+'鐢垫睜缁�'+count+' />'+'</td>'+'</tr>'+'</tbody>'+'</table>'+'</div>';
+ return battTitle+allOption+battName;
+
+ }
+
+ function selectedIndex(index){
+ var selected='',
+ i=0;
+ for(i=0;i<4;i++){
+ if(i==index){selected+='<option '+'value='+i+' selected'+'>'+i+'</option>';continue;}
+ selected+='<option value='+i+'>'+i+'</option>';
+
+ }
+
+ return selected;
+ }
+ var temp = getCookie("eleparm");
+ //console.info(temp);
+ temp=JSON.parse(temp);
+ console.info(temp);
+ console.info(temp[30]);
+ console.info(temp[33]);
+ var suoyin = temp[33];
+
+ $(function(){creatAllView(suoyin)});
+ </script>
+ <script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
+ <style type="text/css">
+
+ table {
+ margin-top:.5em;
+ border-collapse:separate;
+ border-spacing:0 .5em;
+ }
+
+ tbody tr td{
+ overflow: hidden;
+ text-overflow:ellipsis;
+ white-space: nowrap;
+ }
+ .uncheck{
+ background-color: #dddddd38!important;
+ color: #bdbdbdc4!important;
+ }
+ .ui-btn-icon-right {
+ padding-right: 8.5em;
+ }
+ .hbg{
+ background-color:#ddd9;
+ }
+ #battdata {
+ background-color:#dddddd54
+ }
+ .ui-select .ui-btn select{
+ width:77%;
+ }
+ </style>
+ <link rel="stylesheet" href="css/fgpanel.css">
+</head>
+<body>
+ <div data-role="page">
+
+ <!-- 澶撮儴鍐呭 -->
+ <div data-role="header" data-position="fixed">
+ <a href="ele-param1.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a>
+ <h1>鐢垫睜缁勭敵璇峰畨瑁�</h1>
+
+ </div>
+ <!-- 涓讳綋鍐呭 -->
+ <div data-role="main">
+ <!-- <div class="set-option"> -->
+ <table class="layout-set">
+ <tbody>
+ <tr>
+ <td>鏈烘埧缂栧彿</td>
+ <td>
+ <input type="text" id="StationId" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鐪�</td>
+ <td>
+ <input type="text" id="station_name1" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鍩庡競</td>
+ <td>
+ <input type="text" id="city" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鍖哄幙</td>
+ <td>
+ <input type="text" id="county" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鏈烘埧鍚嶇О</td>
+ <td>
+ <input type="text" id="StationName3" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>璁惧鍚嶇О</td>
+ <td>
+ <input type="text" id="StationName4" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鏈烘埧IP</td>
+ <td>
+ <input type="text" id="StationIp" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>FBS璁惧ID(閲嶈)</td>
+ <td>
+ <input type="text" id="FBSDeviceId" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>FBS璁惧IP(閲嶈)</td>
+ <td>
+ <input type="text" id="FbsDeviceIp" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>瀛愮綉鎺╃爜</td>
+ <td>
+ <input type="text" id="FbsDeviceIp_YM" class="unable" data-mini="true" value="456"/>
+ </td>
+ </tr>
+ <tr>
+ <td>缃戝叧</td>
+ <td>
+ <input type="text" id="FbsDeviceIp_WG" class="unable" data-mini="true" value="456"/>
+ </td>
+ </tr>
+ <tr>
+ <td>FBS璁惧鍚嶇О</td>
+ <td>
+ <input type="text" id="FBSDeviceName" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>FBS鐢垫睜绱㈠紩(0-3)</td>
+ <td>
+ <input type="text" id="GroupIndexInFBSDevice" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鐢垫睜缁処D</td>
+ <td>
+ <input type="text" readonly unselectable="on" value="123" id="BattGroupId" class="uncheck" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鏈烘埧鍐呯數姹犵粍缂栧彿</td>
+ <td>
+ <input type="text" readonly unselectable="on" value="123" id="BattGroupNum" class="uncheck" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鐢垫睜缁勫悕绉�</td>
+ <td>
+ <input type="text" id="BattGroupName" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>娴厖鐢靛帇闃�鍊�(V)</td>
+ <td>
+ <input type="text" id="FloatVolLevel" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>绂荤嚎鐢靛帇闃�鍊�(V)</td>
+ <td>
+ <input type="text" id="OfflineVolLevel" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>娴厖鐢垫祦闃�鍊�(A)</td>
+ <td>
+ <input type="text" id="BattFloatCurrent" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鍗曚綋鏁伴噺</td>
+ <td>
+ <input type="text" id="MonCount" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鏍囩О瀹归噺(AH)</td>
+ <td>
+ <input type="text" id="MonCapStd" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鏍囩О鍗曚綋鐢靛帇(V)</td>
+ <td>
+ <input type="text" id="MonVolStd" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鏍囩О鍗曚綋鍐呴樆(m惟)</td>
+ <td>
+ <input type="text" id="MonResStd" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鏍囩О鍗曚綋鐢靛</td>
+ <td>
+ <input type="text" id="MonSerStd" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)</td>
+ <td>
+ <input type="text" id="MonVolLowToAvg" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>璐熻浇鐢垫祦(A)</td>
+ <td>
+ <input type="text" id="Load_curr" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鏈�澶ф牳瀹圭數娴�(A)</td>
+ <td>
+ <input type="text" id="DisCurrMax" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鍩虹珯鍙风爜</td>
+ <td>
+ <input type="text" id="station_phone" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鐢垫睜鍝佺墝</td>
+ <td>
+ <input type="text" id="BattProducer" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鐢垫睜鍨嬪彿</td>
+ <td>
+ <input type="text" id="BattModel" data-mini="true" />
+ </td>
+ </tr>
+ <tr>
+ <td>鐢垫睜鐢熶骇鏃ユ湡</td>
+ <td>
+ <input id="startTestrecord" type="text" name="appDate" class="appDatefir" value="2000-01-01" />
+ </td>
+ </tr>
+ <tr>
+ <td>鎶曞叆浣跨敤鏃ユ湡 </td>
+ <td>
+ <input id="endTestrecord" type="text" name="appDate" class="appDatesec" value="2017-01-01" />
+ </td>
+ </tr>
+ <tr>
+ <td>瀹夎浜哄憳</td>
+ <td>
+ <input type="text" id="install_user" data-mini="true" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!-- </div> -->
+ <div id="battdata">
+ <!-- <div>
+ <h1 class="hbg">鐢垫睜缁�1</h1>
+ <table class="layout-set">
+ <tbody>
+ <tr>
+ <td>璁惧绱㈠紩</td>
+ <td>
+ <fieldset data-role="controlgroup" data-type="horizontal">
+ <select>
+ <option value="">0</option>
+ <option value="mon">1</option>
+ <option value="mon">2</option>
+ <option value="mon">3</option>
+
+ </select>
+ </fieldset>
+ </td>
+ </tr>
+ <tr>
+ <td>鐢垫睜缁勫悕绉�</td>
+ <td><input type="text" id="" data-mini="true" /></td>
+ </tr>
+ </tbody>
+ </table>
+ </div> -->
+ </div>
+
+
+ </div>
+
+ <div data-role="footer" data-position="fixed" data-theme="a">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="#yourPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">纭畾</a></li>
+ <li><a href="" id="cancel" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-delete" data-position-to="window" data-icon="delete" data-role="button">鍙栨秷</a></li>
+ </ul>
+ </div>
+ </div>
+ <div data-role="popup" id="yourPopup" class="ui-content" data-overlay-theme="b">
+ <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">鍏抽棴</a>
+ <a href="" data-rel="back" id="sure" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-check" >鎻愪氦</a>
+ <a href="" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-delete" >鏀惧純</a>
+ </div>
+ </div>
+</body>
+
+
+<script type="text/javascript">
+ $(function () {
+ //setTimes($("#startTestrecord"),'2000-01-01');
+ //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
+ installstartdata(temp);
+
+ });
+
+ function installstartdata(temp){
+ //$("#StationId").value=temp[0];
+ //var t=document.getElementById("station_name1");
+ document.getElementById("StationId").value = temp[0];
+ document.getElementById("station_name1").value = temp[1];
+ document.getElementById("city").value = temp[2]; //甯�
+ document.getElementById("county").value = temp[3]; //鍖哄幙
+ document.getElementById("StationName3").value = temp[4]; //鏈烘埧鍚嶇О
+ document.getElementById("StationName4").value = temp[5]; //璁惧鍚嶇О
+ document.getElementById("StationIp").value = temp[6]; //璁惧IP
+ document.getElementById("FBSDeviceId").value = temp[7];
+ document.getElementById("FbsDeviceIp").value = temp[8];
+ document.getElementById("FbsDeviceIp_YM").value = temp[9];
+ document.getElementById("FbsDeviceIp_WG").value = temp[10];
+ document.getElementById("FBSDeviceName").value = temp[11];
+ document.getElementById("GroupIndexInFBSDevice").value = temp[12];
+ document.getElementById("BattGroupId").value = temp[13];
+ document.getElementById("BattGroupNum").value = temp[14];
+ document.getElementById("BattGroupName").value = temp[15];
+ document.getElementById("FloatVolLevel").value = temp[16];
+ document.getElementById("OfflineVolLevel").value = temp[17];
+ document.getElementById("BattFloatCurrent").value = temp[18];
+ document.getElementById("MonCount").value = temp[19];
+ document.getElementById("MonCapStd").value = temp[20];
+ document.getElementById("MonVolStd").value = temp[21];
+ document.getElementById("MonResStd").value = temp[22];
+ document.getElementById("MonSerStd").value = temp[23];
+ document.getElementById("MonVolLowToAvg").value = temp[24];
+ document.getElementById("Load_curr").value = temp[25];
+ document.getElementById("DisCurrMax").value = temp[26];
+ document.getElementById("station_phone").value = temp[27];
+ document.getElementById("BattProducer").value = temp[28];
+ document.getElementById("BattModel").value = temp[29];
+ //document.getElementById("startTestrecord").value = temp[30];
+ //document.getElementById("endTestrecord").value = temp[31];
+ setTimes($("#startTestrecord"),temp[30]);
+ setTimes($("#endTestrecord"),temp[31]);
+ document.getElementById("install_user").value = temp[32];
+ }
+
+
+ // 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍骞惰繑鍥� 鍗曚釜淇敼锛屾墜鏈烘柟寮忎笉淇敼澶氫釜鐢垫睜缁�
+ function getUpdateArr(){
+ var arr = new Array();
+ var obj = new Object();
+ obj.StationId = $("#StationId").val(); // 鏈烘埧缂栧彿
+ obj.StationName = ($("#station_name1").val()+"-"+$("#city").val()+"-"+$("#StationName3").val()+"-"+$("#StationName4").val()); // 鎷兼帴鏈烘埧鍚嶇О
+ obj.StationName1 = $("#station_name1").val(); // 鐪�
+ obj.StationName2 = $("#city").val(); // 甯�
+ obj.StationName5 = $("#county").val(); // 鍖�/鍘�
+ obj.StationName3 = $("#StationName3").val(); // 鏈烘埧鍚嶇О
+ obj.StationName4 = $("#StationName4").val(); // 璁惧鍚嶇О
+ obj.StationIp = $("#StationIp").val(); //鏈烘埧ip
+ obj.FBSDeviceId = $("#FBSDeviceId").val(); //璁惧id
+ obj.FbsDeviceIp = $("#FbsDeviceIp").val(); //璁惧ip
+ obj.FbsDeviceIp_YM = $("#FbsDeviceIp_YM").val(); // 璁惧鎺╃爜
+ obj.FbsDeviceIp_WG = $("#FbsDeviceIp_WG").val(); // 缃戝叧
+ obj.FBSDeviceName = $("#FBSDeviceName").val(); //璁惧鍚嶇О
+ obj.GroupIndexInFBSDevice = $("#GroupIndexInFBSDevice").val(); //fbs璁惧绱㈠紩
+ obj.BattGroupId = $("#BattGroupId").val(); //鐢垫睜缁刬d
+ obj.BattGroupNum = $("#BattGroupNum").val(); //鏈烘埧鍐呯數姹犵粍缂栧彿
+ obj.BattGroupName = $("#BattGroupName").val(); //鐢垫睜缁勫悕绉�
+ obj.FloatVolLevel = $("#FloatVolLevel").val(); //娴厖鐢靛帇闃�鍊�
+ obj.OfflineVolLevel = $("#OfflineVolLevel").val(); //绂荤嚎鐢靛帇闃�鍊�
+ obj.BattFloatCurrent = $("#BattFloatCurrent").val(); //娴厖鐢垫祦闃�鍊�
+ obj.MonCount = $("#MonCount").val(); //鍗曚綋鏁伴噺
+ obj.MonCapStd = $("#MonCapStd").val(); //鏍囩О瀹归噺
+ obj.MonVolStd = $("#MonVolStd").val(); //鏍囩О鐢靛帇
+ obj.MonResStd = $("#MonResStd").val(); //鏍囩О鍐呴樆
+ obj.MonSerStd = $("#MonSerStd").val(); //鏍囩О鐢靛
+ obj.MonVolLowToAvg = $("#MonVolLowToAvg").val(); //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+
+
+ obj.Load_curr = $("#Load_curr").val(); //璐熻浇鐢垫祦
+ obj.DisCurrMax = $("#DisCurrMax").val(); //鏈�澶ф牳瀹圭數娴�
+ obj.station_phone = $("#station_phone").val(); //鍩虹珯鍙风爜
+
+ obj.BattProducer = $("#BattProducer").val(); //鐢垫睜鍝佺墝
+ obj.BattModel = $("#BattModel").val(); //鐢垫睜鍨嬪彿
+ obj.BattProductDate = $("#startTestrecord").val(); //鐢垫睜鐢熶骇鏃ユ湡
+ obj.BattInUseDate = $("#endTestrecord").val(); //鐢垫睜浣跨敤鏃ユ湡
+ obj.install_user = $("#install_user").val(); //瀹夎浜哄憳
+ arr.push(obj);
+ console.info(arr);
+ return arr;
+ }
+
+</script>
+ <script type="text/javascript">
+ $(function(){
+ $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
+ $("#sure").click(function(){
+ if(temp[33]&&temp[33]=="new"){
+ addBatt();
+ }else{
+ editParm();
+ }
+ function backpage(){window.location.href="ele-param1.html";}
+ setTimeout(backpage,500);
+ });
+ $("#cancel").click(function(){
+ window.location.href="ele-param1.html";
+ });
+ });
+ function editParm(){
+ var parm = getUpdateArr();
+ $.ajax({
+ type: "post",
+ url: "BattInfAction!update",
+ async:true,
+ dataType:'text',
+ data:"json="+JSON.stringify(parm),
+ success: function(data){
+ data = eval('('+data+')');
+ var model = eval('('+data.result+')');
+ console.info(model);
+ if(model.code ==1){
+ alert("淇敼鎴愬姛");
+ }else{
+ alert("淇敼澶辫触!");
+ }
+ },
+ error:function(){
+ alert("淇敼鐢垫睜缁勫け璐�!");
+ }
+ });
+ }
+ function addBatt(){
+ var parm = getUpdateArr();
+ $.ajax({
+ type: "post",
+ url: "BattInfAction!add",
+ async:true,
+ dataType:'text',
+ data:"json="+JSON.stringify(parm),
+ success: function(data){
+ data = eval('('+data+')');
+ var model = eval('('+data.result+')');
+ //console.info(model);
+ if(model.code ==1){
+ alert("娣诲姞鐢垫睜缁勬垚鍔�!");
+ }else{
+ alert("娣诲姞鐢垫睜缁勫け璐�!");
+ }
+ },
+ error:function(){
+ alert("娣诲姞鐢垫睜缁勫彂鐢熼敊璇�!");
+ }
+ });
+ }
+
+
+
+
+ /* 鎿嶄綔鎴愬姛
+ $('#changeSuc').popup('open');
+ 鎿嶄綔澶辫触
+ $('#changeErr').popup('open'); */
+ </script>
+</html>
\ No newline at end of file
diff --git a/gx_tieta/WebRoot/mobil/battM.html b/gx_tieta/WebRoot/mobil/battM.html
index acf3c2c..368df1b 100644
--- a/gx_tieta/WebRoot/mobil/battM.html
+++ b/gx_tieta/WebRoot/mobil/battM.html
@@ -35,7 +35,7 @@
$(document).ready(function(){
setCookie('batt', '');
//temp = JSON.parse(temp);
- //console.info(temp);
+ console.info(temp);
init();
//searchkBattByStationid();
});
@@ -47,10 +47,10 @@
var data = [
{url: 'javascript:JumpHomePage();', txt: '棣栭〉'},
- {url: 'javascript:JumpFirstPage();', txt: '鐪�'},
- {url: 'javascript:JumpcityPage();', txt: '甯�'},
- {url: 'machineroomM.html', txt: '鍖�/鍘�' },
- {url: 'selectbatt.html', txt: '鏈烘埧'},
+ {url: 'javascript:JumpFirstPage();', txt:temp.StationName1},
+ {url: 'javascript:JumpcityPage();', txt: temp.StationName2},
+ {url: 'selectcounty.html', txt: temp.StationName5 },
+ {url: 'selectbatt.html', txt: temp.StationName3},
{url: 'javascript:;', txt: '钃勭數姹犵粍'}
];
addBreadCrumb($('.breadcrumb').eq(0),data);
diff --git a/gx_tieta/WebRoot/mobil/ele-param.html b/gx_tieta/WebRoot/mobil/ele-param.html
index 1f50d6b..1ceb26b 100644
--- a/gx_tieta/WebRoot/mobil/ele-param.html
+++ b/gx_tieta/WebRoot/mobil/ele-param.html
@@ -326,24 +326,7 @@
createTbl(tblCon, arrTh, arrTd);
}
});
-
- /* 妯℃嫙鏁版嵁鍋氬ソ灏卞垹锛侊紒锛侊紒锛侊紒锛侊紒 */
-
- /*for(i=0;i<340;i++){
- if(i%34==33){
- //<a href="count-report.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a>
- arrTd[i]='<a href="#myPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window" >淇敼鎴栧垹闄�</a>';
- console.warn(i);
- continue;
-
- }
-
- arrTd[i]=i*10;
- }
- createTbl(tblCon, arrTh, arrTd);
-
- /* 妯℃嫙鏁版嵁鍋氬ソ灏卞垹锛侊紒锛侊紒锛侊紒锛侊紒 */
}
function getUpdateArr(temp){
var arr = new Array();
diff --git a/gx_tieta/WebRoot/mobil/ele-param1.html b/gx_tieta/WebRoot/mobil/ele-param1.html
index aaf52c7..f0e30b6 100644
--- a/gx_tieta/WebRoot/mobil/ele-param1.html
+++ b/gx_tieta/WebRoot/mobil/ele-param1.html
@@ -213,7 +213,7 @@
}else{
setcookieCreat(Page.pageSize-1);
}
- window.location.href="batt-infor-conf-temp.html";
+ window.location.href="batt-infor-conf-temp1.html";
});
var arrTh = [ '鏈烘埧缂栧彿', '鐪�', '鍩庡競','鍖哄幙','鏈烘埧鍚嶇О','璁惧鍚嶇О','鏈烘埧IP','FBS璁惧ID(閲嶈)','FBS璁惧IP(閲嶈)','瀛愮綉鎺╃爜','缃戝叧','FBS璁惧鍚嶇О','FBS鐢垫睜绱㈠紩(0-3)','鐢垫睜缁処D','鏈烘埧鍐呯數姹犵粍缂栧彿','鐢垫睜缁勫悕绉�','娴厖鐢靛帇闃�鍊�(V)','绂荤嚎鐢靛帇闃�鍊�(V)','娴厖鐢垫祦闃�鍊�(A)','鍗曚綋鏁伴噺','鏍囩О瀹归噺(AH)','鏍囩О鍗曚綋鐢靛帇(V)','鏍囩О鍗曚綋鍐呴樆(m惟)','鏍囩О鍗曚綋鐢靛','鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)','璐熻浇鐢垫祦(A)','鏈�澶ф牳瀹圭數娴�(A)','鍩虹珯鍙风爜','鐢垫睜鍝佺墝','鐢垫睜鍨嬪彿','鐢垫睜鐢熶骇鏃ユ湡','鎶曞叆浣跨敤鏃ユ湡','瀹夎浜哄憳'];
diff --git a/gx_tieta/WebRoot/mobil/elegroup-batt-conf-temp1.html b/gx_tieta/WebRoot/mobil/elegroup-batt-conf-temp1.html
new file mode 100644
index 0000000..dd32f4f
--- /dev/null
+++ b/gx_tieta/WebRoot/mobil/elegroup-batt-conf-temp1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>elegroup-batt-conf-temp1.html</title>
+
+ <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
+ <meta http-equiv="description" content="this is my page">
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+ <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
+
+ </head>
+
+ <body>
+ This is my HTML page. <br>
+ </body>
+</html>
diff --git a/gx_tieta/WebRoot/mobil/index.html b/gx_tieta/WebRoot/mobil/index.html
index 68bc9d2..8c87962 100644
--- a/gx_tieta/WebRoot/mobil/index.html
+++ b/gx_tieta/WebRoot/mobil/index.html
@@ -12,7 +12,7 @@
<body>
<div data-role="page" id='main'>
<div data-role="header" data-position="fixed">
- <a href="loginm.html" class="ui-btn ui-btn-icon-left ui-btn-inline ui-btn-b ui-corner-all" style="padding-top:0.7em;padding-bottom:0.7em;" target="_top"
+ <a href="javascript:exitUser();" class="ui-btn ui-btn-icon-left ui-btn-inline ui-btn-b ui-corner-all" style="padding-top:0.7em;padding-bottom:0.7em;" target="_top"
data-i18n="toptitle.exit">閫�鍑�</a>
<h1 data-i18n="toptitle.headline">钃勭數姹犵粍鐩戞帶绯荤粺</h1>
</div>
@@ -77,8 +77,16 @@
delCookie("stationId");
$(document.body).css( "visibility", "visible") ;
});
+
+ //瀹夊叏閫�鍑�
+ function exitUser(){
+ $.post("../LoginAction!exitUser",null,function(data){
+ //console.info(data);
+ window.location.replace("loginm.html");
+ });
+ }
</script>
</div>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/gx_tieta/WebRoot/mobil/selectbatt.html b/gx_tieta/WebRoot/mobil/selectbatt.html
index e495026..ad3d038 100644
--- a/gx_tieta/WebRoot/mobil/selectbatt.html
+++ b/gx_tieta/WebRoot/mobil/selectbatt.html
@@ -48,9 +48,9 @@
var data = [
{url: 'javascript:JumpHomePage();', txt: '棣栭〉'},
- {url: 'javascript:JumpFirstPage();', txt: '鐪�'},
- {url: 'javascript:JumpcityPage();', txt: '甯�'},
- {url: 'machineroomM.html', txt: '鍖�/鍘�' },
+ {url: 'javascript:JumpFirstPage();', txt:temp.StationName1},
+ {url: 'javascript:JumpcityPage();', txt: temp.StationName2},
+ {url: 'machineroomM.html', txt: temp.StationName5 },
{url: 'javascript:;', txt: '鏈烘埧'}
];
addBreadCrumb($('.breadcrumb').eq(0),data);
diff --git a/gx_tieta/WebRoot/mobil/selectcity.html b/gx_tieta/WebRoot/mobil/selectcity.html
index 2438891..15aebf6 100644
--- a/gx_tieta/WebRoot/mobil/selectcity.html
+++ b/gx_tieta/WebRoot/mobil/selectcity.html
@@ -74,7 +74,7 @@
$(function(){
var data = [
{url: 'javascript:JumpHomePage();', txt: '棣栭〉'},
- {url: 'javascript:JumpFirstPage();', txt: '鐪�'},
+ {url: 'javascript:JumpFirstPage();', txt: temp.StationName1},
{url: 'javascript:;', txt: '甯�'}
];
addBreadCrumb($('.breadcrumb').eq(0),data);
diff --git a/gx_tieta/WebRoot/mobil/selectcounty.html b/gx_tieta/WebRoot/mobil/selectcounty.html
index ac27a89..6a35db7 100644
--- a/gx_tieta/WebRoot/mobil/selectcounty.html
+++ b/gx_tieta/WebRoot/mobil/selectcounty.html
@@ -74,8 +74,8 @@
$(function(){
var data = [
{url: 'javascript:JumpHomePage();', txt: '棣栭〉'},
- {url: 'javascript:JumpFirstPage();', txt: '鐪�'},
- {url: 'javascript:JumpcityPage();', txt: '甯�'},
+ {url: 'javascript:JumpFirstPage();', txt: temp.StationName1},
+ {url: 'javascript:JumpcityPage();', txt: temp.StationName2},
{url: 'javascript:;', txt: '鍖�/鍘�'}
];
addBreadCrumb($('.breadcrumb').eq(0),data);
diff --git a/gx_tieta/src/com/fgkj/Filters/LoginFilter.java b/gx_tieta/src/com/fgkj/Filters/LoginFilter.java
index 8fbc13c..d555054 100644
--- a/gx_tieta/src/com/fgkj/Filters/LoginFilter.java
+++ b/gx_tieta/src/com/fgkj/Filters/LoginFilter.java
@@ -12,6 +12,7 @@
import javax.servlet.http.HttpServletRequest;
import com.fgkj.actions.ActionUtil;
+import com.fgkj.dao.CheckMobile;
import com.fgkj.dto.User;
import com.fgkj.dto.User_inf;
import com.fgkj.dto.Vip_user;
@@ -31,7 +32,7 @@
//System.out.println(source);
User_inf user=(User_inf)ActionUtil.getSession().getAttribute("user");
Vip_user vuser=(Vip_user)ActionUtil.getSession().getAttribute("vip");
- if(source.equals("login.jsp") || source.equals("fuguang") || source.equals("CheckClient.jsp")){
+ if(("login.jsp").equals(source)|| ("loginm.html").equals(source) || ("gx_tieta").equals(source) || ("CheckClient.jsp").equals(source)){
chain.doFilter(req, resp);
}else if(user!=null && !source.equals("navConfig.jsp")){
chain.doFilter(req, resp);
@@ -40,7 +41,12 @@
}else{
//System.out.println("杩樻湭鐧婚檰璇风櫥闄� LoginFilter");
PrintWriter out=ActionUtil.getOut();
- out.print("<script charset='UTF-8'>window.location.href='login.jsp'</script>");
+ //鍒ゆ柇褰撳墠鐧婚檰鐨勬槸鎵嬫満绔繕鏄痺eb绔�
+ if(CheckIsMobile(request)){
+ out.print("<script charset='UTF-8'>window.location.href='loginm.html'</script>");
+ }else{
+ out.print("<script charset='UTF-8'>window.location.href='login.jsp'</script>");
+ }
//out.print("<script charset='UTF-8'>alert('"+getText("You are not logged in, please log in")+"');window.location.href='login.jsp'</script>");
}
}
@@ -49,4 +55,12 @@
//System.out.println("鍒濆鍖栬繃婊ゅ櫒");
}
+
+ public static boolean CheckIsMobile(HttpServletRequest request){
+ String userAgent = getRequest().getHeader( "USER-AGENT" ).toLowerCase();
+ if(null == userAgent){
+ userAgent = "";
+ }
+ return CheckMobile.check(userAgent);
+ }
}
diff --git a/gx_tieta/src/com/fgkj/actions/BattInfAction.java b/gx_tieta/src/com/fgkj/actions/BattInfAction.java
index 947b4f5..833b60f 100644
--- a/gx_tieta/src/com/fgkj/actions/BattInfAction.java
+++ b/gx_tieta/src/com/fgkj/actions/BattInfAction.java
@@ -93,7 +93,15 @@
//System.out.println(result);
return SUCCESS;
}
-
+
+ //娣诲姞鎿嶄綔鏃舵煡璇㈠嚭璁惧id
+ public String searchmaxdev_id(){
+ model = service.searchmaxdev_id();
+ result = ActionUtil.tojson(model);
+ return SUCCESS;
+ }
+
+
public String searchAll() {
model = service.searchAll();
result = ActionUtil.tojson(model);
diff --git a/gx_tieta/src/com/fgkj/actions/Battinf_applyAction.java b/gx_tieta/src/com/fgkj/actions/Battinf_applyAction.java
new file mode 100644
index 0000000..6c63ae6
--- /dev/null
+++ b/gx_tieta/src/com/fgkj/actions/Battinf_applyAction.java
@@ -0,0 +1,45 @@
+package com.fgkj.actions;
+
+import java.util.List;
+
+import com.fgkj.dto.BattInf;
+import com.fgkj.dto.Battinf_apply;
+import com.fgkj.dto.ServiceModel;
+import com.fgkj.services.Battinf_applyService;
+import com.google.gson.reflect.TypeToken;
+
+public class Battinf_applyAction extends ActionUtil{
+
+ private Battinf_applyService service=new Battinf_applyService();
+ private String json;
+ private String result;
+
+
+ //纭鐢宠(澶氭潯)
+ public String update(){
+ List<Battinf_apply> list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<Battinf_apply>>(){}.getType() );
+ ServiceModel model=service.update(list);
+ result=tojson(model);
+ return SUCCESS;
+ }
+ //娣诲姞鐢宠
+ public String add(){
+ List<Battinf_apply> list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<Battinf_apply>>(){}.getType() );
+ ServiceModel model=service.add(list);
+ 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 e720d18..2793c0c 100644
--- a/gx_tieta/src/com/fgkj/dao/BaseDAO.java
+++ b/gx_tieta/src/com/fgkj/dao/BaseDAO.java
@@ -202,6 +202,8 @@
public static final int APP_BTS_COMM_TASK=99;
+ public static final int BATTINF_APPLY=100;
+
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 628b621..13eebce 100644
--- a/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java
+++ b/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java
@@ -32,6 +32,7 @@
import com.fgkj.dao.impl.Battalarm_dataDAOImpl;
import com.fgkj.dao.impl.Battalarm_data_historyImpl;
import com.fgkj.dao.impl.BattinfThirdImpl;
+import com.fgkj.dao.impl.Battinf_applyImpl;
import com.fgkj.dao.impl.Battinf_exImpl;
import com.fgkj.dao.impl.BattresdataDAOImpl;
import com.fgkj.dao.impl.Battresdata_infDAOImpl;
@@ -208,6 +209,7 @@
case 97:return new Bts_gprs_stateImpl();
case 98:return new Fbs9100_battparamImpl();
case 99:return new App_bts_comm_taskImpl();
+ case 100:return new Battinf_applyImpl();
default :return null;
}
}
diff --git a/gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java b/gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java
index 5024dc6..20e7edf 100644
--- a/gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java
+++ b/gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java
@@ -5,6 +5,7 @@
import com.fgkj.dao.impl.BattInfImpl;
import com.fgkj.dao.impl.Batt_rtstateDAOImpl;
+import com.fgkj.dao.impl.Battinf_applyImpl;
import com.fgkj.dao.impl.Database_backupImpl;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Database_backup;
@@ -118,7 +119,18 @@
int station_next=station_max+1;
return station_next;
}
-
+ //鏌ヨ褰撳墠鏈�澶х殑dev_id
+ public static int searchmaxdev_id(){
+ int dev_id=0;
+ int devid_inf=(new BattInfImpl()).searchMaxdevId_binf();
+ int devid_apply=(new Battinf_applyImpl()).searchMaxdevId_apply();
+ if(devid_inf>=devid_apply){
+ dev_id=devid_inf+1;
+ }else{
+ dev_id=devid_apply+1;
+ }
+ return dev_id;
+ }
//褰撳battinf琛ㄤ腑鏁版嵁杩涜澧炲垹鏀圭殑鎿嶄綔鏃讹紝鍏堝浠絛b_battinf.tb_battinf
public static boolean backup_battinf(){
boolean en=false;
diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
index 992983c..5b0a86b 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -382,8 +382,7 @@
}
//娣诲姞鐢垫睜缁勬椂鏌ヨ鍑烘渶澶х殑鏈烘埧id鍜岀數姹犵粍id
public int searchMaxId(){
- //,max(battgroupid) as maxb
- String sql="select max(stationid) as stationid_maxs from db_battinf.tb_battinf limit 1";
+ String sql="SELECT GREATEST((select max(StationId) from db_battinf.tb_battinf) ,(select max(StationId) from db_battinf.tb_battinf_apply)) as id";
List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
public List getResults(ResultSet rs) {
@@ -391,10 +390,10 @@
try {
while(rs.next()){
- int maxs=42000000;
+ int maxs=42010000;
//int maxb=1000001;
- if(rs.getString("stationid_maxs") != null){
- maxs=Integer.parseInt(rs.getString("stationid_maxs"));
+ if(rs.getString("id") != null){
+ maxs=Integer.parseInt(rs.getString("id"));
}
/*if(rs.getInt("maxb")!=0){
maxb=rs.getInt("maxb");
@@ -415,6 +414,33 @@
}
return stationid;
}
+ //鏌ヨ鍑哄綋鍓嶅瓨鍦ㄥ唴瀛樹腑鏈�澶х殑璁惧鐨刬d(寰堥噸瑕�**********)
+ public int searchMaxdevId_binf(){
+ String sql="select max(FbsDeviceId) as id from db_battinf.tb_battinf limit 1";
+ List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
+
+ public List getResults(ResultSet rs) {
+ List list=new ArrayList();
+ try {
+ while(rs.next()){
+ int dev_id=0;
+ if(rs.getString("id")!=null){}
+ dev_id=rs.getInt("id");
+ list.add(dev_id);
+ }
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return list;
+ }
+ });
+ int dev_id=0;
+ if(list!=null&&list.size()>0){
+ dev_id=(Integer) list.get(list.size()-1);
+ }
+ return dev_id;
+ }
//鍒ゆ柇鏂板鐨勭數姹犵粍鏄惁瀛樺湪
public List judgeBatt(Object obj){
BattInf binf=(BattInf) obj;
diff --git a/gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java b/gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java
index 49a50f7..a63fb42 100644
--- a/gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java
+++ b/gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java
@@ -752,14 +752,17 @@
//鏌ヨ鍑哄綋鍓嶅瓨鍦ㄥ唴瀛樹腑鏈�澶х殑鐢垫睜缁刬d(寰堥噸瑕�**********)
public int searchMaxBattgroupId(){
- String sql=" select max(BattGroupId) as max_id from db_ram_db.tb_batt_rtstate limit 1";
+ String sql=" SELECT GREATEST((select max(battgroupId) from db_battinf.tb_battinf) ,(select max(battgroupId) from db_battinf.tb_battinf_apply)) as id limit 1";
List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
public List getResults(ResultSet rs) {
List list=new ArrayList();
try {
while(rs.next()){
- int battgroupid=rs.getInt("max_id");
+ int battgroupid=1010000;
+ if(rs.getString("id")!=null){
+ battgroupid=rs.getInt("id");
+ }
list.add(battgroupid);
}
} catch (SQLException e) {
diff --git a/gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java b/gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java
new file mode 100644
index 0000000..5074c64
--- /dev/null
+++ b/gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java
@@ -0,0 +1,312 @@
+package com.fgkj.dao.impl;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import com.fgkj.actions.ActionUtil;
+import com.fgkj.dao.BaseDAO;
+import com.fgkj.dao.BattinfGroupFactory;
+import com.fgkj.dao.CallBack;
+import com.fgkj.dao.DAOHelper;
+import com.fgkj.dao.LimitNumberFactory;
+import com.fgkj.dao.UinfDaoFactory;
+import com.fgkj.db.DBUtil;
+import com.fgkj.dto.BattInf;
+import com.fgkj.dto.Battinf_apply;
+import com.fgkj.dto.Page;
+import com.fgkj.dto.User_inf;
+import com.fgkj.dto.User_log;
+import com.fgkj.services.User_logService;
+
+public class Battinf_applyImpl implements BaseDAO,CallBack{
+
+ public List getResults(ResultSet rs) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ //娣诲姞鐢宠
+ public boolean add(Object obj) {
+ List<Battinf_apply> list=(List<Battinf_apply>) obj;
+ List<User_log> listU=new ArrayList<User_log>();//瀛樻斁user_log
+ ArrayList<String> sql_str=new ArrayList();
+ //鑾峰彇褰撳墠鏈�澶х殑stationid鍜宐attgroupid
+ int maxs=BattinfGroupFactory.searchStationId();
+ int maxb=BattinfGroupFactory.searchMaxBattgroupId();
+ if(list!=null && list.size()>0){
+ for (int i = 0; i < list.size(); i++) {
+ Battinf_apply bapply=list.get(i);
+ /*int uid=((User_inf)ActionUtil.getUser()).getUId();
+ bapply.setApply_uid(uid);*/
+ BattInf binf=bapply.getBinf();
+ //楠岃瘉鏂版坊鍔犵殑鏈烘埧鏄惁瀛樺湪
+ List listS=(new BattInfImpl()).judgeBatt(binf);
+ if(listS!=null&&listS.size()>0){
+ binf.setStationId((String) listS.get(listS.size()-1));
+ }else{
+ binf.setStationId(String.valueOf(maxs));
+ }
+ binf.setBattGroupId(maxb);
+ String sql = "insert into db_battinf.tb_battinf_apply(" +
+ "apply_uid,apply_date,StationId,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp,FbsDeviceIp_YM,FbsDeviceIp_WG,"
+ + "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" +
+ ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone" +
+ ") values("+bapply.getApply_uid()+",'"+DAOHelper.sdf.format(bapply.getApply_date())+"','"+binf.getStationId()+"','"+binf.getStationName()+"','"+binf.getStationName1()+"','"+binf.getStationName2()+"','"+binf.getStationName3()+"','"+binf.getStationName4()+"','"+binf.getStationName5()+
+ "','"+binf.getStationIp()+"',"+binf.getFBSDeviceId()+",'"+binf.getFbsDeviceIp()+"','"+binf.getFbsDeviceIp_YM()+"','"+binf.getFbsDeviceIp_WG()+"','"+binf.getFBSDeviceName()+"',"+binf.getGroupIndexInFBSDevice()+
+ ","+binf.getBattGroupId()+","+binf.getBattGroupNum()+",'"+binf.getBattGroupName()+"',"+binf.getFloatVolLevel()+","+binf.getOfflineVolLevel()+","+binf.getBattFloatCurrent()+
+ ","+binf.getMonCount()+","+binf.getMonCapStd()+","+binf.getMonVolStd()+","+binf.getMonResStd()+","+binf.getMonSerStd()+","+binf.getMonVolLowToAvg()+
+ ",'"+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()+"')";
+
+ if(binf.getStationId().equals(maxs)){
+ maxs++;
+ }
+ maxb++;
+ sql_str.add(sql);
+ /*{
+ String msg=((User_inf)ActionUtil.getUser()).getUId()+"鐢宠娣诲姞"+binf.getStationName()+"鏈烘埧"+binf.getBattGroupId()+"鐢垫睜缁勭殑淇℃伅";
+ User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Increase, msg);
+ listU.add(ulog);
+ }*/
+ }
+ }
+ Boolean bl=false;
+ boolean en=BattinfGroupFactory.backup_battinf();
+ if(en){
+ bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
+ }else{
+ return false;
+ }
+ //(new User_logService()).addPro(listU);//灏嗙敤鎴风殑鎿嶄綔璁板綍涓嬫潵
+
+ return bl;
+ }
+ //纭鐢宠(澶氭潯)
+ public boolean update(Object obj) {
+ List<Battinf_apply> list=(List<Battinf_apply>) obj;
+ List<User_log> listU=new ArrayList<User_log>();//瀛樻斁user_log
+ ArrayList<String> sql_str=new ArrayList();
+ if(list!=null&&list.size()>0){
+ for (int i = 0; i < list.size(); i++) {
+ Battinf_apply bapply=list.get(i);
+ bapply.setConfrim_uid(((User_inf)ActionUtil.getUser()).getUId());
+ BattInf binf=bapply.getBinf();
+ binf.setStation_install(1);
+ String sql_update_apply=" update db_battinf.tb_battinf_apply set confrim_uid="+bapply.getConfrim_uid()+",apply_en=1 where num="+bapply.getNum();
+ sql_str.add(sql_update_apply);
+ String sql_insert_binf="insert into db_battinf.tb_battinf(" +
+ "StationId,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp,FbsDeviceIp_YM,FbsDeviceIp_WG,"
+ + "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" +
+ ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone,Station_install" +
+ ") values('"+binf.getStationId()+"','"+binf.getStationName()+"','"+binf.getStationName1()+"','"+binf.getStationName2()+"','"+binf.getStationName3()+"','"+binf.getStationName4()+"','"+binf.getStationName5()+
+ "','"+binf.getStationIp()+"',"+binf.getFBSDeviceId()+",'"+binf.getFbsDeviceIp()+"','"+binf.getFbsDeviceIp_YM()+"','"+binf.getFbsDeviceIp_WG()+"','"+binf.getFBSDeviceName()+"',"+binf.getGroupIndexInFBSDevice()+
+ ","+binf.getBattGroupId()+","+binf.getBattGroupNum()+",'"+binf.getBattGroupName()+"',"+binf.getFloatVolLevel()+","+binf.getOfflineVolLevel()+","+binf.getBattFloatCurrent()+
+ ","+binf.getMonCount()+","+binf.getMonCapStd()+","+binf.getMonVolStd()+","+binf.getMonResStd()+","+binf.getMonSerStd()+","+binf.getMonVolLowToAvg()+
+ ",'"+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 msg=((User_inf)ActionUtil.getUser()).getUId()+"纭娣诲姞"+binf.getStationName()+"鏈烘埧"+binf.getBattGroupId()+"鐢垫睜缁勭殑淇℃伅";
+ User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
+ listU.add(ulog);
+ }
+ }
+ }
+ Boolean bl=false;
+ boolean en=BattinfGroupFactory.backup_battinf();
+ if(en){
+ bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
+ }else{
+ return false;
+ }
+ (new User_logService()).addPro(listU);//灏嗙敤鎴风殑鎿嶄綔璁板綍涓嬫潵
+ return bl;
+
+ }
+
+ public boolean del(Object obj) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public List searchAll() {
+
+ return null;
+ }
+ //鏌ヨ鍑烘墍鏈夐渶瑕佺‘璁ょ殑鐢宠
+ public List serchByCondition(Object obj) {
+ Battinf_apply bapply=(Battinf_apply) obj;
+ BattInf b=bapply.getBinf();
+ Page page=b.getPage();
+ Connection conn=DBUtil.getConn();
+ String numberSql=" SELECT FOUND_ROWS() number";
+ String sql=" select SQL_CALC_FOUND_ROWS distinct num,apply_uid,confrim_uid,apply_date,apply_en,apply_note,StationId,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FbsDeviceId,FbsDeviceIp_YM,FbsDeviceIp_WG,FbsDeviceIp"+
+ ",FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" +
+ ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone " +
+ " from db_battinf.tb_battinf_apply " +
+ " where apply_en=0 and stationName1 like ? and stationName2 like ? and stationId like ? and stationName5 like ? " +
+ " limit ?,? ";
+ List<Battinf_apply> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+b.getStationName1()+"%","%"+b.getStationName2()+"%","%"+b.getStationId()+"%","%"+b.getStationName5()+"%",(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
+
+ public List getResults(ResultSet rs) {
+ List list=new ArrayList();
+ try {
+ while(rs.next()){
+ Battinf_apply apply=new Battinf_apply();
+ apply.setNum(rs.getInt("num"));
+ apply.setApply_uid(rs.getInt("apply_uid"));
+ apply.setConfrim_uid(rs.getInt("confrim_uid"));
+ apply.setApply_en(rs.getInt("apply_en"));
+ apply.setApply_date(rs.getTimestamp("apply_date"));
+ apply.setApply_note(rs.getString("apply_note"));
+
+ BattInf binf=new BattInf();
+ 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.setGroupIndexInFBSDevice(rs.getInt("groupIndexInFBSDevice"));
+ binf.setBattGroupId(rs.getInt("battGroupId"));
+ binf.setBattGroupNum(rs.getInt("battGroupNum"));
+ binf.setBattGroupName(rs.getString("battGroupName"));
+ 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.setMonVolStd(rs.getFloat("monVolStd"));
+ binf.setMonResStd(rs.getFloat("monResStd"));
+ binf.setMonSerStd(rs.getFloat("monSerStd"));
+ 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.setLoad_curr(rs.getFloat("load_curr"));
+ binf.setInstall_user(rs.getString("install_user"));
+ binf.setDisCurrMax(rs.getFloat("disCurrMax"));
+ binf.setStation_phone(rs.getString("station_phone"));
+
+ apply.setBinf(binf);
+ list.add(apply);
+
+ }
+ } 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;
+ }
+ //鏌ヨ鍑哄綋鍓嶅瓨鍦ㄥ唴瀛樹腑鏈�澶х殑璁惧鐨刬d(寰堥噸瑕�**********)
+ public int searchMaxdevId_apply(){
+ String sql="select max(FbsDeviceId) as id from db_battinf.tb_battinf_apply limit 1";
+ List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
+
+ public List getResults(ResultSet rs) {
+ List list=new ArrayList();
+ try {
+ while(rs.next()){
+ int dev_id=0;
+ if(rs.getString("id")!=null){}
+ dev_id=rs.getInt("id");
+ list.add(dev_id);
+ }
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return list;
+ }
+ });
+ int dev_id=0;
+ if(list!=null&&list.size()>0){
+ dev_id=(Integer) list.get(list.size()-1);
+ }
+ return dev_id;
+ }
+ public List serchByInfo(Object obj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ public static void main(String[] args) throws ParseException {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ Date date1 = sdf.parse("2000-01-01 00:00:00");
+ Date date2 = sdf.parse("2020-01-01 23:59:59");
+ Battinf_applyImpl bimpl=new Battinf_applyImpl();
+ Battinf_apply bapply=new Battinf_apply();
+ bapply.setApply_date(ActionUtil.getSimpDate(date2));
+ bapply.setApply_uid(1002);
+
+
+ BattInf binf=new BattInf();
+ binf.setStationName1("婀栧寳鐪�");
+ binf.setStationName2("姝︽眽甯�");
+ binf.setStationName3("鑽嗛棬甯�");
+ binf.setStationName4("BTS璁惧");
+ binf.setStationName5("閽熺ゥ");
+ binf.setStationId("4011100");
+ binf.setStationIp("");
+ binf.setFBSDeviceId(910001000);
+ binf.setFbsDeviceIp("127.0.0.1");
+ binf.setFbsDeviceIp_YM("255.255.255.0");
+ binf.setFbsDeviceIp_WG("127.0.0.1");
+ binf.setFBSDeviceName("璁惧鍚嶇О");
+ binf.setGroupIndexInFBSDevice(1);
+ binf.setBattGroupId(1000005);
+ binf.setBattGroupNum(2);
+ binf.setBattGroupName("鐢垫睜缁�1");
+ binf.setFloatVolLevel(54f);
+ binf.setOfflineVolLevel(42.9f );
+ binf.setBattFloatCurrent(10f);
+ binf.setMonCount(24);
+ binf.setMonCapStd(300f);
+ binf.setMonVolStd(2f);
+ binf.setMonResStd(0.2f);
+ binf.setMonSerStd(5000f);
+ binf.setMonVolLowToAvg(0.05f );
+ binf.setLoad_curr(15f);
+ binf.setDisCurrMax(39.5f);
+ binf.setStation_phone("12345678912");
+ binf.setBattProducer("");
+ binf.setBattModel("");
+ binf.setBattProductDate(ActionUtil.getSimpDate(date1));
+ binf.setBattInUseDate(ActionUtil.getSimpDate(date2));
+ binf.setInstall_user("");
+
+ Page page=new Page();
+ page.setPageCurr(1);
+ page.setPageSize(10);
+ binf.setPage(page);
+ bapply.setBinf(binf);
+ /*List list=bimpl.serchByCondition(bapply);
+ System.out.println(list.size());*/
+ /*List list=new ArrayList();
+ list.add(bapply);
+ boolean bl=bimpl.add(list);
+ System.err.println(bl);*/
+ int dev_id=BattinfGroupFactory.searchmaxdev_id();
+ System.out.println(dev_id);
+ }
+}
diff --git a/gx_tieta/src/com/fgkj/dto/Battinf_apply.java b/gx_tieta/src/com/fgkj/dto/Battinf_apply.java
new file mode 100644
index 0000000..acc61b7
--- /dev/null
+++ b/gx_tieta/src/com/fgkj/dto/Battinf_apply.java
@@ -0,0 +1,64 @@
+package com.fgkj.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Battinf_apply implements Serializable{
+ private int num;
+ private int apply_uid;
+ private int confrim_uid;
+ private Date apply_date;
+ private int apply_en;
+ private String apply_note;
+ private BattInf binf;
+ public int getNum() {
+ return num;
+ }
+ public void setNum(int num) {
+ this.num = num;
+ }
+ public int getApply_uid() {
+ return apply_uid;
+ }
+ public void setApply_uid(int apply_uid) {
+ this.apply_uid = apply_uid;
+ }
+ public int getConfrim_uid() {
+ return confrim_uid;
+ }
+ public void setConfrim_uid(int confrim_uid) {
+ this.confrim_uid = confrim_uid;
+ }
+ public Date getApply_date() {
+ return apply_date;
+ }
+ public void setApply_date(Date apply_date) {
+ this.apply_date = apply_date;
+ }
+ public int getApply_en() {
+ return apply_en;
+ }
+ public void setApply_en(int apply_en) {
+ this.apply_en = apply_en;
+ }
+ public String getApply_note() {
+ return apply_note;
+ }
+ public void setApply_note(String apply_note) {
+ this.apply_note = apply_note;
+ }
+ public BattInf getBinf() {
+ return binf;
+ }
+ public void setBinf(BattInf binf) {
+ this.binf = binf;
+ }
+ @Override
+ public String toString() {
+ return "Battinf_apply [num=" + num + ", apply_uid=" + apply_uid
+ + ", confrim_uid=" + confrim_uid + ", apply_date=" + apply_date
+ + ", apply_en=" + apply_en + ", apply_note=" + apply_note
+ + ", binf=" + binf + "]";
+ }
+
+}
diff --git a/gx_tieta/src/com/fgkj/services/BattInfServices.java b/gx_tieta/src/com/fgkj/services/BattInfServices.java
index 72477ae..6dcb6f0 100644
--- a/gx_tieta/src/com/fgkj/services/BattInfServices.java
+++ b/gx_tieta/src/com/fgkj/services/BattInfServices.java
@@ -1015,7 +1015,15 @@
model.setMsg("鏌ヨ鎴愬姛!");
return model;
}
- public static void main(String[] args) {
+
+ //娣诲姞鎿嶄綔鏃舵煡璇㈠嚭璁惧id
+ public ServiceModel searchmaxdev_id(){
+ int dev_id=BattinfGroupFactory.searchmaxdev_id();
+ model.setData(dev_id);
+ return model;
+ }
+
+ public static void main(String[] args) {
//new BattInfServices().findMenu();
BattInf b=new BattInf();
//b.setBattGroupId(1000005);
diff --git a/gx_tieta/src/com/fgkj/services/Battinf_applyService.java b/gx_tieta/src/com/fgkj/services/Battinf_applyService.java
new file mode 100644
index 0000000..f174cb7
--- /dev/null
+++ b/gx_tieta/src/com/fgkj/services/Battinf_applyService.java
@@ -0,0 +1,43 @@
+package com.fgkj.services;
+
+import java.util.List;
+
+import com.fgkj.dao.BaseDAO;
+import com.fgkj.dao.BaseDAOFactory;
+import com.fgkj.dto.ServiceModel;
+
+public class Battinf_applyService {
+
+ private ServiceModel model;
+ private BaseDAO dao;
+ public Battinf_applyService() {
+ super();
+ model=new ServiceModel();
+ dao=BaseDAOFactory.getBaseDAO(BaseDAO.BATTINF_APPLY);
+ }
+ //纭鐢宠(澶氭潯)
+ public ServiceModel update(Object obj){
+ boolean bl=dao.update(obj);
+ if(bl){
+ model.setCode(1);
+ model.setMsg("纭鎴愬姛!");
+ }else{
+ model.setCode(0);
+ model.setMsg("纭疄澶辫触!");
+ }
+ return model;
+ }
+
+ //娣诲姞鐢宠
+ public ServiceModel add(Object obj){
+ boolean bl=dao.add(obj);
+ if(bl){
+ model.setCode(1);
+ model.setMsg("纭鎴愬姛!");
+ }else{
+ model.setCode(0);
+ model.setMsg("纭疄澶辫触!");
+ }
+ return model;
+ }
+}
--
Gitblit v1.9.1