Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zjgszdVideoAlarmService
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gszd
zjgszdVideoAlarmService
Commits
3f4b7681
Commit
3f4b7681
authored
May 26, 2021
by
wangjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加设备统一管理页面跳转
parent
c535d54d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
176 additions
and
90 deletions
+176
-90
src/main/java/im/zhaojun/common/util/ExportEngine.java
src/main/java/im/zhaojun/common/util/ExportEngine.java
+14
-8
src/main/java/im/zhaojun/system/controller/IndexController.java
...in/java/im/zhaojun/system/controller/IndexController.java
+7
-0
src/main/java/im/zhaojun/system/controller/TrafficStatisticsController.java
...haojun/system/controller/TrafficStatisticsController.java
+7
-31
src/main/java/im/zhaojun/system/model/Traffalarmrecord.java
src/main/java/im/zhaojun/system/model/Traffalarmrecord.java
+37
-37
src/main/resources/application.properties
src/main/resources/application.properties
+14
-11
src/main/resources/mapper/traffdevicewriteresult.xml
src/main/resources/mapper/traffdevicewriteresult.xml
+3
-3
src/main/resources/static/js/tsgl/sbtygl.js
src/main/resources/static/js/tsgl/sbtygl.js
+24
-0
src/main/resources/templates/page/sbtygl.html
src/main/resources/templates/page/sbtygl.html
+70
-0
No files found.
src/main/java/im/zhaojun/common/util/ExportEngine.java
View file @
3f4b7681
...
...
@@ -17,13 +17,15 @@ import java.util.Map;
public
class
ExportEngine
{
private
static
Log
iLog
=
LogFactory
.
getLog
(
ExportEngine
.
class
.
getName
());
public
void
exportData
(
String
sheetName
,
ExcelCol
[]
headertxt
,
List
<
Map
>
list
,
HttpServletResponse
responses
)
{
public
void
exportData
(
String
sheetName
,
String
headertxt
,
String
enhead
,
List
<
Map
>
list
,
HttpServletResponse
responses
)
{
if
(
null
==
headertxt
||
null
==
enhead
)
return
;
OutputStream
os
=
null
;
try
{
os
=
responses
.
getOutputStream
();
responses
.
reset
();
// 清空输出流
responses
.
setCharacterEncoding
(
"utf-8"
);
responses
.
setHeader
(
"Content-disposition"
,
"attachment; filename="
+
(
new
Date
()).
getTime
()
+
".xls"
);
// 设定输出文件头
responses
.
setContentType
(
"application/msexcel;charset=
gb2312
"
);
// 定义输出类型
responses
.
setContentType
(
"application/msexcel;charset=
utf-8
"
);
// 定义输出类型
HSSFWorkbook
workbook
=
new
HSSFWorkbook
();
// 创建字体对象
HSSFFont
font
=
workbook
.
createFont
();
...
...
@@ -36,15 +38,16 @@ public class ExportEngine {
// 单元格的字体用什么?就用上面设置好的东西
cellStyle
.
setFont
(
font
);
cellStyle
.
setAlignment
(
HSSFCellStyle
.
ALIGN_CENTER
);
HSSFSheet
sheet
=
workbook
.
createSheet
(
sheetName
);
HSSFSheet
sheet
=
workbook
.
createSheet
(
"sheet1"
);
sheet
.
setDefaultColumnWidth
((
short
)
12
);
// 生成表头
String
[]
cells
=
headertxt
.
split
(
","
);
HSSFRow
row
=
sheet
.
createRow
((
short
)
0
);
if
(
headertxt
!=
null
&&
headertxt
.
length
>
0
)
{
if
(
cells
!=
null
&&
cells
.
length
>
0
)
{
short
j
=
0
;
for
(
ExcelCol
s
:
headertxt
)
{
for
(
String
s
:
cells
)
{
HSSFCell
cell1
=
row
.
createCell
(
j
);
cell1
.
setCellValue
(
headertxt
[
j
].
getColName
()
);
cell1
.
setCellValue
(
cells
[
j
]
);
cell1
.
setCellStyle
(
cellStyle
);
j
=
(
short
)
(
j
+
1
);
}
...
...
@@ -53,13 +56,16 @@ public class ExportEngine {
HSSFCellStyle
cs
=
workbook
.
createCellStyle
();
cs
.
setAlignment
(
HSSFCellStyle
.
ALIGN_CENTER
);
// 生成数据
String
[]
encells
=
enhead
.
split
(
","
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
HSSFRow
datarow
=
sheet
.
createRow
((
short
)
i
+
1
);
Map
mp
=
list
.
get
(
i
);
for
(
short
k
=
0
;
k
<
headertxt
.
length
;
k
++)
{
iLog
.
info
(
list
.
get
(
i
));
for
(
short
k
=
0
;
k
<
encells
.
length
;
k
++)
{
iLog
.
info
(
"encells[k]"
+
encells
[
k
]);
HSSFCell
datacell
=
datarow
.
createCell
(
k
);
datacell
.
setCellStyle
(
cs
);
datacell
.
setCellValue
(
mp
.
get
(
headertxt
[
k
].
getColKey
())
==
null
?
""
:
mp
.
get
(
headertxt
[
k
].
getColKey
())
+
""
);
datacell
.
setCellValue
(
encells
[
k
]
==
null
?
""
:
mp
.
get
(
encells
[
k
])==
null
?
""
:
mp
.
get
(
encells
[
k
]).
toString
()
);
}
}
workbook
.
write
(
os
);
...
...
src/main/java/im/zhaojun/system/controller/IndexController.java
View file @
3f4b7681
...
...
@@ -200,6 +200,13 @@ public class IndexController {
model
.
addAttribute
(
"userOnlineCount"
,
userOnlineCount
);
return
"welcome"
;
}
@OperationLog
(
"设备统一管理"
)
@GetMapping
(
"/sbtygl"
)
public
String
sbtygl
(
Model
model
)
{
List
<
Menu
>
menuTreeVOS
=
menuService
.
selectCurrentUserMenuTree
();
model
.
addAttribute
(
"menus"
,
menuTreeVOS
);
return
"page/sbtygl"
;
}
@OperationLog
(
"查看近七日登录统计图"
)
@GetMapping
(
"/weekLoginCount"
)
...
...
src/main/java/im/zhaojun/system/controller/TrafficStatisticsController.java
View file @
3f4b7681
...
...
@@ -39,6 +39,11 @@ public class TrafficStatisticsController {
@Value
(
"${pushrecordurl}"
)
private
String
pushrecordurl
;
@Value
(
"${exportcolumn}"
)
private
String
exportcolumn
;
@Value
(
"${enexportcolumn}"
)
private
String
enexportcolumn
;
@OperationLog
(
"获取车流量列表,从当天凌晨开始"
)
...
...
@@ -880,40 +885,11 @@ public class TrafficStatisticsController {
listMap
.
put
(
"xzbh"
,
item
.
getAreaid
());
listMap
.
put
(
"xzmc"
,
item
.
getXzmc
());
listMap
.
put
(
"recordtime"
,
DateUtils
.
parseDateToStr
(
"yyyy-MM-dd HH:mm:ss"
,
item
.
getRecordtime
()));
listMap
.
put
(
"recordlevel"
,
item
.
getAlarmlevel
()
+
"级"
);
listMap
.
put
(
"recordlevel"
,
item
.
getAlarmlevel
());
listMap
.
put
(
"recordname"
,
item
.
getRecordname
());
lists
.
add
(
listMap
);
}
ExcelCol
[]
cells
=
new
ExcelCol
[
8
];
cells
[
0
]
=
new
ExcelCol
();
cells
[
0
].
setColKey
(
"sbbh"
);
cells
[
0
].
setColName
(
"设备编号"
);
cells
[
1
]
=
new
ExcelCol
();
cells
[
1
].
setColKey
(
"tdbh"
);
cells
[
1
].
setColName
(
"通道编号"
);
cells
[
2
]
=
new
ExcelCol
();
cells
[
2
].
setColKey
(
"tdmc"
);
cells
[
2
].
setColName
(
"设备名称"
);
cells
[
3
]
=
new
ExcelCol
();
cells
[
3
].
setColKey
(
"xzbh"
);
cells
[
3
].
setColName
(
"区域编号"
);
cells
[
4
]
=
new
ExcelCol
();
cells
[
4
].
setColKey
(
"xzmc"
);
cells
[
4
].
setColName
(
"区域名称"
);
cells
[
5
]
=
new
ExcelCol
();
cells
[
5
].
setColKey
(
"recordtime"
);
cells
[
5
].
setColName
(
"告警时间"
);
cells
[
6
]
=
new
ExcelCol
();
cells
[
6
].
setColKey
(
"recordlevel"
);
cells
[
6
].
setColName
(
"告警等级"
);
cells
[
7
]
=
new
ExcelCol
();
cells
[
7
].
setColKey
(
"recordname"
);
cells
[
7
].
setColName
(
"告警名称"
);
Map
<
String
,
Object
>
param
=
new
HashMap
<>(
4
);
SimpleDateFormat
formart
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
dateTime
=
formart
.
format
(
new
Date
());
...
...
@@ -921,7 +897,7 @@ public class TrafficStatisticsController {
param
.
put
(
"sheetName"
,
"告警事件"
);
param
.
put
(
"header"
,
"告警事件"
);
// new ExportEngine().exportCommData(param, cells, lists, response);
new
ExportEngine
().
exportData
(
"告警事件"
,
cells
,
lists
,
response
);
new
ExportEngine
().
exportData
(
"告警事件"
,
exportcolumn
,
enexportcolumn
,
lists
,
response
);
}
...
...
src/main/java/im/zhaojun/system/model/Traffalarmrecord.java
View file @
3f4b7681
...
...
@@ -9,44 +9,44 @@ import java.util.Date;
public
class
Traffalarmrecord
implements
java
.
io
.
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Id
private
Long
recordid
;
// ��¼��� ��������
private
Integer
algotype
;
//--�㷨���� Ĭ���� 0:��˾ 1:��������˾
private
Long
areaid
;
//--Ͻ�����
private
String
fdid
;
//�豸���
private
Integer
channelid
;
//--ͨ�����
private
Integer
channeletype
;
//ͨ������ �ɺ���
private
String
channelname
;
//ͨ������
private
Date
recordtime
;
//�¼���¼ʱ��
private
String
recordtype
;
//�¼���¼����
private
String
location
;
//Ŀ�궨λ��Ϣ
private
String
img1urlfrom
;
//ͼƬԴ��ַ
private
String
img1path
;
//ͼƬ�洢��ַ
private
String
img2urlfrom
;
//ͼƬԴ��ַ
private
String
img2path
;
//ͼƬ�洢��ַ
private
String
img3urlfrom
;
//ͼƬԴ��ַ
private
String
img3path
;
//ͼƬ�洢��ַ
private
String
img4urlfrom
;
//ͼƬԴ��ַ
private
String
img4path
;
//ͼƬ�洢��ַ
private
String
img5urlfrom
;
//ͼƬԴ��ַ
private
String
img5path
;
//ͼƬ�洢��ַ
private
String
videourlfrom
;
//��ƵԴ��ַ
private
String
videopath
;
//��Ƶ�洢��ַ
private
Date
retrytime
;
//video���Ե����һ�εĶ�ȡ��ʱ��
private
Integer
retrycount
;
//ideo���Զ�ȡ�ܴ���
private
Integer
recordlevel
;
//�¼����� --Ĭ��Ϊ0 ����������ʱδ֪
private
Integer
checkstatus
;
//0:����� 1:���ͨ�� 2:��˲�ͨ�� 9:����
private
String
creator
;
//������
private
Date
createtime
;
//����ʱ��
private
String
updator
;
//������
private
Date
updatetime
;
//����ʱ��
private
Long
recordid
;
private
Integer
algotype
;
private
Long
areaid
;
private
String
fdid
;
private
Integer
channelid
;
private
Integer
channeletype
;
private
String
channelname
;
private
Date
recordtime
;
private
String
recordtype
;
private
String
location
;
private
String
img1urlfrom
;
private
String
img1path
;
private
String
img2urlfrom
;
private
String
img2path
;
private
String
img3urlfrom
;
private
String
img3path
;
private
String
img4urlfrom
;
private
String
img4path
;
private
String
img5urlfrom
;
private
String
img5path
;
private
String
videourlfrom
;
private
String
videopath
;
private
Date
retrytime
;
private
Integer
retrycount
;
private
Integer
recordlevel
;
private
Integer
checkstatus
;
private
String
creator
;
private
Date
createtime
;
private
String
updator
;
private
Date
updatetime
;
private
String
remark
;
private
Integer
pushstatus
;
//����״̬
private
String
pushdesc
;
//��������
private
String
pushcount
;
//���ʹ���
private
Date
pushdate
;
//����ʱ��
private
String
processstatus
;
//����״̬
private
String
objlable
;
//��������
private
String
objlablename
;
//��������
private
Integer
pushstatus
;
private
String
pushdesc
;
private
String
pushcount
;
private
Date
pushdate
;
private
String
processstatus
;
private
String
objlable
;
private
String
objlablename
;
private
String
videoname
;
private
String
rectificationtype
;
@Override
...
...
src/main/resources/application.properties
View file @
3f4b7681
...
...
@@ -2,15 +2,15 @@ spring.profiles.active=dev
server.port
=
8082
#
spring.datasource.username=hzjt
#
spring.datasource.password=hzjt
#
spring.datasource.url=jdbc:oracle:thin:@33.50.1.22:1521:orcl
spring.datasource.username
=
test
spring.datasource.password
=
test
spring.datasource.url
=
jdbc:oracle:thin:@192.168.168.212:1523:helowin
spring.datasource.username
=
hzjt
spring.datasource.password
=
hzjt
spring.datasource.url
=
jdbc:oracle:thin:@33.50.1.22:1521:orcl
#
spring.datasource.username=test
#
spring.datasource.password=test
#
spring.datasource.url=jdbc:oracle:thin:@192.168.168.212:1523:helowin
spring.datasource.driver-class-name
=
oracle.jdbc.OracleDriver
#
��ʼ����С����С�����
#
\uFFFD\uFFFD\u02BC\uFFFD\uFFFD\uFFFD\uFFFD\u0421\uFFFD\uFFFD\uFFFD\uFFFD\u0421\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
spring.datasource.initialSize
=
5
spring.datasource.minIdle
=
5
spring.datasource.maxActive
=
20
...
...
@@ -51,13 +51,16 @@ shiro-action.log.login = false
shiro-action.session-timeout
=
259200
shiro-action.perms-cache-timeout
=
518400
shiro-action.super-admin-username
=
admin
shiro-action.super-admin-username
=
test
shiro-action.retry-count
=
5
shiro-action.retry-timeout
=
300
shiro-action.login-verify
=
true
managername
=
admin
spring.devtools.restart.enabled
=
true
spring.devtools.restart.additional-paths
=
src/main/java
spring.devtools.restart.exclude
=
static/**,public/**
managername
=
admin
spring.profiles.path
=
D:/hzjt_service/imp/config/im/hzjt.properties
\ No newline at end of file
spring.profiles.path
=
D:/hzjt_service/imp/config/im/hzjt.properties
exportcolumn
=
\u
8BBE
\u5907\u
7F16
\u
53F7,
\u
901A
\u9053\u
7F16
\u
53F7,
\u
8BBE
\u5907\u
540D
\u
79F0,
\u
533A
\u
57DF
\u
7F16
\u
53F7,
\u
533A
\u
57DF
\u
540D
\u
79F0,
\u
544A
\u
8B66
\u
65F6
\u
95F4,
\u
544A
\u
8B66
\u
7B49
\u
7EA7,
\u
544A
\u
8B66
\u
540D
\u
79F0
enexportcolumn
=
sbbh,tdbh,tdmc,xzbh,xzmc,recordtime,recordlevel,recordname
\ No newline at end of file
src/main/resources/mapper/traffdevicewriteresult.xml
View file @
3f4b7681
...
...
@@ -11,7 +11,7 @@
a.pushdesc,
p.dept_name as xztreename
from sbtdspsr ta
left
join traffdevicewriteresult a
inner
join traffdevicewriteresult a
on a.sbbh = ta.sbbh
and a.tdbh = ta.tdbh
left join dept p
...
...
@@ -47,8 +47,8 @@
p.dept_name as xztreename,
b.remark1 as deviceconfig
from sbtdspsr ta
left
join traffdevicewriteresult a on a.sbbh = ta.sbbh and a.tdbh = ta.tdbh
left
join traffdeviceconfig b on b.fdid = ta.sbbh and b.channelid = ta.tdbh
inner
join traffdevicewriteresult a on a.sbbh = ta.sbbh and a.tdbh = ta.tdbh
inner
join traffdeviceconfig b on b.fdid = ta.sbbh and b.channelid = ta.tdbh
left join dept p on p.dept_id = ta.xzbh
<where>
<if
test=
"xhs !=null and xhs.size>0 "
>
...
...
src/main/resources/static/js/tsgl/sbtygl.js
0 → 100644
View file @
3f4b7681
let
vue_sjcx
=
new
Vue
({
el
:
'
#sjcx
'
,
data
:
{
data_table_wfpz
:
[
{
xzmc
:
'
杭州支队
'
,
xzaddress
:
'
http://33.51.6.97:8009/operation/node-list
'
},
{
xzmc
:
'
杭州支队
'
,
xzaddress
:
'
http://33.55.1.85-96:8009/operation/node-list
'
},
{
xzmc
:
'
温州支队:
'
,
xzaddress
:
'
http://33.57.1.22:8009/operation/node-list
'
},
{
xzmc
:
'
绍兴支队:
'
,
xzaddress
:
'
http://33.61.1.23:8009/operation/node-list
'
},
{
xzmc
:
'
嘉兴支队
'
,
xzaddress
:
'
http://33.55.1.85-96:8009/operation/node-list
'
},
{
xzmc
:
'
衢州支队
'
,
xzaddress
:
''
},
{
xzmc
:
'
丽水支队
'
,
xzaddress
:
'
http://33.53.1.171:8009/operation/node-list
'
},
{
xzmc
:
'
金华支队
'
,
xzaddress
:
'
http://33.60.1.7:8009/operation/node-list
'
},
{
xzmc
:
'
湖州支队
'
,
xzaddress
:
'
http://33.52.1.222:8009/operation/node-list
'
}
]
},
methods
:
{
gopage
:
function
(
item
){
window
.
open
(
item
,
"
_blank
"
);
}
}
});
src/main/resources/templates/page/sbtygl.html
0 → 100644
View file @
3f4b7681
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<link
rel=
"stylesheet"
href=
"../bootstrap/css/bootstrap.css"
>
<link
rel=
"stylesheet"
href=
"../bootstrap/css/bootstrap-datetimepicker.css"
>
<link
rel=
"stylesheet"
href=
"../bootstrap/css/bootstrap-select.css"
>
<link
rel=
"stylesheet"
href=
"../bootstrap/css/bootstrap-treeview.css"
>
<link
rel=
"stylesheet"
href=
"../bootstrap/css/bootstrap-switch.min.css"
>
<link
rel=
"stylesheet"
href=
"../css/sbts.css"
>
<link
rel=
"stylesheet"
href=
"../css/photoviewer.css"
>
<title>
设备统一管理
</title>
</head>
<body>
<div
id=
"page-sy"
>
<div
class=
"right-nav"
>
<div
class=
"tab-content content-sjfx"
>
<div
role=
"tabpanel"
class=
"tab-pane active"
id=
"sjcx"
>
<div
class=
"div-left"
>
<div
id=
"sjcx_s"
class=
"div-right"
>
<div
style=
"height:calc(100% - 130px);margin-top: 20px;"
class=
"tables"
>
<table
class=
"table table-td"
style=
"text-align: center;"
>
<thead>
<tr
style=
"background-color: rgb(228, 228, 228);"
>
<td>
支队名称
</td>
<td
style=
"width: 400px;"
>
服务器链接地址
</td>
</tr>
</thead>
<tbody
class=
"div-pub-gt"
>
<tr
v-for=
"(item,index) in data_table_wfpz"
>
<td
v-text=
"item.xzmc"
></td>
<td
style=
"width: 400px;"
>
<a
@
click=
"gopage(item.xzaddress)"
target=
"_blank"
>
{{item.xzaddress}}
</a>
</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
sjcx
</body>
<script
src=
"../js/jquery-3.1.1.min.js"
></script>
<!--<script src="../js/viewer.min.js"></script>-->
<script
src=
"../js/util/photoviewer.js"
></script>
<script
src=
"../bootstrap/js/bootstrap.js"
></script>
<script
src=
"../bootstrap/js/bootstrap-paginator.js"
></script>
<script
src=
"../bootstrap/js/bootstrap-treeview.js"
></script>
<script
src=
"../bootstrap/js/bootstrap-select.js"
></script>
<script
src=
"../bootstrap/js/bootstrap-switch.min.js"
></script>
<!--<script src="../bootstrap/js/bootstrap-datetimepicker.js"></script>-->
<!--<script src="../bootstrap/js/bootstrap-datetimepicker.zh-CN.js"></script>-->
<script
src=
"../js/laydate/laydate.js"
></script>
<script
src=
"../js/vue.js"
></script>
<script
src=
"../js/util/http_util.js"
></script>
<script
src=
"../js/tsgl/sbtygl.js"
></script>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment