From daf105a4c7cfd299d6473939b4d678a3e9f91f23 Mon Sep 17 00:00:00 2001 From: LiJun <LiJun@192.168.10.18> Date: 星期四, 01 十一月 2018 17:37:50 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whyclj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/src/com/fgkj/dao/impl/User_ChartImpl.java | 24 + gx_tieta/WebRoot/batt-life-manage.jsp | 10 gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java | 63 ++++ gx_tieta/WebRoot/dischargeplan.jsp | 148 +++++++++- gx_tieta/src/com/fgkj/actions/User_ChartAction.java | 6 gx_tieta/src/com/fgkj/actions/ram/Fbs9100_sysparamAction.java | 58 ++++ gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java | 2 gx_tieta/src/com/fgkj/services/BattMap_informationService.java | 25 + gx_tieta/WebRoot/taskplan.jsp | 2 gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java | 2 gx_tieta/src/com/fgkj/dto/ram/Fbs9100_sysparam.java | 197 +++++++++++++++ gx_tieta/src/com/fgkj/dao/BaseDAO.java | 2 gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java | 37 ++ gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_setparamImpl.java | 1 gx_tieta/src/com/fgkj/dao/impl/BadBatt_monImpl.java | 4 gx_tieta/src/com/fgkj/dao/FBS9100_ComBase.java | 7 gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_sysparamImpl.java | 162 ++++++++++++ gx_tieta/src/com/fgkj/dto/User_Chart.java | 21 + 18 files changed, 729 insertions(+), 42 deletions(-) diff --git a/gx_tieta/WebRoot/batt-life-manage.jsp b/gx_tieta/WebRoot/batt-life-manage.jsp index 8b93c25..e3b830e 100644 --- a/gx_tieta/WebRoot/batt-life-manage.jsp +++ b/gx_tieta/WebRoot/batt-life-manage.jsp @@ -465,7 +465,7 @@ function searchBattLife(isLoad){ var temp = createSearchParam(); var json = JSON.stringify(temp); - var arrTd = new Array(); + arrTd = new Array(); var load; if(isLoad) { load = layer.load(1); @@ -503,12 +503,12 @@ Page.pageAll = data[data.length-1].page.pageAll; var pageNum=Math.ceil(Page.pageAll/Page.pageSize); $('#total').text(Page.pageAll); - $('#current').text(Page.pageCurr+"/"+pageNum); - createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus); + $('#current').text(Page.pageCurr+"/"+pageNum); } - - } + createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus); + } }); + } //棣栭〉 $('#home').click(function(){ diff --git a/gx_tieta/WebRoot/dischargeplan.jsp b/gx_tieta/WebRoot/dischargeplan.jsp index 5bfa3ad..57748a7 100644 --- a/gx_tieta/WebRoot/dischargeplan.jsp +++ b/gx_tieta/WebRoot/dischargeplan.jsp @@ -20,7 +20,7 @@ <link rel="stylesheet" type="text/css" href="css/dischargeplan_layout.css"> <link rel="stylesheet" type="text/css" href="css/progress.css"> <link rel="stylesheet" type="text/css" href="css/popup.css"> - + <link href="src/css/layui.css" type="text/css" rel="stylesheet"> <!-- 瀵煎叆Echarts鐨刯s鍖� --> <script type="text/javascript" src="js/echarts.js"></script> <!-- 瀵煎叆frame.js --> @@ -42,6 +42,7 @@ <tr class="fWeight"> <td>鐪�</td> <!-- 鐪� --> <td>甯�</td> <!-- 甯� --> + <td>鍖�/鍘�</td> <!-- 鍖�/鍘� --> <td><s:text name="Computer_site"/></td> <!-- 鏈烘埧绔欑偣锛堟垨鏈烘埧璁惧锛� --> <td><s:text name="Battery"/></td> <!-- 钃勭數姹犵粍 --> <td><s:text name="Test"/><s:text name="Status"/></td> <!-- 娴嬭瘯鐘舵�� --> @@ -56,14 +57,13 @@ <select id="city" name="station_name2"></select> </td> <td> - <select id="station_name" name="station_name"> - - </select> + <select id="county" name="station_name5"></select> </td> <td> - <select id="battgroup_name" name="battgroup_name"> - - </select> + <select id="station_name" name="station_name"></select> + </td> + <td> + <select id="battgroup_name" name="battgroup_name"></select> </td> <td> <select id="discharge-state" name="discharge-state"> @@ -167,6 +167,7 @@ <script type="text/javascript" src="js/popup.js"></script> <!-- 瀵煎叆Jquery --> <script type="text/javascript" src="js/jquery-ui.js"></script> + <script type="text/javascript" src="src/layui.all.js"></script> <script type="text/javascript"> var Page = { pageSize:10, //姣忛〉鐨勮鏁� @@ -487,7 +488,7 @@ var formjson; function searchDischarge(){ - loading.showLoading(); + var load = layer.load(1); var jsontemp = $('#search_form').serialize(); if(formjson != jsontemp){ Page.pageCurr = 1; @@ -502,7 +503,7 @@ async:true, dataType:'text', data:"json="+json, - success: function(data){ + success: function(data){ arrTd = new Array(); data = eval('('+data+')'); var model = eval('('+data.result+')'); @@ -546,11 +547,11 @@ $('#page_num').val(Page.pageCurr); //console.info(arrTd); changeTblByStatus(); - loading.hideLoading(); + layer.close(load); } }).error(function(){ noContent.showNoContent("<s:text name='Search'/><s:text name='Fail'/>,<s:text name='Please'/><s:text name='Examine'/><s:text name='Network'/><s:text name='Connect'/>锛�"); //鏌ヨ澶辫触,璇锋鏌ョ綉缁滆繛鎺� - loading.hideLoading(); + layer.close(load); }); } @@ -619,7 +620,9 @@ $('#end-discharge-end-date').val(new Date().format('yyyy-MM-dd')); // 鐪�-甯�-鏈烘埧-鐢垫睜缁� + var filterLoad; $(document).ready(function(){ + filterLoad = layer.load(); //椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷 $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){ data=data.result; @@ -647,10 +650,14 @@ }); // 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯� - function findCity() { + function findCity(isLoad) { var data = { StationName1: $("#station_name1").val() }; + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } // 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競 $.ajax({ type: "post", @@ -675,27 +682,121 @@ }else { $select.text('').html('<option>鏆傛棤鍙祴甯�</option>'); } - findStationNamebyStationname1(); + findCounty(); } }); } + // 鏌ヨ鍖�/鍘� + function findCounty(isLoad) { + var tmp = { + StationName1:$("#station_name1").val(), + StationName2:$("#city").val(), + }; + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } + // 鏌ヨ鍖哄幙 + $.ajax({ + type: 'post', + async: true, + url: "BattInfAction!serchStationName5", + data: "json="+JSON.stringify(tmp), + success:function(data) { + var rs = JSON.parse(data.result); + var $select = $("#county"); + if(rs.code==1){ + var _data = rs.data; + // 鏍规嵁鏁版嵁鏋勯�犵敓鎴愪笅鎷夊垪琛ㄧ殑鏁版嵁 + var optsList = []; + for(var i=0;i<_data.length;i++){ + var __data = _data[i]; + var _attr = { + StationId: __data.StationId + }; + var tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr); + optsList.push(tmp); + } + + // 鏍规嵁鏁版嵁鐢熸垚涓嬫媺鍒楄〃 + createOptions($select, optsList, true); + }else{ + $select.text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>'); + } + findCounty(); + } + }); + } + + // 鏌ヨ鍖�/鍘� + function findCounty(isLoad) { + var tmp = { + StationName1:$("#station_name1").val(), + StationName2:$("#city").val(), + }; + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } + // 鏌ヨ鍖哄幙 + $.ajax({ + type: 'post', + async: true, + url: "BattInfAction!serchStationName5", + data: "json="+JSON.stringify(tmp), + success:function(data) { + var rs = JSON.parse(data.result); + var $select = $("#county"); + if(rs.code==1){ + var _data = rs.data; + // 鏍规嵁鏁版嵁鏋勯�犵敓鎴愪笅鎷夊垪琛ㄧ殑鏁版嵁 + var optsList = []; + for(var i=0;i<_data.length;i++){ + var __data = _data[i]; + var _attr = { + StationId: __data.StationId + }; + var tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr); + optsList.push(tmp); + } + + // 鏍规嵁鏁版嵁鐢熸垚涓嬫媺鍒楄〃 + createOptions($select, optsList, true); + }else{ + $select.text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>'); + } + findStationNamebyStationname1(); + } + }); + } + //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊甯� $('#station_name1').change(function(){ - findCity(); + findCity(true); }); //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 $('#city').change(function(){ - findStationNamebyStationname1(); + findCounty(true); + }); + + //褰撳尯/鍘跨殑鍊煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 + $('#county').change(function(){ + findStationNamebyStationname1(true); }); //鏍规嵁鐪侊紝甯傛煡璇㈢珯鐐� - function findStationNamebyStationname1(){ + function findStationNamebyStationname1(isLoad){ var tmp = { StationName1:$("#station_name1").val(), - StationName2:$("#city").val() + StationName2:$("#city").val(), + StationName5:$("#county").val() }; + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } //var selectvalue=$("#station_name1 option:selected").val(); //alert(selectvalue); $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){ @@ -725,20 +826,24 @@ // 鏍规嵁鏈烘埧鍚嶇О鏌ヨ鐢垫睜缁� $('#station_name').change(function(){ - findserchByBattGroupNamebystationname(); + findserchByBattGroupNamebystationname(true); }); //鏍规嵁鐪侊紝甯傚拰鏈烘埧鏌ヨ钃勭數姹犵粍 - function findserchByBattGroupNamebystationname(){ + function findserchByBattGroupNamebystationname(isLoad){ var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):''; // 鏋勯�犳煡璇㈡潯浠� var tmp = { StationName1:$("#station_name1").val(), StationName2:$("#city").val(), + StationName5:$("#county").val(), StationName: $("#station_name").val(), StationId: stationid }; - + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } $.post("BattInfAction!serchBattByStation","json="+JSON.stringify(tmp),function(data){ data=data.result; //console.info(data); @@ -767,6 +872,8 @@ }else{ $("#battgroup_name").text('').html('<option>鏆傛棤鍙祴钃勭數姹犵粍</option>'); } + + layer.close(filterLoad); }); } @@ -797,6 +904,7 @@ var temp = { binf:{ StationName:$('#station_name').val(), + StationName5:$('#county').val(), StationName2:$('#city').val(), StationName1:$('#station_name1').val(), BattGroupId:$('#battgroup_name').val(), diff --git a/gx_tieta/WebRoot/taskplan.jsp b/gx_tieta/WebRoot/taskplan.jsp index 3c526d6..716de17 100644 --- a/gx_tieta/WebRoot/taskplan.jsp +++ b/gx_tieta/WebRoot/taskplan.jsp @@ -702,7 +702,7 @@ StationName:$('#station_name').val(), StationName2:$('#city').val(), StationName1:$('#station_name1').val(), - StationNmae5:$('#county').val(), + StationName5:$('#county').val(), BattGroupId:$('#battgroup_name').val(), BattProducer:$('#producer').val(), BattInUseDate:$('#startinusedate').val()+" 00:00:00", diff --git a/gx_tieta/src/com/fgkj/actions/User_ChartAction.java b/gx_tieta/src/com/fgkj/actions/User_ChartAction.java index aa7d4c0..bba9c7b 100644 --- a/gx_tieta/src/com/fgkj/actions/User_ChartAction.java +++ b/gx_tieta/src/com/fgkj/actions/User_ChartAction.java @@ -43,6 +43,8 @@ put("devalarm","home_warn.gif"); put("precharge","home_warn.gif"); put("onlinecharge","home_warn.gif"); + put("poff","poff.gif"); + put("install","install.gif"); } }; @@ -160,6 +162,10 @@ uc.setChart_pre_charge(files.get(i)); }else if("onlinecharge".equals(ftype.get(i))){ uc.setChart_online_charge(files.get(i)); + }else if("poff".equals(ftype.get(i))){ + uc.setChart_poff(files.get(i)); + }else if("install".equals(ftype.get(i))){ + uc.setChart_install(files.get(i)); } } diff --git a/gx_tieta/src/com/fgkj/actions/ram/Fbs9100_sysparamAction.java b/gx_tieta/src/com/fgkj/actions/ram/Fbs9100_sysparamAction.java new file mode 100644 index 0000000..fbc0370 --- /dev/null +++ b/gx_tieta/src/com/fgkj/actions/ram/Fbs9100_sysparamAction.java @@ -0,0 +1,58 @@ +package com.fgkj.actions.ram; + +import java.util.List; + +import com.fgkj.actions.ActionUtil; +import com.fgkj.dao.FBS9100_ComBase; +import com.fgkj.dao.UinfDaoFactory; +import com.fgkj.dto.BattInf; +import com.fgkj.dto.ServiceModel; +import com.fgkj.dto.User_log; +import com.fgkj.dto.ram.Fbs9100_setparam; +import com.fgkj.dto.ram.Fbs9100_sysparam; +import com.fgkj.services.User_logService; +import com.fgkj.services.ram.Fbs9100_sysparamService; +import com.google.gson.reflect.TypeToken; + +public class Fbs9100_sysparamAction extends ActionUtil{ + private Fbs9100_sysparamService service=new Fbs9100_sysparamService(); + private User_logService uservice=new User_logService(); + private String json; + private String result; + + //淇敼绯荤粺鍙傛暟 + public String update() { + Fbs9100_sysparam sys = getGson().fromJson(json, Fbs9100_sysparam.class); + ServiceModel model = service.update(sys); + { String msg=""; + if(sys.getNum()==FBS9100_ComBase.CMD_SetDischargeParm){ + msg="淇敼"+sys.getDev_id()+"鐨勮澶囨斁鐢靛弬鏁�"; + }else if(sys.getNum()==FBS9100_ComBase.CMD_Start){ + msg="鍚姩"+sys.getDev_id()+"鐨勮澶囨斁鐢�"; + }else if(sys.getNum()==FBS9100_ComBase.CMD_Stop){ + msg="鍋滄"+sys.getDev_id()+"鐨勮澶囨斁鐢�"; + } + User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg); + uservice.add(ulog);//灏嗙敤鎴风殑鎿嶄綔璁板綍涓嬫潵 + } + result = tojson(model); + return SUCCESS; + } + //鏍规嵁璁惧id鏌ヨ绯荤粺鍙傛暟(涓�瀹氭槸琚鐞嗙殑) + public String serchByCondition(){ + Fbs9100_sysparam sys= getGson().fromJson(json, Fbs9100_sysparam.class); + ServiceModel model = service.serchByCondition(sys); + 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 5bbfbd7..7f82ecf 100644 --- a/gx_tieta/src/com/fgkj/dao/BaseDAO.java +++ b/gx_tieta/src/com/fgkj/dao/BaseDAO.java @@ -194,6 +194,8 @@ public static final int STATIONTRAFFIC=95; + public static final int FBS9100_SYSPARAM=96; + 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 d3fafa5..2c7b294 100644 --- a/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java +++ b/gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java @@ -84,6 +84,7 @@ import com.fgkj.dao.impl.ram.Bts_station_stateImpl; import com.fgkj.dao.impl.ram.Fbs9100_setparamImpl; import com.fgkj.dao.impl.ram.Fbs9100_stateImpl; +import com.fgkj.dao.impl.ram.Fbs9100_sysparamImpl; import com.fgkj.dao.impl.ram.Fbs9100s_dcdc_stateImpl; import com.fgkj.dao.impl.ram.Fbs9100s_dfu_stateImpl; import com.fgkj.dao.impl.ram.Fbs9600_stateImpl; @@ -200,6 +201,7 @@ case 93:return new Battinf_exImpl(); case 94:return new Deverror_recordImpl(); case 95:return new StationtrafficImpl(); + case 96:return new Fbs9100_sysparamImpl(); default :return null; } } diff --git a/gx_tieta/src/com/fgkj/dao/FBS9100_ComBase.java b/gx_tieta/src/com/fgkj/dao/FBS9100_ComBase.java index 1a0ed38..10cd810 100644 --- a/gx_tieta/src/com/fgkj/dao/FBS9100_ComBase.java +++ b/gx_tieta/src/com/fgkj/dao/FBS9100_ComBase.java @@ -29,6 +29,13 @@ //FBS9600S璁惧鍐呴樆娴嬭瘯鐨勫惎鍔ㄥ懡浠� final public static int CMD_9600_Start=1; + //绯荤粺鍙傛暟鍛戒护 + public static final int CMD_GetSYSSetParamAck = 0x7E; //126 + public static final int CMD_SetSYSSetParamAck = 0x7F; //127 + public static final int CMD_GetSYSSetParam = 0x80;//鑾峰彇绯荤粺鍙傛暟128 + public static final int CMD_SetSYSSetParam = 0x81;//璁剧疆绯荤粺鍙傛暟129 + public static final int CMD_ResetSystemAck = 0x0F;//15 + public static final int CMD_ResetSystem = 0x10;//閲嶅惎16 //6185璁惧宸ヤ綔鐘舵�佸搴斿叧绯粀orkstate final public static int DEV_ONLINE_CHARGE=0; //鍦ㄧ嚎娴厖 diff --git a/gx_tieta/src/com/fgkj/dao/impl/BadBatt_monImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BadBatt_monImpl.java index a146e85..0d3825a 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/BadBatt_monImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/BadBatt_monImpl.java @@ -397,6 +397,8 @@ binf.setBattInUseDate1(ActionUtil.getSimpDate(date2)); binf.setStationName1(""); binf.setStationName(""); + binf.setStationName2(""); + binf.setStationName5(""); binf.setBattGroupId(0); binf.setBattProducer(""); Page page=new Page(); @@ -410,7 +412,7 @@ bmd.setUinf(uinf); List<Batt_Maint_Dealarm> list=bimpl.serchByInfo(bmd); for (Batt_Maint_Dealarm b : list) { - System.out.println(b.getBdmon()); + System.out.println(b); } } diff --git a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java index 86a25ad..2eae987 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java @@ -3747,7 +3747,7 @@ " from db_battinf.tb_battinf " + " left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " + " on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " + - " where stationname2 like ? stationname5 like ? "; + " where stationname2 like ? and stationname5 like ? "; //鐢ㄦ埛绠$悊 String userSql=" and StationId in(" + " select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id and db_user.tb_user_battgroup_baojigroup_usr.uId=?" + diff --git a/gx_tieta/src/com/fgkj/dao/impl/User_ChartImpl.java b/gx_tieta/src/com/fgkj/dao/impl/User_ChartImpl.java index a0d5804..7ad91cd 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/User_ChartImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/User_ChartImpl.java @@ -53,7 +53,9 @@ list.add(uchart.getChart_dev_alarm()); list.add(uchart.getChart_pre_charge()); list.add(uchart.getChart_online_charge()); - String sql="insert into web_site.tb_user_Chart(chart_name,chart_file,Chart_logo,Chart_normal,Chart_behind,Chart_warn,Chart_timeout,Chart_nuclear_cap,Chart_dev_alarm,Chart_pre_charge,Chart_online_charge) values(?,?,?,?,?,?,?,?,?,?,?)"; + list.add(uchart.getChart_poff()); + list.add(uchart.getChart_install()); + String sql="insert into web_site.tb_user_Chart(chart_name,chart_file,Chart_logo,Chart_normal,Chart_behind,Chart_warn,Chart_timeout,Chart_nuclear_cap,Chart_dev_alarm,Chart_pre_charge,Chart_online_charge,Chart_poff,Chart_install) values(?,?,?,?,?,?,?,?,?,?,?,?,?)"; boolean bl=DAOHelper.executeUpdatePicture(DBUtil.getConn(), sql, list); return bl; } @@ -143,8 +145,26 @@ list.add(uchart.getChart_online_charge()); sql+=online_chargeSql; } + //Chart_poff鍥剧墖 + String poffSql=" Chart_poff=? "; + if(uchart.getChart_poff()!=null&&uchart.getChart_poff().length()>0){ + if(list.size()>0){ + sql+=","; + } + list.add(uchart.getChart_poff()); + sql+=poffSql; + } + //Chart_install鍥剧墖 + String installSql=" Chart_install=? "; + if(uchart.getChart_install()!=null&&uchart.getChart_install().length()>0){ + if(list.size()>0){ + sql+=","; + } + list.add(uchart.getChart_install()); + sql+=installSql; + } //endSql - String endSql=" where chart_file=?"; + String endSql=" where chart_file=? "; list.add(uchart.getChart_file()); sql+=endSql; //System.out.println(list.size()+" "+sql); diff --git a/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java b/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java index 11ae092..d4b99ab 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/ram/Bts_station_stateImpl.java @@ -13,6 +13,7 @@ import com.fgkj.dao.UinfDaoFactory; import com.fgkj.db.DBUtil; import com.fgkj.dto.BattInf; +import com.fgkj.dto.BattMap_information; import com.fgkj.dto.Page; import com.fgkj.dto.User_inf; import com.fgkj.dto.ram.Bts_station_state; @@ -209,6 +210,35 @@ } return nums; } + //鏌ヨ褰撳墠鏈烘埧鍋滅數鏁�(鏍规嵁station_id ) + public int serchByStationId(Object obj) { + BattMap_information binformation=(BattMap_information) obj; + String sql="select count(num) as nums from db_ram_db.tb_bts_station_state " + + " where station_stat&2>1 " + + " and station_id=? " + + " limit 1 "; + //System.out.println(sql); + List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binformation.getStationId()}, new CallBack() { + + public List getResults(ResultSet rs) { + List list=new ArrayList(); + try { + while(rs.next()){ + int nums=rs.getInt("nums"); + list.add(nums); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return list; + } + }); + int nums=0;//鏈�鍚庣殑缁撴灉 + if(list!=null&&list.size()>0){ + nums=(Integer) list.get(list.size()-1); + } + return nums; + } public List serchByInfo(Object obj) { // TODO Auto-generated method stub return null; @@ -233,8 +263,11 @@ //System.out.println(bs.getStation_stat_diaozhan()+" "+bs.getStation_stat_dooropen()+" "+bs.getStation_stat_fadian()+" "+bs.getStation_stat_xuhang()+" "+bs.getStation_stat_poff()); System.out.println(bs); } - /*int nums=bimpl.serchByState(uinf); - System.out.println(nums);*/ + /*int nums=bimpl.serchByState(uinf);*/ + BattMap_information bm=new BattMap_information(); + bm.setStationId("42000570"); + int nums=bimpl.serchByStationId(bm); + System.out.println(nums); } diff --git a/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_setparamImpl.java b/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_setparamImpl.java index f291d52..2afd9ac 100644 --- a/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_setparamImpl.java +++ b/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_setparamImpl.java @@ -244,6 +244,7 @@ case FBS9100_ComBase.CMD_GetDischargeParm: m_cmd_ack = FBS9100_ComBase.CMD_GetDischargeParmAck; break; case FBS9100_ComBase.CMd_SetIp_Tem: m_cmd_ack = FBS9100_ComBase.CMd_SetIpAck; break; case FBS9100_ComBase.CMd_SetIp_Per: m_cmd_ack = FBS9100_ComBase.CMd_SetIpAck; break; + case FBS9100_ComBase.CMD_ResetSystem: m_cmd_ack = FBS9100_ComBase.CMD_ResetSystemAck; break; default: return false; } String sql_end = ""; diff --git a/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_sysparamImpl.java b/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_sysparamImpl.java new file mode 100644 index 0000000..35b55ed --- /dev/null +++ b/gx_tieta/src/com/fgkj/dao/impl/ram/Fbs9100_sysparamImpl.java @@ -0,0 +1,162 @@ +package com.fgkj.dao.impl.ram; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.fgkj.dao.BaseDAO; +import com.fgkj.dao.CallBack; +import com.fgkj.dao.DAOHelper; +import com.fgkj.dao.FBS9100_ComBase; +import com.fgkj.db.DBUtil; +import com.fgkj.dto.ram.Fbs9100_sysparam; + +public class Fbs9100_sysparamImpl implements BaseDAO,CallBack{ + + public List getResults(ResultSet rs) { + // TODO Auto-generated method stub + return null; + } + + public boolean add(Object obj) { + // TODO Auto-generated method stub + return false; + } + //淇敼绯荤粺鍙傛暟 + public boolean update(Object obj) { + Fbs9100_sysparam sys=(Fbs9100_sysparam) obj; + String sql=" update db_ram_db.tb_fbs9100_sysparam set IPADDR=?,SubIPADDR=?,NetGateADDR=?,GroupVolRange=?,GroupVolSorce=?,CurrentRange=?,CurrentTyte=?,MonomerOrder=?,BackLightTime=?" + + ",MACADDR=?,LoaderCount=?,DtCardCount=?,PowerBreakChargeCurr=?,MajorBattGroupNum=?,POF_BG_Boost_Cnt=?,POF_BG_Boost_VolStop=?,POF_BG_Boost_VolStart=? " + + "where dev_id=? "; + boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{sys.getIPADDR(),sys.getSubIPADDR(),sys.getNetGateADDR(),sys.getGroupVolRange(),sys.getGroupVolSorce(),sys.getCurrentRange(),sys.getCurrentTyte(),sys.getMonomerOrder(),sys.getBackLightTime() + ,sys.getMACADDR(),sys.getLoaderCount(),sys.getDtCardCount(),sys.getPowerBreakChargeCurr(),sys.getMajorBattGroupNum(),sys.getPOF_BG_Boost_Cnt(),sys.getPOF_BG_Boost_VolStop(),sys.getPOF_BG_Boost_VolStart(),sys.getDev_id()}); + return bl; + } + + public boolean del(Object obj) { + // TODO Auto-generated method stub + return false; + } + + public List searchAll() { + // TODO Auto-generated method stub + return null; + } + //鏍规嵁璁惧id鏌ヨ绯荤粺鍙傛暟(涓�瀹氭槸琚鐞嗙殑) + public List serchByCondition(Object obj) { + Fbs9100_sysparam sys=(Fbs9100_sysparam) obj; + String sql=" select distinct dev_ip,dev_id,op_cmd,IPADDR,SubIPADDR,NetGateADDR,GroupVolRange,GroupVolSorce,CurrentRange,CurrentTyte,MonomerOrder,BackLightTime" + + " ,MACADDR,LoaderCount,DtCardCount,PowerBreakChargeCurr,MajorBattGroupNum,POF_BG_Boost_Cnt,POF_BG_Boost_VolStop,POF_BG_Boost_VolStart" + + " ,db_battinf.tb_battinf.FBSDeviceName,db_battinf.tb_battinf.StationName " + + " from db_ram_db.tb_fbs9100_sysparam,db_battinf.tb_battinf " + + " where db_ram_db.tb_fbs9100_sysparam.dev_id=db_battinf.tb_battinf.FBSDeviceId " + + " and db_ram_db.tb_fbs9100_sysparam.dev_id=? " ; + List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{sys.getDev_id()}, new CallBack() { + + public List getResults(ResultSet rs) { + List list=new ArrayList(); + try { + while(rs.next()){ + Fbs9100_sysparam fbs_sys=new Fbs9100_sysparam(); + fbs_sys.setDev_ip(rs.getString("dev_ip")); + fbs_sys.setDev_id(rs.getInt("dev_id")); + fbs_sys.setOp_cmd(rs.getInt("op_cmd")); + fbs_sys.setIPADDR(rs.getString("iPADDR")); + fbs_sys.setSubIPADDR(rs.getString("subIPADDR")); + fbs_sys.setNetGateADDR(rs.getString("netGateADDR")); + fbs_sys.setGroupVolRange(rs.getInt("groupVolRange")); + fbs_sys.setGroupVolSorce(rs.getInt("groupVolSorce")); + fbs_sys.setCurrentRange(rs.getInt("currentRange")); + fbs_sys.setCurrentTyte(rs.getInt("currentTyte")); + fbs_sys.setMonomerOrder(rs.getInt("monomerOrder")); + fbs_sys.setBackLightTime(rs.getInt("backLightTime")); + fbs_sys.setMACADDR(rs.getString("mACADDR")); + fbs_sys.setLoaderCount(rs.getInt("loaderCount")); + fbs_sys.setDtCardCount(rs.getInt("dtCardCount")); + fbs_sys.setPowerBreakChargeCurr(rs.getFloat("powerBreakChargeCurr")); + fbs_sys.setMajorBattGroupNum(rs.getInt("majorBattGroupNum")); + fbs_sys.setPOF_BG_Boost_Cnt(rs.getInt("pOF_BG_Boost_Cnt")); + fbs_sys.setPOF_BG_Boost_VolStop(rs.getFloat("pOF_BG_Boost_VolStop")); + fbs_sys.setPOF_BG_Boost_VolStart(rs.getFloat("pOF_BG_Boost_VolStart")); + fbs_sys.setFBSDeviceName(rs.getString("FBSDeviceName")); + fbs_sys.setStationName(rs.getString("stationName")); + list.add(fbs_sys); + } + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return list; + } + }); + return list; + } + //绯荤粺鍙傛暟鍛戒护鎿嶄綔璁惧鏃剁殑cmd鍜宎ck鏍¢獙 + public boolean sendCmdToFBS9100Dev(int cmd,int dev_id) + { + int m_cmd = cmd; + int m_cmd_ack = cmd; + switch(m_cmd) { + case FBS9100_ComBase.CMD_GetSYSSetParam: m_cmd_ack = FBS9100_ComBase.CMD_GetSYSSetParamAck; break; + case FBS9100_ComBase.CMD_SetSYSSetParam: m_cmd_ack = FBS9100_ComBase.CMD_SetSYSSetParamAck; break; + default: return false; + } + boolean res_exe = false; + String sql = "UPDATE db_ram_db.tb_fbs9100_sysparam SET " + + " op_cmd=? " + + " WHERE dev_id=? "; + Boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{m_cmd,dev_id}); + if(true == bl) + { + sql = "SELECT op_cmd FROM db_ram_db.tb_fbs9100_sysparam "+ + " WHERE dev_id="+dev_id; + Connection conn=DBUtil.getConn(); + PreparedStatement ps = null; + ResultSet rs = null; + for(int n=0; n<20; n++) + { + try { + ps = conn.prepareStatement(sql); + rs=ps.executeQuery(); + if(rs.next()) + { + if(rs.getInt("op_cmd") == m_cmd_ack) + { + res_exe = true; + break; + } + } + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + try { + Thread.sleep(250); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + DBUtil.close(rs, ps, conn); + } + return res_exe; + } + public List serchByInfo(Object obj) { + // TODO Auto-generated method stub + return null; + } + + public static void main(String[] args) { + Fbs9100_sysparamImpl fimpl=new Fbs9100_sysparamImpl(); + Fbs9100_sysparam sys=new Fbs9100_sysparam(); + sys.setDev_id(910000011); + List list=fimpl.serchByCondition(sys); + System.out.println(list.size()); + } + +} diff --git a/gx_tieta/src/com/fgkj/dto/User_Chart.java b/gx_tieta/src/com/fgkj/dto/User_Chart.java index ecc3d15..0a45174 100644 --- a/gx_tieta/src/com/fgkj/dto/User_Chart.java +++ b/gx_tieta/src/com/fgkj/dto/User_Chart.java @@ -14,6 +14,8 @@ private File Chart_behind; private File Chart_warn; private File Chart_timeout; + private File Chart_poff; //鍋滅數 + private File Chart_install;//鏈坊鍔犵殑鍥炬爣 private File Chart_nuclear_cap;//鏍稿鏀剧數 private File Chart_dev_alarm;//璁惧鍛婅 @@ -136,14 +138,28 @@ public void setChart_timeout_blob(Blob chart_timeout_blob) { Chart_timeout_blob = chart_timeout_blob; } + public File getChart_poff() { + return Chart_poff; + } + public void setChart_poff(File chart_poff) { + Chart_poff = chart_poff; + } + public File getChart_install() { + return Chart_install; + } + public void setChart_install(File chart_install) { + Chart_install = chart_install; + } @Override public String toString() { return "User_Chart [num=" + num + ", Chart_name=" + Chart_name + ", Chart_file=" + Chart_file + ", Chart_logo=" + Chart_logo + ", Chart_normal=" + Chart_normal + ", Chart_behind=" + Chart_behind + ", Chart_warn=" + Chart_warn - + ", Chart_timeout=" + Chart_timeout + ", Chart_nuclear_cap=" - + Chart_nuclear_cap + ", Chart_dev_alarm=" + Chart_dev_alarm + + ", Chart_timeout=" + Chart_timeout + ", Chart_poff=" + + Chart_poff + ", Chart_install=" + Chart_install + + ", Chart_nuclear_cap=" + Chart_nuclear_cap + + ", Chart_dev_alarm=" + Chart_dev_alarm + ", Chart_pre_charge=" + Chart_pre_charge + ", Chart_online_charge=" + Chart_online_charge + ", Chart_logo_blob=" + Chart_logo_blob @@ -154,4 +170,5 @@ } + } diff --git a/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_sysparam.java b/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_sysparam.java new file mode 100644 index 0000000..946e175 --- /dev/null +++ b/gx_tieta/src/com/fgkj/dto/ram/Fbs9100_sysparam.java @@ -0,0 +1,197 @@ +package com.fgkj.dto.ram; + +import java.io.Serializable; + +public class Fbs9100_sysparam implements Serializable{ + private int num; + private String dev_ip; + private int dev_id; + private int op_cmd; + private String IPADDR; + private String SubIPADDR; + private String NetGateADDR; + private int GroupVolRange; + private int GroupVolSorce; + private int CurrentRange; + private int CurrentTyte; + private int MonomerOrder; + private int BackLightTime; + private String MACADDR; + private int LoaderCount; + private int DtCardCount; + private float PowerBreakChargeCurr; + private int MajorBattGroupNum; + private int POF_BG_Boost_Cnt; + private float POF_BG_Boost_VolStop; + private float POF_BG_Boost_VolStart; + private String stationName; + private String FBSDeviceName; + private String note; + public int getNum() { + return num; + } + public void setNum(int num) { + this.num = num; + } + public String getDev_ip() { + return dev_ip; + } + public void setDev_ip(String dev_ip) { + this.dev_ip = dev_ip; + } + public int getDev_id() { + return dev_id; + } + public void setDev_id(int dev_id) { + this.dev_id = dev_id; + } + public int getOp_cmd() { + return op_cmd; + } + public void setOp_cmd(int op_cmd) { + this.op_cmd = op_cmd; + } + public String getIPADDR() { + return IPADDR; + } + public void setIPADDR(String iPADDR) { + IPADDR = iPADDR; + } + public String getSubIPADDR() { + return SubIPADDR; + } + public void setSubIPADDR(String subIPADDR) { + SubIPADDR = subIPADDR; + } + public String getNetGateADDR() { + return NetGateADDR; + } + public void setNetGateADDR(String netGateADDR) { + NetGateADDR = netGateADDR; + } + public int getGroupVolRange() { + return GroupVolRange; + } + public void setGroupVolRange(int groupVolRange) { + GroupVolRange = groupVolRange; + } + public int getGroupVolSorce() { + return GroupVolSorce; + } + public void setGroupVolSorce(int groupVolSorce) { + GroupVolSorce = groupVolSorce; + } + public int getCurrentRange() { + return CurrentRange; + } + public void setCurrentRange(int currentRange) { + CurrentRange = currentRange; + } + public int getCurrentTyte() { + return CurrentTyte; + } + public void setCurrentTyte(int currentTyte) { + CurrentTyte = currentTyte; + } + public int getMonomerOrder() { + return MonomerOrder; + } + public void setMonomerOrder(int monomerOrder) { + MonomerOrder = monomerOrder; + } + public int getBackLightTime() { + return BackLightTime; + } + public void setBackLightTime(int backLightTime) { + BackLightTime = backLightTime; + } + public String getMACADDR() { + return MACADDR; + } + public void setMACADDR(String mACADDR) { + MACADDR = mACADDR; + } + public int getLoaderCount() { + return LoaderCount; + } + public void setLoaderCount(int loaderCount) { + LoaderCount = loaderCount; + } + public int getDtCardCount() { + return DtCardCount; + } + public void setDtCardCount(int dtCardCount) { + DtCardCount = dtCardCount; + } + public float getPowerBreakChargeCurr() { + return PowerBreakChargeCurr; + } + public void setPowerBreakChargeCurr(float powerBreakChargeCurr) { + PowerBreakChargeCurr = powerBreakChargeCurr; + } + public int getMajorBattGroupNum() { + return MajorBattGroupNum; + } + public void setMajorBattGroupNum(int majorBattGroupNum) { + MajorBattGroupNum = majorBattGroupNum; + } + public int getPOF_BG_Boost_Cnt() { + return POF_BG_Boost_Cnt; + } + public void setPOF_BG_Boost_Cnt(int pOF_BG_Boost_Cnt) { + POF_BG_Boost_Cnt = pOF_BG_Boost_Cnt; + } + public float getPOF_BG_Boost_VolStop() { + return POF_BG_Boost_VolStop; + } + public void setPOF_BG_Boost_VolStop(float pOF_BG_Boost_VolStop) { + POF_BG_Boost_VolStop = pOF_BG_Boost_VolStop; + } + public float getPOF_BG_Boost_VolStart() { + return POF_BG_Boost_VolStart; + } + public void setPOF_BG_Boost_VolStart(float pOF_BG_Boost_VolStart) { + POF_BG_Boost_VolStart = pOF_BG_Boost_VolStart; + } + public String getStationName() { + return stationName; + } + public void setStationName(String stationName) { + this.stationName = stationName; + } + + public String getNote() { + return note; + } + public void setNote(String note) { + this.note = note; + } + public String getFBSDeviceName() { + return FBSDeviceName; + } + public void setFBSDeviceName(String fBSDeviceName) { + FBSDeviceName = fBSDeviceName; + } + @Override + public String toString() { + return "Fbs9100_sysparam [num=" + num + ", dev_ip=" + dev_ip + + ", dev_id=" + dev_id + ", op_cmd=" + op_cmd + ", IPADDR=" + + IPADDR + ", SubIPADDR=" + SubIPADDR + ", NetGateADDR=" + + NetGateADDR + ", GroupVolRange=" + GroupVolRange + + ", GroupVolSorce=" + GroupVolSorce + ", CurrentRange=" + + CurrentRange + ", CurrentTyte=" + CurrentTyte + + ", MonomerOrder=" + MonomerOrder + ", BackLightTime=" + + BackLightTime + ", MACADDR=" + MACADDR + ", LoaderCount=" + + LoaderCount + ", DtCardCount=" + DtCardCount + + ", PowerBreakChargeCurr=" + PowerBreakChargeCurr + + ", MajorBattGroupNum=" + MajorBattGroupNum + + ", POF_BG_Boost_Cnt=" + POF_BG_Boost_Cnt + + ", POF_BG_Boost_VolStop=" + POF_BG_Boost_VolStop + + ", POF_BG_Boost_VolStart=" + POF_BG_Boost_VolStart + + ", stationName=" + stationName + ", FBSDeviceName=" + + FBSDeviceName + ", note=" + note + "]"; + } + + + +} diff --git a/gx_tieta/src/com/fgkj/services/BattMap_informationService.java b/gx_tieta/src/com/fgkj/services/BattMap_informationService.java index d231680..6e46763 100644 --- a/gx_tieta/src/com/fgkj/services/BattMap_informationService.java +++ b/gx_tieta/src/com/fgkj/services/BattMap_informationService.java @@ -14,6 +14,7 @@ import com.fgkj.dao.impl.BattMap_informationImpl; import com.fgkj.dao.impl.Batt_rtstateDAOImpl; import com.fgkj.dao.impl.Battalarm_dataDAOImpl; +import com.fgkj.dao.impl.ram.Bts_station_stateImpl; import com.fgkj.dao.impl.ram.Fbs9100_stateImpl; import com.fgkj.db.DBUtil; import com.fgkj.dto.BattInf; @@ -107,6 +108,7 @@ int numBadBatt=0; int numAlarm=0; int numPlan=0; + int numPoff=0; if(list!=null&&list.size()>0){ for(int i=0;i<list.size();i++){ state="item-normal"; @@ -117,25 +119,32 @@ binf.setFBSDeviceId(binformation.getFBSDeviceId()); state=(new Fbs9100_stateImpl().seachDevNow(binf)); }else{ + numPoff=(new Bts_station_stateImpl()).serchByStationId(binformation); //鍋滅數鏁� numBadBatt=(new BadBatt_monImpl()).serchByStationId(binformation); //钀藉悗鎬绘暟 numAlarm=(new Battalarm_dataDAOImpl()).serchByStationId(binformation); //鍛婅鎬绘暟 numPlan=(new BattDischarge_planImpl()).serchByStationId(binformation); //寤惰繜鎬绘暟 - if(numBadBatt>0){ - state="item-behind"; //钀藉悗鏈烘埧 + if(numPoff>0){ + state="item-poff"; //鍋滅數 }else{ - if(numAlarm > 0){ - state="item-warn"; //鍛婅鏈烘埧 + if(numBadBatt>0){ + state="item-behind"; //钀藉悗鏈烘埧 }else{ - if(numPlan > 0){ - state="item-timeout"; //寤惰繜鏈烘埧 + if(numAlarm > 0){ + state="item-warn"; //鍛婅鏈烘埧 + }else{ + if(numPlan > 0){ + state="item-timeout"; //寤惰繜鏈烘埧 + } } } } + } if("0".equals(list.get(i).getInformation())){ - state=""; //鑻ユ満鎴挎湭瀹夎灏嗘寚瀹氱殑鏈烘埧璁剧疆鎴愮伆鑹茬殑 + state="item-install"; //鑻ユ満鎴挎湭瀹夎灏嗘寚瀹氱殑鏈烘埧璁剧疆鎴愮伆鑹茬殑 } - model.setData(list.get(i)); + model.setData(list.get(i)); + model.setMsgO(String.valueOf(numPoff)); //鍋滅數鏁� model.setCode(numAlarm); //鍛婅鎬绘暟 model.setSum(numBadBatt); //钀藉悗鎬绘暟 model.setNewsum(numPlan); //寤舵椂鎬绘暟 diff --git a/gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java b/gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java new file mode 100644 index 0000000..476d997 --- /dev/null +++ b/gx_tieta/src/com/fgkj/services/ram/Fbs9100_sysparamService.java @@ -0,0 +1,63 @@ +package com.fgkj.services.ram; + +import java.util.ArrayList; +import java.util.List; + +import com.fgkj.dao.BaseDAO; +import com.fgkj.dao.BaseDAOFactory; +import com.fgkj.dao.FBS9100_ComBase; +import com.fgkj.dao.impl.ram.Fbs9100_setparamImpl; +import com.fgkj.dao.impl.ram.Fbs9100_sysparamImpl; +import com.fgkj.dto.ServiceModel; +import com.fgkj.dto.ram.Fbs9100_sysparam; + +public class Fbs9100_sysparamService { + private BaseDAO dao; + private ServiceModel model; + + public Fbs9100_sysparamService() { + super(); + dao=BaseDAOFactory.getBaseDAO(BaseDAO.FBS9100_SYSPARAM); + model=new ServiceModel(); + } + //淇敼绯荤粺鍙傛暟 + public ServiceModel update(Object obj) { + Fbs9100_sysparam fbs_sys=(Fbs9100_sysparam) obj; + Boolean b=dao.update(obj); + boolean bl=false; + if(b){ + if(fbs_sys.getNum()==FBS9100_ComBase.CMD_ResetSystem){//閲嶅惎 + bl=(new Fbs9100_setparamImpl()).sendCmdToFBS9100Dev(fbs_sys.getNum(),0, fbs_sys.getDev_id()); + }else{ + bl=((Fbs9100_sysparamImpl)dao).sendCmdToFBS9100Dev(fbs_sys.getNum(), fbs_sys.getDev_id()); + } + if(bl){ + model.setCode(1); + model.setMsg("淇敼鎴愬姛!"); + }else{ + model.setCode(0); + model.setMsg("璁剧疆9100鍙傛暟澶辫触,璇锋鏌ョ綉缁�!"); + } + }else{ + model.setCode(0); + model.setMsg("淇敼澶辫触!"); + } + return model; + } + + //鏍规嵁璁惧id鏌ヨ绯荤粺鍙傛暟(涓�瀹氭槸琚鐞嗙殑) + public ServiceModel serchByCondition(Object obj){ + List list = dao.serchByCondition(obj); + if(list!=null && list.size()>0){ + model.setCode(1); + model.setData(list); + model.setMsg("鏌ヨ鎴愬姛!"); + }else{ + model.setCode(0); + model.setMsg("鏌ヨ澶辫触!"); + } + return model; + } + + +} -- Gitblit v1.9.1