Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hnxtbaboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
杨亮
hnxtbaboot
Commits
d8668a91
Commit
d8668a91
authored
Jul 08, 2022
by
wuchengwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备监控管理查询sql优化,调整排序
parent
bbc568c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
30 deletions
+50
-30
hnxtba-core/src/main/java/com/founder/cjqx/dao/SysClientVpMapper.java
+2
-1
hnxtba-core/src/main/java/com/founder/cjqx/service/impl/SysClientVpServiceImpl.java
+1
-1
hnxtba-core/src/main/java/com/founder/controller/SwCjController.java
+32
-14
hnxtba-core/src/main/resources/mapper/SysClientVpMapper.xml
+15
-14
No files found.
hnxtba-core/src/main/java/com/founder/cjqx/dao/SysClientVpMapper.java
View file @
d8668a91
...
...
@@ -109,5 +109,5 @@ public interface SysClientVpMapper {
* @param ip
* @return
*/
String
get
mc
jsj
(
String
ip
);
String
get
MC
jsj
(
String
ip
);
}
\ No newline at end of file
hnxtba-core/src/main/java/com/founder/cjqx/service/impl/SysClientVpServiceImpl.java
View file @
d8668a91
...
...
@@ -335,7 +335,7 @@ public class SysClientVpServiceImpl implements SysClientVpService {
@Override
public
String
getmcjsj
(
String
ip
)
{
String
getMCjsj
=
sysClientVpMapper
.
get
mc
jsj
(
ip
);
String
getMCjsj
=
sysClientVpMapper
.
get
MC
jsj
(
ip
);
return
getMCjsj
;
}
}
hnxtba-core/src/main/java/com/founder/controller/SwCjController.java
View file @
d8668a91
...
...
@@ -8,10 +8,12 @@ import com.founder.ryswtz.controller.CommonController;
import
com.founder.service.AutoTbXwRycjService
;
import
com.founder.service.IParamService
;
import
com.founder.service.ISwCjService
;
import
com.founder.service.XzxtcxService
;
import
com.founder.utils.EasyuiPage
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
...
...
@@ -33,6 +35,8 @@ import java.net.URLDecoder;
import
java.net.URLEncoder
;
import
java.util.*
;
import
static
com
.
founder
.
model
.
Constant
.
USER_LEVEL_CX
;
/**
* 声纹采集Controller
* @author www
...
...
@@ -43,9 +47,13 @@ public class SwCjController {
private
static
Log
log
=
LogFactory
.
getLog
(
SwCjController
.
class
);
@Autowired
private
ISwCjService
swCjService
;
/**
* 文件下载路径
*/
@Value
(
"${wjxzlj}"
)
private
String
wjxzlj
;
@Autowired
private
IDicItemService
dicItem
Service
;
private
XzxtcxService
xzxtcx
Service
;
@Autowired
private
IParamService
paramService
;
...
...
@@ -195,8 +203,9 @@ private static Log log = LogFactory.getLog(SwCjController.class);
int
swcnt
=
swCjService
.
getSwSjXxCnt
(
rybhstr
);
//List<TbStSw> tbStSws = swCjService.getSwSjXxList(rybhstr);
String
savePath
=
"/personphoto/"
+
rybhstr
.
substring
(
rybhstr
.
length
()
-
10
,
rybhstr
.
length
()
-
4
)
+
"/"
+
rybhstr
.
substring
(
rybhstr
.
length
()
-
3
,
rybhstr
.
length
());
Param
param
=
paramService
.
getParamById
(
"0100"
);
String
zplj
=
param
.
getParamvalue
();
// Param param = paramService.getParamById("0100");
// String zplj = param.getParamvalue();
String
zplj
=
wjxzlj
;
String
filePath
=
zplj
;
filePath
=
filePath
+
savePath
;
File
filejia0
=
new
File
(
filePath
);
...
...
@@ -449,8 +458,9 @@ private static Log log = LogFactory.getLog(SwCjController.class);
int
swcnt
=
swCjService
.
getSwSjXxCnt
(
rybhstr
);
//List<TbStSw> tbStSws = swCjService.getSwSjXxList(rybhstr);
String
savePath
=
"/personphoto/"
+
rybhstr
.
substring
(
rybhstr
.
length
()
-
10
,
rybhstr
.
length
()
-
4
)
+
"/"
+
rybhstr
.
substring
(
rybhstr
.
length
()
-
3
,
rybhstr
.
length
());
Param
param
=
paramService
.
getParamById
(
"0100"
);
String
zplj
=
param
.
getParamvalue
();
// Param param = paramService.getParamById("0100");
// String zplj = param.getParamvalue();
String
zplj
=
wjxzlj
;
String
filePath
=
zplj
;
filePath
=
filePath
+
savePath
;
File
filejia0
=
new
File
(
filePath
);
...
...
@@ -476,8 +486,13 @@ private static Log log = LogFactory.getLog(SwCjController.class);
@PostMapping
(
"/getSwDetail"
)
@ResponseBody
public
Map
getSwDetail
(
String
asjxgrybh
){
List
<
TbStSw
>
tbStSws
=
swCjService
.
getSwSjXxList
(
asjxgrybh
);
public
Map
getSwDetail
(
String
asjxgrybh
,
String
type
){
List
<
TbStSw
>
tbStSws
=
new
ArrayList
<>();
if
(
USER_LEVEL_CX
.
equals
(
type
))
{
tbStSws
=
xzxtcxService
.
getSwSjXxList
(
asjxgrybh
);
}
else
{
tbStSws
=
swCjService
.
getSwSjXxList
(
asjxgrybh
);
}
CommonController
commonController
=
new
CommonController
();
TbStSw
swzh
=
new
TbStSw
();
//表头数据展示
...
...
@@ -682,8 +697,9 @@ private static Log log = LogFactory.getLog(SwCjController.class);
int
swcnt
=
swCjService
.
getSwSjXxCnt
(
rybhstr
);
//List<TbStSw> tbStSws = swCjService.getSwSjXxList(rybhstr);
String
savePath
=
"/personphoto/"
+
rybhstr
.
substring
(
rybhstr
.
length
()
-
10
,
rybhstr
.
length
()
-
4
)
+
"/"
+
rybhstr
.
substring
(
rybhstr
.
length
()
-
3
,
rybhstr
.
length
());
Param
param
=
paramService
.
getParamById
(
"0100"
);
String
zplj
=
param
.
getParamvalue
();
// Param param = paramService.getParamById("0100");
// String zplj = param.getParamvalue();
String
zplj
=
wjxzlj
;
String
filePath
=
zplj
;
filePath
=
filePath
+
savePath
;
File
filejia0
=
new
File
(
filePath
);
...
...
@@ -774,8 +790,9 @@ private static Log log = LogFactory.getLog(SwCjController.class);
FileInputStream
ips
=
null
;
String
savePath
=
"/personphoto/"
+
rybh
.
substring
(
rybh
.
length
()
-
10
,
rybh
.
length
()
-
4
)
+
"/"
+
rybh
.
substring
(
rybh
.
length
()
-
3
,
rybh
.
length
());
Param
param
=
paramService
.
getParamById
(
"0100"
);
String
zplj
=
param
.
getParamvalue
();
// Param param = paramService.getParamById("0100");
// String zplj = param.getParamvalue();
String
zplj
=
wjxzlj
;
String
filePath
=
zplj
;
filePath
=
filePath
+
savePath
;
File
filejia0
=
new
File
(
filePath
);
...
...
@@ -828,8 +845,9 @@ private static Log log = LogFactory.getLog(SwCjController.class);
boolean
bool
=
swCjService
.
deleteSwxx
(
xxzjbh
);
if
(
bool
){
String
savePath
=
"/personphoto/"
+
rybh
.
substring
(
rybh
.
length
()
-
10
,
rybh
.
length
()
-
4
)
+
"/"
+
rybh
.
substring
(
rybh
.
length
()
-
3
,
rybh
.
length
());
Param
param
=
paramService
.
getParamById
(
"0100"
);
String
zplj
=
param
.
getParamvalue
();
// Param param = paramService.getParamById("0100");
// String zplj = param.getParamvalue();
String
zplj
=
wjxzlj
;
String
filePath
=
zplj
;
filePath
=
filePath
+
savePath
;
File
filejia0
=
new
File
(
filePath
);
...
...
hnxtba-core/src/main/resources/mapper/SysClientVpMapper.xml
View file @
d8668a91
...
...
@@ -248,7 +248,7 @@
,YHKXSF_LXDH as yhkxsfLxdh
,DNAXSF_LXDH as dnaxsfLxdh
,YTHCJXSF_LXDH as ythcjxsfLxdh
,to_char(dqsj,'yyyy-mm-dd') dqsjStr
</sql>
<sql
id=
"queryWhere"
>
...
...
@@ -338,7 +338,15 @@
nvl(ry.zjcjs, 0) as zjcjs,
nvl(ry.swcjs, 0) as swcjs,
nvl(ry.sjycs, 0) as sjycs
FROM Sys_Client_Vp vp
FROM (select pp.*, substr((select utl_raw.cast_to_varchar2(utl_encode.base64_decode(
utl_raw.cast_to_raw(utl_raw.cast_to_varchar2(
utl_encode.base64_decode(utl_raw.cast_to_raw(pp.IP)))))) as ip
from dual), 1, instr((select utl_raw.cast_to_varchar2(
utl_encode.base64_decode(
utl_raw.cast_to_raw(
utl_raw.cast_to_varchar2(
utl_encode.base64_decode(utl_raw.cast_to_raw(pp.IP)))))) as ip
from dual), '{') - 1) as ips from Sys_Client_Vp pp where pp.scbz ='0' order by ip) vp
left join (select IP,
count(*) as ycs,
sum(HM) as hmcjs,
...
...
@@ -363,18 +371,11 @@
and (ifhb is null or ifhb
<![CDATA[<>]]>
'1')
<if
test=
"maxlrsjStr != null and maxlrsjStr != ''"
>
and LRSJ
<![CDATA[<]]>
to_date(#{maxlrsjStr , jdbcType=VARCHAR },'YYYY-MM-DD')+1
</if>
<if
test=
"minlrsjStr != null and minlrsjStr != ''"
>
and LRSJ
<![CDATA[>=]]>
to_date(#{minlrsjStr , jdbcType=VARCHAR },'YYYY-MM-DD')
</if>
order by lrsj desc ,IP
)
group by ip) ry on
substr((select utl_raw.cast_to_varchar2(utl_encode.base64_decode(
utl_raw.cast_to_raw(utl_raw.cast_to_varchar2(
utl_encode.base64_decode(utl_raw.cast_to_raw(vp.IP)))))) as ip
from dual), 1, instr((select utl_raw.cast_to_varchar2(
utl_encode.base64_decode(
utl_raw.cast_to_raw(
utl_raw.cast_to_varchar2(
utl_encode.base64_decode(utl_raw.cast_to_raw(vp.IP)))))) as ip
from dual), '{') - 1) = ry.IP
where vp.SCBZ='0'
vp.ips = ry.IP
where 1=1
<if
test=
"ip!=null and ip !=''"
>
AND vp.ip = #{ip}
</if>
<if
test=
"spzt!=null and spzt !=''"
>
AND vp.spzt = #{spzt}
</if>
<if
test=
"ssdwcode!=null and ssdwcode !=''"
>
AND vp.SSDW_CODE like #{ssdwcode}||'%'
</if>
...
...
@@ -391,9 +392,9 @@
<if
test=
"zjcjycode!=null and zjcjycode !=''"
>
AND vp.ZJCJY_CODE = #{zjcjycode}
</if>
<if
test=
"hmcjycode!=null and hmcjycode !=''"
>
AND vp.HMCJY_CODE = #{hmcjycode}
</if>
<if
test=
"swcjycode!=null and swcjycode !=''"
>
AND vp.SWCJY_CODE = #{swcjycode}
</if>
order by rylrsj desc
) A
where ROWNUM
<![CDATA[ <= ]]>
${end}
order by A.SPZT, A.rylrsj desc
)
WHERE RN
<![CDATA[ >= ]]>
${begin}
</select>
...
...
@@ -1040,7 +1041,7 @@
from dual)
</sql>
<select
id=
"
C
lientYlist"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
<select
id=
"
c
lientYlist"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select b.month yysjstr,decode(sl,'',0,sl) yycsstr from
(
<include
refid=
"cyxj"
/>
) a,
(
<include
refid=
"dnyf"
/>
) b where a.mo(+) = b.month order by b.month
...
...
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