Commit 8fc4920c authored by wangjinjing's avatar wangjinjing

修复监控在线不在线统计方法

parent b2b4c081
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>impyw</display-name> <display-name>impnhyw</display-name>
<welcome-file-list> <welcome-file-list>
<welcome-file>index.jsp</welcome-file> <welcome-file>index.jsp</welcome-file>
</welcome-file-list> </welcome-file-list>
...@@ -39,6 +39,14 @@ ...@@ -39,6 +39,14 @@
<filter-name>AppSessionOutFilter</filter-name> <filter-name>AppSessionOutFilter</filter-name>
<filter-class>cn.base.filter.AppSessionOutFilter</filter-class> <filter-class>cn.base.filter.AppSessionOutFilter</filter-class>
</filter> </filter>
<filter-mapping>
<filter-name>AppSessionOutFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>AppSessionOutFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter> <filter>
<filter-name>struts2</filter-name> <filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
......
...@@ -129,23 +129,23 @@ ...@@ -129,23 +129,23 @@
} }
// function uuid() {
// return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c = > (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16);
// )
// }
function uuid() { function uuid() {
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c = > (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16); var s = [];
) var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
} }
s[14] = "4";
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join("");
// function uuid() { return uuid;
// var s = []; }
// var hexDigits = "0123456789abcdef";
// for (var i = 0; i < 36; i++) {
// s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
// }
// s[14] = "4";
// s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
// s[8] = s[13] = s[18] = s[23] = "-";
//
// var uuid = s.join("");
// return uuid;
// }
</script> </script>
\ No newline at end of file
...@@ -51,7 +51,7 @@ function getQueryParams(){ ...@@ -51,7 +51,7 @@ function getQueryParams(){
}else if(chosed[i]=="2"){ }else if(chosed[i]=="2"){
currentstate += " or a.networkerror=1 "; currentstate += " or a.networkerror=1 ";
}else if(chosed[i]=="3"){ }else if(chosed[i]=="3"){
currentstate += " or a.isonline=1 "; currentstate += " or ( a.isonline is not null and a.isonline!=0 )";
}else if(chosed[i]=="4"){ }else if(chosed[i]=="4"){
currentstate += " or a.vqcstate=1 "; currentstate += " or a.vqcstate=1 ";
}else if(chosed[i]=="5"){ }else if(chosed[i]=="5"){
...@@ -61,7 +61,7 @@ function getQueryParams(){ ...@@ -61,7 +61,7 @@ function getQueryParams(){
} }
} }
if (currentstate == "1") { if (currentstate == "1") {
sParam.tableparam = " and a.isonline=1 "; sParam.tableparam = " and a.isonline is not null and a.isonline!=0 ";
}else{ }else{
if(currentstate!=""){ if(currentstate!=""){
sParam.tableparam = " and ("+currentstate.substr(3)+") "; sParam.tableparam = " and ("+currentstate.substr(3)+") ";
...@@ -335,7 +335,7 @@ function initCacheStatus(){ ...@@ -335,7 +335,7 @@ function initCacheStatus(){
} }
function transStatus(data){ function transStatus(data){
if(data=="1"){ if(data!="0"){
return "<div style='height:13px;width:13px;background-color:#60b631;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>"; return "<div style='height:13px;width:13px;background-color:#60b631;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>";
} else if (data=="0") { } else if (data=="0") {
return "<div style='height:13px;width:13px;background-color:#fe0000;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>"; return "<div style='height:13px;width:13px;background-color:#fe0000;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>";
......
...@@ -100,10 +100,6 @@ function getQueryParams(){ ...@@ -100,10 +100,6 @@ function getQueryParams(){
// 加载列表 // 加载列表
function initGrid(){ function initGrid(){
toolbar = [{ toolbar = [{
text : '查询',
iconCls : 'icon-search',
handler : doSearch
},{
text:'待办事项', text:'待办事项',
iconCls:'icon-showList', iconCls:'icon-showList',
handler:showToDoList handler:showToDoList
......
...@@ -212,13 +212,13 @@ function xhdRate() { ...@@ -212,13 +212,13 @@ function xhdRate() {
if (res) { if (res) {
//console.log(res); //console.log(res);
// 信号灯在线率 // 信号灯在线率
$("#xhdOnline").text(res.online); $("#xhdOnline").text(res.xhdonline);
$("#xhdUnOnline").text(res.unonline); $("#xhdUnOnline").text(res.xhdunonline);
var data = [{ var data = [{
value: res.online, value: res.xhdonline,
name: '在线' name: '在线'
}, { }, {
value: res.unonline, value: res.xhdunonline,
name: '不在线' name: '不在线'
}]; }];
EchartsBase.circularGraphChart({ EchartsBase.circularGraphChart({
......
...@@ -22,7 +22,7 @@ $(function(){ ...@@ -22,7 +22,7 @@ $(function(){
success:function(result){ success:function(result){
var str=""; var str="";
for(var i=0;i<result.length;i++){ for(var i=0;i<result.length;i++){
str+="<a class=\"ahref\" href='"+CommonData.uploadurl+"/"+result[i].foldername+"'>"+result[i].name+" </a>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;"; str+="<a class=\"ahref\" href='"+CommonData.downloadurl+"/"+result[i].foldername+"'>"+result[i].name+" </a>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;";
} }
$("#receiverdata").html(str); $("#receiverdata").html(str);
} }
...@@ -84,7 +84,7 @@ function renderOrder(){ ...@@ -84,7 +84,7 @@ function renderOrder(){
$("#accuracyofinfo").text(transEmptyObj(records.accuracyofinfo)); $("#accuracyofinfo").text(transEmptyObj(records.accuracyofinfo));
$("#construction").text(transEmptyObj(records.construction)); $("#construction").text(transEmptyObj(records.construction));
$("#completiontime").text(transEmptyObj(records.completiontime)); $("#completiontime").text(transEmptyObj(records.completiontime));
$("#receivercompany").text(transEmptyObj(records.receivercompany)); $("#receivercompany").text(transEmptyObj(records.receivercompanyname));
$("#receiverpeople").text(transEmptyObj(records.receiverpeople)); $("#receiverpeople").text(transEmptyObj(records.receiverpeople));
$("#receiverphone").text(transEmptyObj(records.receiverphone)); $("#receiverphone").text(transEmptyObj(records.receiverphone));
$("#receivertime").text(transEmptyObj(records.receivertime)); $("#receivertime").text(transEmptyObj(records.receivertime));
......
...@@ -17,9 +17,9 @@ function getQueryParams(){ ...@@ -17,9 +17,9 @@ function getQueryParams(){
var state = records.state; var state = records.state;
if(type=="isonline"){//监控点是否在线详细展示 if(type=="isonline"){//监控点是否在线详细展示
if(state=='1'){//正常 if(state=='1'){//正常
tableparam = " and isonline!=0"; tableparam = " and ( isonline is not null and isonline!=0)";
}else{ }else{
tableparam = " and isonline=0"; tableparam = " and (isonline is null or isonline=0)";
} }
}else if(type=="video"){//监控点设备异常详细展示 }else if(type=="video"){//监控点设备异常详细展示
if(state=='1'){//正常 if(state=='1'){//正常
......
...@@ -17,9 +17,9 @@ function getQueryParams(){ ...@@ -17,9 +17,9 @@ function getQueryParams(){
var state = records.state; var state = records.state;
if(type=="isonline"){//监控点是否在线详细展示 if(type=="isonline"){//监控点是否在线详细展示
if(state=='1'){//正常 if(state=='1'){//正常
tableparam = " and isonline!=0"; tableparam = " and (isonline is not null and isonline!=0) ";
}else{ }else{
tableparam = " and isonline=0"; tableparam = " and ( isonline is null or isonline=0) ";
} }
}else if(type=="video"){//监控点设备异常详细展示 }else if(type=="video"){//监控点设备异常详细展示
if(state=='1'){//正常 if(state=='1'){//正常
......
...@@ -388,10 +388,10 @@ function shownArea(xzbh,xzmc,flag){ ...@@ -388,10 +388,10 @@ function shownArea(xzbh,xzmc,flag){
//tableparam = " and b.currentstateid is null"; //tableparam = " and b.currentstateid is null";
}else if(flag==3){ }else if(flag==3){
title = "在线数"; title = "在线数";
tableparam = " and b.isonline=1 " tableparam = " and b.isonline is not null and b.isonline!=0 "
}else if(flag==4){ }else if(flag==4){
title = "离线数"; title = "离线数";
tableparam = " and b.isonline=0 " tableparam = " and ( b.isonline=0 or b.isonline is null) "
} }
params.tableparam = tableparam; params.tableparam = tableparam;
params.title = title; params.title = title;
......
...@@ -22,9 +22,9 @@ function getQueryParams(){ ...@@ -22,9 +22,9 @@ function getQueryParams(){
var state = records.state; var state = records.state;
if(type=="isonline"){//监控点是否在线详细展示 if(type=="isonline"){//监控点是否在线详细展示
if(state=='1'){//正常 if(state=='1'){//正常
tableparam = " and isonline=1"; tableparam = " and isonline is not null and isonline!=0";
}else{ }else{
tableparam = " and isonline=0"; tableparam = " and ( isonline=0 or isonline is null) ";
} }
}else if(type=="video"){//监控点设备异常详细展示 }else if(type=="video"){//监控点设备异常详细展示
if(state=='1'){//正常 if(state=='1'){//正常
......
...@@ -428,9 +428,9 @@ function shownArea(xzbh,xzmc,flag){ ...@@ -428,9 +428,9 @@ function shownArea(xzbh,xzmc,flag){
} }
if(params.alarmdevicetype =="1") { if(params.alarmdevicetype =="1") {
if(flag == 3) { if(flag == 3) {
tableparam = " and b.isonline=1 " tableparam = " and b.isonline is not null and b.isonline!=0 "
} else if (flag == 4) { } else if (flag == 4) {
tableparam = " and b.isonline=0 " tableparam = " and ( b.isonline=0 or b.isonline is null) "
} }
}else if(params.alarmdevicetype =="2") {//服務器 }else if(params.alarmdevicetype =="2") {//服務器
if(flag == 3) { if(flag == 3) {
......
...@@ -22,9 +22,9 @@ function getQueryParams(){ ...@@ -22,9 +22,9 @@ function getQueryParams(){
var state = records.state; var state = records.state;
if(type=="isonline"){//监控点是否在线详细展示 if(type=="isonline"){//监控点是否在线详细展示
if(state=='1'){//正常 if(state=='1'){//正常
tableparam = " and isonline=1"; tableparam = " and isonline is not null and isonline!=0 ";
}else{ }else{
tableparam = " and isonline=0"; tableparam = " and ( isonline=0 or isonline is null) ";
} }
}else if(type=="video"){//监控点设备异常详细展示 }else if(type=="video"){//监控点设备异常详细展示
if(state=='1'){//正常 if(state=='1'){//正常
......
...@@ -39,7 +39,15 @@ ...@@ -39,7 +39,15 @@
<input class="easyui-datetimebox" id="endTime" > <input class="easyui-datetimebox" id="endTime" >
</div> </div>
<div style="margin-top:5px"> <div style="margin-top:5px">
<label> <input type="checkbox" id="TaskMachine" checked οnclick="checkboxOnclick()"> 是否已加入巡检 </label> <div class='fl'>
<span class="text-content" style="width:100px">是否已加入巡检:</span>
<select id="TaskMachine" class="easyui-combobox">
<option >全部</option>
<option value="1" selected></option>
<option value="0"></option>
</select>
</div>
<%--<label> <input type="checkbox" id="TaskMachine" checked onclick="checkboxOnclick()"> 是否已加入巡检 </label>--%>
</div> </div>
</div> </div>
<div class="form-line hidden"> <div class="form-line hidden">
...@@ -122,9 +130,9 @@ ...@@ -122,9 +130,9 @@
<div style="height:100%;" id="taskDiv"> <div style="height:100%;" id="taskDiv">
<table id='tableGrid'></table> <table id='tableGrid'></table>
</div> </div>
<div style="height:100%;height:100%;display:none;" id="notaskDiv"> <%--<div style="height:100%;height:100%;display:none;" id="notaskDiv">--%>
<table id='tableNoTaskGrid'></table> <%--<table id='tableNoTaskGrid'></table>--%>
</div> <%--</div>--%>
</div> </div>
<form action="" method="post" name="excelForm" id="excelForm" style="display: none;"> <form action="" method="post" name="excelForm" id="excelForm" style="display: none;">
</form> </form>
......
...@@ -60,18 +60,10 @@ ...@@ -60,18 +60,10 @@
</html> </html>
<script type="text/javascript"> <script type="text/javascript">
var winId = $.getUrlParam("winId"); var winId = $.getUrlParam("winId");
var records = top.$("#"+winId).panel("options").data; var data = top.$("#"+winId).panel("options").data;
console.log("跳转iframe: ",records); console.log("跳转iframe: ",data);
$(function(){ $(function(){
$.ajax({
type : 'post',
dataType : 'json',
url : 'ywmachinestatusinfoAction!listYwmachinestatusinfoByPage.do',
data : {'machineid':records.machineid,'statusupbatch':records.statusupbatch,'page':0,'rows':20},
success : function(res){
// console.log("测试:",res);
var data = res.rows[0]
// console.log("返回结果:",data);
$('#mc').html(data.machinename); $('#mc').html(data.machinename);
$('#ip').html(data.machineip); $('#ip').html(data.machineip);
$('#jcsj').html(data.statusuptime); $('#jcsj').html(data.statusuptime);
...@@ -83,7 +75,7 @@ $(function(){ ...@@ -83,7 +75,7 @@ $(function(){
zjzt = "正常"; zjzt = "正常";
zjhtml = "<div style='height:13px;width:13px;background-color:green;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto 0 0;'></div>"; zjhtml = "<div style='height:13px;width:13px;background-color:green;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto 0 0;'></div>";
} else if (zjzt == '0') { } else if (zjzt == '0') {
zjzt = "异常" zjzt = "异常";
zjhtml = "<div style='height:13px;width:13px;background-color:#fe0000;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto 0 0;'></div>"; zjhtml = "<div style='height:13px;width:13px;background-color:#fe0000;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto 0 0;'></div>";
} }
$('#zjzt').html(zjzt); $('#zjzt').html(zjzt);
...@@ -269,8 +261,6 @@ $(function(){ ...@@ -269,8 +261,6 @@ $(function(){
if(ypzt=='正常'){ if(ypzt=='正常'){
$("#diskTitle").parent().css("color","#000"); $("#diskTitle").parent().css("color","#000");
} }
}
});
}); });
function cpuGrap(data){ function cpuGrap(data){
...@@ -367,7 +357,7 @@ function cpuGrap(data){ ...@@ -367,7 +357,7 @@ function cpuGrap(data){
}] }]
} }
] ]
} };
option.series[0].data[0].value =data; option.series[0].data[0].value =data;
myChart.setOption(option, true); myChart.setOption(option, true);
} }
......
var windowId,proName = window.location.pathname.split("/")[1],sysUrl = "http://"+window.location.host+"/"+proName,toEdit; var windowId,proName = window.location.pathname.split("/")[1],sysUrl = "http://"+window.location.host+"/"+proName,toEdit;
var arrs=[];
$(function(){ $(function(){
initDefault(); initDefault();
}); });
//默认 //默认
function initDefault(){ function initDefault(){
ywDc();
initGrid(); initGrid();
} }
function ywDc(){
$.ajax({
type: 'post',
async:true,
dataType: 'json',
url: 'xtclAction!listXtclByPage.do',//dac 行政树
// url:'ptxzsAction!query_Ptxzs.do' ,//本地 行政树
data:{
LIKEcsdl: "ksh_ZxldCurrent",
LIKEcslm:"",
LIKEcsdm:"",
LIKEcsmc:"",
order: "order by csdl asc",
page: 1,
rows: 20,
},
}).done(function (data) {
var arr=[];
if(data.rows.length>0){
for(var i in data.rows){
arr.push({name:data.rows[i].csmc,value:data.rows[i].csdm});
}
}
arrs = arr;
initCacheStatus();
// var a =data;
});
}
//初始化下拉框
function initCacheStatus() {
var ywDeviceStatusArr = [];
// var videoStatus = Constants.videoStatus;
var videoStatus = arrs;
for (var i in videoStatus) {
ywDeviceStatusArr.push({"id": videoStatus[i].value, "text": videoStatus[i].name})
}
$("#currentstate").combobox("loadData", ywDeviceStatusArr);
$('#currentstate').combobox({
formatter: function (row) {
var opts = $(this).combobox('options');
return row[opts.textField];
}
});
var firstShowPanel = true;
var ht=[];
for(var i=0;i<arrs.length;i++){
var str = "#_easyui_combobox_i1_"+i;
ht.push({id:str});
}
for(var i=0;i<ht.length;i++){
$(ht[i].id).after("<div onclick='handleA' class='handleCom1' style='display:none;'>" + $(ht[i].id).html() + "</div>");
}
$('#currentstate').combobox({
onUnselect: function (record) {
var opts = $(this).combobox('options');
var values = $('#currentstate').combobox('getValues');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).show();
}
$(".handleCom").hide();
} else {
if (values.length <= 1) {
var values = $('#currentstate').combobox('getValues');
$(".handleCom1").hide();
$("#_easyui_combobox_i1_0").show();
}
}
},
onChange: function () {
var values = $('#currentstate').combobox('getValues');
},
onHidePanel: function () {
selectedValues = $('#currentstate').combobox('getValues');
firstShowPanel = false;
},
onShowPanel: function () {
if (!firstShowPanel) {
if (selectedValues.indexOf("1") != -1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
} else {
if (selectedValues.length > 0) {
$("#_easyui_combobox_i1_0").hide();
}
}
}
},
onSelect: function (record) {
var values = $('#currentstate').combobox('getValues');
var opts = $(this).combobox('options');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
$(".handleCom").show();
} else {
$("#_easyui_combobox_i1_0").hide();
$(".handleCom1").hide();
}
return false;
}
});
}
//查询条件 //查询条件
function getQueryParams(){ function getQueryParams(){
var sParam = {}; var sParam = {};
...@@ -15,6 +124,22 @@ function getQueryParams(){ ...@@ -15,6 +124,22 @@ function getQueryParams(){
sParam.LIKEbz = $('#bz').textbox("getValue"); sParam.LIKEbz = $('#bz').textbox("getValue");
sParam.order = " order by updatetime desc"; sParam.order = " order by updatetime desc";
sParam.emptyremarks = $("#combobz").combobox("getValue"); sParam.emptyremarks = $("#combobz").combobox("getValue");
var chosed = $('#currentstate').combobox('getValues');
var state = "";
for (var i in chosed) {
if(chosed[i]=="0"){
state += " or STATE is null or STATE=0";
}else{
state += " or STATE= " + chosed[i];
}
}
if (state == "") {
sParam.tableparam = "";
} else {
if (state != "") {
sParam.tableparam = " and (" + state.substr(3) + ") ";
}
}
return sParam; return sParam;
} }
//加载列表 //加载列表
......
...@@ -46,6 +46,10 @@ ...@@ -46,6 +46,10 @@
<option value="0">为空</option> <option value="0">为空</option>
</select> </select>
</div> </div>
<div class='fl'>
<span class="text-content">设备状态:</span>
<input class="easyui-combobox" id="currentstate" name="currentstate" data-options="multiple:true, textField:'text', valueField:'id', panelWidth:148,value:''" >
</div>
</div> </div>
</div> </div>
......
...@@ -46,6 +46,10 @@ ...@@ -46,6 +46,10 @@
<option value="0">为空</option> <option value="0">为空</option>
</select> </select>
</div> </div>
<div class='fl'>
<span class="text-content">设备状态:</span>
<input class="easyui-combobox" id="currentstate" name="currentstate" data-options="multiple:true, textField:'text', valueField:'id', panelWidth:148,value:''" >
</div>
<!-- <div class='fl'> <!-- <div class='fl'>
<span class="text-content">主机状态:</span> <span class="text-content">主机状态:</span>
<input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" > <input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" >
......
...@@ -53,13 +53,17 @@ ...@@ -53,13 +53,17 @@
</div> </div>
<div class='fl'> <div class='fl'>
<span class="text-content" style="width: 200px">备注是否为空:</span> <span class="text-content" style="width: 160px">备注是否为空:</span>
<select class="easyui-combobox" id="combobz"> <select class="easyui-combobox" id="combobz">
<option value="">全部</option> <option value="">全部</option>
<option value="1">不为空</option> <option value="1">不为空</option>
<option value="0">为空</option> <option value="0">为空</option>
</select> </select>
</div> </div>
<div class='fl'>
<span class="text-content">设备状态:</span>
<input class="easyui-combobox" id="currentstate" name="currentstate" data-options="multiple:true, textField:'text', valueField:'id', panelWidth:148,value:''" >
</div>
<!-- <div class='fl'> <!-- <div class='fl'>
<span class="text-content">主机状态:</span> <span class="text-content">主机状态:</span>
<input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" > <input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" >
......
var windowId, proName = window.location.pathname.split("/")[1], var windowId, proName = window.location.pathname.split("/")[1],
sysUrl = "http://" + window.location.host + "/" + proName, toEdit; sysUrl = "http://" + window.location.host + "/" + proName, toEdit;
var arrs=[];
$(function () { $(function () {
initDefault(); initDefault();
}); });
//默认 //默认
function initDefault() { function initDefault() {
ywXhd();
initGrid(); initGrid();
} }
function ywXhd(){
$.ajax({
type: 'post',
async:true,
dataType: 'json',
url: 'xtclAction!listXtclByPage.do',//dac 行政树
// url:'ptxzsAction!query_Ptxzs.do' ,//本地 行政树
data:{
LIKEcsdl: "nhywjtxhdglCurrent",
LIKEcslm:"",
LIKEcsdm:"",
LIKEcsmc:"",
order: "order by csdl asc",
page: 1,
rows: 20,
},
}).done(function (data) {
var arr=[];
if(data.rows.length>0){
for(var i in data.rows){
arr.push({name:data.rows[i].csmc,value:data.rows[i].csdm});
}
}
arrs = arr;
initCacheStatus();
// var a =data;
});
}
//初始化下拉框
function initCacheStatus() {
var ywDeviceStatusArr = [];
// var videoStatus = Constants.videoStatus;
var videoStatus = arrs;
for (var i in videoStatus) {
ywDeviceStatusArr.push({"id": videoStatus[i].value, "text": videoStatus[i].name})
}
$("#currentstate").combobox("loadData", ywDeviceStatusArr);
$('#currentstate').combobox({
formatter: function (row) {
var opts = $(this).combobox('options');
return row[opts.textField];
}
});
var firstShowPanel = true;
var ht=[];
for(var i=0;i<arrs.length;i++){
var str = "#_easyui_combobox_i1_"+i;
ht.push({id:str});
}
for(var i=0;i<ht.length;i++){
$(ht[i].id).after("<div onclick='handleA' class='handleCom1' style='display:none;'>" + $(ht[i].id).html() + "</div>");
}
$('#currentstate').combobox({
onUnselect: function (record) {
var opts = $(this).combobox('options');
var values = $('#currentstate').combobox('getValues');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).show();
}
$(".handleCom").hide();
} else {
if (values.length <= 1) {
var values = $('#currentstate').combobox('getValues');
$(".handleCom1").hide();
$("#_easyui_combobox_i1_0").show();
}
}
},
onChange: function () {
var values = $('#currentstate').combobox('getValues');
},
onHidePanel: function () {
selectedValues = $('#currentstate').combobox('getValues');
firstShowPanel = false;
},
onShowPanel: function () {
if (!firstShowPanel) {
if (selectedValues.indexOf("1") != -1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
} else {
if (selectedValues.length > 0) {
$("#_easyui_combobox_i1_0").hide();
}
}
}
},
onSelect: function (record) {
var values = $('#currentstate').combobox('getValues');
var opts = $(this).combobox('options');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
$(".handleCom").show();
} else {
$("#_easyui_combobox_i1_0").hide();
$(".handleCom1").hide();
}
return false;
}
});
}
//查询条件 //查询条件
function getQueryParams() { function getQueryParams() {
var sParam = {}; var sParam = {};
...@@ -24,7 +132,22 @@ function getQueryParams() { ...@@ -24,7 +132,22 @@ function getQueryParams() {
// sParam.startTime = startTime; // sParam.startTime = startTime;
// sParam.endTime = endTime; // sParam.endTime = endTime;
// sParam.order = " order by createtime desc" // sParam.order = " order by createtime desc"
var chosed = $('#currentstate').combobox('getValues');
var currentstate = "";
for (var i in chosed) {
if(chosed[i]=="0"){
currentstate += " or STATE is null or STATE=0";
}else{
currentstate += " or STATE= " + chosed[i];
}
}
if (currentstate == "") {
sParam.tableparam = "";
} else {
if (currentstate != "") {
sParam.tableparam = " and (" + currentstate.substr(3) + ") ";
}
}
return sParam; return sParam;
} }
...@@ -64,10 +187,18 @@ function initGrid() { ...@@ -64,10 +187,18 @@ function initGrid() {
{ {
field: 'mode', title: '当前状态', hidden: false, width: 60, field: 'mode', title: '当前状态', hidden: false, width: 60,
formatter: function showClick(value, record, num) { formatter: function showClick(value, record, num) {
if (value == 20) { // if (value == 20) {
return "<div style='height:13px;width:13px;background-color:#fe0000;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>"; // return "<div style='height:13px;width:13px;background-color:#fe0000;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>";
} else { // } else {
// return "<div style='height:13px;width:13px;background-color:green;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>";
// }
if (value == 1) {
return "<div style='height:13px;width:13px;background-color:green;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>"; return "<div style='height:13px;width:13px;background-color:green;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>";
} else if (value == 0){
return "<div style='height:13px;width:13px;background-color:#fe0000;border-radius:50%;-moz-border-radius: 50%;-webkit-border-radius: 50%;margin:0 auto;'></div>";
}
else {
return "未知";
} }
} }
}, },
......
...@@ -4,7 +4,6 @@ $(function () { ...@@ -4,7 +4,6 @@ $(function () {
// console.log("历史记录:",currentstateid); // console.log("历史记录:",currentstateid);
initDefault(); initDefault();
}); });
//默认 //默认
function initDefault() { function initDefault() {
// 设置默认时间 // 设置默认时间
......
var windowId, proName = window.location.pathname.split("/")[1], var windowId, proName = window.location.pathname.split("/")[1],
sysUrl = "http://" + window.location.host + "/" + proName, toEdit; sysUrl = "http://" + window.location.host + "/" + proName, toEdit;
var arrs=[];
$(function () { $(function () {
initDefault(); initDefault();
}); });
//默认 //默认
function initDefault() { function initDefault() {
ywYdp();
initGrid(); initGrid();
} }
function ywYdp(){
$.ajax({
type: 'post',
async:true,
dataType: 'json',
url: 'xtclAction!listXtclByPage.do',//dac 行政树
// url:'ptxzsAction!query_Ptxzs.do' ,//本地 行政树
data:{
LIKEcsdl: "nhywjtledydpglCurrent",
LIKEcslm:"",
LIKEcsdm:"",
LIKEcsmc:"",
order: "order by csdl asc",
page: 1,
rows: 20,
},
}).done(function (data) {
var arr=[];
if(data.rows.length>0){
for(var i in data.rows){
arr.push({name:data.rows[i].csmc,value:data.rows[i].csdm});
}
}
arrs = arr;
initCacheStatus();
// var a =data;
});
}
//初始化下拉框
function initCacheStatus() {
var ywDeviceStatusArr = [];
// var videoStatus = Constants.videoStatus;
var videoStatus = arrs;
for (var i in videoStatus) {
ywDeviceStatusArr.push({"id": videoStatus[i].value, "text": videoStatus[i].name})
}
$("#currentstate").combobox("loadData", ywDeviceStatusArr);
$('#currentstate').combobox({
formatter: function (row) {
var opts = $(this).combobox('options');
return row[opts.textField];
}
});
var firstShowPanel = true;
var ht=[];
for(var i=0;i<arrs.length;i++){
var str = "#_easyui_combobox_i1_"+i;
ht.push({id:str});
}
for(var i=0;i<ht.length;i++){
$(ht[i].id).after("<div onclick='handleA' class='handleCom1' style='display:none;'>" + $(ht[i].id).html() + "</div>");
}
$('#currentstate').combobox({
onUnselect: function (record) {
var opts = $(this).combobox('options');
var values = $('#currentstate').combobox('getValues');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).show();
}
$(".handleCom").hide();
} else {
if (values.length <= 1) {
var values = $('#currentstate').combobox('getValues');
$(".handleCom1").hide();
$("#_easyui_combobox_i1_0").show();
}
}
},
onChange: function () {
var values = $('#currentstate').combobox('getValues');
},
onHidePanel: function () {
selectedValues = $('#currentstate').combobox('getValues');
firstShowPanel = false;
},
onShowPanel: function () {
if (!firstShowPanel) {
if (selectedValues.indexOf("1") != -1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
} else {
if (selectedValues.length > 0) {
$("#_easyui_combobox_i1_0").hide();
}
}
}
},
onSelect: function (record) {
var values = $('#currentstate').combobox('getValues');
var opts = $(this).combobox('options');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
$(".handleCom").show();
} else {
$("#_easyui_combobox_i1_0").hide();
$(".handleCom1").hide();
}
return false;
}
});
}
//查询条件 //查询条件
function getQueryParams() { function getQueryParams() {
var sParam = {}; var sParam = {};
...@@ -19,7 +125,19 @@ function getQueryParams() { ...@@ -19,7 +125,19 @@ function getQueryParams() {
sParam.LIKEledmc = $('#LIKEledmc').textbox("getValue"); sParam.LIKEledmc = $('#LIKEledmc').textbox("getValue");
sParam.LIKEbz = $('#bz').textbox("getValue"); sParam.LIKEbz = $('#bz').textbox("getValue");
sParam.emptyremarks = $('#combobz').combobox("getValue"); sParam.emptyremarks = $('#combobz').combobox("getValue");
var chosed = $('#currentstate').combobox('getValues');
var currentstate = "";
for (var i in chosed) {
currentstate += " or STATE= " + chosed[i];
}
if (currentstate == "1") {
sParam.tableparam = " and (STATE is not null and STATE!=0)";
} else {
if (currentstate != "") {
sParam.tableparam = " and (" + currentstate.substr(3) + ") ";
}
}
// sParam.startTime = startTime; // sParam.startTime = startTime;
// sParam.endTime = endTime; // sParam.endTime = endTime;
return sParam; return sParam;
......
...@@ -45,6 +45,10 @@ ...@@ -45,6 +45,10 @@
<option value="0">为空</option> <option value="0">为空</option>
</select> </select>
</div> </div>
<div class='fl'>
<span class="text-content">设备状态:</span>
<input class="easyui-combobox" id="currentstate" name="currentstate" data-options="multiple:true, textField:'text', valueField:'id', panelWidth:148,value:''" >
</div>
<!-- <div class='fl'> <!-- <div class='fl'>
<span class="text-content">主机状态:</span> <span class="text-content">主机状态:</span>
<input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" > <input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" >
......
var windowId, proName = window.location.pathname.split("/")[1], var windowId, proName = window.location.pathname.split("/")[1],
sysUrl = "http://" + window.location.host + "/" + proName, toEdit; sysUrl = "http://" + window.location.host + "/" + proName, toEdit;
var arrs=[];
$(function () { $(function () {
initDefault(); initDefault();
}); });
//默认 //默认
function initDefault() { function initDefault() {
ywFwq();
initGrid(); initGrid();
} }
function ywFwq(){
$.ajax({
type: 'post',
async:true,
dataType: 'json',
url: 'xtclAction!listXtclByPage.do',//dac 行政树
// url:'ptxzsAction!query_Ptxzs.do' ,//本地 行政树
data:{
LIKEcsdl: "ywMachineCurrent",
LIKEcslm:"",
LIKEcsdm:"",
LIKEcsmc:"",
order: "order by csdl asc",
page: 1,
rows: 20,
},
}).done(function (data) {
var arr=[];
if(data.rows.length>0){
for(var i in data.rows){
arr.push({name:data.rows[i].csmc,value:data.rows[i].csdm});
}
}
arrs = arr;
initCacheStatus();
// var a =data;
});
}
//初始化下拉框
function initCacheStatus() {
var ywDeviceStatusArr = [];
// var videoStatus = Constants.videoStatus;
var videoStatus = arrs;
for (var i in videoStatus) {
ywDeviceStatusArr.push({"id": videoStatus[i].value, "text": videoStatus[i].name})
}
$("#currentstate").combobox("loadData", ywDeviceStatusArr);
$('#currentstate').combobox({
formatter: function (row) {
var opts = $(this).combobox('options');
return row[opts.textField];
}
});
var firstShowPanel = true;
var ht=[];
for(var i=0;i<arrs.length;i++){
var str = "#_easyui_combobox_i1_"+i;
ht.push({id:str});
}
for(var i=0;i<ht.length;i++){
$(ht[i].id).after("<div onclick='handleA' class='handleCom1' style='display:none;'>" + $(ht[i].id).html() + "</div>");
}
$('#currentstate').combobox({
onUnselect: function (record) {
var opts = $(this).combobox('options');
var values = $('#currentstate').combobox('getValues');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).show();
}
$(".handleCom").hide();
} else {
if (values.length <= 1) {
var values = $('#currentstate').combobox('getValues');
$(".handleCom1").hide();
$("#_easyui_combobox_i1_0").show();
}
}
},
onChange: function () {
var values = $('#currentstate').combobox('getValues');
},
onHidePanel: function () {
selectedValues = $('#currentstate').combobox('getValues');
firstShowPanel = false;
},
onShowPanel: function () {
if (!firstShowPanel) {
if (selectedValues.indexOf("1") != -1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
} else {
if (selectedValues.length > 0) {
$("#_easyui_combobox_i1_0").hide();
}
}
}
},
onSelect: function (record) {
var values = $('#currentstate').combobox('getValues');
var opts = $(this).combobox('options');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
$(".handleCom").show();
} else {
$("#_easyui_combobox_i1_0").hide();
$(".handleCom1").hide();
}
return false;
}
});
}
//查询条件 //查询条件
function getQueryParams() { function getQueryParams() {
var sParam = {}; var sParam = {};
...@@ -18,9 +128,47 @@ function getQueryParams() { ...@@ -18,9 +128,47 @@ function getQueryParams() {
sParam.LIKEmachinename = $('#LIKEmachinename').textbox("getValue"); sParam.LIKEmachinename = $('#LIKEmachinename').textbox("getValue");
sParam.LIKEbz = $('#bz').textbox("getValue"); sParam.LIKEbz = $('#bz').textbox("getValue");
sParam.emptyremarks = $('#combobz').combobox("getValue");
// sParam.startTime = startTime; // sParam.startTime = startTime;
// sParam.endTime = endTime; // sParam.endTime = endTime;
var chosed = $('#currentstate').combobox('getValues');
var currentstate = "";
// for (var i in chosed) {
// currentstate += " or CURRENTSTATE= " + chosed[i];
//
// }
// if (currentstate == "1") {
// sParam.tableparam = " and (CURRENTSTATE is not null and CURRENTSTATE!=0)";
// } else {
// if (currentstate != "") {
// sParam.tableparam = " and (" + currentstate.substr(3) + ") ";
// }
// }
// for (var i in chosed) {
// currentstate += " or isonline= " + chosed[i];
//
// }
// if (currentstate == "1") {
// sParam.tableparam = " and (isonline is not null and isonline!=0)";
// } else {
// if (currentstate != "") {
// sParam.tableparam = " and (" + currentstate.substr(3) + ") ";
// }
// }
for (var i in chosed) {
currentstate += " or currentstate= " + chosed[i];
}
if (currentstate == "") {
sParam.tableparam = "";
} else {
if (currentstate != "") {
sParam.tableparam = " and (" + currentstate.substr(3) + ") ";
}
}
// sParam.tableparam = " and (isonline is not null and isonline!=0)";
sParam.order = " order by createtime desc"; sParam.order = " order by createtime desc";
return sParam; return sParam;
......
...@@ -45,6 +45,10 @@ ...@@ -45,6 +45,10 @@
<option value="0">为空</option> <option value="0">为空</option>
</select> </select>
</div> </div>
<div class='fl'>
<span class="text-content">设备状态:</span>
<input class="easyui-combobox" id="currentstate" name="currentstate" data-options="multiple:true, textField:'text', valueField:'id', panelWidth:148,value:''" >
</div>
<!-- <div class='fl'> <!-- <div class='fl'>
<span class="text-content">主机状态:</span> <span class="text-content">主机状态:</span>
<input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" > <input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" >
......
var windowId,proName = window.location.pathname.split("/")[1],sysUrl = "http://"+window.location.host+"/"+proName,toEdit; var windowId,proName = window.location.pathname.split("/")[1],sysUrl = "http://"+window.location.host+"/"+proName,toEdit;
var arrs=[];
$(function(){ $(function(){
initDefault(); initDefault();
}); });
//默认 //默认
function initDefault(){ function initDefault(){
ywLd();
initGrid(); initGrid();
} }
function ywLd(){
$.ajax({
type: 'post',
async:true,
dataType: 'json',
url: 'xtclAction!listXtclByPage.do',//dac 行政树
// url:'ptxzsAction!query_Ptxzs.do' ,//本地 行政树
data:{
LIKEcsdl: "ksh_ZxldCurrent",
LIKEcslm:"",
LIKEcsdm:"",
LIKEcsmc:"",
order: "order by csdl asc",
page: 1,
rows: 20,
},
}).done(function (data) {
var arr=[];
if(data.rows.length>0){
for(var i in data.rows){
arr.push({name:data.rows[i].csmc,value:data.rows[i].csdm});
}
}
arrs = arr;
initCacheStatus();
// var a =data;
});
}
//初始化下拉框
function initCacheStatus() {
var ywDeviceStatusArr = [];
// var videoStatus = Constants.videoStatus;
var videoStatus = arrs;
for (var i in videoStatus) {
ywDeviceStatusArr.push({"id": videoStatus[i].value, "text": videoStatus[i].name})
}
$("#currentstate").combobox("loadData", ywDeviceStatusArr);
$('#currentstate').combobox({
formatter: function (row) {
var opts = $(this).combobox('options');
return row[opts.textField];
}
});
var firstShowPanel = true;
var ht=[];
for(var i=0;i<arrs.length;i++){
var str = "#_easyui_combobox_i1_"+i;
ht.push({id:str});
}
for(var i=0;i<ht.length;i++){
$(ht[i].id).after("<div onclick='handleA' class='handleCom1' style='display:none;'>" + $(ht[i].id).html() + "</div>");
}
$('#currentstate').combobox({
onUnselect: function (record) {
var opts = $(this).combobox('options');
var values = $('#currentstate').combobox('getValues');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).show();
}
$(".handleCom").hide();
} else {
if (values.length <= 1) {
var values = $('#currentstate').combobox('getValues');
$(".handleCom1").hide();
$("#_easyui_combobox_i1_0").show();
}
}
},
onChange: function () {
var values = $('#currentstate').combobox('getValues');
},
onHidePanel: function () {
selectedValues = $('#currentstate').combobox('getValues');
firstShowPanel = false;
},
onShowPanel: function () {
if (!firstShowPanel) {
if (selectedValues.indexOf("1") != -1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
} else {
if (selectedValues.length > 0) {
$("#_easyui_combobox_i1_0").hide();
}
}
}
},
onSelect: function (record) {
var values = $('#currentstate').combobox('getValues');
var opts = $(this).combobox('options');
if (record.id == 1) {
for(var i=0;i<arrs.length;i++){
$("#_easyui_combobox_i1_"+i).hide();
}
$(".handleCom").show();
} else {
$("#_easyui_combobox_i1_0").hide();
$(".handleCom1").hide();
}
return false;
}
});
}
//查询条件 //查询条件
function getQueryParams(){ function getQueryParams(){
var sParam = {}; var sParam = {};
sParam.LIKEldmc= $('#LIKEldmc').textbox("getValue"); sParam.LIKEldmc= $('#LIKEldmc').textbox("getValue");
sParam.LIKEbz = $('#bz').textbox("getValue"); sParam.LIKEbz = $('#bz').textbox("getValue");
sParam.emptyremarks = $('#combobz').combobox("getValue"); sParam.emptyremarks = $('#combobz').combobox("getValue");
var chosed = $('#currentstate').combobox('getValues');
var state = "";
for (var i in chosed) {
if(chosed[i]=="0"){
state += " or STATE is null or STATE=0";
}else{
state += " or STATE= " + chosed[i];
}
}
if (state == "") {
sParam.tableparam = "";
} else {
if (state != "") {
sParam.tableparam = " and (" + state.substr(3) + ") ";
}
}
return sParam; return sParam;
} }
//加载列表 //加载列表
......
...@@ -44,6 +44,10 @@ ...@@ -44,6 +44,10 @@
<option value="0">为空</option> <option value="0">为空</option>
</select> </select>
</div> </div>
<div class='fl'>
<span class="text-content">设备状态:</span>
<input class="easyui-combobox" id="currentstate" name="currentstate" data-options="multiple:true, textField:'text', valueField:'id', panelWidth:148,value:''" >
</div>
<!-- <div class='fl'> <!-- <div class='fl'>
<span class="text-content">主机状态:</span> <span class="text-content">主机状态:</span>
<input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" > <input class="easyui-textbox" id="LIKEmachinestatusid" data-options="validType:'length[0,40]'" >
......
...@@ -31,7 +31,7 @@ document.write("<script src='"+script_init+"'><\/script>"); ...@@ -31,7 +31,7 @@ document.write("<script src='"+script_init+"'><\/script>");
<script type='text/javascript' src='../szmap/business/base/item/CheGpsLayer.js'></script> <script type='text/javascript' src='../szmap/business/base/item/CheGpsLayer.js'></script>
<!-- 首页弹出层响应事件 --> <!-- 首页弹出层响应事件 -->
<script type='text/javascript' src='../../common/mapUtil.js'></script> <script type='text/javascript' src='../../common/mapUtil.js'></script>
<script type='text/javascript' src='business/base/BaseDataYzd.js'></script> <%--<script type='text/javascript' src='business/base/BaseDataYzd.js'></script>--%>
<script type='text/javascript' src='../szmap/business/base/item/js/map.js'></script> <script type='text/javascript' src='../szmap/business/base/item/js/map.js'></script>
<%--<script type="text/javascript" src="../../frame/main/area/console/rtcServer.js"></script>--%> <%--<script type="text/javascript" src="../../frame/main/area/console/rtcServer.js"></script>--%>
<%--<script type="text/javascript" src="../../frame/main/area/console/rtcResponse.js"></script>--%> <%--<script type="text/javascript" src="../../frame/main/area/console/rtcResponse.js"></script>--%>
......
...@@ -68,9 +68,6 @@ function initGrid(){ ...@@ -68,9 +68,6 @@ function initGrid(){
]] ]]
}); });
if(devicetype!="1") {
$('#tableGrid').datagrid('showColumn', 'tdbh');
}
} }
function getSelectedRows(){ function getSelectedRows(){
...@@ -81,40 +78,14 @@ function getSelectedRows(){ ...@@ -81,40 +78,14 @@ function getSelectedRows(){
function getSelected(){ function getSelected(){
var rows = $('#tableGrid').datagrid('getChecked'); var rows = $('#tableGrid').datagrid('getChecked');
// console.log("勾选:",rows);
return rows; return rows;
} }
/*parent.parent.$(".l-btn-text").on("click",function(){
if($(this).text()=="关闭"){
return;
}
var insertParam = {};
// insertParam.channelsetid = channelsetid;
var rows = $('#tableGrid').datagrid('getChecked');
// top.$("#"+winId).panel("options").data.insertParam = insertParam;
// top.$("#"+winId).panel("options").data.channelsetid = channelsetid;
$.ajax({
type:'post',
dataType : 'json',
url:'ywvideochannelsetlistAction!batch_add_Ywvideochannelsetlist.do',
data:{channelsetid:channelsetid,param:JSON.stringify(rows)},
success:function(value){
if(value=="success"){
$.showMsg("操作成功!");
// top.$("#"+winId).dialog('close');
// doSearch();
}else if(value=="same"){
$.showMsg("已存在!");
}else{
$.showMsg("操作失败!");
}
}
});
});*/
//删除
function doSearch(){ function doSearch(){
$('#tableGrid').datagrid('load',getQueryParams()); $('#tableGrid').datagrid('load',getQueryParams());
if(devicetype=="1") {
$('#tableGrid').datagrid('showColumn', 'tdbh');
}else{
$('#tableGrid').datagrid('hideColumn', 'tdbh');
}
} }
...@@ -129,13 +129,7 @@ function initGrid(){ ...@@ -129,13 +129,7 @@ function initGrid(){
{field:'extend4',title:'扩展4',hidden:true,width:120} {field:'extend4',title:'扩展4',hidden:true,width:120}
]] ]]
}); });
//控制显影
if(devicetype=="1") {
$('#tableGrid').datagrid('showColumn', 'channelnum');
$('#tableGrid').datagrid('showColumn', 'videomodelname');
$('#tableGrid').datagrid('showColumn', 'recordxdays');
$('#tableGrid').datagrid('showColumn', 'recordmodelname');
}
} }
//删除 //删除
function doDelete(){ function doDelete(){
...@@ -254,6 +248,20 @@ function doend_batch(){ ...@@ -254,6 +248,20 @@ function doend_batch(){
//查询 //查询
function doSearch(){ function doSearch(){
$('#tableGrid').datagrid('load',getQueryParams()); $('#tableGrid').datagrid('load',getQueryParams());
//控制显影
if(devicetype=="1") {
$('#tableGrid').datagrid('showColumn', 'channelnum');
$('#tableGrid').datagrid('showColumn', 'videomodelname');
$('#tableGrid').datagrid('showColumn', 'recordxdays');
$('#tableGrid').datagrid('showColumn', 'recordmodelname');
}
else{
$('#tableGrid').datagrid('hideColumn', 'channelnum');
$('#tableGrid').datagrid('hideColumn', 'videomodelname');
$('#tableGrid').datagrid('hideColumn', 'recordxdays');
$('#tableGrid').datagrid('hideColumn', 'recordmodelname');
}
} }
//增加 //增加
function doAdd(){ function doAdd(){
......
#数据源1
#
#datasource1.driver=oracle.jdbc.OracleDriver
#
#datasource1.url=jdbc:oracle:thin:@192.168.168.212:1521:helowin
#
#datasource1.username=zn06
#
#datasource1.password=znznzn8
#数据源1 #数据源1
datasource1.driver=oracle.jdbc.OracleDriver datasource1.driver=oracle.jdbc.OracleDriver
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<sqlMap resource="sqlmap/Ptlxccqzgl.xml" /> <sqlMap resource="sqlmap/Ptlxccqzgl.xml" />
<sqlMap resource="sqlmap/Sbtdjqqx.xml" /> <sqlMap resource="sqlmap/Sbtdjqqx.xml" />
<sqlMap resource="sqlmap/Sbtdtpqx.xml" /> <sqlMap resource="sqlmap/Sbtdtpqx.xml" />
<sqlMap resource="sqlmap/Sbtdspyzd.xml" /> <!--<sqlMap resource="sqlmap/Sbtdspyzd.xml" />-->
<!-- 平台信息/end --> <!-- 平台信息/end -->
<!-- 系统常量变化量/start --> <!-- 系统常量变化量/start -->
......
...@@ -99,21 +99,13 @@ ...@@ -99,21 +99,13 @@
"clickFun": "MapToolBar.frameSelect()" "clickFun": "MapToolBar.frameSelect()"
} }
], ],
"menulist": [{ "menulist": [ {
"title": "̨",
"id": "jklk-tab",
"content": ""
}, {
"title": "资源列表", "title": "资源列表",
"id": "monitor-tab", "id": "monitor-tab",
"content": "" "content": ""
} }
], ],
"selectedlist": [{ "selectedlist": [ {
"title": "̨",
"id": "jklk-tab-selected",
"content": ""
}, {
"title": "资源列表", "title": "资源列表",
"id": "monitor-tab-selected", "id": "monitor-tab-selected",
"content": "" "content": ""
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4"> <module type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager">
<conelement value="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0" />
<conelement value="org.eclipse.jst.j2ee.internal.web.container" />
<conelement value="org.eclipse.jst.j2ee.internal.module.container" />
<src_description expected_position="0">
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
<src_folder value="file://$MODULE_DIR$/config" expected_position="1" />
</src_description>
</component>
<component name="FacetManager"> <component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration>
<fileset id="fileset" name="Spring Application Context" removed="false">
<file>file://$MODULE_DIR$/WebRoot/WEB-INF/springBase.xml</file>
<file>file://$MODULE_DIR$/WebRoot/WEB-INF/springService.xml</file>
</fileset>
</configuration>
</facet>
<facet type="web" name="Web"> <facet type="web" name="Web">
<configuration> <configuration>
<descriptors> <descriptors>
...@@ -27,24 +10,35 @@ ...@@ -27,24 +10,35 @@
<root url="file://$MODULE_DIR$/WebRoot" relative="/" /> <root url="file://$MODULE_DIR$/WebRoot" relative="/" />
</webroots> </webroots>
<sourceRoots> <sourceRoots>
<root url="file://$MODULE_DIR$/src" />
<root url="file://$MODULE_DIR$/config" /> <root url="file://$MODULE_DIR$/config" />
<root url="file://$MODULE_DIR$/WebRoot" /> <root url="file://$MODULE_DIR$/src" />
</sourceRoots> </sourceRoots>
</configuration> </configuration>
</facet> </facet>
<facet type="Spring" name="Spring">
<configuration>
<fileset id="fileset" name="Spring Application Context" removed="false">
<file>file://$MODULE_DIR$/WebRoot/WEB-INF/springBase.xml</file>
<file>file://$MODULE_DIR$/WebRoot/WEB-INF/springService.xml</file>
</fileset>
</configuration>
</facet>
</component> </component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7"> <component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/out" /> <output url="file://$MODULE_DIR$/out/production/impnhyw/WEB-INF/classes" />
<output-test url="file://$MODULE_DIR$/out/test/impnhyw" /> <output-test url="file://$MODULE_DIR$/out/test/impnhyw" />
<exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/config" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/config" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/WebRoot" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/.externalToolBuilders" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/.idea" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/.settings" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build" isTestSource="true" />
</content> </content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" /> <orderEntry type="library" name="lib5" level="project" />
<orderEntry type="library" name="lib" level="project" /> <orderEntry type="library" name="lib2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Tomcat 8.5.53" level="application_server_libraries" />
</component> </component>
</module> </module>
\ No newline at end of file
...@@ -18,29 +18,40 @@ public class AppSessionOutFilter implements Filter { ...@@ -18,29 +18,40 @@ public class AppSessionOutFilter implements Filter {
public void destroy() {} public void destroy() {}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filter) throws IOException, ServletException { public void doFilter(ServletRequest request, ServletResponse response, FilterChain filter) {
HttpServletRequest httpRequst = (HttpServletRequest) request; HttpServletRequest httpRequst = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response; HttpServletResponse httpResponse = (HttpServletResponse) response;
String path=httpRequst.getContextPath();
String head = httpRequst.getHeader("x-requested-with"); String head = httpRequst.getHeader("x-requested-with");
String remoteAddr = httpRequst.getRequestURI(); String remoteAddr = httpRequst.getRequestURI();
try { try {
if (remoteAddr.indexOf("userloginValidation.do") == -1 if (remoteAddr.indexOf("userloginValidation.do") == -1
&& remoteAddr.indexOf("selectUserRole.do") == -1 && remoteAddr.indexOf("selectUserRole.do") == -1
&& remoteAddr.indexOf("getMenuGroupList.do") == -1 && remoteAddr.indexOf("getMenuGroupList.do") == -1
&& remoteAddr.indexOf("selectUser.do") == -1 && remoteAddr.indexOf("selectUser.do") == -1
&& remoteAddr.indexOf("listXtbbxxByPage.do") == -1 && remoteAddr.indexOf("listXtbbxxByPage.do") == -1
&& remoteAddr.indexOf("restartAweb.do") == -1 && remoteAddr.indexOf("restartAweb.do") == -1
&& remoteAddr.indexOf("index.jsp") == -1
&& remoteAddr.indexOf("login.jsp") == -1
){ ){
if (head != null && (head.equalsIgnoreCase("XMLHttpRequest"))) { // if (head != null && (head.equalsIgnoreCase("XMLHttpRequest"))) {
Object adminUser = httpRequst.getSession().getAttribute("userInfo"); Object adminUser = httpRequst.getSession().getAttribute("userInfo");
if (adminUser == null) { if (adminUser == null) {
httpResponse.setHeader("sessionstatus", "timeout"); httpResponse.setHeader("sessionstatus", "timeout");
httpResponse.sendError(999); httpResponse.setContentType("text/html;utf-8");
return; httpResponse.setCharacterEncoding("utf-8");
} httpResponse.sendRedirect(path+"/index.jsp");
return ;
}else {
filter.doFilter(request, response);
} }
//}
} }
else {
filter.doFilter(request, response); filter.doFilter(request, response);
}
} catch (Exception e) {} } catch (Exception e) {}
} }
} }
...@@ -34,7 +34,7 @@ public class DetectorAction extends BaseAction { ...@@ -34,7 +34,7 @@ public class DetectorAction extends BaseAction {
map.put("limit", rows); map.put("limit", rows);
Struts2Utils.renderJson(this.service.listDetectorByPage(map)); Struts2Utils.renderJson(this.service.listDetectorByPage(map));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); //e.printStackTrace();
iLog.error("DetectorAction-listDetectorByPage-error:" + e); iLog.error("DetectorAction-listDetectorByPage-error:" + e);
Struts2Utils.renderJson(null); Struts2Utils.renderJson(null);
} }
...@@ -54,7 +54,7 @@ public class DetectorAction extends BaseAction { ...@@ -54,7 +54,7 @@ public class DetectorAction extends BaseAction {
map.put("limit", rows); map.put("limit", rows);
Struts2Utils.renderJson(this.service.listDetectortaskByPage(map)); Struts2Utils.renderJson(this.service.listDetectortaskByPage(map));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); //e.printStackTrace();
iLog.error("DetectorAction-listDetectorMy-error:" + e); iLog.error("DetectorAction-listDetectorMy-error:" + e);
Struts2Utils.renderJson(null); Struts2Utils.renderJson(null);
} }
...@@ -70,7 +70,7 @@ public class DetectorAction extends BaseAction { ...@@ -70,7 +70,7 @@ public class DetectorAction extends BaseAction {
try { try {
Struts2Utils.renderJson(this.service.count_Detector(map)); Struts2Utils.renderJson(this.service.count_Detector(map));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); //e.printStackTrace();
iLog.error("DetectorAction-count_Detector-error:" + e); iLog.error("DetectorAction-count_Detector-error:" + e);
Struts2Utils.renderJson(null); Struts2Utils.renderJson(null);
} }
...@@ -198,7 +198,7 @@ public class DetectorAction extends BaseAction { ...@@ -198,7 +198,7 @@ public class DetectorAction extends BaseAction {
public void update_DetectorRemarks() { public void update_DetectorRemarks() {
Map map = Struts2Utils.getRequestParameterMap(); Map map = Struts2Utils.getRequestParameterMap();
try { try {
if(RHUtil.isNotEmpty(map.get("remarks")) && map.get("remarks").equals("survey")){ if(RHUtil.isNotEmpty(map.get("remarks")) && map.get("remarks").toString().indexOf("survey")>0){
map.put("repairstate",900); map.put("repairstate",900);
} }
int result = service.update_DetectorRemarks(map); int result = service.update_DetectorRemarks(map);
......
...@@ -186,7 +186,7 @@ public class YwmachineinfoAction extends BaseAction{ ...@@ -186,7 +186,7 @@ public class YwmachineinfoAction extends BaseAction{
public void update_YwmachineinfoRemarks(){ public void update_YwmachineinfoRemarks(){
Map map = Struts2Utils.getRequestParameterMap(); Map map = Struts2Utils.getRequestParameterMap();
try { try {
if(RHUtil.isNotEmpty(map.get("remarks"))&& map.get("remarks").equals("survey")){ if(RHUtil.isNotEmpty(map.get("remarks"))&& map.get("remarks").toString().contains("survey")){
map.put("repairstate",900); map.put("repairstate",900);
this.service.update_YwmachinecurrentstateRepairstate(map); this.service.update_YwmachinecurrentstateRepairstate(map);
} }
......
...@@ -175,7 +175,7 @@ public class NhywjtledydpglAction extends BaseAction { ...@@ -175,7 +175,7 @@ public class NhywjtledydpglAction extends BaseAction {
public void update_NhywjtledydpglRemarks() { public void update_NhywjtledydpglRemarks() {
Map map = Struts2Utils.getRequestParameterMap(); Map map = Struts2Utils.getRequestParameterMap();
try { try {
if(RHUtil.isNotEmpty(map.get("bz"))&& map.get("bz").equals("survey")){ if(RHUtil.isNotEmpty(map.get("bz"))&& map.get("bz").toString().contains("survey")){
map.put("repairstate",900); map.put("repairstate",900);
} }
int result = service.update_NhywjtledydpglRemarks(map); int result = service.update_NhywjtledydpglRemarks(map);
......
...@@ -93,8 +93,8 @@ public class NhywjtledydpglDao extends BaseSqlMapDAO{ ...@@ -93,8 +93,8 @@ public class NhywjtledydpglDao extends BaseSqlMapDAO{
} }
public List<Map> statisticsYDPOnlineRate() throws SQLException{ public Map statisticsYDPOnlineRate() throws SQLException{
return (List<Map>) this.queryForList("statisticsYDPOnlineRate",null); return (Map)this.queryForObject("statisticsYDPOnlineRate",null);
} }
public List<Map> query_NhywjtledydpglStatus(Map map) throws SQLException{ public List<Map> query_NhywjtledydpglStatus(Map map) throws SQLException{
return (List<Map>) this.queryForPage("query_NhywjtledydpglStatus",map); return (List<Map>) this.queryForPage("query_NhywjtledydpglStatus",map);
......
...@@ -132,15 +132,7 @@ public class NhywjtledydpglService extends BaseService { ...@@ -132,15 +132,7 @@ public class NhywjtledydpglService extends BaseService {
* @throws SQLException * @throws SQLException
*/ */
public Map statisticsYDPOnlineRate() throws SQLException{ public Map statisticsYDPOnlineRate() throws SQLException{
Map<String,Object> result = new HashMap<String,Object>(); return nhywjtledydpglDao.statisticsYDPOnlineRate();
List<Map> list = nhywjtledydpglDao.statisticsYDPOnlineRate();
if(list!=null && list.size()>0){
for(Map m : list){
String name = m.get("name")+"";
result.put(name, m.get("totalcount"));
}
}
return result;
} }
public Map listNhywjtledydpglStatusByPage(Map map) throws SQLException { public Map listNhywjtledydpglStatusByPage(Map map) throws SQLException {
List<Map> list = nhywjtledydpglDao.query_NhywjtledydpglStatus(map); List<Map> list = nhywjtledydpglDao.query_NhywjtledydpglStatus(map);
......
...@@ -203,7 +203,7 @@ public class NhywjtxhdglAction extends BaseAction { ...@@ -203,7 +203,7 @@ public class NhywjtxhdglAction extends BaseAction {
public void update_NhywjtxhdglRemarks() { public void update_NhywjtxhdglRemarks() {
Map map = Struts2Utils.getRequestParameterMap(); Map map = Struts2Utils.getRequestParameterMap();
try { try {
if(RHUtil.isNotEmpty(map.get("bz"))&& map.get("bz").equals("survey")){ if(RHUtil.isNotEmpty(map.get("bz"))&& map.get("bz").toString().indexOf("survey")>0){
map.put("repairstate",900); map.put("repairstate",900);
} }
this.service.update_NhywjtxhdglRepairstate(map); this.service.update_NhywjtxhdglRepairstate(map);
...@@ -404,21 +404,10 @@ public class NhywjtxhdglAction extends BaseAction { ...@@ -404,21 +404,10 @@ public class NhywjtxhdglAction extends BaseAction {
Map map = Struts2Utils.getRequestParameterMap(); Map map = Struts2Utils.getRequestParameterMap();
Map<String, Object> result = new HashMap<String, Object>(); Map<String, Object> result = new HashMap<String, Object>();
try { try {
Map m = service.countNhywjtxhdgl(map); Struts2Utils.renderJson(service.xhdOnline());
if (null != m.get("总数")) {
Integer mtotal = (Integer) m.get("总数");
Integer onlinesum = service.xhdOnline();
if (mtotal >= onlinesum) {
result.put("unonline", mtotal - onlinesum);
} else {
result.put("unonline", 0);
}
result.put("online", onlinesum);
}
Struts2Utils.renderJson(result);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
iLog.error("nhywjtxhdglAction-listNhywjtxhdglHistoryStateByPage-error:" + e); iLog.error("nhywjtxhdglAction-xhdRate-error:" + e);
Struts2Utils.renderJson(null); Struts2Utils.renderJson(null);
} }
......
...@@ -109,8 +109,8 @@ public class NhywjtxhdglDao extends BaseSqlMapDAO{ ...@@ -109,8 +109,8 @@ public class NhywjtxhdglDao extends BaseSqlMapDAO{
public List<Map> query_NhywjtxhdglStateStatis(Map map) throws SQLException{ public List<Map> query_NhywjtxhdglStateStatis(Map map) throws SQLException{
return this.queryForPage("query_NhywjtxhdglStateStatis",map); return this.queryForPage("query_NhywjtxhdglStateStatis",map);
} }
public Integer xhdOnline() throws SQLException{ public Map xhdOnline() throws SQLException{
return (Integer)this.queryForObject("xhdOnline",null); return (Map)this.queryForObject("xhdOnline",null);
} }
public List<Map> query_Ywxhdstatusinfo(Map map) throws SQLException{ public List<Map> query_Ywxhdstatusinfo(Map map) throws SQLException{
return this.queryForPage("query_Ywxhdstatusinfo",map); return this.queryForPage("query_Ywxhdstatusinfo",map);
......
...@@ -165,7 +165,7 @@ public class NhywjtxhdglService extends BaseService { ...@@ -165,7 +165,7 @@ public class NhywjtxhdglService extends BaseService {
} }
//@DS("datasource2") //@DS("datasource2")
public Integer xhdOnline()throws SQLException{ public Map xhdOnline()throws SQLException{
return nhywjtxhdglDao.xhdOnline(); return nhywjtxhdglDao.xhdOnline();
} }
public Map listYwxhdstatusinfoByPage(Map map)throws SQLException{ public Map listYwxhdstatusinfoByPage(Map map)throws SQLException{
......
...@@ -485,6 +485,7 @@ public class YwrepairjobinfoAction extends BaseAction { ...@@ -485,6 +485,7 @@ public class YwrepairjobinfoAction extends BaseAction {
}else if("2".equals(deviceType)){//服务器 }else if("2".equals(deviceType)){//服务器
ywmachinecurrentstateService.update_Ywmachinecurrentstate_WorkOrder(map); ywmachinecurrentstateService.update_Ywmachinecurrentstate_WorkOrder(map);
}*/ }*/
//更新状态表
updateState(deviceType, StringUtil.transEmpty(map.get("processstatus") + ""), updateState(deviceType, StringUtil.transEmpty(map.get("processstatus") + ""),
StringUtil.transEmpty(map.get("XGTJfaultdeviceid") + ""), StringUtil.transEmpty(map.get("XGTJfaultdeviceid") + ""),
StringUtil.transEmpty(map.get("XGTJchannelnum") + ""), StringUtil.transEmpty(map.get("XGTJchannelnum") + ""),
...@@ -547,7 +548,6 @@ public class YwrepairjobinfoAction extends BaseAction { ...@@ -547,7 +548,6 @@ public class YwrepairjobinfoAction extends BaseAction {
public void edit_confirmOrder() { public void edit_confirmOrder() {
Map map = Struts2Utils.getRequestParameterMap(); Map map = Struts2Utils.getRequestParameterMap();
try { try {
// 更新 Ywrepairjobinfo 表 // 更新 Ywrepairjobinfo 表
PtyhBean ptyh = (PtyhBean) Struts2Utils.getSession().getAttribute("userInfo"); PtyhBean ptyh = (PtyhBean) Struts2Utils.getSession().getAttribute("userInfo");
map.put("modifyaccount", ptyh.getYhzh()); map.put("modifyaccount", ptyh.getYhzh());
...@@ -570,7 +570,6 @@ public class YwrepairjobinfoAction extends BaseAction { ...@@ -570,7 +570,6 @@ public class YwrepairjobinfoAction extends BaseAction {
String channelnum = map.get("channelnum") == null ? "" : String.valueOf(map.get("channelnum")); String channelnum = map.get("channelnum") == null ? "" : String.valueOf(map.get("channelnum"));
String alarmeventid = map.get("alarmeventid") == null ? "" : String.valueOf(map.get("alarmeventid")); String alarmeventid = map.get("alarmeventid") == null ? "" : String.valueOf(map.get("alarmeventid"));
updateState(alarmdevicetype, repairstate, alarmdeviceid, channelnum, alarmeventid); updateState(alarmdevicetype, repairstate, alarmdeviceid, channelnum, alarmeventid);
// 向日志表增加记录 // 向日志表增加记录
// PtyhBean ptyh = (PtyhBean)Struts2Utils.getSession().getAttribute("userInfo"); // PtyhBean ptyh = (PtyhBean)Struts2Utils.getSession().getAttribute("userInfo");
String jobid = String.valueOf(map.get("XGTJjobid")); String jobid = String.valueOf(map.get("XGTJjobid"));
...@@ -646,12 +645,10 @@ public class YwrepairjobinfoAction extends BaseAction { ...@@ -646,12 +645,10 @@ public class YwrepairjobinfoAction extends BaseAction {
+ " or (confirmcompany='" + bmbh + "' and confirmpeople='" + yhzh + "') )"; + " or (confirmcompany='" + bmbh + "' and confirmpeople='" + yhzh + "') )";
queryMap.put("comprehensive", comprehensive); queryMap.put("comprehensive", comprehensive);
} }
queryMap.put("start", 0); queryMap.put("start", 0);
queryMap.put("limit", 5000); queryMap.put("limit", 5000);
Map resMap = service.listYwrepairjobinfoByPage(queryMap); Map resMap = service.listYwrepairjobinfoByPage(queryMap);
List<Map> sList = (List<Map>) resMap.get("rows"); List<Map> sList = (List<Map>) resMap.get("rows");
String[] zdbm = {"jobnum", "jobprocessstatename", "faultdevicetypename", "faultdevicename", "faultdeviceid", "channelnum", "faulttypename", "faultdescription", "jobreporttime"}; String[] zdbm = {"jobnum", "jobprocessstatename", "faultdevicetypename", "faultdevicename", "faultdeviceid", "channelnum", "faulttypename", "faultdescription", "jobreporttime"};
String[] zdmc = {"工单编号", "工单状态", "故障设备类型", "故障设备名称", "故障设备编号", "通道编号", "故障类型", "故障描述", "上报时间"}; String[] zdmc = {"工单编号", "工单状态", "故障设备类型", "故障设备名称", "故障设备编号", "通道编号", "故障类型", "故障描述", "上报时间"};
int excelNum = zdbm.length; int excelNum = zdbm.length;
...@@ -677,7 +674,6 @@ public class YwrepairjobinfoAction extends BaseAction { ...@@ -677,7 +674,6 @@ public class YwrepairjobinfoAction extends BaseAction {
int page = Integer.parseInt(Struts2Utils.getParameter("page")); int page = Integer.parseInt(Struts2Utils.getParameter("page"));
int rows = Integer.parseInt(Struts2Utils.getParameter("rows")); int rows = Integer.parseInt(Struts2Utils.getParameter("rows"));
int start = ((page == 0 ? 1 : page) - 1) * rows; int start = ((page == 0 ? 1 : page) - 1) * rows;
map.put("start", start); map.put("start", start);
map.put("limit", rows); map.put("limit", rows);
Struts2Utils.renderJson(this.service.listYwrepairDevicejobinfoByPage(map)); Struts2Utils.renderJson(this.service.listYwrepairDevicejobinfoByPage(map));
...@@ -695,9 +691,7 @@ public class YwrepairjobinfoAction extends BaseAction { ...@@ -695,9 +691,7 @@ public class YwrepairjobinfoAction extends BaseAction {
map.put("start", 0); map.put("start", 0);
map.put("limit", 5000); map.put("limit", 5000);
Map resMap = service.listYwrepairjobinfoByPage(map); Map resMap = service.listYwrepairjobinfoByPage(map);
List<Map> sList = (List<Map>) resMap.get("rows"); List<Map> sList = (List<Map>) resMap.get("rows");
String[] zdbm = {"jobnum", "jobprocessstatename", "faultdevicetypename", "faultdevicename", "faultdeviceid", "channelnum", "faulttypename", "faultdescription", "jobreporttime"}; String[] zdbm = {"jobnum", "jobprocessstatename", "faultdevicetypename", "faultdevicename", "faultdeviceid", "channelnum", "faulttypename", "faultdescription", "jobreporttime"};
String[] zdmc = {"工单编号", "工单状态", "故障设备类型", "故障设备名称", "故障设备编号", "通道编号", "故障类型", "故障描述", "上报时间"}; String[] zdmc = {"工单编号", "工单状态", "故障设备类型", "故障设备名称", "故障设备编号", "通道编号", "故障类型", "故障描述", "上报时间"};
int excelNum = zdbm.length; int excelNum = zdbm.length;
......
...@@ -1051,7 +1051,7 @@ public class YwvideocurrentstateAction extends BaseAction{ ...@@ -1051,7 +1051,7 @@ public class YwvideocurrentstateAction extends BaseAction{
//请求参数update_Ywmachineinfo //请求参数update_Ywmachineinfo
Map map = Struts2Utils.getRequestParameterMap(); Map map = Struts2Utils.getRequestParameterMap();
//有“survey”这个内容就让设备维修状态改变下,可以不让做告警处理 //有“survey”这个内容就让设备维修状态改变下,可以不让做告警处理
if(RHUtil.isNotEmpty(map.get("remarks"))&& map.get("remarks").equals("survey")){ if(RHUtil.isNotEmpty(map.get("remarks"))&& map.get("remarks").toString().contains("survey")){
map.put("repairstate",900); map.put("repairstate",900);
this.service.update_ywvideocurrentstateRepairState(map); this.service.update_ywvideocurrentstateRepairState(map);
} }
......
...@@ -43,13 +43,14 @@ public class YwvideocurrentstateService extends BaseService { ...@@ -43,13 +43,14 @@ public class YwvideocurrentstateService extends BaseService {
return ywvideocurrentstateDao.statisticsRecordIntactRate(); return ywvideocurrentstateDao.statisticsRecordIntactRate();
} }
public Map videoCurrentStateStatistics(Map map) throws SQLException{ public Map videoCurrentStateStatistics(Map map) throws SQLException{
Map<String,String> result= new HashMap<String,String>(); Map<String,List<Map>> result= new HashMap<String,List<Map>>();
List<Map> lists = ywvideocurrentstateDao.videoCurrentStateStatistics(map); List<Map> lists = ywvideocurrentstateDao.videoCurrentStateStatistics(map);
if(lists!=null && lists.size()>0){ // if(lists!=null && lists.size()>0){
for(Map m : lists){ // for(Map m : lists){
result.put(m.get("name")+"", m.get("total")+""); // result.put(m.get("name")+"", m.get("total")+"");
} // }
} // }
result.put("data",lists);
return result; return result;
} }
......
...@@ -181,7 +181,7 @@ public class ZxldAction extends BaseAction { ...@@ -181,7 +181,7 @@ public class ZxldAction extends BaseAction {
public void update_ZxldRemarks() { public void update_ZxldRemarks() {
Map map = Struts2Utils.getRequestParameterMap(); Map map = Struts2Utils.getRequestParameterMap();
try { try {
if(RHUtil.isNotEmpty(map.get("bz"))&& map.get("bz").equals("survey")){ if(RHUtil.isNotEmpty(map.get("bz"))&& map.get("bz").toString().indexOf("survey")>0){
map.put("repairstate",900); map.put("repairstate",900);
} }
int result = service.update_ZxldRemarks(map); int result = service.update_ZxldRemarks(map);
......
...@@ -120,8 +120,8 @@ public class ZxldDao extends BaseSqlMapDAO { ...@@ -120,8 +120,8 @@ public class ZxldDao extends BaseSqlMapDAO {
return this.update("edit_Zxld", map); return this.update("edit_Zxld", map);
} }
public List<Map> statisticsZxldRate() throws SQLException { public Map statisticsZxldRate() throws SQLException {
return (List<Map>) this.queryForList("statisticsZxldRate", null); return (Map) this.queryForObject("statisticsZxldRate", null);
} }
public List<Map> query_ZxldcurrentstateByPage(Map map) throws SQLException { public List<Map> query_ZxldcurrentstateByPage(Map map) throws SQLException {
......
...@@ -159,15 +159,7 @@ public class ZxldService extends BaseService { ...@@ -159,15 +159,7 @@ public class ZxldService extends BaseService {
* @throws SQLException * @throws SQLException
*/ */
public Map statisticsZxldRate() throws SQLException{ public Map statisticsZxldRate() throws SQLException{
Map<String,Object> result = new HashMap<String,Object>(); return zxldDao.statisticsZxldRate();
List<Map> list = zxldDao.statisticsZxldRate();
if(list!=null && list.size()>0){
for(Map m : list){
String name = m.get("name")+"";
result.put(name, m.get("totalcount"));
}
}
return result;
} }
/** /**
......
...@@ -195,6 +195,9 @@ ...@@ -195,6 +195,9 @@
<isNotEmpty prepend='AND ' property='statusupbatch'> <isNotEmpty prepend='AND ' property='statusupbatch'>
(statusupbatch =#statusupbatch# ) (statusupbatch =#statusupbatch# )
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend='AND ' property='currentstate'>
(a.STATE = #currentstate# )
</isNotEmpty>
<isNotEmpty property='tableparam'> <isNotEmpty property='tableparam'>
$tableparam$ $tableparam$
</isNotEmpty> </isNotEmpty>
...@@ -392,14 +395,10 @@ ...@@ -392,14 +395,10 @@
</insert> </insert>
<select id="statisticsYDPOnlineRate" resultClass="java.util.HashMap" parameterClass="java.util.Map"> <select id="statisticsYDPOnlineRate" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select COUNT(*) as totalcount ,'totalcount' as name select count(*) as totalcount,
from nhywjtledydpgl SUM(case when a.state is not null and a.state=1 then 1 else 0 end) as ydponlinenum,
union ALL SUM(case when a.state =0 or a.state is null then 1 else 0 end) as ydpunonlinenum
(select COUNT(state) as totalcount,'ydponlinenum' as name from nhywjtledydpgl where state ='1' ) from nhywjtledydpgl a
union ALL
select COUNT(*) as totalcount ,'ydpunonlinenum' as name from
nhywjtledydpgl where (state='0' or state is null)
</select> </select>
<select id="query_NhywjtledydpglStatus" resultClass="java.util.HashMap" parameterClass="java.util.Map"> <select id="query_NhywjtledydpglStatus" resultClass="java.util.HashMap" parameterClass="java.util.Map">
......
...@@ -251,6 +251,9 @@ ...@@ -251,6 +251,9 @@
<isNotEmpty prepend='AND ' property='Likemc'> <isNotEmpty prepend='AND ' property='Likemc'>
(xhdmc like '%Likemc%') (xhdmc like '%Likemc%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend='AND ' property='currentstate'>
(a.STATE = #currentstate# )
</isNotEmpty>
<isNotEmpty property='tableparam'> <isNotEmpty property='tableparam'>
$tableparam$ $tableparam$
</isNotEmpty> </isNotEmpty>
...@@ -501,10 +504,10 @@ ...@@ -501,10 +504,10 @@
) a ) a
left join nhywjtxhdstate_history b on a.lkh=b.nojunc and a.qybh=b.noarea left join nhywjtxhdstate_history b on a.lkh=b.nojunc and a.qybh=b.noarea
<isNotEmpty prepend="and" property="startTime"> <isNotEmpty prepend="and" property="startTime">
<![CDATA[ b.create_time >= #startTime# ]]> <![CDATA[ b.create_time >= to_date(#startTime#,'yyyy-mm-dd hh24:mi:ss')]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="and" property="endTime"> <isNotEmpty prepend="and" property="endTime">
<![CDATA[ b.create_time <=#endTime# ]]> <![CDATA[ b.create_time <=to_date(#endTime# ,'yyyy-mm-dd hh24:mi:ss') ]]>
</isNotEmpty> </isNotEmpty>
</select> </select>
...@@ -516,10 +519,10 @@ ...@@ -516,10 +519,10 @@
) a ) a
left join nhywjtxhdstate_history b on a.lkh=b.nojunc and a.qybh=b.noarea left join nhywjtxhdstate_history b on a.lkh=b.nojunc and a.qybh=b.noarea
<isNotEmpty prepend="and" property="startTime"> <isNotEmpty prepend="and" property="startTime">
<![CDATA[ b.create_time >= #startTime# ]]> <![CDATA[ b.create_time >= to_date(#startTime#,'yyyy-mm-dd hh24:mi:ss') ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="and" property="endTime"> <isNotEmpty prepend="and" property="endTime">
<![CDATA[ b.create_time <=#endTime# ]]> <![CDATA[ b.create_time <=to_date(#endTime# ,'yyyy-mm-dd hh24:mi:ss') ]]>
</isNotEmpty> </isNotEmpty>
</select> </select>
<select id="query_NhywjtxhdglStateStatis" resultClass="java.util.HashMap" parameterClass="java.util.Map" <select id="query_NhywjtxhdglStateStatis" resultClass="java.util.HashMap" parameterClass="java.util.Map"
...@@ -532,8 +535,12 @@ ...@@ -532,8 +535,12 @@
<include refid="condition_Nhywjtxhdgl"/> <include refid="condition_Nhywjtxhdgl"/>
and (state=0 or state is null) and (state=0 or state is null)
</select> </select>
<select id="xhdOnline" resultClass="java.lang.Integer" remapResults="true"> <select id="xhdOnline" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select count(*) from NHYWJTXHDGL where state=1 select count(*) as totalcount,
SUM(case when a.state is not null and a.state=1 then 1 else 0 end) as xhdonline,
SUM(case when a.state =0 or a.state is null then 1 else 0 end) as xhdunonline
from nhywjtxhdgl a
</select> </select>
<select id="query_Ywxhdstatusinfo" resultClass="java.util.HashMap" parameterClass="java.util.Map"> <select id="query_Ywxhdstatusinfo" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select a.*,b.xhdbh,b.qybh,b.qymc,b.lkh,b.lkmc from ( select a.*,b.xhdbh,b.qybh,b.qymc,b.lkh,b.lkmc from (
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
where 1=1 where 1=1
<isNotEmpty prepend='AND ' property='keyword'> <isNotEmpty prepend='AND ' property='keyword'>
key in (#keyword#) key in (#keyword#)
</isNotEmpty> </isNotEmpty>videoCurrentStateStatistics
</delete> </delete>
<!-- ??? --> <!-- ??? -->
......
...@@ -717,7 +717,7 @@ ...@@ -717,7 +717,7 @@
</isNotEmpty>) as jobnormalnum, sum(case when jd is not null and wd is not null then 1 else 0 end) </isNotEmpty>) as jobnormalnum, sum(case when jd is not null and wd is not null then 1 else 0 end)
lalnormalnum, lalnormalnum,
(select count(*) as jobtotal from ywvideocurrentstate e ,sbtdspsr f where e.videonum=f.sbbh and (select count(*) as jobtotal from ywvideocurrentstate e ,sbtdspsr f where e.videonum=f.sbbh and
e.channelnum=f.tdbh and e.isonline!=0 and c.xzbh=f.xzbh) as zxsc e.channelnum=f.tdbh and e.isonline is not null and e.isonline!=0 and c.xzbh=f.xzbh) as zxsc
from sbtdspsr c left join ptxzs b on b.xzbh=c.xzbh where sbbh is not null from sbtdspsr c left join ptxzs b on b.xzbh=c.xzbh where sbbh is not null
<isNotEmpty prepend='AND ' property='xzbh'> <isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[ c.xzbh in ]]> <![CDATA[ c.xzbh in ]]>
...@@ -1004,7 +1004,7 @@ ...@@ -1004,7 +1004,7 @@
</isNotEmpty>) as jobnormalnum, sum(case when jd is not null and wd is not null then 1 else 0 end) </isNotEmpty>) as jobnormalnum, sum(case when jd is not null and wd is not null then 1 else 0 end)
lalnormalnum, lalnormalnum,
(select count(*) as jobtotal from ywvideocurrentstate e where e.videonum=c.sbbh and (select count(*) as jobtotal from ywvideocurrentstate e where e.videonum=c.sbbh and
e.channelnum=c.tdbh and e.isonline!=0) as zxsc e.channelnum=c.tdbh and e.isolation is not null and e.isonline!=0) as zxsc
from sbtdspsr c from sbtdspsr c
<isNotEmpty prepend='where ' property='areanum'> <isNotEmpty prepend='where ' property='areanum'>
(c.xzbh = #areanum# or (c.xzbh in (select xzbh from Ptxzs start with sjxzbh= (c.xzbh = #areanum# or (c.xzbh in (select xzbh from Ptxzs start with sjxzbh=
......
...@@ -362,6 +362,12 @@ ...@@ -362,6 +362,12 @@
(b.remarks is not null and b.remarks !=' ' ) (b.remarks is not null and b.remarks !=' ' )
</isEqual> </isEqual>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend='AND ' property='currentstate'>
(a.currentstate = #currentstate# )
</isNotEmpty>
<isNotEmpty property='tableparam'>
$tableparam$
</isNotEmpty>
</select> </select>
<!-- query objects by page--> <!-- query objects by page-->
<select id="get_Ywmachinecurrentstate" resultClass="java.util.HashMap" parameterClass="java.util.Map" <select id="get_Ywmachinecurrentstate" resultClass="java.util.HashMap" parameterClass="java.util.Map"
......
...@@ -432,7 +432,7 @@ ...@@ -432,7 +432,7 @@
<select id="count_HomepageDeviceCount" resultClass="java.util.HashMap" parameterClass="java.util.Map"> <select id="count_HomepageDeviceCount" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select count(*) as zs, 'fwqzl' as name from ywmachineinfo select count(*) as zs, 'fwqzl' as name from ywmachineinfo
union all union all
select count(*) as zs, 'jkzxs' as name from ywvideocurrentstate where isonline=1 select count(*) as zs, 'jkzxs' as name from ywvideocurrentstate where (isolation is not null and isonline!=0)
union all union all
select count(*) as zs, 'jkzl' as name from sbtdspsr select count(*) as zs, 'jkzl' as name from sbtdspsr
union all union all
......
...@@ -758,61 +758,145 @@ ...@@ -758,61 +758,145 @@
<!-- query objects by page--> <!-- query objects by page-->
<select id="query_Ywrepairjobinfo" resultClass="java.util.HashMap" parameterClass="java.util.Map" <select id="query_Ywrepairjobinfo" resultClass="java.util.HashMap" parameterClass="java.util.Map"
remapResults="true"> remapResults="true">
select select jobid,
jobid,jobnum,jobsource,alarmeventid, jobnum,
faultdevicetype,(select csmc from xtcl b where b.csdl='ywAlarmDeviceType' and b.csdm=faultdevicetype) as jobsource,
faultdevicetypename, alarmeventid,
faultdevicename,faultdeviceid,channelnum,faultpictureurl, faultdevicetype,
faultgrade,(select csmc from xtcl b where b.csdl='ywAlarmRuleLevel' and b.csdm=faultgrade) as faultgradename, (select csmc
faulttype,(select csmc from xtcl b where b.csdl='ywAlarmDeviceType' and b.csdm=faulttype) as faulttypename, from xtcl b
faultdescription,faultoccurtime,requirefinishtime,actualfinishtime, where b.csdl = 'ywAlarmDeviceType'
jobprocessstate,(select alarmname from ywalarmeventcode b where b.alarmcode=jobprocessstate) as and b.csdm = faultdevicetype) as faultdevicetypename,
jobprocessstatename, faultdevicename,
jobreportcompany,(select bmmc from ptyhbm b where b.bmbh=jobreportcompany) as jobreportcompanyname, faultdeviceid,
jobreportpeople,(select yhzh from ptyh b where b.yhbh=jobreportpeople) as jobreportpeoplename, channelnum,
jobreportphone,jobreporttime,jobacceptstate,jobaccepttime, faultpictureurl,
jobacceptcompany,(select bmmc from ptyhbm b where b.bmbh=jobacceptcompany) as jobacceptcompanyname, faultgrade,
jobacceptpeople,(select yhzh from ptyh b where b.yhbh=jobacceptpeople ) as jobacceptpeoplename, (select csmc
jobacceptphone,rejectcause,ishangup,hangupcause, from xtcl b
hanguppeople,(select yhzh from ptyh b where b.yhbh=hanguppeople ) as hanguppeoplename, where b.csdl = 'ywAlarmRuleLevel'
hangupcompany,(select bmmc from ptyhbm b where b.bmbh=hangupcompany) as hangupcompanyname, and b.csdm = faultgrade) as faultgradename,
hanguptime,unhanguptime, faulttype,
unhanguppeople,(select yhzh from ptyh b where b.yhbh=unhanguppeople ) as unhanguppeoplename, (select csmc
unhangupcompany,(select bmmc from ptyhbm b where b.bmbh=unhangupcompany) as unhangupcompanyname, from xtcl b
where b.csdl = 'ywAlarmDeviceType'
and b.csdm = faulttype) as faulttypename,
faultdescription,
faultoccurtime,
requirefinishtime,
actualfinishtime,
jobprocessstate,
(select alarmname
from ywalarmeventcode b
where b.alarmcode = jobprocessstate) as jobprocessstatename,
jobreportcompany,
(select bmmc from ptyhbm b where b.bmbh = jobreportcompany) as jobreportcompanyname,
jobreportpeople,
(select yhzh from ptyh b where b.yhbh = jobreportpeople) as jobreportpeoplename,
jobreportphone,
jobreporttime,
jobacceptstate,
jobaccepttime,
jobacceptcompany,
(select bmmc from ptyhbm b where b.bmbh = jobacceptcompany) as jobacceptcompanyname,
jobacceptpeople,
(select yhzh from ptyh b where b.yhbh = jobacceptpeople) as jobacceptpeoplename,
jobacceptphone,
rejectcause,
ishangup,
hangupcause,
hanguppeople,
(select yhzh from ptyh b where b.yhbh = hanguppeople) as hanguppeoplename,
hangupcompany,
(select bmmc from ptyhbm b where b.bmbh = hangupcompany) as hangupcompanyname,
hanguptime,
unhanguptime,
unhanguppeople,
(select yhzh from ptyh b where b.yhbh = unhanguppeople) as unhanguppeoplename,
unhangupcompany,
(select bmmc from ptyhbm b where b.bmbh = unhangupcompany) as unhangupcompanyname,
faultacceptinfo, faultacceptinfo,
feedbackcompany,(select bmmc from ptyhbm b where b.bmbh=feedbackcompany) as feedbackcompanyname, feedbackcompany,
feedbackpeople,feedbacktime,feedbackphone,feedbackstate,feedbackinfo,isdelay,delaytime,delaycause,delayforcompany,delayforpeople,delayfortime,delayforstate,delayfordescription, (select bmmc from ptyhbm b where b.bmbh = feedbackcompany) as feedbackcompanyname,
confirmfaulttype, (select csmc from Xtcl where csdl='ywAlarmRuleSource' and feedbackpeople,
csdm=confirmfaulttype)confirmfaulttypename,confirmfaultinfo,repairdays, feedbacktime,
confirmcompany,(select bmmc from ptyhbm b where b.bmbh=confirmcompany) as confirmcompanyname, feedbackphone,
confirmpeople,confirmtime,confirmphone,confirmstate,confirmdescription,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4, feedbackstate,
isreject,maintenanceresult,confirmmaintenance,completiontime, feedbackinfo,
receivertime,receivercompany,receiverpeople,receiverphone,accuracyofinfo,construction,jd,wd isdelay,
delaytime,
<!-- (select b.bmmc from ptyh a left join ptyhbm b on (a.bmbh = b.bmbh) where delaycause,
1=1 delayforcompany,
<isNotEmpty prepend='AND ' property='yhbh'> delayforpeople,
a.yhbh = #yhbh# delayfortime,
</isNotEmpty> delayforstate,
) as bmmc --> delayfordescription,
confirmfaulttype,
(select csmc
from Xtcl
where csdl = 'ywAlarmRuleSource'
and csdm = confirmfaulttype) confirmfaulttypename,
confirmfaultinfo,
repairdays,
confirmcompany,
(select bmmc from ptyhbm b where b.bmbh = confirmcompany) as confirmcompanyname,
confirmpeople,
confirmtime,
confirmphone,
confirmstate,
confirmdescription,
createaccount,
createtime,
modifyaccount,
modifytime,
remarks,
extend1,
extend2,
extend3,
extend4,
isreject,
maintenanceresult,
confirmmaintenance,
completiontime,
receivertime,
receivercompany,
(select bmmc from ptyhbm b where b.bmbh = receivercompany) as receivercompanyname,
receiverpeople,
receiverphone,
accuracyofinfo,
construction,
jd,
wd
from ywrepairjobinfo from ywrepairjobinfo
left join ( left join (SELECT sbbh xh, tdbh, jd, wd, '1' devicetype
SELECT sbbh xh ,tdbh , jd,wd, '1' devicetype FROM sbtdspsr FROM sbtdspsr
union all union all
SELECT xh,null tdbh, jd,wd, '3' devicetype SELECT xh, null tdbh, jd, wd, '3' devicetype
FROM nhywjtxhdgl n FROM nhywjtxhdgl n
UNION ALL UNION ALL
SELECT xh,null tdbh, jd,wd, '4' devicetype FROM nhywjtledydpgl SELECT xh, null tdbh, jd, wd, '4' devicetype
FROM nhywjtledydpgl
UNION ALL UNION ALL
SELECT id AS xh,null tdbh,to_char(longitude) jd, to_char(latitude) wd, '10' AS devicetype SELECT id AS xh,
FROM its.ksh_detector WHERE detectortype = 'GVD' null tdbh,
to_char(longitude) jd,
to_char(latitude) wd,
'10' AS devicetype
FROM its.ksh_detector
WHERE detectortype = 'GVD'
UNION ALL UNION ALL
SELECT id AS xh,null tdbh, to_char(longitude) jd, to_char(latitude) wd, '11' AS devicetype SELECT id AS xh,
FROM its.ksh_detector WHERE detectortype = 'SMARTSENSOR' null tdbh,
to_char(longitude) jd,
to_char(latitude) wd,
'11' AS devicetype
FROM its.ksh_detector
WHERE detectortype = 'SMARTSENSOR'
UNION ALL UNION ALL
SELECT xh,null tdbh, jd,wd, '12' AS detectortype SELECT xh, null tdbh, jd, wd, '12' AS detectortype
FROM its.ksh_zxld FROM its.ksh_zxld) a
) a on faultdeviceid=a.xh and channelnum=a.tdbh on faultdeviceid = a.xh
and channelnum = a.tdbh
<include refid="condition_Ywrepairjobinfo"/> <include refid="condition_Ywrepairjobinfo"/>
<!-- <isNotEmpty prepend=' ' property='start'> <!-- <isNotEmpty prepend=' ' property='start'>
limit #start# ,#limit# limit #start# ,#limit#
......
This diff is collapsed.
...@@ -606,7 +606,7 @@ ...@@ -606,7 +606,7 @@
(a.videonum like '%$LIKEvideonum$%' ) (a.videonum like '%$LIKEvideonum$%' )
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend='AND ' property='LIKEip'> <isNotEmpty prepend='AND ' property='LIKEip'>
(a.sbip like '%$LIKEip$%' ) (e.sbip like '%$LIKEip$%' )
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend='AND ' property='currentstate'> <isNotEmpty prepend='AND ' property='currentstate'>
(a.currentstate = #currentstate# ) (a.currentstate = #currentstate# )
......
...@@ -314,12 +314,10 @@ ...@@ -314,12 +314,10 @@
</select> </select>
<select id="statisticsZxldRate" resultClass="java.util.HashMap" parameterClass="java.util.Map"> <select id="statisticsZxldRate" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select COUNT(*) as totalcount ,'totalcount' as name select count(*) as totalcount,
from its.ksh_zxld SUM(case when a.state is not null and a.state=1 then 1 else 0 end) as onlinenum,
union ALL SUM(case when a.state =0 or a.state is null then 1 else 0 end) as unonlinenum
select COUNT(a.xh) as totalcount,'onlinenum' as name from its.ksh_zxld a where state=1 from its.ksh_zxld a
union ALL
select COUNT(a.xh) as totalcount ,'unonlinenum' as name from its.ksh_zxld a where ( state=0 or state is null)
</select> </select>
<!-- query objects by page--> <!-- query objects by page-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment