5.25——工作记录
程序员文章站
2024-03-20 23:42:22
...
文章目录
前言
记录
报错
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
‘org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0’:
Invocation of init method failed; nested exception is
java.lang.IllegalStateException: Ambiguous mapping found. Cannot map
‘dtmStatusperceptionController’ bean method
解决:1.action重复
解决:service调错sql了
感知探测 采集/心跳jsp
deviceStatusPerceptionEventInfoSearchCommon.jsp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
<head>
<meta charset="utf-8" />
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css" media="all" />
<link rel="stylesheet" href="layuiadmin/style/admin.css" media="all" />
<script src="js/jquery-1.7.1.js"></script>
<script src="js/userjs/common.js"></script>
<style type="text/css">
a {
text-decoration: none;
color: blue;
text-decoration: underline;
}
a:hover {
color: #FF5907;
}
.layui-disabled,
.layui-disabled:hover {
color: black !important;
cursor: not-allowed !important
}
</style>
</head>
<body>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div id="deviceStatusPerceptionEventInfoSearchCommonDiv" class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-form" style="margin-bottom: 10px;">
设备编码:
<div class="layui-inline" style="width:165px;">
<input class="layui-input" name="deviceStatusPerceptionEventInfoSearchCommonDde01" id="deviceStatusPerceptionEventInfoSearchCommonDde01"
autocomplete="off" />
</div>
信息类型:
<div class="layui-inline" style="width:165px;">
<select name="deviceStatusPerceptionEventInfoSearchCommonDfe05" id="deviceStatusPerceptionEventInfoSearchCommonDfe05">
<option value="-1">请选择</option>
<c:forEach items="${listDictionaryStatusperceptionEventtype }" var="listDictionaryStatusperceptionEventtype">
<option value="${listDictionaryStatusperceptionEventtype.dseId }">${listDictionaryStatusperceptionEventtype.dse01
}</option>
</c:forEach>
</select>
</div>
证件类型:
<div class="layui-inline" style='text-align:left;width:165px;'>
<select name="deviceFacesnapshotEventInfoSearchCommonDfe03" id="deviceFacesnapshotEventInfoSearchCommonDfe03">
<option value="-1">请选择</option>
<c:forEach items="${listStatusPerceptionEventDictionaryCardTypeInfoSearch }" var="listStatusPerceptionEventDictionaryCardTypeInfoSearch">
<option value="${listStatusPerceptionEventDictionaryCardTypeInfoSearch.dct03 }">${listStatusPerceptionEventDictionaryCardTypeInfoSearch.dct01
}</option>
</c:forEach>
</select>
</div>
<label style='width:85px;display:inline-block;'>证件号码:</label>
<div class="layui-inline" style='text-align:left;width:165px;'>
<input class="layui-input" name="deviceFacesnapshotEventInfoSearchCommonDfe04" id="deviceFacesnapshotEventInfoSearchCommonDfe04"
autocomplete="off" />
</div>
</div>
<div class="layui-form" style="margin-bottom: 10px;">
开始时间:
<div class="layui-inline" style="width:165px;">
<input type="text" class="layui-input" id="deviceStatusPerceptionEventInfoSearchCommonDde08Start" name="deviceStatusPerceptionEventInfoSearchCommonDde08Start" />
</div>
结束时间:
<div class="layui-inline" style="width:165px;">
<input type="text" class="layui-input" id="deviceStatusPerceptionEventInfoSearchCommonDde08End" name="deviceStatusPerceptionEventInfoSearchCommonDde08End" />
</div>
<c:if test="${loginUserType==7}">
所属区县:
<div class="layui-inline" style='text-align:left;width:165px;'>
<select name="deviceStatusPerceptionEventInfoSearchCommonAreaId" id="deviceStatusPerceptionEventInfoSearchCommonAreaId"
lay-filter="setAreaSearch">
<option value="-1">请选择</option>
<c:forEach items="${listStatusPerceptionEventDictionaryAreaSearch }" var="listStatusPerceptionEventDictionaryAreaSearch">
<option value="${listStatusPerceptionEventDictionaryAreaSearch.da02 }">${listStatusPerceptionEventDictionaryAreaSearch.da01
}</option>
</c:forEach>
</select>
</div>
所属派出所:
<div class="layui-inline" style='text-align:left;width:165px;'>
<select id="deviceStatusPerceptionEventInfoSearchCommonPoliceId" name="deviceStatusPerceptionEventInfoSearchCommonPoliceId">
<option value='-1'>请选择派出所</option>
</select>
</div>
</c:if>
<c:if test="${loginUserType!=7}">
所属区县:
<div class="layui-inline" style='width:165px;'>
<select id="deviceStatusPerceptionEventInfoSearchCommonAreaId" name="deviceStatusPerceptionEventInfoSearchCommonAreaId">
<option value='-1'>请选择</option>
</select> <label style='width:85px;display:inline-block;'>所属派出所:</label>
<div class="layui-inline" style='width:165px;'>
<select id="deviceStatusPerceptionEventInfoSearchCommonPoliceId" name="deviceStatusPerceptionEventSearchCommonPoliceId">
<option value='-1'>请选择</option>
</select>
</div>
</div>
</c:if>
<button type="button" class="layui-btn" onclick="deviceStatusPerceptionEventInfoSearchCommonBtn();">
<i class="layui-icon layui-icon-search"></i>搜索
</button>
</div>
<div id="deviceStatusPerceptionEventInfoSearchCommonList">
<table id="deviceStatusPerceptionEventInfoSearchCommondg" class="layui-table" lay-filter="deviceStatusPerceptionEventInfoSearchCommonTable"
lay-data="{height:'full-370',cellMinWidth: 80 }">
<thead id="deviceStatusPerceptionEventInfoSearchCommonthead">
</thead>
<tbody id="deviceStatusPerceptionEventInfoSearchCommontbody">
</tbody>
</table>
<div id="deviceStatusPerceptionEventInfoSearchCommonPage"></div>
</div>
<div>
<p>
<b style="margin-left: 5px;">图片信息</b>
</p>
<div id="showDtmDeviceStatusPerceptionEventImageSmallDiv"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 单位名称 -->
<input type="hidden" name="deviceStatusPerceptionEventInfoSearchCommonHiddenDui02" id="deviceStatusPerceptionEventInfoSearchCommonHiddenDui02" />
<!-- 设备编号 -->
<input type="hidden" name="deviceStatusPerceptionEventInfoSearchCommonHiddenDde01" id="deviceStatusPerceptionEventInfoSearchCommonHiddenDde01" />
<!-- 事件类型 -->
<input type="hidden" name="deviceStatusPerceptionEventInfoSearchCommonHiddenDde18" id="deviceStatusPerceptionEventInfoSearchCommonHiddenDde18" />
<!-- 开始时间 -->
<input type="hidden" name="deviceStatusPerceptionEventInfoSearchCommonHiddenDde08Start" id="deviceStatusPerceptionEventInfoSearchCommonHiddenDde08Start" />
<!-- 结束时间 -->
<input type="hidden" name="deviceStatusPerceptionEventInfoSearchCommonHiddenDde08End" id="deviceStatusPerceptionEventInfoSearchCommonHiddenDde08End" />
<!-- 事件图片base64 -->
<input type="hidden" name="deviceStatusPerceptionEventInfoSearchCommonHiddenBase64Img" id="deviceStatusPerceptionEventInfoSearchCommonHiddenBase64Img" />
<!-- 场景图片base64 -->
<input type="hidden" name="deviceStatusPerceptionEventInfoSearchCommonHiddenBase64ImgCj" id="deviceStatusPerceptionEventInfoSearchCommonHiddenBase64ImgCj" />
<!-- 所属派出所权限 -->
<input type="hidden" name="deviceStatusPerceptionEventInfoSearchCommonHiddenPoliceID" id="deviceStatusPerceptionEventInfoSearchCommonHiddenPoliceID"
value="${sessionScope.PoliceID }" /> <input type="hidden" id="deviceStatusPerceptionEventInfoSearchCommonHiddenCpage"
name="deviceStatusPerceptionEventInfoSearchCommonHiddenCpage" value="1" /> <input type="hidden" id="deviceStatusPerceptionEventInfoSearchCommonHiddenTotalNum"
name="deviceStatusPerceptionEventInfoSearchCommonHiddenTotalNum" value="-1" />
<script src="layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['table', 'laypage', 'layer', 'index', 'form', 'laydate'], function() {
var laypage = layui.laypage,
table = layui.table,
$ = layui.$,
admin = layui.admin,
element = layui.element,
layer = layui.layer,
laydate = layui.laydate,
form = layui.form;
//初始化分页
laypage.render({
elem: 'deviceStatusPerceptionEventInfoSearchCommonPage',
count: 0,
limit: 15,
curr: 1,
layout: ['prev', 'page', 'next', 'count', 'skip']
});
//日期选择器初始化
laydate.render({
elem: '#deviceStatusPerceptionEventInfoSearchCommonDde08Start', //指定元素
type: 'datetime'
});
//日期选择器初始化
laydate.render({
elem: '#deviceStatusPerceptionEventInfoSearchCommonDde08End', //指定元素
type: 'datetime'
});
//获取当前时间
var myDate = new Date;
//当前年
var yearStart = myDate.getFullYear();
//当前月
var monthStart = myDate.getMonth() + 1;
if (monthStart.toString().length == "1") {
monthStart = '0' + monthStart;
}
//当前日
var dayStart = myDate.getDate();
if (dayStart.toString().length == "1") {
dayStart = '0' + dayStart;
}
//开始时间
var strStartTime = yearStart + "-" + monthStart + "-" + dayStart + " 00:00:00";
//时间加一天
myDate.setDate(myDate.getDate() + 1);
//时间加一天后年
var yearEnd = myDate.getFullYear();
//时间加一天后月
var monthEnd = myDate.getMonth() + 1;
if (monthEnd.toString().length == "1") {
monthEnd = '0' + monthEnd;
}
//时间加一天后日
var dayEnd = myDate.getDate();
if (dayEnd.toString().length == "1") {
dayEnd = '0' + dayEnd;
}
//结束时间
var strEndTime = yearEnd + "-" + monthEnd + "-" + dayEnd + " 00:00:00";
//开始时间 初始化当前日期
$("#deviceStatusPerceptionEventInfoSearchCommonDde08Start").val(strStartTime);
//结束时间 初始化当前日期
$("#deviceStatusPerceptionEventInfoSearchCommonDde08End").val(strEndTime);
//表单重新渲染
form.render();
//监听区联动注册
form.on('select(setAreaSearch)', function(data) {
//加载派出所下拉框,并选中办公派出所
setAreaPoliceQx($("#deviceStatusPerceptionEventInfoSearchCommonAreaId").val(),
'deviceStatusPerceptionEventInfoSearchCommonPoliceId', $(
"#deviceStatusPerceptionEventInfoSearchCommonPoliceId").val(), $(
"#deviceStatusPerceptionEventInfoSearchCommonHiddenPoliceID").val()); //隐藏派出所
});
});
function searchDtmUsecompanyInfoByDeviceCoding(dfe01) {
layer.open({
type: 2,
title: '设备单位信息',
maxmin: false,
resize: false,
move: false,
area: ['1000px', '700px'],
content: 'dtmUsecompanyInfoByDeviceCodingAction.action?dfe01=' + dfe01
});
}
//检索
function deviceStatusPerceptionEventInfoSearchCommonBtn() {
//设备编号
$("#deviceStatusPerceptionEventInfoSearchCommonHiddenDde01").val($(
"#deviceStatusPerceptionEventInfoSearchCommonDde01").val());
//事件类型
$("#deviceStatusPerceptionEventInfoSearchCommonHiddenDde18").val($(
"#deviceStatusPerceptionEventInfoSearchCommonDde18").val());
//刷卡开始时间
$("#deviceStatusPerceptionEventInfoSearchCommonHiddenDde08Start").val($(
"#deviceStatusPerceptionEventInfoSearchCommonDde08Start").val());
//结束时间
$("#deviceStatusPerceptionEventInfoSearchCommonHiddenDde08End").val($(
"#deviceStatusPerceptionEventInfoSearchCommonDde08End").val());
$("#deviceStatusPerceptionEventInfoSearchCommonHiddenCpage").val(1);
$("#deviceStatusPerceptionEventInfoSearchCommonHiddenTotalNum").val(-1);
deviceStatusPerceptionEventSearchCommonSubmit();
}
//提交检索
function deviceStatusPerceptionEventSearchCommonSubmit() {
//事件类型
var Dde18 = $("#deviceStatusPerceptionEventInfoSearchCommonHiddenDde18").val();
//设备编码
var dde02 = $("#deviceStatusPerceptionEventInfoSearchCommonDde01").val();
//开始时间
var dse04Start = $("#deviceStatusPerceptionEventInfoSearchCommonDde08Start").val();
//结束时间
var dse04End = $("#deviceStatusPerceptionEventInfoSearchCommonDde08End").val();
//所属区县
var areaId = $("#deviceStatusPerceptionEventInfoSearchCommonAreaId").val();
alert("areaId:" + areaId)
//所属派出所
var policeId = $("#deviceStatusPerceptionEventInfoSearchCommonPoliceId").val();
//当前页
var Cpage = $("#deviceStatusPerceptionEventInfoSearchCommonHiddenCpage").val();
//总页数
var totalNum = $("#deviceStatusPerceptionEventInfoSearchCommonHiddenTotalNum").val();
//加载数据层
var indexs = layer.load(3);
$.ajax({
url: "searchdtmDeviceStatusPerceptionEventFindCommon.action",
type: "POST",
data: {
dde02: dde02, //设备编码
Dde18: Dde18, //事件类型
dse04Start: dse04Start, //触发开始时间
dse04End: dse04End,
dui32: areaId,
dui36: policeId,
Cpage: Cpage,
totalNum: totalNum
},
dataType: "json",
async: false,
success: function(data) {
var strTable = "";
var intPageNum = data.intPageNum;
var totalPageSize = data.intAllCount;
$("#deviceStatusPerceptionEventInfoSearchCommontbody").text(""); //先清空原先内容
if (data.jsonFlag == 1) {
//有数据
if (data.listDtmStatuscollectionEventFind != null && data.listDtmStatuscollectionEventFind.length > 0) {
for (var i = 0; i < data.listDtmStatuscollectionEventFind.length; i++) {
strTable = strTable + "<tr>";
/*
//图片路径
var imgurl = "";
if (data.listDtmStatuscollectionEventFind[i].dse14 != null && data.listDtmStatuscollectionEventFind[i].dse15 != "") {
imgurl = data.listDtmStatuscollectionEventFind[i].dse14 + data.listDtmStatuscollectionEventFind[i].dse15;
}
//场景图片路径
var CJimgurl = "";
if (data.listDtmStatuscollectionEventFind[i].dse18 != null && data.listDtmStatuscollectionEventFind[i].dse19 != "") {
CJimgurl = data.listDtmStatuscollectionEventFind[i].dse18 + data.listDtmStatuscollectionEventFind[i].dse19;
} */
//设备编码
if (data.listDtmStatuscollectionEventFind[i].dde02 != null && data.listDtmStatuscollectionEventFind[i].dde02 !=
"") {
var str = '<td><a href="#" onclick="searchDtmUsecompanyInfoByDeviceCoding(\'' + data.listDtmStatuscollectionEventFind[
i].dde02 + '\');">' + data.listDtmStatuscollectionEventFind[i].dde02 + '</a></td>';
strTable = strTable + str;
} else {
strTable = strTable + "<td></td>";
}
//图片
//strTable = strTable + "<td><a class='layui-btn layui-btn-xs' onclick=javascript:showDtmDdeviceStatusPerceptionEventFindImage('" + imgurl + "','" + CJimgurl + "');><i class='layui-icon layui-icon-picture'></i>图片</a></td>";
//详情
strTable = strTable +
"<td><a class='layui-btn layui-btn-xs' lay-href='dtmStatuscollectionEventFindIndex.action?dseId=" +
data.listDtmStatuscollectionEventFind[i].dseId +
"' ><i class='layui-icon layui-icon-edit'></i>详情</a></td>";
//事件时间
if (data.listDtmStatuscollectionEventFind[i].dde04 != null && data.listDtmStatuscollectionEventFind[i].dde04 !=
"") {
strTable = strTable + "<td>" + data.listDtmStatuscollectionEventFind[i].dde04 + "</td>";
} else {
strTable = strTable + "<td></td>";
}
strTable = strTable + "</tr>";
}
$("#deviceStatusPerceptionEventInfoSearchCommontbody").html(strTable);
} else {
layer.msg('没有查询到数据!', {
offset: '15px',
icon: 1
});
}
//显示表格
layui.use(['table'], function() { //------
var table = layui.table;
//初始化表格
table.init('deviceStatusPerceptionEventInfoSearchCommonTable', {
height: 'full-370', //设置高度
limit: intPageNum, //支持所有基础参数
page: false //是否分页
});
}) //------
//分页
layui.use(['laypage'], function() { //------
var laypage = layui.laypage;
//初始化分页
laypage.render({
elem: 'deviceStatusPerceptionEventInfoSearchCommonPage',
count: totalPageSize,
limit: intPageNum,
curr: Cpage,
layout: ['prev', 'page', 'next', 'count', 'skip'],
jump: function(obj, first) {
if (!first) {
$("#deviceStatusPerceptionEventInfoSearchCommonHiddenCpage").val(obj.curr);
deviceStatusPerceptionEventInfoSearchCommonSubmit();
}
}
});
}) //------
} else if (data.jsonFlag == -2) {
layer.msg("Session失效,请重新登录!", {
icon: 2,
time: 2000
}, function() {
window.location = "${pageContext.request.contextPath}/communitySessionError.jsp";
});
} else if (data.jsonFlag == -1) {
layer.msg('感知探测查询失败!', {
offset: '15px',
icon: 2
});
} else {
layer.msg('感知探测查询失败!', {
offset: '15px',
icon: 2
});
}
//加载数据层关闭
layer.close(indexs);
return false;
}
});
}
//图片显示大图
function open_win(imgname, imgdataname) {
var imgDate = $("#" + imgdataname).val();
const img = new Image();
img.src = "data:image/png;base64," + imgDate;
const newWin = window.open("", "_blank");
newWin.document.write(img.outerHTML);
newWin.document.title = imgname;
newWin.document.close();
}
//查看图片
function showDtmDdeviceStatusPerceptionEventFindImage(imageurl, CJimageurl) {
//清空下方图片Div信息
document.getElementById("showDtmDeviceStatusPerceptionEventImageSmallDiv").innerHTML = "";
var strTable = "<table style='width:100%;' ><tr><td valign= 'top' align='center'>";
//无图片完整路径 显示提示信息
if (imageurl == null || imageurl == "" || imageurl == "null") {
strTable = strTable +
"<p>采集图片信息</p><div style='height:190px;' ><p> </p><p> </p><p> </p><span style='font-size:30px;'>暂无图片信息</span></div>";
}
//有图片完整路径 点击 可查看放大之后的图片
else {
strTable = strTable + "<p>采集图片信息</p><div style='height:200px;' ><a target='_blank' href='" + imageurl +
"'><img height='200px' width='200px' src='" + imageurl + "'/></a></div>";
}
strTable = strTable + "</td><td valign= 'top' align='center'>";
if (CJimageurl == null || CJimageurl == "" || CJimageurl == "null") {
strTable = strTable +
"<p>场景图片信息</p><div style='height:190px;' ><p> </p><p> </p><p> </p><span style='font-size:30px;'>暂无图片信息</span></div>";
}
//有图片完整路径 点击 可查看放大之后的图片
else {
strTable = strTable + "<p>场景图片信息</p><div style='height:200px;' ><a target='_blank' href='" + CJimageurl +
"'><img height='200px' width='200px' src='" + CJimageurl + "'/></a></div>";
}
document.getElementById("showDtmDeviceStatusPerceptionEventImageSmallDiv").innerHTML = strTable +
"</td></tr></table>";
$("#showDtmDeviceStatusPerceptionEventImageSmallDiv").initUI();
}
//表头初始化
function deviceStatusPerceptionEventInfoSearchCommonTableInit() {
$("#deviceStatusPerceptionEventInfoSearchCommonthead").text(""); //先清空原先内容
var thead = document.getElementById('deviceStatusPerceptionEventInfoSearchCommonthead');
var tr = document.createElement("tr");
tr.innerHTML = '<th lay-data="{field:\'dde02\',width:160}">设备编码</th>' +
'<th lay-data="{field:\'btn1\',width:90}">图片</th>' +
'<th lay-data="{field:\'btn2\',width:90}">详情</th>' +
'<th lay-data="{field:\'dde04\',width:190}">发生时间</th>' +
thead.appendChild(tr);
}
deviceStatusPerceptionEventInfoSearchCommonTableInit();
</script>
</body>
</html>
deviceStatusPerceptionHeartInfoSearchCommon.jsp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
<head>
<meta charset="utf-8"/>
<meta name="renderer" content="webkit"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css" media="all"/>
<link rel="stylesheet" href="layuiadmin/style/admin.css" media="all"/>
<script src="js/jquery-1.7.1.js"></script>
<script src="js/userjs/common.js"></script>
<style type="text/css">
a{text-decoration:none;color:blue;text-decoration:underline;}
a:hover{color: #FF5907;}
.layui-disabled,.layui-disabled:hover {color: black !important;cursor: not-allowed !important}
</style>
</head>
<body>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div id="deviceFacesnapshotEventInfoSearchCommonDiv" class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-form" style="margin-bottom: 10px;">
设备编码:
<div class="layui-inline" style="width:165px;" >
<input class="layui-input" name="deviceFacesnapshotEventInfoSearchCommonDfe01" id="deviceFacesnapshotEventInfoSearchCommonDfe01" autocomplete="off"/>
</div>
信息类型:
<div class="layui-inline" style="width:165px;">
<select name="deviceFacesnapshotEventInfoSearchCommonDfe05" id="deviceFacesnapshotEventInfoSearchCommonDfe05" >
<option value="-1"> 请选择</option>
<c:forEach items="${listDictionaryFacesnapshotEventtype }" var="listDictionaryFacesnapshotEventtype">
<option value="${listDictionaryFacesnapshotEventtype.dfeId }">${listDictionaryFacesnapshotEventtype.dfe01 }</option>
</c:forEach>
</select>
</div>
证件类型:
<div class="layui-inline" style="width:165px;">
<select name="deviceFacesnapshotEventInfoSearchCommonDfe03" id="deviceFacesnapshotEventInfoSearchCommonDfe03" >
<option value="-1"> 请选择</option>
<c:forEach items="${listDictionaryCardTypeInfoSearch }" var="listDictionaryCardTypeInfoSearch">
<option value="${listDictionaryCardTypeInfoSearch.dct03 }">${listDictionaryCardTypeInfoSearch.dct01 }</option>
</c:forEach>
</select>
</div>
<label style='width:85px;display:inline-block;'>证件号码:</label>
<div class="layui-inline" style="width:165px;" >
<input class="layui-input" name="deviceFacesnapshotEventInfoSearchCommonDfe04" id="deviceFacesnapshotEventInfoSearchCommonDfe04" autocomplete="off"/>
</div>
</div>
<div class="layui-form" style="margin-bottom: 10px;">
开始时间:
<div class="layui-inline" style="width:165px;">
<input type="text" class="layui-input" id="deviceFacesnapshotEventInfoSearchCommonDfe06Start" name="deviceFacesnapshotEventInfoSearchCommonDfe06Start"/>
</div>
结束时间:
<div class="layui-inline" style="width:165px;" >
<input type="text" class="layui-input" id="deviceFacesnapshotEventInfoSearchCommonDfe06End" name="deviceFacesnapshotEventInfoSearchCommonDfe06End"/>
</div>
<c:if test="${loginUserType==7}">
所属区县:
<div class="layui-inline" style='text-align:left;width:165px;'>
<select name="deviceFacesnapshotHeartInfoSearchCommonAreaId" id="deviceFacesnapshotHeartInfoSearchCommonAreaId" lay-filter="setAreaEditSearch" >
<option value="-1"> 请选择</option>
<c:forEach items="${listDictionaryAreaSearch }" var="listDictionaryArea">
<option value="${listDictionaryArea.da02 }">${listDictionaryArea.da01 }</option>
</c:forEach>
</select>
</div>
<label style='width:85px;display:inline-block;'>所属派出所:</label>
<div class="layui-inline" style='text-align:left;width:165px;'>
<select id="deviceFacesnapshotHeartInfoSearchCommonPoliceId" name="deviceFacesnapshotHeartInfoSearchCommonPoliceId">
<option value='-1'>请选择</option>
</select>
</div>
</c:if>
<c:if test="${loginUserType!=7}">
所属区县:
<div class="layui-inline" style='width:165px;'>
<select id="deviceFacesnapshotHeartInfoSearchCommonAreaId" name="deviceFacesnapshotHeartInfoSearchCommonAreaId">
<option value='-1'>请选择</option>
</select>
</div>
<label style='width:85px;display:inline-block;'>所属派出所:</label>
<div class="layui-inline" style='text-align:left;width:165px;'>
<select id="deviceFacesnapshotHeartInfoSearchCommonPoliceId" name="deviceFacesnapshotHeartInfoSearchCommonPoliceId">
<option value='-1'>请选择派出所</option>
</select>
</div>
</c:if>
</div>
<div class="layui-form" style="margin-bottom: 10px;">
<button type="button" class="layui-btn" onclick="deviceFacesnapshotEventInfoSearchCommonBtn();"><i class="layui-icon layui-icon-search"></i>搜索</button>
</div>
</div>
<div id="deviceFacesnapshotEventInfoSearchCommonList">
<table id="deviceFacesnapshotEventInfoSearchCommondg" class="layui-table" lay-filter="deviceFacesnapshotEventInfoSearchCommonTable" lay-data="{height:'full-450',cellMinWidth: 80 }">
<thead id="deviceFacesnapshotEventInfoSearchCommonthead">
</thead>
<tbody id="deviceFacesnapshotEventInfoSearchCommontbody">
</tbody>
</table>
<div id="deviceFacesnapshotEventInfoSearchCommonPage"></div>
</div>
<div>
<p>
<b style="margin-left: 5px;">图片信息</b>
</p>
<div id="showDtmDeviceFacesnapshotEventImageSmallDiv"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 开始时间 -->
<input type="hidden" name="deviceFacesnapshotEventInfoSearchCommonHiddenDde08Start" id="deviceFacesnapshotEventInfoSearchCommonHiddenDde08Start" />
<!-- 结束时间 -->
<input type="hidden" name="deviceFacesnapshotEventInfoSearchCommonHiddenDde08End" id="deviceFacesnapshotEventInfoSearchCommonHiddenDde08End" />
<input type="hidden" id="deviceFacesnapshotEventInfoSearchCommonHiddenCpage" name="deviceFacesnapshotEventInfoSearchCommonHiddenCpage" value="1"/>
<input type="hidden" id="deviceFacesnapshotEventInfoSearchCommonHiddenTotalNum" name="deviceFacesnapshotEventInfoSearchCommonHiddenTotalNum" value="-1"/>
<!-- 事件图片base64 -->
<input type="hidden" name="deviceFacesnapshotEventInfoSearchCommonHiddenBase64Img" id="deviceFacesnapshotEventInfoSearchCommonHiddenBase64Img" />
<!-- 人员图片base64 -->
<input type="hidden" name="deviceFacesnapshotEventInfoSearchCommonHiddenBase64ImgPerson" id="deviceFacesnapshotEventInfoSearchCommonHiddenBase64ImgPerson" />
<!-- 办公区县 -->
<input type="hidden"
name="deviceFacesnapshotHeartInfoSearchCommonAreaIdHidden"
id="deviceFacesnapshotHeartInfoSearchCommonAreaIdHidden" />
<!--所属派出所 -->
<input type="hidden"
name="deviceFacesnapshotHeartInfoSearchCommonPoliceIdHidden"
id="deviceFacesnapshotHeartInfoSearchCommonPoliceIdHidden" />
<!-- 派出所权限 -->
<input type="hidden"
id="deviceFacesnapshotHeartInfoSearchCommonHiddenPoliceID"
name="deviceFacesnapshotHeartInfoSearchCommonHiddenPoliceID"
value="${sessionScope.PoliceID }" />
<script src="layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['table','laypage', 'layer','index', 'form', 'laydate'], function(){
var laypage = layui.laypage
,table=layui.table
,$ = layui.$
,admin = layui.admin
,element = layui.element
,layer = layui.layer
,laydate = layui.laydate
,form = layui.form;
//初始化分页
laypage.render({
elem:'deviceFacesnapshotEventInfoSearchCommonPage'
,count:0
,limit:15
,curr:1
,layout: [ 'prev', 'page', 'next','count', 'skip']
});
//日期选择器初始化 开始时间
laydate.render({
elem: '#deviceFacesnapshotEventInfoSearchCommonDfe06Start' //指定元素
,type: 'datetime'
});
//日期选择器初始化 结束时间
laydate.render({
elem: '#deviceFacesnapshotEventInfoSearchCommonDfe06End' //指定元素
,type: 'datetime'
});
//获取当前时间
var myDate = new Date;
//当前年
var yearStart = myDate.getFullYear();
//当前月
var monthStart = myDate.getMonth() + 1;
if (monthStart.toString().length=="1") {
monthStart = '0' + monthStart;
}
//当前日
var dayStart = myDate.getDate();
if (dayStart.toString().length=="1") {
dayStart = '0' + dayStart;
}
//开始时间
var strStartTime = yearStart+"-"+monthStart+"-"+dayStart+" 00:00:00";
//时间加一天
myDate.setDate(myDate.getDate()+1);
//时间加一天后年
var yearEnd = myDate.getFullYear();
//时间加一天后月
var monthEnd = myDate.getMonth() + 1;
if (monthEnd.toString().length=="1") {
monthEnd = '0' + monthEnd;
}
//时间加一天后日
var dayEnd = myDate.getDate();
if (dayEnd.toString().length=="1") {
dayEnd = '0' + dayEnd;
}
//结束时间
var strEndTime = yearEnd+"-"+monthEnd+"-"+dayEnd+" 00:00:00";
//开始时间 初始化当前日期
$("#deviceFacesnapshotEventInfoSearchCommonDfe06Start").val(strStartTime);
//结束时间 初始化当前日期
$("#deviceFacesnapshotEventInfoSearchCommonDfe06End").val(strEndTime);
//表单重新渲染
form.render();
//监听区联动注册
form.on('select(setAreaEditSearch)', function(data) {
//加载派出所下拉框,并选中办公派出所
setAreaPoliceQx($("#deviceFacesnapshotHeartInfoSearchCommonAreaId").val()
, 'deviceFacesnapshotHeartInfoSearchCommonPoliceId'
, $("#deviceFacesnapshotHeartInfoSearchCommonPoliceId").val()
, $("#deviceFacesnapshotHeartInfoSearchCommonHiddenPoliceID").val()); //隐藏派出所
});
});
function searchDtmPersonInfo(dfe03,dfe04){
layer.open({
type: 2
,title: '设备人员信息'
,maxmin: false
,resize:false
,move: false
,area: ['1000px', '700px']
,content: 'dtmPersonInfoIndexlogic.action?dfe03='+dfe03+'&dfe04='+dfe04
});
}
function searchDtmUsecompanyInfoByDeviceCoding(dfe01){
layer.open({
type: 2
,title: '设备单位信息'
,maxmin: false
,resize:false
,move: false
,area: ['1000px', '700px']
,content: 'dtmUsecompanyInfoByDeviceCodingAction.action?ase20='+dfe01
});
}
//检索
function deviceFacesnapshotEventInfoSearchCommonBtn(){
//办公区县
$("#deviceFacesnapshotHeartInfoSearchCommonAreaIdHidden").val($("#deviceFacesnapshotHeartInfoSearchCommonAreaId").val());
//所属派出所
$("#deviceFacesnapshotHeartInfoSearchCommonPoliceIdHidden").val($("#deviceFacesnapshotHeartInfoSearchCommonPoliceId").val());
$("#deviceFacesnapshotEventInfoSearchCommonHiddenCpage").val(1);
$("#deviceFacesnapshotEventInfoSearchCommonHiddenTotalNum").val(-1);
deviceFacesnapshotEventInfoSearchCommonSubmit();
}
//提交检索
function deviceFacesnapshotEventInfoSearchCommonSubmit(){
//设备编码
var dfe01 = $("#deviceFacesnapshotEventInfoSearchCommonDfe01").val();
//证件类型
var dfe03 = $("#deviceFacesnapshotEventInfoSearchCommonDfe03").val();
//证件号码
var dfe04 = $("#deviceFacesnapshotEventInfoSearchCommonDfe04").val().toUpperCase();
//事件类型
var dfe05 = $("#deviceFacesnapshotEventInfoSearchCommonDfe05").val();
//开始时间
var dfe06Start = $("#deviceFacesnapshotEventInfoSearchCommonDfe06Start").val();
//结束时间
var dfe06End = $("#deviceFacesnapshotEventInfoSearchCommonDfe06End").val();
//所属区县
var dui32 = $("#deviceFacesnapshotHeartInfoSearchCommonAreaId").val();
//所属派出所
var dui36 = $("#deviceFacesnapshotHeartInfoSearchCommonPoliceId").val()
//当前页
var Cpage = $("#deviceFacesnapshotEventInfoSearchCommonHiddenCpage").val();
//总页数
var totalNum = $("#deviceFacesnapshotEventInfoSearchCommonHiddenTotalNum").val();
//加载数据层
var indexs=layer.load(3);
$.ajax({
url : "searchdtmDeviceFacesnapshotEventFindCommon.action",
type : "POST",
data : {
dfe01 : dfe01,
dfe03 : dfe03,
dfe04 : dfe04,
dfe05 : dfe05,
dfe06Start : dfe06Start,
dfe06End : dfe06End,
dui32 : dui32,
dui36 : dui36,
Cpage : Cpage,
totalNum : totalNum
},
dataType : "json",
async:false,
success : function(data) {
var strTable = "";
var intPageNum = data.intPageNum;
var totalPageSize = data.intAllCount;
$("#deviceFacesnapshotEventInfoSearchCommontbody").text("");//先清空原先内容
if (data.jsonFlag == 1) {
//有数据
if(data.listUserDtmFacesnapshotEventFind != null && data.listUserDtmFacesnapshotEventFind.length > 0){
for(var i=0;i<data.listUserDtmFacesnapshotEventFind.length;i++){
strTable = strTable + "<tr>";
//事件图片路径
var imgurl = "";
if(data.listUserDtmFacesnapshotEventFind[i].dde06 != null && data.listUserDtmFacesnapshotEventFind[i].dde06 != "" && data.listUserDtmFacesnapshotEventFind[i].dde07 != null && data.listUserDtmFacesnapshotEventFind[i].dde07 != ""){
imgurl = data.listUserDtmFacesnapshotEventFind[i].dde06+data.listUserDtmFacesnapshotEventFind[i].dde07;
}
//人员图片路径
var psersonImgurl = "";
//if(data.listUserDtmFacesnapshotEventFind[i].dpi56 != null && data.listUserDtmFacesnapshotEventFind[i].dpi56 != ""){
// psersonImgurl = data.listUserDtmFacesnapshotEventFind[i].dpi56;
//}
if(data.listUserDtmFacesnapshotEventFind[i].dpi14 != null && data.listUserDtmFacesnapshotEventFind[i].dpi14 != "" && data.listUserDtmFacesnapshotEventFind[i].dpi15 != null && data.listUserDtmFacesnapshotEventFind[i].dpi15 != ""){
psersonImgurl = data.listUserDtmFacesnapshotEventFind[i].dpi14+data.listUserDtmFacesnapshotEventFind[i].dpi15;
}
//设备编码
if(data.listUserDtmFacesnapshotEventFind[i].dde01 != null && data.listUserDtmFacesnapshotEventFind[i].dde01 != ""){
var str = '<td><a href="#" onclick="searchDtmUsecompanyInfoByDeviceCoding(\''+data.listUserDtmFacesnapshotEventFind[i].dde21+'\');">'+data.listUserDtmFacesnapshotEventFind[i].dde01 +'</a></td>';
strTable = strTable + str;
}else{
strTable = strTable + "<td></td>";
}
//图片
strTable = strTable + "<td><a class='layui-btn layui-btn-xs' onclick=javascript:showDtmDeviceEntranceEventFindImage('"+imgurl+"','"+psersonImgurl+"');><i class='layui-icon layui-icon-picture'></i>图片</a></td>";
//详情
strTable = strTable + "<td><a class='layui-btn layui-btn-xs' lay-href='dtmfacesnapshotEventFindIndex.action?ddeId="+data.listUserDtmFacesnapshotEventFind[i].ddeId+"&dpi14="+data.listUserDtmFacesnapshotEventFind[i].dpi14+"&dpi15="+data.listUserDtmFacesnapshotEventFind[i].dpi15+"'><i class='layui-icon layui-icon-edit'></i>详情</a></td>";
//事件时间
if(data.listUserDtmFacesnapshotEventFind[i].dde04 != null && data.listUserDtmFacesnapshotEventFind[i].dde04 != ""){
strTable = strTable + "<td>"+data.listUserDtmFacesnapshotEventFind[i].dde04+"</td>";
}else{
strTable = strTable + "<td></td>";
}
//证件类型
if(data.listUserDtmFacesnapshotEventFind[i].dct01 != null && data.listUserDtmFacesnapshotEventFind[i].dct01 != ""){
strTable = strTable + "<td>"+data.listUserDtmFacesnapshotEventFind[i].dct01+"</td>";
}else{
strTable = strTable + "<td></td>";
}
//证件号码
if(data.listUserDtmFacesnapshotEventFind[i].dfe03 != null && data.listUserDtmFacesnapshotEventFind[i].dfe03 != ""){
var str = '<td><a href="#" onclick="searchDtmPersonInfo('+data.listUserDtmFacesnapshotEventFind[i].dfe02+', \''+data.listUserDtmFacesnapshotEventFind[i].dfe03+'\');">'+data.listUserDtmFacesnapshotEventFind[i].dfe03 +'</a></td>';
strTable = strTable + str;
}else{
strTable = strTable + "<td></td>";
}
//人员类型
if(data.listUserDtmFacesnapshotEventFind[i].dfe11Name != null && data.listUserDtmFacesnapshotEventFind[i].dfe11Name != ""){
strTable = strTable + "<td>"+data.listUserDtmFacesnapshotEventFind[i].dfe11Name+"</td>";
}else{
strTable = strTable + "<td></td>";
}
//人脸对比结果
if(data.listUserDtmFacesnapshotEventFind[i].dfe10 != null && data.listUserDtmFacesnapshotEventFind[i].dfe10 != ""){
strTable = strTable + "<td>"+data.listUserDtmFacesnapshotEventFind[i].dfe10+"</td>";
}else{
strTable = strTable + "<td></td>";
}
strTable = strTable + "</tr>";
}
$("#deviceFacesnapshotEventInfoSearchCommontbody").html(strTable);
}else{
layer.msg('没有查询到数据!', {offset: '15px',icon: 1});
}
//显示表格
layui.use(['table'], function(){//------
var table = layui.table;
//初始化表格
table.init('deviceFacesnapshotEventInfoSearchCommonTable', {
height: 'full-400' //设置高度
,limit:intPageNum
//支持所有基础参数
,page: false //是否分页
});
})//------
//分页
layui.use(['laypage'], function(){//------
var laypage = layui.laypage;
//初始化分页
laypage.render({
elem:'deviceFacesnapshotEventInfoSearchCommonPage'
,count:totalPageSize
,limit:intPageNum
,curr:Cpage
,layout: [ 'prev', 'page', 'next','count', 'skip']
,jump: function(obj, first){
if(!first){
$("#deviceFacesnapshotEventInfoSearchCommonHiddenCpage").val(obj.curr);
deviceFacesnapshotEventInfoSearchCommonSubmit();
}
}
});
})
} else if (data.jsonFlag == -2) {
layer.msg("Session失效,请重新登录!",{
icon: 2,
time: 2000
}, function(){
window.location = "${pageContext.request.contextPath}/communitySessionError.jsp";
});
} else if (data.jsonFlag == -1) {
layer.msg('人脸抓拍事件查询失败!', {offset: '15px',icon: 2});
} else {
layer.msg('人脸抓拍事件查询失败!', {offset: '15px',icon: 2});
}
//加载数据层关闭
layer.close(indexs);
return false;
}
});
}
//图片显示大图
function open_win(imgname,imgdataname) {
var imgDate = $("#"+imgdataname).val();
const img = new Image();
img.src = "data:image/png;base64,"+imgDate;
const newWin = window.open("", "_blank");
newWin.document.write(img.outerHTML);
newWin.document.title = imgname;
newWin.document.close();
}
//查看图片
function showDtmDeviceEntranceEventFindImage(imageurl,psersonImgurl){
//清空下方图片Div信息
document.getElementById("showDtmDeviceFacesnapshotEventImageSmallDiv").innerHTML="";
var strTable = "<table style='width:100%;' ><tr><td valign= 'top' align='center'>";
//无图片完整路径 显示提示信息
if(imageurl == null || imageurl == "" || imageurl == "null"){
strTable = strTable + "<p>采集图片</p><div style='height:190px;' ><p> </p><p> </p><p> </p><span style='font-size:30px;'>暂无图片信息</span></div>";
}
//有图片完整路径 点击 可查看放大之后的图片
else{
strTable = strTable + "<p>采集图片信息</p><div style='height:200px;' ><a target='_blank' href='"+imageurl+"'><img height='200px' width='200px' src='"+imageurl+"'/></a></div>";
}
strTable = strTable +"</td><td valign= 'top' align='center'>";
if(psersonImgurl == null || psersonImgurl == "" || psersonImgurl == "null"){
strTable = strTable + "<p>人员图片</p><div style='height:190px;' ><p> </p><p> </p><p> </p><span style='font-size:30px;'>暂无图片信息</span></div>";
}
//有图片完整路径 点击 可查看放大之后的图片
else{
strTable = strTable + "<p>人员图片信息</p><div style='height:200px;' ><a target='_blank' href='"+psersonImgurl+"'><img height='200px' width='200px' src='"+psersonImgurl+"'/></a></div>";
}
document.getElementById("showDtmDeviceFacesnapshotEventImageSmallDiv").innerHTML=strTable+"</td></tr></table>";
$("#showDtmDeviceFacesnapshotEventImageSmallDiv").initUI();
}
//表头初始化
function deviceFacesnapshotEventInfoSearchCommonTableInit(){
$("#deviceFacesnapshotEventInfoSearchCommonthead").text("");//先清空原先内容
var thead = document.getElementById('deviceFacesnapshotEventInfoSearchCommonthead');
var tr = document.createElement("tr");
tr.innerHTML=
'<th lay-data="{field:\'dfe01\', width:170}">设备编码</th>' +
'<th lay-data="{field:\'btn1\', width:90}">图片</th>' +
'<th lay-data="{field:\'btn2\', width:90}">详情</th>' +
'<th lay-data="{field:\'dfe06\', width:170}">发生时间</th>' +
'<th lay-data="{field:\'dct01\', width:130}">证件类型</th>' +
'<th lay-data="{field:\'dfe04\', width:170}">证件号码</th>' +
'<th lay-data="{field:\'dfe11Name\', width:150}">人员类型</th>'
thead.appendChild(tr);
}
deviceFacesnapshotEventInfoSearchCommonTableInit();
</script>
</body>
</html>
总结:
感观事件模糊查询sql
-- 单位信息表dui_id
select * from dtm_usecompany_info
--人脸识别事件
select dde_id,dde01,dde03,dde10,dde15,dde20,dde21,dde04,dde06,dde07,dde08,dde09,
(select dpi14 from dtm_person_info where dpi01=dtm_facesnapshot_event.dfe02 and dpi02=dtm_facesnapshot_event.dfe03) as dpi14,
(select dpi15 from dtm_person_info where dpi01=dtm_facesnapshot_event.dfe02 and dpi02=dtm_facesnapshot_event.dfe03) as dpi15,dct01,dtm_facesnapshot_event.dfe02 as dfe02
,dtm_facesnapshot_event.dfe03 as dfe03,dictionary_facesnapshot_eventtype.dfe01 as dfe11Name from dtm_facesnapshot_event
left join dictionary_card_type on dtm_facesnapshot_event.dfe02=dct03
left join dictionary_facesnapshot_eventtype on dde20=dictionary_facesnapshot_eventtype.dfe_id
left join dtm_usecompany_info on dui_id=dde21 left join dtm_usecompany_trade on dut04=dde21 where 1=1--->>>>?????????????????????????
--感观探测事件类型
select * from dictionary_statusperception_eventtype
--感观探测 dde02,dde04
select * from dtm_statusperception_event
-- dictionary_card_type
select * from dictionary_card_type
--感观探测left join dictionary_card_type on dtm_statusperception_event.dfe02=dct03
select dde02,dde04 from dtm_statusperception_event
--感观事件类型dde20
---关键
select * from dtm_statusperception_event
left join dictionary_statusperception_eventtype on dtm_statusperception_event.dde20=dse02