Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Imagedx
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
VideoAIService
Imagedx
Commits
238fd7d4
Commit
238fd7d4
authored
Jan 14, 2022
by
wangjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布的版本
parent
adf5dfe2
Changes
53
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
1281 additions
and
839 deletions
+1281
-839
pom.xml
pom.xml
+13
-1
src/main/java/im/dx/ShiroActionApplication.java
src/main/java/im/dx/ShiroActionApplication.java
+0
-2
src/main/java/im/dx/common/config/ScheduleTaskConfig.java
src/main/java/im/dx/common/config/ScheduleTaskConfig.java
+4
-0
src/main/java/im/dx/common/exception/WebExceptionHandler.java
...main/java/im/dx/common/exception/WebExceptionHandler.java
+28
-28
src/main/java/im/dx/common/shiro/ShiroActionProperties.java
src/main/java/im/dx/common/shiro/ShiroActionProperties.java
+21
-25
src/main/java/im/dx/system/controller/CodeController.java
src/main/java/im/dx/system/controller/CodeController.java
+47
-15
src/main/java/im/dx/system/controller/DeptController.java
src/main/java/im/dx/system/controller/DeptController.java
+63
-43
src/main/java/im/dx/system/controller/DeptTreeController.java
...main/java/im/dx/system/controller/DeptTreeController.java
+61
-14
src/main/java/im/dx/system/controller/IndexController.java
src/main/java/im/dx/system/controller/IndexController.java
+6
-13
src/main/java/im/dx/system/controller/LoginController.java
src/main/java/im/dx/system/controller/LoginController.java
+15
-14
src/main/java/im/dx/system/controller/LoginLogController.java
...main/java/im/dx/system/controller/LoginLogController.java
+6
-2
src/main/java/im/dx/system/controller/MenuController.java
src/main/java/im/dx/system/controller/MenuController.java
+28
-6
src/main/java/im/dx/system/controller/OAuth2Controller.java
src/main/java/im/dx/system/controller/OAuth2Controller.java
+5
-28
src/main/java/im/dx/system/controller/OperatorController.java
...main/java/im/dx/system/controller/OperatorController.java
+4
-2
src/main/java/im/dx/system/controller/RoleController.java
src/main/java/im/dx/system/controller/RoleController.java
+50
-15
src/main/java/im/dx/system/controller/TrafficStatisticsController.java
.../im/dx/system/controller/TrafficStatisticsController.java
+230
-128
src/main/java/im/dx/system/controller/UserController.java
src/main/java/im/dx/system/controller/UserController.java
+68
-14
src/main/java/im/dx/system/controller/UserOnlineController.java
...in/java/im/dx/system/controller/UserOnlineController.java
+0
-17
src/main/java/im/dx/system/controller/VideoController.java
src/main/java/im/dx/system/controller/VideoController.java
+110
-69
src/main/java/im/dx/system/mapper/DeptTreeMapper.java
src/main/java/im/dx/system/mapper/DeptTreeMapper.java
+1
-1
src/main/java/im/dx/system/mapper/TraffalarmrecordMapper.java
...main/java/im/dx/system/mapper/TraffalarmrecordMapper.java
+0
-1
src/main/java/im/dx/system/mapper/TrafficStatisticsMapper.java
...ain/java/im/dx/system/mapper/TrafficStatisticsMapper.java
+16
-3
src/main/java/im/dx/system/mapper/VideoMapper.java
src/main/java/im/dx/system/mapper/VideoMapper.java
+3
-1
src/main/java/im/dx/system/model/DeptVideo.java
src/main/java/im/dx/system/model/DeptVideo.java
+9
-0
src/main/java/im/dx/system/model/ResponseEnum.java
src/main/java/im/dx/system/model/ResponseEnum.java
+18
-18
src/main/java/im/dx/system/model/ResultObj.java
src/main/java/im/dx/system/model/ResultObj.java
+19
-19
src/main/java/im/dx/system/model/TraffpictureParam.java
src/main/java/im/dx/system/model/TraffpictureParam.java
+7
-5
src/main/java/im/dx/system/service/DeptTreeService.java
src/main/java/im/dx/system/service/DeptTreeService.java
+2
-2
src/main/java/im/dx/system/service/MenuService.java
src/main/java/im/dx/system/service/MenuService.java
+1
-1
src/main/java/im/dx/system/service/TrafficStatisticsService.java
...n/java/im/dx/system/service/TrafficStatisticsService.java
+23
-1
src/main/java/im/dx/system/service/VideoService.java
src/main/java/im/dx/system/service/VideoService.java
+2
-2
src/main/resources/application-im.properties
src/main/resources/application-im.properties
+4
-4
src/main/resources/application-local.properties
src/main/resources/application-local.properties
+2
-2
src/main/resources/application.properties
src/main/resources/application.properties
+1
-3
src/main/resources/logback-spring.xml
src/main/resources/logback-spring.xml
+1
-1
src/main/resources/mapper/DeptMapper.xml
src/main/resources/mapper/DeptMapper.xml
+33
-28
src/main/resources/mapper/DeptTreeMapper.xml
src/main/resources/mapper/DeptTreeMapper.xml
+25
-38
src/main/resources/mapper/LoginLogMapper.xml
src/main/resources/mapper/LoginLogMapper.xml
+5
-25
src/main/resources/mapper/MenuMapper.xml
src/main/resources/mapper/MenuMapper.xml
+0
-1
src/main/resources/mapper/OperatorMapper.xml
src/main/resources/mapper/OperatorMapper.xml
+4
-27
src/main/resources/mapper/TrafficStatisticsMapper.xml
src/main/resources/mapper/TrafficStatisticsMapper.xml
+130
-30
src/main/resources/mapper/VideoMapper.xml
src/main/resources/mapper/VideoMapper.xml
+12
-8
src/main/resources/static/js/jgsbgl/jgsbgl.js
src/main/resources/static/js/jgsbgl/jgsbgl.js
+39
-78
src/main/resources/static/js/rgjy/rgjy.js
src/main/resources/static/js/rgjy/rgjy.js
+1
-1
src/main/resources/static/js/rwpfhistory/rwpfhistory.js
src/main/resources/static/js/rwpfhistory/rwpfhistory.js
+56
-10
src/main/resources/static/js/sjcx/sjcx.js
src/main/resources/static/js/sjcx/sjcx.js
+64
-59
src/main/resources/templates/error/500.html
src/main/resources/templates/error/500.html
+0
-1
src/main/resources/templates/login.html
src/main/resources/templates/login.html
+0
-11
src/main/resources/templates/page/jgsbgl.html
src/main/resources/templates/page/jgsbgl.html
+22
-12
src/main/resources/templates/page/jksj.html
src/main/resources/templates/page/jksj.html
+1
-1
src/main/resources/templates/page/rwpfhistory.html
src/main/resources/templates/page/rwpfhistory.html
+2
-2
src/main/resources/templates/page/sjcx.html
src/main/resources/templates/page/sjcx.html
+5
-5
src/main/resources/templates/page/test.html
src/main/resources/templates/page/test.html
+14
-2
No files found.
pom.xml
View file @
238fd7d4
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
<dependency>
<dependency>
<groupId>
mysql
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
8.0.11
</version>
<version>
8.0.27
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
@@ -178,6 +178,18 @@
...
@@ -178,6 +178,18 @@
<version>
1.2.3
</version>
<version>
1.2.3
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
2.8.6
</version>
<scope>
compile
</scope>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
<version>
2.17.0
</version>
</dependency>
</dependencies>
</dependencies>
<repositories>
<repositories>
...
...
src/main/java/im/dx/ShiroActionApplication.java
View file @
238fd7d4
...
@@ -6,8 +6,6 @@ import tk.mybatis.spring.annotation.MapperScan;
...
@@ -6,8 +6,6 @@ import tk.mybatis.spring.annotation.MapperScan;
@SpringBootApplication
@SpringBootApplication
//@MapperScan("im.dx.system.mapper")
//@PropertySource("file:${spring.profiles.path}")
public
class
ShiroActionApplication
{
public
class
ShiroActionApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ShiroActionApplication
.
class
,
args
);
SpringApplication
.
run
(
ShiroActionApplication
.
class
,
args
);
...
...
src/main/java/im/dx/common/config/ScheduleTaskConfig.java
View file @
238fd7d4
...
@@ -61,5 +61,9 @@ public class ScheduleTaskConfig {
...
@@ -61,5 +61,9 @@ public class ScheduleTaskConfig {
}
}
}
}
// @Scheduled(cron = "0/16 * 1-18 * * ?")
private
void
st
()
{
log
.
info
(
new
Date
().
toLocaleString
());
}
}
}
src/main/java/im/dx/common/exception/WebExceptionHandler.java
View file @
238fd7d4
...
@@ -28,7 +28,7 @@ import javax.annotation.Resource;
...
@@ -28,7 +28,7 @@ import javax.annotation.Resource;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.List
;
@ControllerAdvice
//
@ControllerAdvice
public
class
WebExceptionHandler
{
public
class
WebExceptionHandler
{
@Resource
@Resource
...
@@ -52,79 +52,79 @@ public class WebExceptionHandler {
...
@@ -52,79 +52,79 @@ public class WebExceptionHandler {
@ExceptionHandler
@ExceptionHandler
public
String
unauthorized
(
NoHandlerFoundException
e
)
{
public
String
unauthorized
(
NoHandlerFoundException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
请求的地址不存在
"
,
e
);
log
.
debug
(
"
请求的地址不存在"
,
e
);
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
请求的地址不存在
"
,
HttpStatus
.
NOT_FOUND
.
value
());
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
请求的地址不存在"
,
HttpStatus
.
NOT_FOUND
.
value
());
}
}
@ExceptionHandler
(
value
=
{
UnauthorizedException
.
class
})
@ExceptionHandler
(
value
=
{
UnauthorizedException
.
class
})
public
String
unauthorized
(
Exception
e
)
{
public
String
unauthorized
(
Exception
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
无权限
"
);
log
.
debug
(
"
无权限"
);
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
无权限
"
);
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
无权限"
);
}
}
@ExceptionHandler
@ExceptionHandler
public
String
unknownAccount
(
UnknownAccountException
e
)
{
public
String
unknownAccount
(
UnknownAccountException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
账号不存在
"
);
log
.
debug
(
"
账号不存在"
)
;
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
账号不存在
"
);
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
账号不存在"
)
;
}
}
@ExceptionHandler
@ExceptionHandler
public
String
incorrectCredentials
(
IncorrectCredentialsException
e
)
{
public
String
incorrectCredentials
(
IncorrectCredentialsException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
密码错误
"
);
log
.
debug
(
"
密码错误"
)
;
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
密码错误
"
);
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
密码错误"
)
;
}
}
@ExceptionHandler
@ExceptionHandler
public
String
excessiveAttemptsException
(
ExcessiveAttemptsException
e
)
{
public
String
excessiveAttemptsException
(
ExcessiveAttemptsException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
登录失败次数过多
"
);
log
.
debug
(
"
登录失败次数过多"
);
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
登录失败次数过多, 请稍后再试
"
);
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
登录失败次数过多, 请稍后再试"
);
}
}
@ExceptionHandler
@ExceptionHandler
public
String
lockedAccount
(
LockedAccountException
e
)
{
public
String
lockedAccount
(
LockedAccountException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
账号已锁定
"
);
log
.
debug
(
"
账号已锁定"
)
;
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
账号已锁定
"
);
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
账号已锁定"
)
;
}
}
@ExceptionHandler
@ExceptionHandler
public
String
lockedAccount
(
CaptchaIncorrectException
e
)
{
public
String
lockedAccount
(
CaptchaIncorrectException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
验证码错误
"
);
log
.
debug
(
"
验证码错误"
)
;
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
验证码错误
"
);
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
验证码错误"
)
;
}
}
@ExceptionHandler
@ExceptionHandler
public
String
lockedAccount
(
DuplicateNameException
e
)
{
public
String
lockedAccount
(
DuplicateNameException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
用户名已存在
"
);
log
.
debug
(
"
用户名已存在"
);
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
用户名已存在
"
);
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
用户名已存在"
);
}
}
@ExceptionHandler
@ExceptionHandler
public
String
missingRequestParameter
(
MissingServletRequestParameterException
e
)
{
public
String
missingRequestParameter
(
MissingServletRequestParameterException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
请求参数无效
"
);
log
.
debug
(
"
请求参数无效"
);
}
}
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
请求参数缺失
"
);
return
generateErrorInfo
(
ResultBean
.
FAIL
,
"
请求参数缺失"
);
}
}
@ExceptionHandler
@ExceptionHandler
public
String
methodArgumentNotValid
(
BindException
e
)
{
public
String
methodArgumentNotValid
(
BindException
e
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
参数校验失败
"
,
e
);
log
.
debug
(
"
参数校验失败"
,
e
);
}
}
List
<
ObjectError
>
allErrors
=
e
.
getBindingResult
().
getAllErrors
();
List
<
ObjectError
>
allErrors
=
e
.
getBindingResult
().
getAllErrors
();
StringBuilder
errorMessage
=
new
StringBuilder
();
StringBuilder
errorMessage
=
new
StringBuilder
();
...
@@ -140,19 +140,19 @@ public class WebExceptionHandler {
...
@@ -140,19 +140,19 @@ public class WebExceptionHandler {
@ExceptionHandler
@ExceptionHandler
public
String
all
(
Exception
e
)
{
public
String
all
(
Exception
e
)
{
String
msg
=
e
.
getMessage
()
==
null
?
"
系统出现异常
"
:
e
.
getMessage
();
String
msg
=
e
.
getMessage
()
==
null
?
"
系统出现异常"
:
e
.
getMessage
();
log
.
error
(
msg
,
e
);
log
.
error
(
msg
,
e
);
generateErrorInfo
(
ResultBean
.
FAIL
,
msg
,
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
generateErrorInfo
(
ResultBean
.
FAIL
,
msg
,
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
"forward:/error"
;
return
"forward:/error"
;
}
}
/**
/**
*
生成错误信息, 放到 request 域中
.
*
生成错误信息, 放到 request 域中.
*
*
* @param code
错误码
* @param code
错误码
* @param msg
错误信息
* @param msg
错误信息
* @param httpStatus HTTP
状态码
* @param httpStatus HTTP
状态码
* @return SpringBoot
默认提供的 /error Controller 处理器
* @return SpringBoot
默认提供的 /error Controller 处理器
*/
*/
private
String
generateErrorInfo
(
int
code
,
String
msg
,
int
httpStatus
)
{
private
String
generateErrorInfo
(
int
code
,
String
msg
,
int
httpStatus
)
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
...
@@ -164,14 +164,14 @@ public class WebExceptionHandler {
...
@@ -164,14 +164,14 @@ public class WebExceptionHandler {
/**
/**
*
捕获 ClientAbortException 异常, 不做任何处理, 防止出现大量堆栈日志输出, 此异常不影响功能
.
*
捕获 ClientAbortException 异常, 不做任何处理, 防止出现大量堆栈日志输出, 此异常不影响功能.
*/
*/
@ExceptionHandler
({
HttpMediaTypeNotAcceptableException
.
class
,
ClientAbortException
.
class
})
@ExceptionHandler
({
HttpMediaTypeNotAcceptableException
.
class
,
ClientAbortException
.
class
})
@ResponseBody
@ResponseBody
@ResponseStatus
@ResponseStatus
public
void
clientAbortException
(
Exception
ex
)
{
public
void
clientAbortException
(
Exception
ex
)
{
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"
出现了断开异常
:"
,
ex
);
log
.
debug
(
"
出现了断开异常:"
,
ex
);
}
}
}
}
...
...
src/main/java/im/dx/common/shiro/ShiroActionProperties.java
View file @
238fd7d4
...
@@ -3,13 +3,9 @@ package im.dx.common.shiro;
...
@@ -3,13 +3,9 @@ package im.dx.common.shiro;
import
im.dx.common.constants.AuthcTypeEnum
;
import
im.dx.common.constants.AuthcTypeEnum
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.StringUtils
;
import
javax.annotation.PostConstruct
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
@Component
@Component
@ConfigurationProperties
(
prefix
=
"shiro-action"
)
@ConfigurationProperties
(
prefix
=
"shiro-action"
)
...
@@ -80,27 +76,27 @@ public class ShiroActionProperties {
...
@@ -80,27 +76,27 @@ public class ShiroActionProperties {
this
.
permsCacheTimeout
=
permsCacheTimeout
;
this
.
permsCacheTimeout
=
permsCacheTimeout
;
}
}
@PostConstruct
//
@PostConstruct
public
void
validate
()
{
//
public void validate() {
Set
<
String
>
set
=
new
HashSet
<>();
//
Set<String> set = new HashSet<>();
//
for
(
Provider
provider
:
this
.
oauth2Provider
.
values
())
{
//
for (Provider provider : this.oauth2Provider.values()) {
// ClientId 不能为空
//
// ClientId 不能为空
if
(!
StringUtils
.
hasText
(
provider
.
getClientId
()))
{
//
if (!StringUtils.hasText(provider.getClientId())) {
throw
new
IllegalStateException
(
"Client id must not be empty."
);
//
throw new IllegalStateException("Client id must not be empty.");
}
//
}
//
// ClientSecret 不能为空
//
// ClientSecret 不能为空
if
(!
StringUtils
.
hasText
(
provider
.
getClientSecret
()))
{
//
if (!StringUtils.hasText(provider.getClientSecret())) {
throw
new
IllegalStateException
(
"Client secret must not be empty."
);
//
throw new IllegalStateException("Client secret must not be empty.");
}
//
}
//
// 回调地址不能重复.
//
// 回调地址不能重复.
if
(!
set
.
add
(
provider
.
redirectUrl
))
{
//
if (!set.add(provider.redirectUrl)) {
throw
new
IllegalStateException
(
"redirectUrl must not be duplicate."
);
//
throw new IllegalStateException("redirectUrl must not be duplicate.");
}
//
}
}
//
}
}
//
}
public
static
class
Provider
{
public
static
class
Provider
{
private
String
clientId
;
private
String
clientId
;
...
...
src/main/java/im/dx/system/controller/CodeController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.system.model.Code
;
import
im.dx.system.model.Code
;
...
@@ -20,7 +19,12 @@ public class CodeController {
...
@@ -20,7 +19,12 @@ public class CodeController {
@Resource
@Resource
private
CodeService
codeService
;
private
CodeService
codeService
;
@OperationLog
(
"获取code列表"
)
/***
* 获取code列表
* @param page
* @param limit
* @return
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
PageResultBean
<
Code
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
public
PageResultBean
<
Code
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
...
@@ -30,30 +34,47 @@ public class CodeController {
...
@@ -30,30 +34,47 @@ public class CodeController {
return
new
PageResultBean
<>(
userPageInfo
.
getTotal
(),
userPageInfo
.
getList
());
return
new
PageResultBean
<>(
userPageInfo
.
getTotal
(),
userPageInfo
.
getList
());
}
}
@OperationLog
(
"获取指定type的code列表"
)
/***
* 获取指定type的code列表
* @param typeid
* @return
*/
@GetMapping
(
"/list/{typeid}"
)
@GetMapping
(
"/list/{typeid}"
)
@ResponseBody
@ResponseBody
public
ResultBean
getList
(
@PathVariable
(
"typeid"
)
String
typeid
)
{
public
ResultBean
getList
(
@PathVariable
(
"typeid"
)
String
typeid
)
{
List
<
Code
>
codes
=
codeService
.
selectAllWithType
(
typeid
);
List
<
Code
>
codes
=
codeService
.
selectAllWithType
(
typeid
);
return
ResultBean
.
success
(
codes
);
return
ResultBean
.
success
(
codes
);
};
}
@OperationLog
(
"更新code"
)
/**
* 更新code
* @param codelist
* @return
*/
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
public
ResultBean
update
(
@RequestBody
List
<
Code
>
codelist
)
{
public
ResultBean
update
(
@RequestBody
List
<
Code
>
codelist
)
{
int
result
=
codeService
.
updatecode
(
codelist
);
int
result
=
codeService
.
updatecode
(
codelist
);
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"新增"
)
/***
* 新增
* @param codelist
* @return
*/
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
public
ResultBean
add
(
@RequestBody
List
<
Code
>
codelist
)
{
public
ResultBean
add
(
@RequestBody
List
<
Code
>
codelist
)
{
int
result
=
codeService
.
addcode
(
codelist
);
int
result
=
codeService
.
addcode
(
codelist
);
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"新增videoalarm"
)
/***
* 新增videoalarm
* @param videoeRecordType
* @return
*/
@PostMapping
(
"/addvideoeRecordType"
)
@PostMapping
(
"/addvideoeRecordType"
)
public
ResultBean
VideoeRecordType
(
@RequestBody
VideoeRecordType
videoeRecordType
)
{
public
ResultBean
VideoeRecordType
(
@RequestBody
VideoeRecordType
videoeRecordType
)
{
//判断存不存在
//判断存不存在
...
@@ -65,16 +86,19 @@ public class CodeController {
...
@@ -65,16 +86,19 @@ public class CodeController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
/***
* 更新用户列表
@OperationLog
(
"更新用户列表"
)
*/
@GetMapping
(
"/codetest"
)
public
void
test
()
{
public
void
test
()
{
List
<
Code
>
codes
=
codeService
.
selectAllWithKey
(
1
,
10
);
List
<
Code
>
codes
=
codeService
.
selectAllWithKey
(
1
,
10
);
}
}
@OperationLog
(
"更新code time"
)
/**
* 更新code time
* @param codelist
* @return
*/
@PostMapping
(
"/updatetime"
)
@PostMapping
(
"/updatetime"
)
public
ResultBean
updatetime
(
@RequestBody
List
<
Code
>
codelist
)
{
public
ResultBean
updatetime
(
@RequestBody
List
<
Code
>
codelist
)
{
...
@@ -82,14 +106,22 @@ public class CodeController {
...
@@ -82,14 +106,22 @@ public class CodeController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"禁用账号"
)
/***
* 禁用账号
* @param codeId
* @return
*/
@PostMapping
(
"/{codeId}/disable"
)
@PostMapping
(
"/{codeId}/disable"
)
@ResponseBody
@ResponseBody
public
ResultBean
disable
(
@PathVariable
(
"codeId"
)
String
codeId
)
{
public
ResultBean
disable
(
@PathVariable
(
"codeId"
)
String
codeId
)
{
return
ResultBean
.
success
(
codeService
.
disableCodeByCodeID
(
codeId
));
return
ResultBean
.
success
(
codeService
.
disableCodeByCodeID
(
codeId
));
}
}
@OperationLog
(
"激活账号"
)
/***
* 激活账号
* @param codeId
* @return
*/
@PostMapping
(
"/{codeId}/enable"
)
@PostMapping
(
"/{codeId}/enable"
)
@ResponseBody
@ResponseBody
public
ResultBean
enable
(
@PathVariable
(
"codeId"
)
String
codeId
)
{
public
ResultBean
enable
(
@PathVariable
(
"codeId"
)
String
codeId
)
{
...
...
src/main/java/im/dx/system/controller/DeptController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.shiro.ShiroActionProperties
;
import
im.dx.common.shiro.ShiroActionProperties
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.TreeUtil
;
import
im.dx.common.util.TreeUtil
;
...
@@ -39,7 +38,11 @@ public class DeptController {
...
@@ -39,7 +38,11 @@ public class DeptController {
return
"dept/dept-list"
;
return
"dept/dept-list"
;
}
}
@OperationLog
(
"获取部门列表"
)
/***
* 获取部门列表
* @param parentId
* @return
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
ResultBean
getList
(
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
Integer
parentId
)
{
public
ResultBean
getList
(
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
Integer
parentId
)
{
...
@@ -68,7 +71,11 @@ public class DeptController {
...
@@ -68,7 +71,11 @@ public class DeptController {
return
"dept/dept-add"
;
return
"dept/dept-add"
;
}
}
@OperationLog
(
"新增部门"
)
/***
* 新增部门
* @param dept
* @return
*/
@ResponseBody
@ResponseBody
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
public
ResultBean
add
(
Dept
dept
)
{
public
ResultBean
add
(
Dept
dept
)
{
...
@@ -81,7 +88,11 @@ public class DeptController {
...
@@ -81,7 +88,11 @@ public class DeptController {
return
ResultBean
.
success
(
deptService
.
insert
(
dept
));
return
ResultBean
.
success
(
deptService
.
insert
(
dept
));
}
}
@OperationLog
(
"删除部门"
)
/***
* 删除部门
* @param deptId
* @return
*/
@DeleteMapping
(
"/{deptId}"
)
@DeleteMapping
(
"/{deptId}"
)
@ResponseBody
@ResponseBody
public
ResultBean
delete
(
@PathVariable
(
"deptId"
)
Integer
deptId
)
{
public
ResultBean
delete
(
@PathVariable
(
"deptId"
)
Integer
deptId
)
{
...
@@ -89,7 +100,11 @@ public class DeptController {
...
@@ -89,7 +100,11 @@ public class DeptController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"修改部门"
)
/***
* 修改部门
* @param dept
* @return
*/
@ResponseBody
@ResponseBody
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
public
ResultBean
update
(
Dept
dept
)
{
public
ResultBean
update
(
Dept
dept
)
{
...
@@ -113,7 +128,13 @@ public class DeptController {
...
@@ -113,7 +128,13 @@ public class DeptController {
return
ResultBean
.
success
(
dept
);
return
ResultBean
.
success
(
dept
);
}
}
@OperationLog
(
"调整部门排序"
)
/***
* 调整部门排序
* @param currentId
* @param swapId
* @return
*/
@PostMapping
(
"/swap"
)
@PostMapping
(
"/swap"
)
@ResponseBody
@ResponseBody
public
ResultBean
swapSort
(
Integer
currentId
,
Integer
swapId
)
{
public
ResultBean
swapSort
(
Integer
currentId
,
Integer
swapId
)
{
...
@@ -121,8 +142,13 @@ public class DeptController {
...
@@ -121,8 +142,13 @@ public class DeptController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
/***
@OperationLog
(
"查询部门及監控"
)
* 查询部门及監控
* @param deptId
* @param username
* @param tdmc
* @return
*/
@GetMapping
(
"/listvideo"
)
@GetMapping
(
"/listvideo"
)
@ResponseBody
@ResponseBody
public
ResultBean
listvideo
(
@RequestParam
(
"deptId"
)
String
deptId
,
@RequestParam
(
"username"
)
String
username
,
@RequestParam
(
"tdmc"
)
String
tdmc
)
{
public
ResultBean
listvideo
(
@RequestParam
(
"deptId"
)
String
deptId
,
@RequestParam
(
"username"
)
String
username
,
@RequestParam
(
"tdmc"
)
String
tdmc
)
{
...
@@ -135,8 +161,13 @@ public class DeptController {
...
@@ -135,8 +161,13 @@ public class DeptController {
return
ResultBean
.
success
(
deptlist
);
return
ResultBean
.
success
(
deptlist
);
}
}
/***
@OperationLog
(
"查询部门及監控"
)
* 查询部门及監控
* @param deptId
* @param username
* @param tdmc
* @return
*/
@GetMapping
(
"/listvideotree"
)
@GetMapping
(
"/listvideotree"
)
@ResponseBody
@ResponseBody
public
ResultBean
listvideotree
(
@RequestParam
(
"deptId"
)
String
deptId
,
@RequestParam
(
"username"
)
String
username
,
@RequestParam
(
"tdmc"
)
String
tdmc
)
{
public
ResultBean
listvideotree
(
@RequestParam
(
"deptId"
)
String
deptId
,
@RequestParam
(
"username"
)
String
username
,
@RequestParam
(
"tdmc"
)
String
tdmc
)
{
...
@@ -150,9 +181,12 @@ public class DeptController {
...
@@ -150,9 +181,12 @@ public class DeptController {
return
ResultBean
.
success
(
list
);
return
ResultBean
.
success
(
list
);
}
}
/***
* 查询部门及其子节点
@OperationLog
(
"查询部门及其子節點"
)
* @param deptId
* @param username
* @return
*/
@GetMapping
(
"/listChildDept"
)
@GetMapping
(
"/listChildDept"
)
@ResponseBody
@ResponseBody
public
ResultBean
listChildDept
(
@RequestParam
(
"deptId"
)
Integer
deptId
,
@RequestParam
(
"username"
)
String
username
)
{
public
ResultBean
listChildDept
(
@RequestParam
(
"deptId"
)
Integer
deptId
,
@RequestParam
(
"username"
)
String
username
)
{
...
@@ -165,7 +199,12 @@ public class DeptController {
...
@@ -165,7 +199,12 @@ public class DeptController {
return
ResultBean
.
success
(
deptlist
);
return
ResultBean
.
success
(
deptlist
);
}
}
@OperationLog
(
"更新部門默認監控"
)
/***
* 更新部门默认监控
* @param deptId
* @param videoId
* @return
*/
@PostMapping
(
"/updateDefaultVideo"
)
@PostMapping
(
"/updateDefaultVideo"
)
@ResponseBody
@ResponseBody
public
ResultBean
updateDefaultVideo
(
@RequestParam
(
"deptId"
)
String
deptId
,
@RequestParam
(
"videoId"
)
String
videoId
)
{
public
ResultBean
updateDefaultVideo
(
@RequestParam
(
"deptId"
)
String
deptId
,
@RequestParam
(
"videoId"
)
String
videoId
)
{
...
@@ -177,16 +216,12 @@ public class DeptController {
...
@@ -177,16 +216,12 @@ public class DeptController {
}
}
}
}
@OperationLog
(
"查詢部門默認監控"
)
/***
@GetMapping
(
"/queryDefaultVideoId"
)
* 查询所有部门默认监控
@ResponseBody
* @param deptId
public
ResultBean
queryDefaultVideo
(
@RequestParam
(
"deptId"
)
String
deptId
)
{
* @return
return
ResultBean
.
success
(
deptService
.
selectDefaultVideoByDeptId
(
deptId
));
*/
}
@OperationLog
(
"查詢所有部門默認監控"
)
@GetMapping
(
"/queryAllDefaultVideo"
)
@GetMapping
(
"/queryAllDefaultVideo"
)
@ResponseBody
@ResponseBody
public
ResultBean
queryAllDefaultVideo
(
@RequestParam
(
"deptId"
)
String
deptId
)
{
public
ResultBean
queryAllDefaultVideo
(
@RequestParam
(
"deptId"
)
String
deptId
)
{
...
@@ -195,26 +230,11 @@ public class DeptController {
...
@@ -195,26 +230,11 @@ public class DeptController {
}
}
@OperationLog
(
"新增部門默認監控"
)
/**
@PostMapping
(
"/insertDefaultVideo"
)
* 查询所有监控
@ResponseBody
* @param deptid
public
ResultBean
insertDefaultVideo
(
@RequestParam
(
"deptId"
)
String
deptId
,
* @return
@RequestParam
(
"videoId[]"
)
List
<
String
>
videoId
)
{
*/
for
(
String
videoid:
videoId
)
{
//判断是否存在
int
result
=
deptService
.
selectExistsDefaultVideo
(
deptId
,
videoid
);
if
(
result
==
0
){
deptService
.
insertDefaultVideo
(
deptId
,
videoid
);
}
}
return
ResultBean
.
success
();
}
@OperationLog
(
"查询所有监控"
)
@GetMapping
(
"/listAllvideoIdsByDeptid"
)
@GetMapping
(
"/listAllvideoIdsByDeptid"
)
@ResponseBody
@ResponseBody
public
ResultBean
listAllvideoIdsByDeptid
(
@RequestParam
(
"deptid"
)
String
deptid
)
{
public
ResultBean
listAllvideoIdsByDeptid
(
@RequestParam
(
"deptid"
)
String
deptid
)
{
...
...
src/main/java/im/dx/system/controller/DeptTreeController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.shiro.ShiroActionProperties
;
import
im.dx.common.shiro.ShiroActionProperties
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
...
@@ -43,7 +42,11 @@ public class DeptTreeController {
...
@@ -43,7 +42,11 @@ public class DeptTreeController {
return
"dept/dept-list"
;
return
"dept/dept-list"
;
}
}
@OperationLog
(
"获取部门列表"
)
/***
* 获取部门列表
* @param parentId
* @return
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
ResultBean
getList
(
@RequestParam
(
required
=
false
)
String
parentId
)
{
public
ResultBean
getList
(
@RequestParam
(
required
=
false
)
String
parentId
)
{
...
@@ -54,13 +57,17 @@ public class DeptTreeController {
...
@@ -54,13 +57,17 @@ public class DeptTreeController {
@GetMapping
(
"/tree/root"
)
@GetMapping
(
"/tree/root"
)
@ResponseBody
@ResponseBody
public
ResultBean
treeAndRoot
()
{
public
ResultBean
treeAndRoot
()
{
return
ResultBean
.
success
(
deptTreeService
.
selectAllDeptTreeAndRoot
());
return
ResultBean
.
success
(
deptTreeService
.
selectAllDeptTreeAndRoot
());
}
}
@GetMapping
(
"/tree"
)
@GetMapping
(
"/tree"
)
@ResponseBody
@ResponseBody
public
ResultBean
tree
()
{
public
ResultBean
tree
()
{
return
ResultBean
.
success
(
TreeUtil
.
toTree
(
deptTreeService
.
selectAllDeptTree
(
"0"
),
"deptId"
,
"parentId"
,
"children"
,
DeptTree
.
class
,
"0"
));
return
ResultBean
.
success
(
TreeUtil
.
toTree
(
deptTreeService
.
selectAllDeptTree
(
"0"
),
"deptId"
,
"parentId"
,
"children"
,
DeptTree
.
class
,
"0"
));
}
}
@GetMapping
(
"/alltree"
)
@GetMapping
(
"/alltree"
)
@ResponseBody
@ResponseBody
...
@@ -68,10 +75,16 @@ public class DeptTreeController {
...
@@ -68,10 +75,16 @@ public class DeptTreeController {
return
ResultBean
.
success
(
deptTreeService
.
selectAllDeptTree
(
"0"
));
return
ResultBean
.
success
(
deptTreeService
.
selectAllDeptTree
(
"0"
));
}
}
@GetMapping
(
"/videotree/{deptId}"
)
@GetMapping
(
"/videotree/{deptId}
/{username}
"
)
@ResponseBody
@ResponseBody
public
ResultBean
videotree
(
@PathVariable
(
"deptId"
)
String
deptId
)
{
public
ResultBean
videotree
(
@PathVariable
(
"deptId"
)
String
deptId
,
@PathVariable
(
"username"
)
String
username
)
{
List
<
DeptTree
>
dept
=
deptTreeService
.
selectAllVideoTree
(
"0"
);
if
(
null
!=
username
&&
shiroActionProperties
.
getSuperAdminUsername
().
equals
(
username
))
{
deptId
=
"0"
;
username
=
null
;
}
List
<
DeptTree
>
dept
=
deptTreeService
.
selectAllVideoTree
(
deptId
,
username
);
return
ResultBean
.
success
(
TreeUtil
.
toTree
(
dept
,
"deptId"
,
"parentId"
,
"children"
,
DeptTree
.
class
,
"0"
));
return
ResultBean
.
success
(
TreeUtil
.
toTree
(
dept
,
"deptId"
,
"parentId"
,
"children"
,
DeptTree
.
class
,
"0"
));
}
}
...
@@ -95,7 +108,11 @@ public class DeptTreeController {
...
@@ -95,7 +108,11 @@ public class DeptTreeController {
// return ResultBean.success(deptTreeService.insert(dept));
// return ResultBean.success(deptTreeService.insert(dept));
// }
// }
@OperationLog
(
"删除部门"
)
/***
* 删除部门
* @param deptId
* @return
*/
@DeleteMapping
(
"/{deptId}"
)
@DeleteMapping
(
"/{deptId}"
)
@ResponseBody
@ResponseBody
public
ResultBean
delete
(
@PathVariable
(
"deptId"
)
String
deptId
)
{
public
ResultBean
delete
(
@PathVariable
(
"deptId"
)
String
deptId
)
{
...
@@ -103,7 +120,11 @@ public class DeptTreeController {
...
@@ -103,7 +120,11 @@ public class DeptTreeController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"修改部门"
)
/***
* 修改部门
* @param dept
* @return
*/
@PutMapping
@PutMapping
@ResponseBody
@ResponseBody
public
ResultBean
update
(
DeptTree
dept
)
{
public
ResultBean
update
(
DeptTree
dept
)
{
...
@@ -119,7 +140,12 @@ public class DeptTreeController {
...
@@ -119,7 +140,12 @@ public class DeptTreeController {
return
"dept/dept-add"
;
return
"dept/dept-add"
;
}
}
@OperationLog
(
"调整部门排序"
)
/***
* 调整部门排序
* @param currentId
* @param swapId
* @return
*/
@PostMapping
(
"/swap"
)
@PostMapping
(
"/swap"
)
@ResponseBody
@ResponseBody
public
ResultBean
swapSort
(
Integer
currentId
,
Integer
swapId
)
{
public
ResultBean
swapSort
(
Integer
currentId
,
Integer
swapId
)
{
...
@@ -127,7 +153,12 @@ public class DeptTreeController {
...
@@ -127,7 +153,12 @@ public class DeptTreeController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"获取部门列表"
)
/***
* 获取部门列表
* @param parentId
* @param username
* @return
*/
@GetMapping
(
"/listByUsername"
)
@GetMapping
(
"/listByUsername"
)
@ResponseBody
@ResponseBody
public
ResultBean
listByUsername
(
@RequestParam
(
required
=
false
)
String
parentId
,
String
username
)
{
public
ResultBean
listByUsername
(
@RequestParam
(
required
=
false
)
String
parentId
,
String
username
)
{
...
@@ -138,7 +169,11 @@ public class DeptTreeController {
...
@@ -138,7 +169,11 @@ public class DeptTreeController {
return
ResultBean
.
success
(
deptList
);
return
ResultBean
.
success
(
deptList
);
}
}
@OperationLog
(
"获取角色所管辖事件监控"
)
/**
* 获取角色所管辖事件监控
* @param userID
* @return
*/
@GetMapping
(
"/listeventByvideoid/{userID}"
)
@GetMapping
(
"/listeventByvideoid/{userID}"
)
@ResponseBody
@ResponseBody
public
ResultBean
listeventByvideoid
(
@PathVariable
(
"userID"
)
String
userID
)
{
public
ResultBean
listeventByvideoid
(
@PathVariable
(
"userID"
)
String
userID
)
{
...
@@ -147,7 +182,13 @@ public class DeptTreeController {
...
@@ -147,7 +182,13 @@ public class DeptTreeController {
return
ResultBean
.
success
(
eventids
);
return
ResultBean
.
success
(
eventids
);
}
}
@OperationLog
(
"获取监控控制的事件"
)
/***
* 获取监控控制的事件
* @param parentId
* @param page
* @param limit
* @return
*/
@GetMapping
(
"/recordtype/list"
)
@GetMapping
(
"/recordtype/list"
)
@ResponseBody
@ResponseBody
public
PageResultBean
<
Map
>
getrecordtypeList
(
@RequestParam
(
required
=
false
)
String
parentId
,
public
PageResultBean
<
Map
>
getrecordtypeList
(
@RequestParam
(
required
=
false
)
String
parentId
,
...
@@ -160,7 +201,13 @@ public class DeptTreeController {
...
@@ -160,7 +201,13 @@ public class DeptTreeController {
PageInfo
<
Map
>
rolePageInfo
=
new
PageInfo
<>(
menuList
);
PageInfo
<
Map
>
rolePageInfo
=
new
PageInfo
<>(
menuList
);
return
new
PageResultBean
<>(
rolePageInfo
.
getTotal
(),
rolePageInfo
.
getList
());
return
new
PageResultBean
<>(
rolePageInfo
.
getTotal
(),
rolePageInfo
.
getList
());
}
}
@OperationLog
(
"删除监控控制的事件"
)
/***
* 删除监控控制的事件
* @param taskno
* @param status
* @return
*/
@GetMapping
(
"/delvideorecord/{taskno}/{status}"
)
@GetMapping
(
"/delvideorecord/{taskno}/{status}"
)
@ResponseBody
@ResponseBody
public
TaskResultObj
delvideorecord
(
@PathVariable
(
"taskno"
)
String
taskno
,
@PathVariable
(
"status"
)
String
status
)
{
public
TaskResultObj
delvideorecord
(
@PathVariable
(
"taskno"
)
String
taskno
,
@PathVariable
(
"status"
)
String
status
)
{
...
...
src/main/java/im/dx/system/controller/IndexController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
im.dx.common.util.DateUtils
;
import
im.dx.system.model.Menu
;
import
im.dx.system.model.Menu
;
import
im.dx.system.service.*
;
import
im.dx.system.service.*
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeoutException
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
...
@@ -41,9 +31,6 @@ public class IndexController {
...
@@ -41,9 +31,6 @@ public class IndexController {
@Resource
@Resource
private
RoleService
roleService
;
private
RoleService
roleService
;
@Resource
private
SysLogService
sysLogService
;
@Resource
@Resource
private
UserOnlineService
userOnlineService
;
private
UserOnlineService
userOnlineService
;
...
@@ -142,6 +129,12 @@ public class IndexController {
...
@@ -142,6 +129,12 @@ public class IndexController {
model
.
addAttribute
(
"menus"
,
menuTreeVOS
);
model
.
addAttribute
(
"menus"
,
menuTreeVOS
);
return
"page/manualscreen"
;
return
"page/manualscreen"
;
}
}
@GetMapping
(
value
=
{
"/xxtj"
})
public
String
xxtj
(
Model
model
)
{
List
<
Menu
>
menuTreeVOS
=
menuService
.
selectCurrentUserMenuTree
();
model
.
addAttribute
(
"menus"
,
menuTreeVOS
);
return
"page/xxtj"
;
}
@GetMapping
(
value
=
{
"/symrjk"
})
@GetMapping
(
value
=
{
"/symrjk"
})
...
...
src/main/java/im/dx/system/controller/LoginController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
cn.hutool.core.util.IdUtil
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.shiro.ShiroActionProperties
;
import
im.dx.common.shiro.ShiroActionProperties
;
import
im.dx.common.util.CaptchaUtil
;
import
im.dx.common.util.DateUtils
;
import
im.dx.common.util.DateUtils
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.system.model.ResultObj
;
import
im.dx.system.model.ResultObj
;
...
@@ -11,7 +8,6 @@ import im.dx.system.model.User;
...
@@ -11,7 +8,6 @@ import im.dx.system.model.User;
import
im.dx.system.service.UserService
;
import
im.dx.system.service.UserService
;
import
org.apache.shiro.SecurityUtils
;
import
org.apache.shiro.SecurityUtils
;
import
org.apache.shiro.authc.UsernamePasswordToken
;
import
org.apache.shiro.authc.UsernamePasswordToken
;
import
org.apache.shiro.session.Session
;
import
org.apache.shiro.subject.Subject
;
import
org.apache.shiro.subject.Subject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpEntity
;
...
@@ -21,16 +17,10 @@ import org.springframework.stereotype.Controller;
...
@@ -21,16 +17,10 @@ import org.springframework.stereotype.Controller;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.thymeleaf.TemplateEngine
;
import
org.thymeleaf.TemplateEngine
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.imageio.ImageIO
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.OutputStream
;
@Controller
@Controller
public
class
LoginController
{
public
class
LoginController
{
...
@@ -73,15 +63,21 @@ public class LoginController {
...
@@ -73,15 +63,21 @@ public class LoginController {
return
ResultBean
.
success
(
cuser
);
return
ResultBean
.
success
(
cuser
);
}
}
@OperationLog
(
"注销"
)
/***
* 注销
* @return
*/
@GetMapping
(
"/logout"
)
@GetMapping
(
"/logout"
)
public
String
logout
()
{
public
String
logout
()
{
SecurityUtils
.
getSubject
().
logout
();
SecurityUtils
.
getSubject
().
logout
();
return
"redirect:login"
;
return
"redirect:login"
;
}
}
/***
@OperationLog
(
"用户账号查询权限"
)
* 用户账号查询权限
* @param username
* @return
*/
@PostMapping
(
"/firstmenu"
)
@PostMapping
(
"/firstmenu"
)
@ResponseBody
@ResponseBody
public
ResultBean
firstmenu
(
String
username
)
{
public
ResultBean
firstmenu
(
String
username
)
{
...
@@ -95,7 +91,12 @@ public class LoginController {
...
@@ -95,7 +91,12 @@ public class LoginController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"用户账号查询权限"
)
/***
* 用户账号查询权限
* @param menuid
* @param username
* @return
*/
@PostMapping
(
"/secondmenu"
)
@PostMapping
(
"/secondmenu"
)
@ResponseBody
@ResponseBody
public
ResultBean
firstmenu
(
Integer
menuid
,
String
username
)
{
public
ResultBean
firstmenu
(
Integer
menuid
,
String
username
)
{
...
...
src/main/java/im/dx/system/controller/LoginLogController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.system.model.LoginLog
;
import
im.dx.system.model.LoginLog
;
import
im.dx.system.service.LoginLogService
;
import
im.dx.system.service.LoginLogService
;
...
@@ -26,7 +25,12 @@ public class LoginLogController {
...
@@ -26,7 +25,12 @@ public class LoginLogController {
return
"log/login-logs"
;
return
"log/login-logs"
;
}
}
@OperationLog
(
"查看登录日志"
)
/***
* 查看登录日志
* @param page
* @param limit
* @return
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
PageResultBean
<
LoginLog
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
public
PageResultBean
<
LoginLog
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
...
...
src/main/java/im/dx/system/controller/MenuController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.annotation.RefreshFilterChain
;
import
im.dx.common.annotation.RefreshFilterChain
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.system.model.Menu
;
import
im.dx.system.model.Menu
;
...
@@ -26,7 +25,12 @@ public class MenuController {
...
@@ -26,7 +25,12 @@ public class MenuController {
return
"menu/menu-list"
;
return
"menu/menu-list"
;
}
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
@OperationLog
(
"获取菜单列表"
)
/***
* 获取菜单列表
* @param parentId
* @return
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
ResultBean
getList
(
@RequestParam
(
required
=
false
)
Integer
parentId
)
{
public
ResultBean
getList
(
@RequestParam
(
required
=
false
)
Integer
parentId
)
{
...
@@ -57,7 +61,11 @@ public class MenuController {
...
@@ -57,7 +61,11 @@ public class MenuController {
return
ResultBean
.
success
(
menuService
.
getALLMenuAndCountOperatorTreeAndRoot
());
return
ResultBean
.
success
(
menuService
.
getALLMenuAndCountOperatorTreeAndRoot
());
}
}
@OperationLog
(
"新增菜单"
)
/**
* 新增菜单
* @param menu
* @return
*/
@RefreshFilterChain
@RefreshFilterChain
@PostMapping
@PostMapping
@ResponseBody
@ResponseBody
...
@@ -68,7 +76,11 @@ public class MenuController {
...
@@ -68,7 +76,11 @@ public class MenuController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"删除菜单"
)
/***
* 删除菜单
* @param menuId
* @return
*/
@RefreshFilterChain
@RefreshFilterChain
@DeleteMapping
(
"/{menuId}"
)
@DeleteMapping
(
"/{menuId}"
)
@ResponseBody
@ResponseBody
...
@@ -84,7 +96,12 @@ public class MenuController {
...
@@ -84,7 +96,12 @@ public class MenuController {
return
"menu/menu-add"
;
return
"menu/menu-add"
;
}
}
@OperationLog
(
"修改菜单"
)
/***
* 修改菜单
* @param menu
* @return
*/
@RefreshFilterChain
@RefreshFilterChain
@PutMapping
@PutMapping
@ResponseBody
@ResponseBody
...
@@ -94,7 +111,12 @@ public class MenuController {
...
@@ -94,7 +111,12 @@ public class MenuController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"调整部门排序"
)
/***
* 调整部门排序
* @param currentId
* @param swapId
* @return
*/
@PostMapping
(
"/swap"
)
@PostMapping
(
"/swap"
)
@ResponseBody
@ResponseBody
public
ResultBean
swapSort
(
Integer
currentId
,
Integer
swapId
)
{
public
ResultBean
swapSort
(
Integer
currentId
,
Integer
swapId
)
{
...
...
src/main/java/im/dx/system/controller/OAuth2Controller.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.constants.AuthcTypeEnum
;
import
im.dx.common.constants.AuthcTypeEnum
;
import
im.dx.common.shiro.OAuth2Helper
;
import
im.dx.common.shiro.OAuth2Helper
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
...
@@ -8,7 +7,6 @@ import im.dx.common.util.ShiroUtil;
...
@@ -8,7 +7,6 @@ import im.dx.common.util.ShiroUtil;
import
im.dx.system.model.UserAuths
;
import
im.dx.system.model.UserAuths
;
import
im.dx.system.model.vo.OAuth2VO
;
import
im.dx.system.model.vo.OAuth2VO
;
import
im.dx.system.service.UserAuthsService
;
import
im.dx.system.service.UserAuthsService
;
import
me.zhyd.oauth.request.AuthRequest
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -16,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -16,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -30,34 +27,15 @@ public class OAuth2Controller {
...
@@ -30,34 +27,15 @@ public class OAuth2Controller {
@Resource
@Resource
private
UserAuthsService
userAuthsService
;
private
UserAuthsService
userAuthsService
;
/**
* 生成 Github 授权地址
*/
@OperationLog
(
"Github OAuth2 登录"
)
@GetMapping
(
"/render/github"
)
@ResponseBody
public
ResultBean
renderGithubAuth
(
HttpServletResponse
response
)
{
AuthRequest
authRequest
=
oAuth2Helper
.
getAuthRequest
(
AuthcTypeEnum
.
GITHUB
);
return
ResultBean
.
successData
(
authRequest
.
authorize
());
}
/**
* 生成 Gitee 授权地址
*/
@OperationLog
(
"Gitee OAuth2 登录"
)
@GetMapping
(
"/render/gitee"
)
@ResponseBody
public
ResultBean
renderGiteeAuth
(
HttpServletResponse
response
)
{
AuthRequest
authRequest
=
oAuth2Helper
.
getAuthRequest
(
AuthcTypeEnum
.
GITEE
);
return
ResultBean
.
successData
(
authRequest
.
authorize
());
}
@GetMapping
(
"/index"
)
@GetMapping
(
"/index"
)
public
String
index
()
{
public
String
index
()
{
return
"oauth2/oauth2-list"
;
return
"oauth2/oauth2-list"
;
}
}
@OperationLog
(
"获取账号绑定信息"
)
/***
* 获取账号绑定信息
* @return
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
ResultBean
list
()
{
public
ResultBean
list
()
{
...
@@ -80,9 +58,8 @@ public class OAuth2Controller {
...
@@ -80,9 +58,8 @@ public class OAuth2Controller {
}
}
/**
/**
* 取消
授权
* 取消
账号绑定
*/
*/
@OperationLog
(
"取消账号绑定"
)
@GetMapping
(
"/revoke/{provider}"
)
@GetMapping
(
"/revoke/{provider}"
)
@ResponseBody
@ResponseBody
public
Object
revokeAuth
(
@PathVariable
(
"provider"
)
AuthcTypeEnum
provider
)
{
public
Object
revokeAuth
(
@PathVariable
(
"provider"
)
AuthcTypeEnum
provider
)
{
...
...
src/main/java/im/dx/system/controller/OperatorController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.annotation.RefreshFilterChain
;
import
im.dx.common.annotation.RefreshFilterChain
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.system.model.Operator
;
import
im.dx.system.model.Operator
;
...
@@ -19,7 +18,10 @@ public class OperatorController {
...
@@ -19,7 +18,10 @@ public class OperatorController {
@Resource
@Resource
private
OperatorService
operatorService
;
private
OperatorService
operatorService
;
@OperationLog
(
"查看操作日志"
)
/***
* 查看操作日志
* @return
*/
@GetMapping
(
"/index"
)
@GetMapping
(
"/index"
)
public
String
index
()
{
public
String
index
()
{
return
"operator/operator-list"
;
return
"operator/operator-list"
;
...
...
src/main/java/im/dx/system/controller/RoleController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.TreeUtil
;
import
im.dx.system.model.Role
;
import
im.dx.system.model.Role
;
import
im.dx.system.model.TaskParams
;
import
im.dx.system.model.TaskParams
;
import
im.dx.system.model.UserRoleTree
;
import
im.dx.system.service.RoleService
;
import
im.dx.system.service.RoleService
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
...
@@ -28,7 +25,13 @@ public class RoleController {
...
@@ -28,7 +25,13 @@ public class RoleController {
return
"role/role-list"
;
return
"role/role-list"
;
}
}
@OperationLog
(
"查询角色列表"
)
/**
* 查询角色列表
* @param page
* @param limit
* @param roleQuery
* @return
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
PageResultBean
<
Role
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
public
PageResultBean
<
Role
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
...
@@ -44,7 +47,11 @@ public class RoleController {
...
@@ -44,7 +47,11 @@ public class RoleController {
return
"role/role-add"
;
return
"role/role-add"
;
}
}
@OperationLog
(
"新增角色"
)
/**
* 新增角色
* @param role
* @return
*/
@PostMapping
@PostMapping
@ResponseBody
@ResponseBody
public
ResultBean
add
(
Role
role
)
{
public
ResultBean
add
(
Role
role
)
{
...
@@ -59,7 +66,11 @@ public class RoleController {
...
@@ -59,7 +66,11 @@ public class RoleController {
return
"role/role-add"
;
return
"role/role-add"
;
}
}
@OperationLog
(
"修改角色"
)
/**
* 修改角色
* @param role
* @return
*/
@PutMapping
@PutMapping
@ResponseBody
@ResponseBody
public
ResultBean
update
(
Role
role
)
{
public
ResultBean
update
(
Role
role
)
{
...
@@ -67,8 +78,11 @@ public class RoleController {
...
@@ -67,8 +78,11 @@ public class RoleController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
/***
@OperationLog
(
"删除角色"
)
* 删除角色
* @param roleId
* @return
*/
@DeleteMapping
(
"/{roleId}"
)
@DeleteMapping
(
"/{roleId}"
)
@ResponseBody
@ResponseBody
public
ResultBean
delete
(
@PathVariable
(
"roleId"
)
Integer
roleId
)
{
public
ResultBean
delete
(
@PathVariable
(
"roleId"
)
Integer
roleId
)
{
...
@@ -76,7 +90,12 @@ public class RoleController {
...
@@ -76,7 +90,12 @@ public class RoleController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"为角色授予菜单"
)
/***
* 为角色授予菜单
* @param roleId
* @param menuIds
* @return
*/
@PostMapping
(
"/{roleId}/grant/menu"
)
@PostMapping
(
"/{roleId}/grant/menu"
)
@ResponseBody
@ResponseBody
public
ResultBean
grantMenu
(
@PathVariable
(
"roleId"
)
Integer
roleId
,
@RequestParam
(
value
=
"menuIds[]"
,
required
=
false
)
Integer
[]
menuIds
)
{
public
ResultBean
grantMenu
(
@PathVariable
(
"roleId"
)
Integer
roleId
,
@RequestParam
(
value
=
"menuIds[]"
,
required
=
false
)
Integer
[]
menuIds
)
{
...
@@ -84,8 +103,12 @@ public class RoleController {
...
@@ -84,8 +103,12 @@ public class RoleController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
/***
@OperationLog
(
"为角色授予操作权限"
)
* 为角色授予操作权限
* @param roleId
* @param operatorIds
* @return
*/
@PostMapping
(
"/{roleId}/grant/operator"
)
@PostMapping
(
"/{roleId}/grant/operator"
)
@ResponseBody
@ResponseBody
public
ResultBean
grantOperator
(
@PathVariable
(
"roleId"
)
Integer
roleId
,
@RequestParam
(
value
=
"operatorIds[]"
,
required
=
false
)
Integer
[]
operatorIds
)
{
public
ResultBean
grantOperator
(
@PathVariable
(
"roleId"
)
Integer
roleId
,
@RequestParam
(
value
=
"operatorIds[]"
,
required
=
false
)
Integer
[]
operatorIds
)
{
...
@@ -115,8 +138,12 @@ public class RoleController {
...
@@ -115,8 +138,12 @@ public class RoleController {
return
ResultBean
.
success
(
operatorIds
);
return
ResultBean
.
success
(
operatorIds
);
}
}
/***
@OperationLog
(
"为角色授予菜单"
)
* 为角色授予菜单
* @param roleId
* @param videorecordIds
* @return
*/
@PostMapping
(
"/{roleId}/grant/videorecord"
)
@PostMapping
(
"/{roleId}/grant/videorecord"
)
@ResponseBody
@ResponseBody
public
ResultBean
grantVideorecord
(
@PathVariable
(
"roleId"
)
Integer
roleId
,
@RequestParam
(
value
=
"videorecordIds[]"
,
required
=
false
)
String
[]
videorecordIds
)
{
public
ResultBean
grantVideorecord
(
@PathVariable
(
"roleId"
)
Integer
roleId
,
@RequestParam
(
value
=
"videorecordIds[]"
,
required
=
false
)
String
[]
videorecordIds
)
{
...
@@ -124,14 +151,22 @@ public class RoleController {
...
@@ -124,14 +151,22 @@ public class RoleController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"查询角色用户树形数据"
)
/***
* 查询角色用户树形数据
* @return
*/
@GetMapping
(
"/listAllUsers"
)
@GetMapping
(
"/listAllUsers"
)
@ResponseBody
@ResponseBody
public
ResultBean
listAllUsers
()
{
public
ResultBean
listAllUsers
()
{
return
ResultBean
.
success
(
roleService
.
queryRoleUserTree
());
return
ResultBean
.
success
(
roleService
.
queryRoleUserTree
());
}
}
@OperationLog
(
"给用户添加任务"
)
/***
* 给用户添加任务
* @param taskParams
* @return
*/
@PostMapping
(
"/addtaskinfo"
)
@PostMapping
(
"/addtaskinfo"
)
@ResponseBody
@ResponseBody
public
ResultBean
addtaskinfo
(
@RequestBody
TaskParams
taskParams
)
{
public
ResultBean
addtaskinfo
(
@RequestBody
TaskParams
taskParams
)
{
...
...
src/main/java/im/dx/system/controller/TrafficStatisticsController.java
View file @
238fd7d4
This diff is collapsed.
Click to expand it.
src/main/java/im/dx/system/controller/UserController.java
View file @
238fd7d4
package
im
.
dx
.
system
.
controller
;
package
im
.
dx
.
system
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
im.dx.common.annotation.OperationLog
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.PageResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.util.ResultBean
;
import
im.dx.common.validate.groups.Create
;
import
im.dx.common.validate.groups.Create
;
...
@@ -43,7 +42,13 @@ public class UserController {
...
@@ -43,7 +42,13 @@ public class UserController {
return
"user/user-send"
;
return
"user/user-send"
;
}
}
@OperationLog
(
"获取用户列表"
)
/***
* 获取用户列表
* @param page
* @param pageSize
* @param userQuery
* @return
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
public
PageResultBean
<
User
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
public
PageResultBean
<
User
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
...
@@ -54,7 +59,14 @@ public class UserController {
...
@@ -54,7 +59,14 @@ public class UserController {
return
new
PageResultBean
<>(
userPageInfo
.
getTotal
(),
userPageInfo
.
getList
());
return
new
PageResultBean
<>(
userPageInfo
.
getTotal
(),
userPageInfo
.
getList
());
}
}
@OperationLog
(
"根據部門获取用户列表"
)
/***
* 根據部門获取用户列表
* @param page
* @param pageSize
* @param deptId
* @param userName
* @return
*/
@GetMapping
(
"/list/userByDeptId"
)
@GetMapping
(
"/list/userByDeptId"
)
@ResponseBody
@ResponseBody
public
PageResultBean
<
User
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
public
PageResultBean
<
User
>
getList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
...
@@ -83,7 +95,12 @@ public class UserController {
...
@@ -83,7 +95,12 @@ public class UserController {
return
"user/user-add"
;
return
"user/user-add"
;
}
}
@OperationLog
(
"编辑角色"
)
/***
* 编辑角色
* @param user
* @param roleIds
* @return
*/
@PutMapping
@PutMapping
@ResponseBody
@ResponseBody
public
ResultBean
putupdate
(
@Valid
User
user
,
@RequestParam
(
value
=
"role[]"
,
required
=
false
)
Integer
[]
roleIds
)
{
public
ResultBean
putupdate
(
@Valid
User
user
,
@RequestParam
(
value
=
"role[]"
,
required
=
false
)
Integer
[]
roleIds
)
{
...
@@ -91,8 +108,12 @@ public class UserController {
...
@@ -91,8 +108,12 @@ public class UserController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
/***
@OperationLog
(
"编辑角色"
)
* 编辑角色
* @param user
* @param roleIds
* @return
*/
@PostMapping
(
"/edit"
)
@PostMapping
(
"/edit"
)
@ResponseBody
@ResponseBody
public
ResultBean
update
(
@Valid
User
user
,
@RequestParam
(
value
=
"role[]"
,
required
=
false
)
Integer
[]
roleIds
)
{
public
ResultBean
update
(
@Valid
User
user
,
@RequestParam
(
value
=
"role[]"
,
required
=
false
)
Integer
[]
roleIds
)
{
...
@@ -101,7 +122,13 @@ public class UserController {
...
@@ -101,7 +122,13 @@ public class UserController {
return
ResultBean
.
success
();
return
ResultBean
.
success
();
}
}
@OperationLog
(
"新增用户"
)
/***
* 新增用户
* @param user
* @param roleIds
* @return
*/
@PostMapping
@PostMapping
@ResponseBody
@ResponseBody
public
ResultBean
adduser
(
@Validated
(
Create
.
class
)
User
user
,
@RequestParam
(
value
=
"role[]"
,
required
=
false
)
Integer
[]
roleIds
)
{
public
ResultBean
adduser
(
@Validated
(
Create
.
class
)
User
user
,
@RequestParam
(
value
=
"role[]"
,
required
=
false
)
Integer
[]
roleIds
)
{
...
@@ -110,7 +137,12 @@ public class UserController {
...
@@ -110,7 +137,12 @@ public class UserController {
return
ResultBean
.
success
(
userService
.
add
(
user
,
roleIds
));
return
ResultBean
.
success
(
userService
.
add
(
user
,
roleIds
));
}
}
@OperationLog
(
"新增用户"
)
/***
* 新增用户
* @param user
* @param roleIds
* @return
*/
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
@ResponseBody
@ResponseBody
public
ResultBean
add
(
@Validated
(
Create
.
class
)
User
user
,
@RequestParam
(
value
=
"role[]"
,
required
=
false
)
Integer
[]
roleIds
)
{
public
ResultBean
add
(
@Validated
(
Create
.
class
)
User
user
,
@RequestParam
(
value
=
"role[]"
,
required
=
false
)
Integer
[]
roleIds
)
{
...
@@ -119,21 +151,34 @@ public class UserController {
...
@@ -119,21 +151,34 @@ public class UserController {
return
ResultBean
.
success
(
userService
.
add
(
user
,
roleIds
));
return
ResultBean
.
success
(
userService
.
add
(
user
,
roleIds
));
}
}
@OperationLog
(
"禁用账号"
)
/***
* 禁用账号
* @param userId
* @return
*/
@PostMapping
(
"/{userId:\\d+}/disable"
)
@PostMapping
(
"/{userId:\\d+}/disable"
)
@ResponseBody
@ResponseBody
public
ResultBean
disable
(
@PathVariable
(
"userId"
)
Integer
userId
)
{
public
ResultBean
disable
(
@PathVariable
(
"userId"
)
Integer
userId
)
{
return
ResultBean
.
success
(
userService
.
disableUserByID
(
userId
));
return
ResultBean
.
success
(
userService
.
disableUserByID
(
userId
));
}
}
@OperationLog
(
"激活账号"
)
/**
* 激活账号
* @param userId
* @return
*/
@PostMapping
(
"/{userId}/enable"
)
@PostMapping
(
"/{userId}/enable"
)
@ResponseBody
@ResponseBody
public
ResultBean
enable
(
@PathVariable
(
"userId"
)
Integer
userId
)
{
public
ResultBean
enable
(
@PathVariable
(
"userId"
)
Integer
userId
)
{
return
ResultBean
.
success
(
userService
.
enableUserByID
(
userId
));
return
ResultBean
.
success
(
userService
.
enableUserByID
(
userId
));
}
}
@OperationLog
(
"删除账号"
)
/***
* 删除账号
* @param userId
* @return
*/
@DeleteMapping
(
"/{userId}"
)
@DeleteMapping
(
"/{userId}"
)
@ResponseBody
@ResponseBody
public
ResultBean
delete
(
@PathVariable
(
"userId"
)
Integer
userId
)
{
public
ResultBean
delete
(
@PathVariable
(
"userId"
)
Integer
userId
)
{
...
@@ -147,9 +192,13 @@ public class UserController {
...
@@ -147,9 +192,13 @@ public class UserController {
return
"user/user-reset-pwd"
;
return
"user/user-reset-pwd"
;
}
}
/***
* 重置密码
* @param userId
* @param password
* @return
*/
@OperationLog
(
"重置密码"
)
@PostMapping
(
"/{userId}/reset"
)
@PostMapping
(
"/{userId}/reset"
)
@ResponseBody
@ResponseBody
public
ResultBean
resetPassword
(
@PathVariable
(
"userId"
)
Integer
userId
,
String
password
)
{
public
ResultBean
resetPassword
(
@PathVariable
(
"userId"
)
Integer
userId
,
String
password
)
{
...
@@ -160,7 +209,12 @@ public class UserController {
...
@@ -160,7 +209,12 @@ public class UserController {
return
ResultBean
.
error
(
""
);
return
ResultBean
.
error
(
""
);
}
}
@OperationLog
(
"重置密码"
)
/**
* 重置密码
* @param user
* @param newpwd
* @return
*/
@PostMapping
(
"/myreset/{newpwd}"
)
@PostMapping
(
"/myreset/{newpwd}"
)
@ResponseBody
@ResponseBody
public
ResultBean
resetPassword
(
User
user
,
@PathVariable
(
"newpwd"
)
String
newpwd
)
{
public
ResultBean
resetPassword
(
User
user
,
@PathVariable
(
"newpwd"
)
String
newpwd
)
{
...
...
src/main/java/im/dx/system/controller/UserOnlineController.java
View file @
238fd7d4
...
@@ -21,22 +21,11 @@ import java.util.concurrent.*;
...
@@ -21,22 +21,11 @@ import java.util.concurrent.*;
@Slf4j
@Slf4j
public
class
UserOnlineController
{
public
class
UserOnlineController
{
@Value
(
"${ipurl}"
)
String
ipurl
;
@Autowired
private
RestTemplate
restTemplate
;
@Resource
@Resource
private
UserOnlineService
userOnlineService
;
private
UserOnlineService
userOnlineService
;
private
static
CompletionService
<
String
>
completionService
=
new
ExecutorCompletionService
<
String
>(
ThreadPoolUtil
.
getPool
());
@GetMapping
(
"/index"
)
public
String
index
()
{
return
"online/user-online-list"
;
}
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ResponseBody
@ResponseBody
...
@@ -45,12 +34,6 @@ public class UserOnlineController {
...
@@ -45,12 +34,6 @@ public class UserOnlineController {
return
new
PageResultBean
<>(
list
.
size
(),
list
);
return
new
PageResultBean
<>(
list
.
size
(),
list
);
}
}
@PostMapping
(
"/kickout"
)
@ResponseBody
public
ResultBean
forceLogout
(
String
sessionId
)
{
userOnlineService
.
forceLogout
(
sessionId
);
return
ResultBean
.
success
();
}
}
}
src/main/java/im/dx/system/controller/VideoController.java
View file @
238fd7d4
This diff is collapsed.
Click to expand it.
src/main/java/im/dx/system/mapper/DeptTreeMapper.java
View file @
238fd7d4
...
@@ -22,7 +22,7 @@ public interface DeptTreeMapper {
...
@@ -22,7 +22,7 @@ public interface DeptTreeMapper {
List
<
DeptTree
>
selectByParentId
(
@Param
(
"parentId"
)
String
parentId
);
List
<
DeptTree
>
selectByParentId
(
@Param
(
"parentId"
)
String
parentId
);
List
<
DeptTree
>
selectAllTree
(
@Param
(
"parent_id"
)
String
parent_id
);
List
<
DeptTree
>
selectAllTree
(
@Param
(
"parent_id"
)
String
parent_id
);
List
<
DeptTree
>
selectAllVideoTree
(
@Param
(
"parent_id"
)
String
parent_id
);
List
<
DeptTree
>
selectAllVideoTree
(
@Param
(
"parent_id"
)
String
parent_id
,
@Param
(
"username"
)
String
username
);
List
<
String
>
selectChildrenIDByPrimaryKey
(
@Param
(
"deptId"
)
String
deptId
);
List
<
String
>
selectChildrenIDByPrimaryKey
(
@Param
(
"deptId"
)
String
deptId
);
...
...
src/main/java/im/dx/system/mapper/TraffalarmrecordMapper.java
View file @
238fd7d4
package
im
.
dx
.
system
.
mapper
;
package
im
.
dx
.
system
.
mapper
;
import
com.sun.tracing.dtrace.ModuleAttributes
;
import
im.dx.system.model.DeviceChannelid
;
import
im.dx.system.model.DeviceChannelid
;
import
im.dx.system.model.Traffalarmrecord
;
import
im.dx.system.model.Traffalarmrecord
;
import
im.dx.system.model.TraffalarmrecordResult
;
import
im.dx.system.model.TraffalarmrecordResult
;
...
...
src/main/java/im/dx/system/mapper/TrafficStatisticsMapper.java
View file @
238fd7d4
...
@@ -23,9 +23,13 @@ public interface TrafficStatisticsMapper {
...
@@ -23,9 +23,13 @@ public interface TrafficStatisticsMapper {
List
<
TraffpictureParam
>
queryTraffalarmrecordByPage
(
Map
map
);
List
<
TraffpictureParam
>
queryTraffalarmrecordByPage
(
Map
map
);
List
<
TraffpictureParam
>
queryTaskInfoByPage
(
Map
map
);
List
<
TraffpictureParam
>
queryTaskInfoByPage
(
Map
map
);
int
updateTraffalarmrecordById
(
@Param
(
value
=
"list"
)
List
<
TraffpictureParam
>
recordlist
);
int
updateTraffalarmrecordById
(
@Param
(
value
=
"list"
)
List
<
TraffpictureParam
>
recordlist
);
int
updateDisputesInfo
(
@Param
(
value
=
"list"
)
List
<
TraffpictureParam
>
recordlist
);
List
<
RecordResult
>
todaytraffRecords
(
Map
map
);
List
<
RecordResult
>
todaytraffRecords
(
Map
map
);
public
List
<
Map
>
todaythbtraffRecords
(
Map
map
);
public
List
<
Map
>
todaythbtraffRecords
(
Map
map
);
...
@@ -42,6 +46,7 @@ public interface TrafficStatisticsMapper {
...
@@ -42,6 +46,7 @@ public interface TrafficStatisticsMapper {
int
deleteTraffalarmrecordById
(
String
recordid
);
int
deleteTraffalarmrecordById
(
String
recordid
);
int
updateTraffalarmrecordPushStatusById
(
String
recordid
);
int
updateTraffalarmrecordPushStatusById
(
String
recordid
);
int
deleteTraffalarmrecordByIds
(
String
recordid
);
int
deleteTraffalarmrecordByIds
(
String
recordid
);
List
<
Pedestrian
>
queryTraffPedeDetail
(
String
id
);
List
<
Pedestrian
>
queryTraffPedeDetail
(
String
id
);
...
@@ -53,5 +58,13 @@ public interface TrafficStatisticsMapper {
...
@@ -53,5 +58,13 @@ public interface TrafficStatisticsMapper {
List
<
PeopleRideBicyc
>
queryTraffPeopleRideBicycDetail
(
String
id
);
List
<
PeopleRideBicyc
>
queryTraffPeopleRideBicycDetail
(
String
id
);
int
delTraffalarmrecordByIds
(
@Param
(
value
=
"list"
)
List
<
TraffpictureParam
>
recordlist
);
int
delTraffalarmrecordByIds
(
@Param
(
value
=
"list"
)
List
<
TraffpictureParam
>
recordlist
);
int
delDisputesInfo
(
@Param
(
value
=
"list"
)
List
<
TraffpictureParam
>
recordlist
);
int
deltaskinfoByIds
(
@Param
(
value
=
"list"
)
List
<
TraffpictureParam
>
recordlist
);
int
deltaskinfoByIds
(
@Param
(
value
=
"list"
)
List
<
TraffpictureParam
>
recordlist
);
List
<
StatisticsData
>
eventStatistics
(
StatisticsParam
statisticsParam
);
List
<
StatisticsData
>
deviceStatistics
(
StatisticsParam
statisticsParam
);
List
<
StatisticsData
>
departmentEventStatistics
(
StatisticsParam
statisticsParam
);
List
<
Map
>
sendInfoStatistics
(
StatisticsParam
statisticsParam
);
}
}
\ No newline at end of file
src/main/java/im/dx/system/mapper/VideoMapper.java
View file @
238fd7d4
...
@@ -10,7 +10,9 @@ import java.util.List;
...
@@ -10,7 +10,9 @@ import java.util.List;
@Mapper
@Mapper
public
interface
VideoMapper
{
public
interface
VideoMapper
{
List
<
Video
>
selectByMutiParam
(
@Param
(
"deptId"
)
String
deptId
,
@Param
(
"videoName"
)
String
videoName
);
List
<
Video
>
selectByMutiParam
(
@Param
(
"deptId"
)
String
deptId
,
@Param
(
"userId"
)
String
userId
,
@Param
(
"videoName"
)
String
videoName
);
int
insert
(
Sbtdspsr
video
);
int
insert
(
Sbtdspsr
video
);
void
delete
(
String
id
);
void
delete
(
String
id
);
void
updateByPrimaryKey
(
Sbtdspsr
video
);
void
updateByPrimaryKey
(
Sbtdspsr
video
);
...
...
src/main/java/im/dx/system/model/DeptVideo.java
View file @
238fd7d4
...
@@ -58,6 +58,15 @@ public class DeptVideo implements Serializable {
...
@@ -58,6 +58,15 @@ public class DeptVideo implements Serializable {
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
private
List
<
DeptVideo
>
nodes
;
private
List
<
DeptVideo
>
nodes
;
private
Integer
vels
;
private
Integer
vels
;
private
String
idsets
;
public
String
getIdsets
()
{
return
idsets
;
}
public
void
setIdsets
(
String
idsets
)
{
this
.
idsets
=
idsets
;
}
public
String
getDeptId
()
{
public
String
getDeptId
()
{
return
deptId
;
return
deptId
;
...
...
src/main/java/im/dx/system/model/ResponseEnum.java
View file @
238fd7d4
...
@@ -4,29 +4,29 @@ package im.dx.system.model;
...
@@ -4,29 +4,29 @@ package im.dx.system.model;
import
lombok.Getter
;
import
lombok.Getter
;
/**
/**
*
通用返回值 枚举类
*
通用返回值 枚举类
* @author cp
* @author cp
*/
*/
@Getter
@Getter
public
enum
ResponseEnum
{
public
enum
ResponseEnum
{
/*
错误信息
*/
/*
错误信息 *
/
E_1000
(
1000
,
"
返回值必须为
PageResult"
),
E_1000
(
1000
,
"
返回值必须为Pag
eResult"
),
E_1001
(
1001
,
"
必须传递分页参数
"
),
E_1001
(
1001
,
"
必须传递分页参数"
),
E_1002
(
1002
,
"
参数值异常
"
),
E_1002
(
1002
,
"
参数值异常"
)
,
E_1003
(
1003
,
"
参数值转换异常
"
),
E_1003
(
1003
,
"
参数值转换异常"
),
E_1004
(
1004
,
"
参数值为空
"
),
E_1004
(
1004
,
"
参数值为空"
)
,
/*
保存 更新 重置 删除 等
*/
/*
保存 更新 重置 删除 等 */
E_1005
(
1005
,
"
更新失败
"
),
E_1005
(
1005
,
"
更新失败"
)
,
E_1006
(
1006
,
"
无结果
"
),
E_1006
(
1006
,
"
无结果"
),
E_1007
(
1007
,
"
未登录
"
),
E_1007
(
1007
,
"
未登录"
),
E_1008
(
1008
,
"
请求超时
"
),
E_1008
(
1008
,
"
请求超时"
)
,
E_1009
(
1009
,
"
请求下游服务异常
"
),
E_1009
(
1009
,
"
请求下游服务异常"
),
E_1010
(
1010
,
"
数据保存失败
"
),
E_1010
(
1010
,
"
数据保存失败"
),
E_1011
(
1011
,
"
数据重复
"
),
E_1011
(
1011
,
"
数据重复"
)
,
E_9999
(
9999
,
"
系统异常
"
),
E_9999
(
9999
,
"
系统异常"
)
,
SUCCESS
(
200
,
"
请求成功
"
);
SUCCESS
(
200
,
"
请求成功"
)
;
private
int
code
;
private
int
code
;
...
...
src/main/java/im/dx/system/model/ResultObj.java
View file @
238fd7d4
...
@@ -8,31 +8,31 @@ import lombok.Setter;
...
@@ -8,31 +8,31 @@ import lombok.Setter;
import
java.util.List
;
import
java.util.List
;
/**
/**
*
自定义响应结构
*
自定义响应结构
* @author cp
* @author cp
*/
*/
@Getter
@Getter
@Setter
@Setter
public
class
ResultObj
{
public
class
ResultObj
{
//
定义jackson对象
//
定义jackson对象
private
static
final
ObjectMapper
MAPPER
=
new
ObjectMapper
();
private
static
final
ObjectMapper
MAPPER
=
new
ObjectMapper
();
/**
/**
*
响应业务状态
*
响应业务状态
* 200
成功
* 200
成功
* 201
错误
* 201
错误
* 400
参数错误
* 400
参数错误
*/
*/
private
Integer
status
;
private
Integer
status
;
/**
/**
*
响应消息
*
响应消息
*/
*/
private
String
msg
;
private
String
msg
;
/**
/**
*
响应中的数据
*
响应中的数据
*/
*/
private
Object
data
;
private
Object
data
;
...
@@ -70,11 +70,11 @@ public class ResultObj {
...
@@ -70,11 +70,11 @@ public class ResultObj {
/**
/**
*
将json结果集转化为SysResult对象
*
将json结果集转化为SysResult对象
*
*
* @param jsonData json
数据
* @param jsonData json
数据
* @param clazz SysResult
中的object类型
* @param clazz SysResult
中的object类型
* @return SysResult
对象
* @return SysResult
对象
*/
*/
public
static
ResultObj
formatToPojo
(
String
jsonData
,
Class
<?>
clazz
)
{
public
static
ResultObj
formatToPojo
(
String
jsonData
,
Class
<?>
clazz
)
{
try
{
try
{
...
@@ -97,10 +97,10 @@ public class ResultObj {
...
@@ -97,10 +97,10 @@ public class ResultObj {
}
}
/**
/**
*
没有object对象的转化
*
没有object对象的转化
*
*
* @param json
字符串
* @param json
字符串
* @return SysResult
对象
* @return SysResult
对象
*/
*/
public
static
ResultObj
format
(
String
json
)
{
public
static
ResultObj
format
(
String
json
)
{
try
{
try
{
...
@@ -112,11 +112,11 @@ public class ResultObj {
...
@@ -112,11 +112,11 @@ public class ResultObj {
}
}
/**
/**
* Object
是集合转化
* Object
是集合转化
*
*
* @param jsonData json
数据
* @param jsonData json
数据
* @param clazz
集合中的类型
* @param clazz
集合中的类型
* @return SysResult
对象
* @return SysResult
对象
*/
*/
public
static
ResultObj
formatToList
(
String
jsonData
,
Class
<?>
clazz
)
{
public
static
ResultObj
formatToList
(
String
jsonData
,
Class
<?>
clazz
)
{
try
{
try
{
...
...
src/main/java/im/dx/system/model/TraffpictureParam.java
View file @
238fd7d4
...
@@ -14,7 +14,7 @@ import java.util.Date;
...
@@ -14,7 +14,7 @@ import java.util.Date;
* @since 2021-04-29
* @since 2021-04-29
*/
*/
public
class
TraffpictureParam
extends
Traffpicture
{
public
class
TraffpictureParam
extends
Traffpicture
{
private
Long
record
id
;
private
Long
id
;
private
String
fdid
;
private
String
fdid
;
private
Integer
channelid
;
private
Integer
channelid
;
private
Long
areaid
;
private
Long
areaid
;
...
@@ -151,12 +151,14 @@ public class TraffpictureParam extends Traffpicture {
...
@@ -151,12 +151,14 @@ public class TraffpictureParam extends Traffpicture {
this
.
imagedata
=
imagedata
;
this
.
imagedata
=
imagedata
;
}
}
public
Long
getRecordid
()
{
@Override
return
recordid
;
public
Long
getId
()
{
return
id
;
}
}
public
void
setRecordid
(
Long
recordid
)
{
@Override
this
.
recordid
=
recordid
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
}
public
String
getFdid
()
{
public
String
getFdid
()
{
...
...
src/main/java/im/dx/system/service/DeptTreeService.java
View file @
238fd7d4
...
@@ -82,8 +82,8 @@ public class DeptTreeService {
...
@@ -82,8 +82,8 @@ public class DeptTreeService {
/**
/**
* 查找所有的部门的树形结构
* 查找所有的部门的树形结构
*/
*/
public
List
<
DeptTree
>
selectAllVideoTree
(
String
parentId
)
{
public
List
<
DeptTree
>
selectAllVideoTree
(
String
parentId
,
String
userId
)
{
return
deptTreeMapper
.
selectAllVideoTree
(
parentId
);
return
deptTreeMapper
.
selectAllVideoTree
(
parentId
,
userId
);
}
}
...
...
src/main/java/im/dx/system/service/MenuService.java
View file @
238fd7d4
...
@@ -60,7 +60,7 @@ public class MenuService {
...
@@ -60,7 +60,7 @@ public class MenuService {
*/
*/
public
List
<
Menu
>
getALLMenuTreeAndRoot
()
{
public
List
<
Menu
>
getALLMenuTreeAndRoot
()
{
List
<
Menu
>
allMenuTree
=
getALLTree
();
List
<
Menu
>
allMenuTree
=
getALLTree
();
return
addRootNode
(
"
导航目录
"
,
0
,
allMenuTree
);
return
addRootNode
(
""
,
0
,
allMenuTree
);
}
}
/**
/**
...
...
src/main/java/im/dx/system/service/TrafficStatisticsService.java
View file @
238fd7d4
...
@@ -27,7 +27,6 @@ public class TrafficStatisticsService {
...
@@ -27,7 +27,6 @@ public class TrafficStatisticsService {
public
List
<
TraffpictureParam
>
queryTaskInfoByPage
(
Map
map
,
int
page
,
int
limit
)
{
public
List
<
TraffpictureParam
>
queryTaskInfoByPage
(
Map
map
,
int
page
,
int
limit
)
{
PageHelper
.
startPage
(
page
,
limit
);
PageHelper
.
startPage
(
page
,
limit
);
List
<
TraffpictureParam
>
traffalarmrecordResults
=
trafficStatisticsMapper
.
queryTaskInfoByPage
(
map
);
List
<
TraffpictureParam
>
traffalarmrecordResults
=
trafficStatisticsMapper
.
queryTaskInfoByPage
(
map
);
return
traffalarmrecordResults
;
return
traffalarmrecordResults
;
}
}
...
@@ -35,6 +34,10 @@ public class TrafficStatisticsService {
...
@@ -35,6 +34,10 @@ public class TrafficStatisticsService {
return
trafficStatisticsMapper
.
updateTraffalarmrecordById
(
recordlist
);
return
trafficStatisticsMapper
.
updateTraffalarmrecordById
(
recordlist
);
}
}
public
int
updateDisputesInfo
(
List
<
TraffpictureParam
>
recordlist
){
return
trafficStatisticsMapper
.
updateDisputesInfo
(
recordlist
);
}
public
List
<
RecordResult
>
todaytraffRecords
(
Map
map
)
{
public
List
<
RecordResult
>
todaytraffRecords
(
Map
map
)
{
return
trafficStatisticsMapper
.
todaytraffRecords
(
map
);
return
trafficStatisticsMapper
.
todaytraffRecords
(
map
);
...
@@ -94,4 +97,23 @@ public class TrafficStatisticsService {
...
@@ -94,4 +97,23 @@ public class TrafficStatisticsService {
return
trafficStatisticsMapper
.
selectCodeByCodeid
(
codeid
,
level
);
return
trafficStatisticsMapper
.
selectCodeByCodeid
(
codeid
,
level
);
}
}
public
int
delDisputesInfo
(
List
<
TraffpictureParam
>
recordlist
){
return
trafficStatisticsMapper
.
delDisputesInfo
(
recordlist
);
}
public
List
<
StatisticsData
>
eventStatistics
(
StatisticsParam
statisticsParam
){
return
trafficStatisticsMapper
.
eventStatistics
(
statisticsParam
);
}
public
List
<
StatisticsData
>
deviceStatistics
(
StatisticsParam
statisticsParam
){
return
trafficStatisticsMapper
.
deviceStatistics
(
statisticsParam
);
}
public
List
<
Map
>
sendInfoStatistics
(
StatisticsParam
statisticsParam
){
return
trafficStatisticsMapper
.
sendInfoStatistics
(
statisticsParam
);
}
public
List
<
StatisticsData
>
departmentEventStatistics
(
StatisticsParam
statisticsParam
){
return
trafficStatisticsMapper
.
departmentEventStatistics
(
statisticsParam
);
}
}
}
\ No newline at end of file
src/main/java/im/dx/system/service/VideoService.java
View file @
238fd7d4
...
@@ -19,9 +19,9 @@ public class VideoService {
...
@@ -19,9 +19,9 @@ public class VideoService {
/**
/**
* 根据父 ID 获取所有部门下的监控信息
* 根据父 ID 获取所有部门下的监控信息
*/
*/
public
List
<
Video
>
selectByMutiParam
(
int
page
,
int
rows
,
String
deptId
,
String
videoName
)
{
public
List
<
Video
>
selectByMutiParam
(
int
page
,
int
rows
,
String
deptId
,
String
userId
,
String
videoName
)
{
PageHelper
.
startPage
(
page
,
rows
);
PageHelper
.
startPage
(
page
,
rows
);
return
videoMapper
.
selectByMutiParam
(
deptId
,
videoName
);
return
videoMapper
.
selectByMutiParam
(
deptId
,
userId
,
videoName
);
}
}
@Transactional
@Transactional
...
...
src/main/resources/application-im.properties
View file @
238fd7d4
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
123456
spring.datasource.password
=
123456
#spring.datasource.url=jdbc:mysql://172.22.135.45:12345/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false&
allowPublicKeyRetrieval=true
#spring.datasource.url=jdbc:mysql://172.22.135.45:12345/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false&
serverTimezone=GMT%2B8
spring.datasource.url
=
jdbc:mysql://172.16.24.29:3306/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=
UTC&allowPublicKeyRetrieval=true
spring.datasource.url
=
jdbc:mysql://172.16.24.29:3306/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=
GMT%2B8
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.
cj.
jdbc.Driver
spring.datasource.filters
=
stat
spring.datasou
name
rce.filters
=
stat
spring.datasource.maxActive
=
1000
spring.datasource.maxActive
=
1000
spring.datasource.initialSize
=
100
spring.datasource.initialSize
=
100
spring.datasource.maxWait
=
60000
spring.datasource.maxWait
=
60000
...
...
src/main/resources/application-local.properties
View file @
238fd7d4
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
root
spring.datasource.password
=
root
spring.datasource.url
=
jdbc:mysql://127.0.0.1:3306/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=
Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://127.0.0.1:3306/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=
GMT%2B8
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.
cj.
jdbc.Driver
spring.datasource.filters
=
stat
spring.datasource.filters
=
stat
spring.datasource.maxActive
=
1000
spring.datasource.maxActive
=
1000
spring.datasource.initialSize
=
100
spring.datasource.initialSize
=
100
...
...
src/main/resources/application.properties
View file @
238fd7d4
spring.profiles.active
=
local
spring.profiles.active
=
devzjgs
server.port
=
8083
server.port
=
8083
mybatis.configuration.map-underscore-to-camel-case
=
true
mybatis.configuration.map-underscore-to-camel-case
=
true
mybatis.configuration.default-fetch-size
=
100
mybatis.configuration.default-fetch-size
=
100
mybatis.configuration.default-statement-timeout
=
3000
mybatis.configuration.default-statement-timeout
=
3000
mybatis.type-aliases-package
=
im.dx.system.model.vo
mybatis.type-aliases-package
=
im.dx.system.model.vo
mybatis.mapper-locations
=
classpath:mapper/*.xml
mybatis.mapper-locations
=
classpath:mapper/*.xml
file.rtspurl
=
http://zjh189.ncpoi.cc:7180/getDeviceSnapshot
file.rtspurl
=
http://zjh189.ncpoi.cc:7180/getDeviceSnapshot
file.taskurl
=
http://172.16.24.29:8089/ai/task
file.taskurl
=
http://172.16.24.29:8089/ai/task
spring.http.encoding.force
=
true
spring.http.encoding.force
=
true
...
...
src/main/resources/logback-spring.xml
View file @
238fd7d4
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
scan=
"false"
>
<configuration
debug=
"false"
scan=
"false"
>
<springProperty
scop=
"context"
name=
"spring.application.name"
source=
"spring.application.name"
defaultValue=
""
/>
<springProperty
scop=
"context"
name=
"spring.application.name"
source=
"spring.application.name"
defaultValue=
""
/>
<property
name=
"log.path"
value=
"/home/ubuntu/tar/
videoalarm/logs
/${spring.application.name}"
/>
<property
name=
"log.path"
value=
"/home/ubuntu/tar/
logs/zjgszdVideoAlarmService
/${spring.application.name}"
/>
<!--<property name="log.path" value="/home/prod/deploy/HZDXService/logs/${spring.application.name}"/>-->
<!--<property name="log.path" value="/home/prod/deploy/HZDXService/logs/${spring.application.name}"/>-->
<!-- 彩色日志格式 -->
<!-- 彩色日志格式 -->
<property
name=
"CONSOLE_LOG_PATTERN"
<property
name=
"CONSOLE_LOG_PATTERN"
...
...
src/main/resources/mapper/DeptMapper.xml
View file @
238fd7d4
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
<result
column=
"parent_id"
jdbcType=
"INTEGER"
property=
"parentId"
/>
<result
column=
"parent_id"
jdbcType=
"INTEGER"
property=
"parentId"
/>
<result
column=
"order_num"
jdbcType=
"INTEGER"
property=
"orderNum"
/>
<result
column=
"order_num"
jdbcType=
"INTEGER"
property=
"orderNum"
/>
<result
column=
"vels"
jdbcType=
"INTEGER"
property=
"vels"
/>
<result
column=
"vels"
jdbcType=
"INTEGER"
property=
"vels"
/>
<result
column=
"idsets"
jdbcType=
"VARCHAR"
property=
"idsets"
/>
</resultMap>
</resultMap>
...
@@ -160,10 +161,10 @@
...
@@ -160,10 +161,10 @@
<where>
<where>
<choose>
<choose>
<when
test=
"parent_id!=null"
>
<when
test=
"parent_id!=null"
>
and
parent_id = #{parent_id}
and
find_in_set(#{parent_id},idsets)
</when>
</when>
<otherwise>
<otherwise>
and
parent_id =0
and
find_in_set('0',idsets)
</otherwise>
</otherwise>
</choose>
</choose>
</where>
</where>
...
@@ -171,43 +172,47 @@
...
@@ -171,43 +172,47 @@
</select>
</select>
<select
id=
"listvideo"
resultMap=
"VideoTreeBaseResultMap"
>
<select
id=
"listvideo"
resultMap=
"VideoTreeBaseResultMap"
>
select distinct t.dept_id dept_id,
select distinct t.dept_id dept_id,
t.dept_name ,
t.dept_name ,
parent_id parent_id,
parent_id parent_id,
levels
,t.order_num,0 vel
s
levels
,t.order_num,0 vels,idset
s
from dept t
from dept t
<if
test=
"deptId != null and deptId!=0"
>
union
,t_user a
where a.dept_id = t.dept_id
and a.dept_id = #{deptId}
<if
test=
"username != null and username!='' "
>
and a.username = #{username}
</if>
</if>
union all
select a.* ,0 vels from (SELECT
select a.* ,0 vels from (SELECT
CONCAT_WS( '_' ,A .sbbh , tdbh)
dept_id,
A .sbbh
dept_id,
A .tdmc dept_name,
A .tdmc dept_name,
A .xzbh parent_id,
A .xzbh parent_id,
'' levels,
'' levels,
(
0 order_num,0 idsets
SELECT
max(order_num)
FROM
dept
) + (@rownum := @rownum + 1) order_num
FROM
FROM
dept T,(SELECT @rownum:=0) r ,
dept T,(SELECT @rownum:=0) r ,
sbtdspsr A where
sbtdspsr
T .dept_id = A .xzbh
A where
T .dept_id = A .xzbh and
find_in_set(A.xzbh,T.idsets)
and find_in_set(#{deptId},idsets)
<if
test=
"tdmc != null and tdmc!='' "
>
<if
test=
"tdmc != null and tdmc!='' "
>
and tdmc like '%${tdmc}%'
and tdmc like '%${tdmc}%'
</if>
)a
</if>
)a
union
select a.* ,0 vels,0 idsets from (SELECT
a .sbbh dept_id,
a .tdmc dept_name,
a .xzbh parent_id,
'' levels,
0 order_num
from sbtdspsr a,role_videoerecordtype b,user_role c
where a.sbbh=b.videorecordtypeid and b.roleid=c.role_id
and c.user_id=
(select distinct user_id from t_user where username=#{username})
)a
</select>
</select>
<select
id=
"listAllvideoIdsByDeptid"
resultType=
"java.util.HashMap"
>
<select
id=
"listAllvideoIdsByDeptid"
resultType=
"java.util.HashMap"
>
select
concat(sbbh,'_',tdbh)
vidoid
select
sbbh
vidoid
from sbtdspsr a
from sbtdspsr a
where a.xzbh in (
where a.xzbh in (
select t1.dept_id
select t1.dept_id
...
...
src/main/resources/mapper/DeptTreeMapper.xml
View file @
238fd7d4
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
<result
column=
"order_num"
jdbcType=
"INTEGER"
property=
"orderNum"
/>
<result
column=
"order_num"
jdbcType=
"INTEGER"
property=
"orderNum"
/>
<result
column=
"create_time"
jdbcType=
"VARCHAR"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"VARCHAR"
property=
"createTime"
/>
<result
column=
"modify_time"
jdbcType=
"VARCHAR"
property=
"modifyTime"
/>
<result
column=
"modify_time"
jdbcType=
"VARCHAR"
property=
"modifyTime"
/>
<
!--<collection property="children" ofType="im.zhaojun.system.model.DeptTree" select="selectAllTree"-->
<
collection
property=
"children"
ofType=
"im.dx.system.model.DeptTree"
select=
"selectAllTree"
<!--column="{parent_id = dept_id}"/>--
>
column=
"{parent_id = dept_id}"
/
>
</resultMap>
</resultMap>
<resultMap
id=
"TreeBaseVideoResultMap"
type=
"im.dx.system.model.DeptTree"
>
<resultMap
id=
"TreeBaseVideoResultMap"
type=
"im.dx.system.model.DeptTree"
>
...
@@ -131,18 +131,14 @@
...
@@ -131,18 +131,14 @@
<select
id=
"selectAllTree"
resultMap=
"TreeBaseResultMap"
>
<select
id=
"selectAllTree"
resultMap=
"TreeBaseResultMap"
>
select
select
t1.dept_id, t1.dept_name, t1.parent_id, t1.order_num, t1.create_time, t1.modify_time,t1.levels
t1.dept_id, t1.dept_name, t1.parent_id, t1.order_num, t1.create_time, t1.modify_time,t1.levels
from dept t1 left join dept t2
from dept t1
on t1.parent_id = t2.dept_id
<where>
<where>
<choose>
<choose>
<when
test=
"parent_id!=null"
>
<when
test=
"parent_id != null"
>
and t1.parent_id = #{parent_id}
and parent_id = #{parent_id}
or t1.dept_id = #{parent_id}
or t2.parent_id =#{parent_id}
or t2.dept_id = #{parent_id}
</when>
</when>
<otherwise>
<otherwise>
t1.parent_id =
0
and parent_id =
0
</otherwise>
</otherwise>
</choose>
</choose>
</where>
</where>
...
@@ -158,35 +154,26 @@
...
@@ -158,35 +154,26 @@
t.order_num
t.order_num
from dept t
from dept t
union
union
select distinct t1.dept_id dept_id,
select a.* , (SELECT count(*) FROM dept) + (@rownum := @rownum + 1) order_num from (
t1.dept_name,
select distinct sbbh dept_id,
t1.parent_id parent_id,
t1.levels,
t1.order_num
from dept t1
left join dept t2
on t1.parent_id = t2.dept_id
where t1.parent_id =0
or t1.dept_id =0
or t2.parent_id =0
or t2.dept_id =0
union
select sbbh dept_id,
tdmc dept_name,
tdmc dept_name,
xzbh parent_id,
xzbh parent_id,
'3' levels,
(select max(levels)+1 from dept ) levels
(SELECT count(*) FROM dept) + (@rownum := @rownum + 1) order_num
from dept t1, sbtdspsr A where
from sbtdspsr,(SELECT @rownum:=0) r
t1.dept_id = A.xzbh and
-- union
find_in_set(A.xzbh,idsets)
-- select taskno dept_id,
and find_in_set(#{parent_id},idsets)
-- b.name dept_name,
union
-- videoid parent_id,
select a.* from (SELECT
-- '4' levels,
a .sbbh dept_id,
-- (SELECT count(*) FROM sbtdspsr) + (@rownum := @rownum + 1) order_num
a .tdmc dept_name,
-- from quartz_task_informations a
a .xzbh parent_id,
-- left join t_code b
(select max(levels)+1 from dept ) levels
-- on a.recordtype = b.key and b.type=1
from sbtdspsr a,role_videoerecordtype b,user_role c
) a,(SELECT @rownum:=0) r
where a.sbbh=b.videorecordtypeid and b.roleid=c.role_id
and c.user_id=(select user_id from t_user where username=#{username} limit 1)
)a)a
) a,(SELECT @rownum:=0) r
order by order_num
order by order_num
</select>
</select>
...
@@ -226,7 +213,7 @@
...
@@ -226,7 +213,7 @@
(select name from t_code b where a.sendtype=b.key and b.type=2)sendtype,'3' tasktype,imgsrc
(select name from t_code b where a.sendtype=b.key and b.type=2)sendtype,'3' tasktype,imgsrc
from autosnaptaskinfo a
from autosnaptaskinfo a
where a.devicenum=#{videoId} and status!=4
where a.devicenum=#{videoId} and status!=4
order by
frozenstatus
desc
order by
id
desc
</select>
</select>
...
...
src/main/resources/mapper/LoginLogMapper.xml
View file @
238fd7d4
...
@@ -2,10 +2,6 @@
...
@@ -2,10 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"im.dx.system.mapper.LoginLogMapper"
>
<mapper
namespace=
"im.dx.system.mapper.LoginLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"im.dx.system.model.LoginLog"
>
<resultMap
id=
"BaseResultMap"
type=
"im.dx.system.model.LoginLog"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"login_time"
jdbcType=
"VARCHAR"
property=
"loginTime"
/>
<result
column=
"login_time"
jdbcType=
"VARCHAR"
property=
"loginTime"
/>
<result
column=
"username"
jdbcType=
"VARCHAR"
property=
"username"
/>
<result
column=
"username"
jdbcType=
"VARCHAR"
property=
"username"
/>
...
@@ -13,45 +9,29 @@
...
@@ -13,45 +9,29 @@
<result
column=
"ip"
jdbcType=
"VARCHAR"
property=
"ip"
/>
<result
column=
"ip"
jdbcType=
"VARCHAR"
property=
"ip"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, login_time, username, login_status, ip
id, login_time, username, login_status, ip
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from login_log
from login_log
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</select>
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from login_log
delete from login_log
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"im.dx.system.model.LoginLog"
>
<insert
id=
"insert"
parameterType=
"im.dx.system.model.LoginLog"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into login_log (login_time, username, login_status,
insert into login_log (login_time, username, login_status,
ip)
ip)
values (#{loginTime,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{loginStatus,jdbcType=CHAR},
values (#{loginTime,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{loginStatus,jdbcType=CHAR},
#{ip,jdbcType=VARCHAR})
#{ip,jdbcType=VARCHAR})
</insert>
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"im.dx.system.model.LoginLog"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"im.dx.system.model.LoginLog"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update login_log
update login_log
set login_time = #{loginTime,jdbcType=VARCHAR},
set login_time = #{loginTime,jdbcType=VARCHAR},
username = #{username,jdbcType=VARCHAR},
username = #{username,jdbcType=VARCHAR},
...
...
src/main/resources/mapper/MenuMapper.xml
View file @
238fd7d4
...
@@ -49,7 +49,6 @@
...
@@ -49,7 +49,6 @@
<result
column=
"create_time"
jdbcType=
"VARCHAR"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"VARCHAR"
property=
"createTime"
/>
<result
column=
"modify_time"
jdbcType=
"VARCHAR"
property=
"modifyTime"
/>
<result
column=
"modify_time"
jdbcType=
"VARCHAR"
property=
"modifyTime"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<!--<collection property="children" ofType="im.zhaojun.system.model.Menu" select="selectAllMenuAndCountOperator" column="{parent_id = menu_id}"/>-->
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/OperatorMapper.xml
View file @
238fd7d4
...
@@ -2,10 +2,6 @@
...
@@ -2,10 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"im.dx.system.mapper.OperatorMapper"
>
<mapper
namespace=
"im.dx.system.mapper.OperatorMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"im.dx.system.model.Operator"
>
<resultMap
id=
"BaseResultMap"
type=
"im.dx.system.model.Operator"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"operator_id"
jdbcType=
"INTEGER"
property=
"operatorId"
/>
<id
column=
"operator_id"
jdbcType=
"INTEGER"
property=
"operatorId"
/>
<result
column=
"menu_id"
jdbcType=
"INTEGER"
property=
"menuId"
/>
<result
column=
"menu_id"
jdbcType=
"INTEGER"
property=
"menuId"
/>
<result
column=
"operator_name"
jdbcType=
"VARCHAR"
property=
"operatorName"
/>
<result
column=
"operator_name"
jdbcType=
"VARCHAR"
property=
"operatorName"
/>
...
@@ -16,45 +12,26 @@
...
@@ -16,45 +12,26 @@
<result
column=
"modify_time"
jdbcType=
"VARCHAR"
property=
"modifyTime"
/>
<result
column=
"modify_time"
jdbcType=
"VARCHAR"
property=
"modifyTime"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
operator_id, menu_id, operator_name, url, perms, http_method, create_time, modify_time
operator_id, menu_id, operator_name, url, perms, http_method, create_time, modify_time
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from operator
from operator
where operator_id = #{operatorId,jdbcType=INTEGER}
where operator_id = #{operatorId,jdbcType=INTEGER}
</select>
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from operator
delete from operator
where operator_id = #{operatorId,jdbcType=INTEGER}
where operator_id = #{operatorId,jdbcType=INTEGER}
</delete>
</delete>
<insert
id=
"insert"
keyColumn=
"operator_id"
keyProperty=
"operatorId"
parameterType=
"im.dx.system.model.Operator"
>
<insert
id=
"insert"
keyColumn=
"operator_id"
keyProperty=
"operatorId"
parameterType=
"im.dx.system.model.Operator"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into operator (operator_id , menu_id, operator_name, url,
insert into operator (operator_id , menu_id, operator_name, url,
perms, http_method, create_time,
perms, http_method, create_time,
modify_time)
modify_time)
select max(operator_id )+1,#{menuId,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},#{perms,jdbcType=VARCHAR}, #{httpMethod,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR},#{modifyTime,jdbcType=VARCHAR},#{createTime,jdbcType=VARCHAR},#{modifyTime,jdbcType=VARCHAR}
select max(operator_id )+1,#{menuId,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},#{perms,jdbcType=VARCHAR}, #{httpMethod,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR},#{modifyTime,jdbcType=VARCHAR},#{createTime,jdbcType=VARCHAR},#{modifyTime,jdbcType=VARCHAR}
</insert>
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"im.dx.system.model.Operator"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"im.dx.system.model.Operator"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update operator
update operator
set menu_id = #{menuId,jdbcType=INTEGER},
set menu_id = #{menuId,jdbcType=INTEGER},
operator_name = #{operatorName,jdbcType=VARCHAR},
operator_name = #{operatorName,jdbcType=VARCHAR},
...
...
src/main/resources/mapper/TrafficStatisticsMapper.xml
View file @
238fd7d4
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/VideoMapper.xml
View file @
238fd7d4
...
@@ -43,18 +43,22 @@
...
@@ -43,18 +43,22 @@
<select
id=
"selectByMutiParam"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByMutiParam"
resultMap=
"BaseResultMap"
>
select a.xh, a.tdmc, a.sbbh ,a.tdbh,a.squrllj,a.xzbh,a.jd,a.wd , b.dept_name qymc, a.tdlx,a.kz3
select a.xh, a.tdmc, a.sbbh ,a.tdbh,a.squrllj,a.xzbh,a.jd,a.wd , b.dept_name qymc, a.tdlx,a.kz3
from sbtdspsr a,(select t1.dept_id, t1.dept_name
from sbtdspsr a,
from dept t1
(select t1.dept_id, t1.dept_name
left join dept t2
from dept t1 where find_in_set( #{deptId},idsets))b
on t1.parent_id = t2.dept_id
where t1.parent_id = #{deptId}
or t1.dept_id = #{deptId}
or t2.parent_id =#{deptId}
or t2.dept_id = #{deptId})b
where a.xzbh=b.dept_id
where a.xzbh=b.dept_id
<if
test=
"videoName != null and videoName != '' "
>
<if
test=
"videoName != null and videoName != '' "
>
and tdmc like '%${videoName}%'
and tdmc like '%${videoName}%'
</if>
</if>
union
select a.xh, a.tdmc, a.sbbh ,a.tdbh,a.squrllj,a.xzbh,a.jd,a.wd ,
(select b.dept_name from dept b where b.dept_id=a.xzbh limit 1) qymc, a.tdlx,a.kz3
from sbtdspsr a
<if
test=
"userId !=null and userId !=''"
>
,role_videoerecordtype b
where a.sbbh=b.videorecordtypeid
and b.roleid=(select role_id from user_role where user_id=#{userId} limit 1)
</if>
order by sbbh
order by sbbh
</select>
</select>
<insert
id=
"insert"
parameterType=
"im.dx.system.model.Sbtdspsr"
>
<insert
id=
"insert"
parameterType=
"im.dx.system.model.Sbtdspsr"
>
...
...
src/main/resources/static/js/jgsbgl/jgsbgl.js
View file @
238fd7d4
...
@@ -21,24 +21,6 @@ let vue_right = new Vue({
...
@@ -21,24 +21,6 @@ let vue_right = new Vue({
iframe
.
onload
=
function
()
{
iframe
.
onload
=
function
()
{
document
.
getElementById
(
'
iframe
'
).
contentWindow
.
frames
.
setImg
();
document
.
getElementById
(
'
iframe
'
).
contentWindow
.
frames
.
setImg
();
}
}
// setimg();
// draw = new DrawRectangle('draw-canvas', {
// src:this.imgsrc,
// layers: [{},
// {
// "x1":x,
// "y1": y,
// "x2": x+w,
// "y2": y+h,
// "width": w,
// "height": h,
// "strokeStyle": "red",
// "type": 0
// }
// ]
// });
},
},
add
:
function
(
item
){
add
:
function
(
item
){
$
(
"
#myjgModal1
"
).
modal
(
"
show
"
);
$
(
"
#myjgModal1
"
).
modal
(
"
show
"
);
...
@@ -51,8 +33,6 @@ let vue_right = new Vue({
...
@@ -51,8 +33,6 @@ let vue_right = new Vue({
vue_default
.
valueId
=
item
.
xzbh
;
vue_default
.
valueId
=
item
.
xzbh
;
vue_default
.
data_s
.
tdlx
=
item
.
tdlx
;
vue_default
.
data_s
.
tdlx
=
item
.
tdlx
;
vue_default
.
initHandle
();
vue_default
.
initHandle
();
// vue_default.data_s.qymc = item.qymc,
// vue_myjgModal1_edit.data_s.squrllj = item.squrllj
$
(
"
#myjgModal1
"
).
modal
(
"
show
"
);
$
(
"
#myjgModal1
"
).
modal
(
"
show
"
);
},
},
del
:
function
(
item
)
{
del
:
function
(
item
)
{
...
@@ -80,6 +60,8 @@ let vue_right = new Vue({
...
@@ -80,6 +60,8 @@ let vue_right = new Vue({
page
:
pages
,
page
:
pages
,
pageSize
:
this
.
fy_select
,
pageSize
:
this
.
fy_select
,
deptId
:
this
.
xz_jg
,
deptId
:
this
.
xz_jg
,
userId
:
getCookie
(
"
bjpt_userId
"
),
username
:
getCookie
(
"
bjpt_realName
"
),
videoName
:
$
(
"
#ryxm
"
).
val
(),
videoName
:
$
(
"
#ryxm
"
).
val
(),
},
},
success
:
function
(
result
)
{
success
:
function
(
result
)
{
...
@@ -118,7 +100,6 @@ let vue_right = new Vue({
...
@@ -118,7 +100,6 @@ let vue_right = new Vue({
});
});
},
},
getChange
:
function
()
{
getChange
:
function
()
{
// alert(this.fy_select);
this
.
queryRY
(
1
,
true
);
this
.
queryRY
(
1
,
true
);
}
}
},
},
...
@@ -135,6 +116,7 @@ let vue_sjcx = new Vue({
...
@@ -135,6 +116,7 @@ let vue_sjcx = new Vue({
timetype
:
0
,
timetype
:
0
,
detectType
:
null
,
detectType
:
null
,
notljt
:
1
,
notljt
:
1
,
notface
:
1
,
sfzdzptype
:
0
,
sfzdzptype
:
0
,
imgsrc
:
''
imgsrc
:
''
},
},
...
@@ -156,8 +138,6 @@ let vue_sjcx = new Vue({
...
@@ -156,8 +138,6 @@ let vue_sjcx = new Vue({
else
if
(
this
.
cheakallornot
==
"
1
"
)
{
else
if
(
this
.
cheakallornot
==
"
1
"
)
{
this
.
widthdata
=
"
440px
"
;
this
.
widthdata
=
"
440px
"
;
}
}
},
},
getPic
:
function
(){
getPic
:
function
(){
...
@@ -171,7 +151,8 @@ let vue_sjcx = new Vue({
...
@@ -171,7 +151,8 @@ let vue_sjcx = new Vue({
success
:
function
(
result
)
{
success
:
function
(
result
)
{
if
(
result
.
errorCode
==
"
0
"
){
if
(
result
.
errorCode
==
"
0
"
){
that
.
imgsrc
=
result
.
data
;
that
.
imgsrc
=
result
.
data
;
draw
.
src
=
result
.
data
;
document
.
getElementById
(
'
iframe
'
).
contentWindow
.
frames
.
setImg
();
// draw.src=result.data;
}
}
},
error
:
function
(
result
){
},
error
:
function
(
result
){
...
@@ -179,18 +160,21 @@ let vue_sjcx = new Vue({
...
@@ -179,18 +160,21 @@ let vue_sjcx = new Vue({
}
}
});
});
},
},
changedetectType
:
function
(){
changedetectType
:
function
(){
if
(
this
.
detectType
==
"
15
"
){
if
(
this
.
detectType
==
"
15
"
){
//垃圾桶检测
//垃圾桶检测
this
.
notljt
=
0
;
this
.
notljt
=
0
;
}
else
{
}
else
{
this
.
notljt
=
1
;
}
this
.
notljt
=
1
;
}
if
(
this
.
detectType
==
"
60
"
){
this
.
notljt
=
2
;
this
.
objectType
=
"
6
"
;
}
else
{
this
.
notljt
=
1
;
}
},
},
addtask
:
function
(
item
)
{
addtask
:
function
(
item
)
{
if
(
$
(
"
#starthour
"
).
val
()
==
""
&&
$
(
"
#endhour
"
).
val
()
!=
""
)
if
(
$
(
"
#starthour
"
).
val
()
==
""
&&
$
(
"
#endhour
"
).
val
()
!=
""
)
...
@@ -255,7 +239,7 @@ let vue_sjcx = new Vue({
...
@@ -255,7 +239,7 @@ let vue_sjcx = new Vue({
params
:
{
params
:
{
starthour
:
$
(
"
#starthour
"
).
val
()
,
starthour
:
$
(
"
#starthour
"
).
val
()
,
endhour
:
$
(
"
#endhour
"
).
val
(),
endhour
:
$
(
"
#endhour
"
).
val
(),
thresholdValue
:
0
,
thresholdValue
:
$
(
"
#thresholdValue
"
).
val
()
,
objectType
:
$
(
"
#objectType
"
).
val
(),
objectType
:
$
(
"
#objectType
"
).
val
(),
sendType
:
$
(
"
#autosend
"
).
val
(),
//是否自动推送,
sendType
:
$
(
"
#autosend
"
).
val
(),
//是否自动推送,
},
},
...
@@ -284,13 +268,12 @@ let vue_sjcx = new Vue({
...
@@ -284,13 +268,12 @@ let vue_sjcx = new Vue({
}
}
}
}
});
});
}
else
{
}
else
{
if
(
this
.
timetype
==
0
){
str
=
$
(
"
#starthour
"
).
val
()
+
"
,
"
+
$
(
"
#endhour
"
).
val
()
+
"
,
"
+
$
(
"
#schedulerRule
"
).
val
();
}
else
{
str
=
$
(
"
#starthour
"
).
val
()
+
"
,
"
+
$
(
"
#endhour
"
).
val
()
+
"
,
"
+
$
(
"
#schedulerRule
"
).
val
()
*
this
.
timetype
*
60
;
}
//确认添加任务事件
//确认添加任务事件
$
.
ajax
({
$
.
ajax
({
...
@@ -305,9 +288,8 @@ let vue_sjcx = new Vue({
...
@@ -305,9 +288,8 @@ let vue_sjcx = new Vue({
type
:
"
0
"
,
type
:
"
0
"
,
name
:
$
(
"
#name
"
).
val
(),
name
:
$
(
"
#name
"
).
val
(),
params
:
{
params
:
{
schedulerRule
:
this
.
timetype
==
0
?
$
(
"
#starthour
"
).
val
()
+
"
,
"
+
$
(
"
#endhour
"
).
val
()
+
"
,
"
+
$
(
"
#schedulerRule
"
).
val
()
:
schedulerRule
:
str
,
$
(
"
#starthour
"
).
val
()
+
"
,
"
+
$
(
"
#endhour
"
).
val
()
+
"
,
"
+
$
(
"
#schedulerRule
"
).
val
()
*
this
.
timetype
*
60
,
thresholdValue
:
$
(
"
#thresholdValue
"
).
val
(),
thresholdValue
:
0
,
objectType
:
$
(
"
#objectType
"
).
val
(),
objectType
:
$
(
"
#objectType
"
).
val
(),
sendType
:
$
(
"
#autosend
"
).
val
(),
//是否自动推送,
sendType
:
$
(
"
#autosend
"
).
val
(),
//是否自动推送,
},
},
...
@@ -329,6 +311,13 @@ let vue_sjcx = new Vue({
...
@@ -329,6 +311,13 @@ let vue_sjcx = new Vue({
});
});
$
(
"
#myModal2
"
).
modal
(
"
hide
"
);
$
(
"
#myModal2
"
).
modal
(
"
hide
"
);
}
else
{
}
else
{
if
(
result
.
errorCode
==
'
-1
'
)
{
result
.
errorMg
=
"
超时
"
;
}
else
{
result
.
errorMsg
=
"
任务已存在
"
;
}
layer
.
msg
(
result
.
errorMsg
,
{
layer
.
msg
(
result
.
errorMsg
,
{
icon
:
2
,
icon
:
2
,
time
:
2000
time
:
2000
...
@@ -339,6 +328,11 @@ let vue_sjcx = new Vue({
...
@@ -339,6 +328,11 @@ let vue_sjcx = new Vue({
}
}
}
}
else
{
//调用垃圾识别算法服务
else
{
//调用垃圾识别算法服务
str
=
$
(
"
#schedulerRule
"
).
val
()
*
this
.
timetype
*
60000
;
if
(
this
.
timetype
==
0
){
str
=
$
(
"
#schedulerRule
"
).
val
()
*
1000
;
}
$
.
ajax
({
$
.
ajax
({
url
:
"
/video/LJTtask
"
,
url
:
"
/video/LJTtask
"
,
dataType
:
"
json
"
,
dataType
:
"
json
"
,
...
@@ -349,8 +343,7 @@ let vue_sjcx = new Vue({
...
@@ -349,8 +343,7 @@ let vue_sjcx = new Vue({
deviceNum
:
vue_sjcx
.
sbbh
,
deviceNum
:
vue_sjcx
.
sbbh
,
spId
:
vue_sjcx
.
sbbh
,
spId
:
vue_sjcx
.
sbbh
,
interfaceCode
:
"
NEW_LJTMYJC_001
"
,
interfaceCode
:
"
NEW_LJTMYJC_001
"
,
interval
:
this
.
timetype
==
0
?
$
(
"
#schedulerRule
"
).
val
()
*
1000
:
interval
:
str
,
$
(
"
#schedulerRule
"
).
val
()
*
this
.
timetype
*
60000
,
status
:
1
,
status
:
1
,
params
:
{
params
:
{
starthour
:
$
(
"
#starthour
"
).
val
(),
starthour
:
$
(
"
#starthour
"
).
val
(),
...
@@ -383,39 +376,7 @@ let vue_sjcx = new Vue({
...
@@ -383,39 +376,7 @@ let vue_sjcx = new Vue({
}
}
},
},
});
});
// let vue_myjgModal1 = new Vue({
// el: '#myjgModal1',
// data: {
// data_s: {
// sbbh: '',
// tdmc: '',
// squrllj: '',
// xzbh: '',
// tdlx:'1'
// },
// },
// methods: {
// define: function () {
// vue_myjgModal1.data_s.xzbh=vue_myjgModal1.data_s.qybh;
// $.ajax({
// url: "/video/add",
// dataType: "json",
// type: "POST",
// data: vue_myjgModal1.data_s,
// success: function (result) {
// if (result.code == 0) {
// vue_right.queryRY(1, true);
// $("#myjgModal1").modal("hide");
// info_new("监控新增成功");
// window.setTimeout("$('#info-warning-new').modal('hide')", 2000);
// }
// }
// });
// }
// }
// });
let
vue_default
=
new
Vue
({
let
vue_default
=
new
Vue
({
el
:
"
#myjgModal1
"
,
el
:
"
#myjgModal1
"
,
name
:
"
el-tree-select
"
,
name
:
"
el-tree-select
"
,
...
...
src/main/resources/static/js/rgjy/rgjy.js
View file @
238fd7d4
...
@@ -726,7 +726,7 @@ let vue_sjsstxnow = new Vue({
...
@@ -726,7 +726,7 @@ let vue_sjsstxnow = new Vue({
state_cli
:
function
(
item
,
e
,
index
,
type
)
{
state_cli
:
function
(
item
,
e
,
index
,
type
)
{
let
json_s
=
[];
let
json_s
=
[];
json_s
.
push
({
json_s
.
push
({
recordid
:
item
.
record
id
+
''
,
id
:
item
.
id
+
''
,
channelid
:
item
.
channelid
,
channelid
:
item
.
channelid
,
fdid
:
item
.
fdid
,
fdid
:
item
.
fdid
,
recordtime
:
item
.
recordtime
,
recordtime
:
item
.
recordtime
,
...
...
src/main/resources/static/js/rwpfhistory/rwpfhistory.js
View file @
238fd7d4
...
@@ -27,10 +27,9 @@ let vue_rwpfhistory = new Vue({
...
@@ -27,10 +27,9 @@ let vue_rwpfhistory = new Vue({
taskwp_select
:[{
taskwp_select
:[{
'
id
'
:
0
,
'
id
'
:
0
,
'
name
'
:
'
否
'
'
name
'
:
'
否
'
},
},
{
{
'
id
'
:
1
,
'
id
'
:
2
,
'
name
'
:
'
是
'
'
name
'
:
'
是
'
},
},
...
@@ -324,6 +323,52 @@ let vue_rwpfhistory = new Vue({
...
@@ -324,6 +323,52 @@ let vue_rwpfhistory = new Vue({
},
100
);
},
100
);
},
},
back
:
function
(){
back
:
function
(){
let
taskexists
=
0
;
if
(
vue_rwpfhistory
.
state_arr
.
length
>
0
)
{
//判断是否是已经下派的任务
vue_rwpfhistory
.
state_arr
.
forEach
(
function
(
item
,
index
)
{
if
(
item
.
handler
==
"
undefined
"
||
item
.
handler
==
null
||
item
.
handler
==
''
)
{
taskexists
=
1
;
}
});
}
let
str
=
""
;
if
(
taskexists
==
1
){
str
=
"
存在尚未分配的告警,只撤回已经分派的任务,
"
}
if
(
vue_rwpfhistory
.
state_arr
.
length
>
0
)
{
layer
.
confirm
(
str
+
"
确认撤回
"
,
{
icon
:
3
,
title
:
"
提示
"
},
function
(
index
)
{
//将分派出去的任务信息删除
$
.
ajax
({
url
:
"
/TrafficStatistics/delDisputesInfo
"
,
dateType
:
'
json
'
,
type
:
"
POST
"
,
contentType
:
'
application/json
'
,
data
:
JSON
.
stringify
(
vue_rwpfhistory
.
state_arr
),
success
:
function
(
result
)
{
if
(
result
.
code
==
0
)
{
vue_rwpfhistory
.
query
(
1
,
true
);
layer
.
msg
(
"
撤回成功
"
);
vue_rwpfhistory
.
state_arr
=
[];
}
else
{
layer
.
msg
(
"
撤回失败
"
);
}
}
});
layer
.
close
(
index
);
},
function
(
index
)
{
//取消回调
layer
.
close
(
index
);
}
);
}
else
{
layer
.
msg
(
"
请选择告警信息!
"
)
}
},
},
distributed
:
function
(){
distributed
:
function
(){
...
@@ -339,20 +384,20 @@ let vue_rwpfhistory = new Vue({
...
@@ -339,20 +384,20 @@ let vue_rwpfhistory = new Vue({
if
(
vue_rwpfhistory
.
state_arr
.
length
>
0
)
{
if
(
vue_rwpfhistory
.
state_arr
.
length
>
0
)
{
//判断是否是已经下派的任务
//判断是否是已经下派的任务
vue_rwpfhistory
.
state_arr
.
forEach
(
function
(
item
,
index
)
{
vue_rwpfhistory
.
state_arr
.
forEach
(
function
(
item
,
index
)
{
if
(
typeof
item
.
handler
!=
'
undefined
'
&&
item
.
handler
!=
null
&&
item
.
handler
!=
''
)
{
if
(
item
.
handler
!=
"
undefined
"
&&
item
.
handler
!=
null
&&
item
.
handler
!=
''
)
{
taskexists
=
1
;
taskexists
=
1
;
}
}
});
});
return
taskexists
;
return
taskexists
;
}
}
},
},
del
:
function
()
{
del
:
function
()
{
sfpf
=
this
.
sfpfrw
();
let
sfpf
=
this
.
sfpfrw
();
msg
=
"
确认删除该告警?
"
;
msg
=
"
确认删除该告警?
"
;
if
(
sfpf
==
1
)
{
if
(
sfpf
==
1
)
{
msg
=
"
存在已经被分派的告警信息,确认删除?
"
;
msg
=
"
存在已经被分派的告警信息,确认删除?
"
;
}
}
layer
.
confirm
(
msg
,
{
icon
:
3
,
title
:
"
提示
"
},
layer
.
confirm
(
msg
,
{
icon
:
3
,
title
:
"
提示
"
},
function
(
index
)
{
function
(
index
)
{
layer
.
close
(
index
);
layer
.
close
(
index
);
...
@@ -383,7 +428,7 @@ let vue_rwpfhistory = new Vue({
...
@@ -383,7 +428,7 @@ let vue_rwpfhistory = new Vue({
$
(
"
.div-ul
"
).
find
(
'
input:checked
'
).
each
(
function
()
{
$
(
"
.div-ul
"
).
find
(
'
input:checked
'
).
each
(
function
()
{
let
arr
=
$
(
this
).
val
().
split
(
"
|
"
);
let
arr
=
$
(
this
).
val
().
split
(
"
|
"
);
vue_rwpfhistory
.
state_arr
.
push
({
vue_rwpfhistory
.
state_arr
.
push
({
record
id
:
arr
[
0
],
id
:
arr
[
0
],
channelid
:
arr
[
1
],
channelid
:
arr
[
1
],
fdid
:
arr
[
2
],
fdid
:
arr
[
2
],
recordtime
:
arr
[
3
],
recordtime
:
arr
[
3
],
...
@@ -543,7 +588,7 @@ let vue_sjsstxnow = new Vue({
...
@@ -543,7 +588,7 @@ let vue_sjsstxnow = new Vue({
state_cli
:
function
(
item
,
e
,
index
,
type
)
{
state_cli
:
function
(
item
,
e
,
index
,
type
)
{
let
json_s
=
[];
let
json_s
=
[];
json_s
.
push
({
json_s
.
push
({
record
id
:
item
.
recordid
+
''
,
id
:
item
.
recordid
+
''
,
channelid
:
item
.
channelid
,
channelid
:
item
.
channelid
,
fdid
:
item
.
fdid
,
fdid
:
item
.
fdid
,
recordtime
:
item
.
recordtime
,
recordtime
:
item
.
recordtime
,
...
@@ -592,7 +637,7 @@ let vue_sjsstxnow = new Vue({
...
@@ -592,7 +637,7 @@ let vue_sjsstxnow = new Vue({
//获得选中的userid,告警id
//获得选中的userid,告警id
let
jsonstr
=
[];
let
jsonstr
=
[];
vue_rwpfhistory
.
state_arr
.
forEach
(
function
(
item
,
index
){
vue_rwpfhistory
.
state_arr
.
forEach
(
function
(
item
,
index
){
jsonstr
.
push
(
item
.
record
id
);
jsonstr
.
push
(
item
.
id
);
});
});
$
.
ajax
({
$
.
ajax
({
url
:
"
/role/addtaskinfo
"
,
url
:
"
/role/addtaskinfo
"
,
...
@@ -763,11 +808,12 @@ $("#all").click(function () {
...
@@ -763,11 +808,12 @@ $("#all").click(function () {
// vue_rwpfhistory.state_arr.push($(this).val());
// vue_rwpfhistory.state_arr.push($(this).val());
let
arr
=
$
(
this
).
val
().
split
(
"
|
"
);
let
arr
=
$
(
this
).
val
().
split
(
"
|
"
);
vue_rwpfhistory
.
state_arr
.
push
({
vue_rwpfhistory
.
state_arr
.
push
({
record
id
:
arr
[
0
],
id
:
arr
[
0
],
channelid
:
arr
[
1
],
channelid
:
arr
[
1
],
fdid
:
arr
[
2
],
fdid
:
arr
[
2
],
recordtime
:
arr
[
3
],
recordtime
:
arr
[
3
],
recordtype
:
arr
[
4
]
recordtype
:
arr
[
4
],
handler
:
arr
[
5
]
});
});
});
});
vue_rwpfhistory
.
show_nums
=
true
;
vue_rwpfhistory
.
show_nums
=
true
;
...
...
src/main/resources/static/js/sjcx/sjcx.js
View file @
238fd7d4
...
@@ -29,14 +29,7 @@ let vue_sjcx = new Vue({
...
@@ -29,14 +29,7 @@ let vue_sjcx = new Vue({
this
.
xzml
();
this
.
xzml
();
},
},
xzml
:
function
()
{
xzml
:
function
()
{
$
.
ajax
({
_that
=
this
;
url
:
"
/dept/getDeptParent/
"
+
getCookie
(
"
bjpt_deptId
"
),
dataType
:
"
json
"
,
type
:
"
GET
"
,
data
:
{},
success
:
function
(
result
)
{
if
(
result
.
code
==
0
)
{
let
parIds
=
result
.
data
[
0
].
parentId
;
$
.
ajax
({
$
.
ajax
({
url
:
"
/dept/listvideo
"
,
url
:
"
/dept/listvideo
"
,
dataType
:
"
json
"
,
dataType
:
"
json
"
,
...
@@ -44,14 +37,14 @@ let vue_sjcx = new Vue({
...
@@ -44,14 +37,14 @@ let vue_sjcx = new Vue({
data
:
{
data
:
{
deptId
:
getCookie
(
"
bjpt_deptId
"
),
deptId
:
getCookie
(
"
bjpt_deptId
"
),
username
:
getCookie
(
"
bjpt_realName
"
),
username
:
getCookie
(
"
bjpt_realName
"
),
tdmc
:
vue_sjcx
.
searchText
,
tdmc
:
_that
.
searchText
,
},
},
success
:
function
(
result
)
{
success
:
function
(
result
)
{
let
defaultData
=
[];
let
defaultData
=
[];
vue_sjcx
.
jk_arr
=
[];
_that
.
jk_arr
=
[];
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
vue_sjcx
.
jk_arr
=
result
.
data
;
_that
.
jk_arr
=
result
.
data
;
defaultData
=
toTree
(
result
.
data
,
parIds
+
''
);
defaultData
=
toTree
(
result
.
data
,
"
0
"
);
$
(
'
#tree-xzxq
'
).
treeview
({
$
(
'
#tree-xzxq
'
).
treeview
({
expandIcon
:
'
glyphicon glyphicon-triangle-right selected-span
'
,
expandIcon
:
'
glyphicon glyphicon-triangle-right selected-span
'
,
collapseIcon
:
'
glyphicon glyphicon-triangle-bottom selected-span
'
,
collapseIcon
:
'
glyphicon glyphicon-triangle-bottom selected-span
'
,
...
@@ -83,13 +76,22 @@ let vue_sjcx = new Vue({
...
@@ -83,13 +76,22 @@ let vue_sjcx = new Vue({
}
}
});
});
vue_sjcx
.
query
(
1
,
true
);
_that
.
query
(
1
,
true
);
}
}
});
}
}
}
}
});
});
// $.ajax({
// url: "/dept/getDeptParent/" + getCookie("bjpt_deptId"),
// dataType: "json",
// type: "GET",
// data: {},
// success: function (result) {
// if (result.code == 0) {
// let parIds = result.data[0].parentId;
//
// }
// }
// });
},
},
qh_tab
:
function
(
el
)
{
qh_tab
:
function
(
el
)
{
if
(
el
==
1
)
{
if
(
el
==
1
)
{
...
@@ -183,7 +185,7 @@ let vue_sjcx = new Vue({
...
@@ -183,7 +185,7 @@ let vue_sjcx = new Vue({
}
}
,
,
query
:
function
(
pages
,
items
)
{
query
:
function
(
pages
,
items
)
{
let
nodes
=
$
(
'
#tree-xzxq
'
).
treeview
(
'
getChecked
'
).
filter
(
n
=>
n
.
level
==
null
let
nodes
=
$
(
'
#tree-xzxq
'
).
treeview
(
'
getChecked
'
).
filter
(
n
=>
n
.
level
==
null
||
n
.
level
==
""
).
).
map
(
n
=>
{
map
(
n
=>
{
return
n
.
href
return
n
.
href
...
@@ -353,6 +355,7 @@ let vue_sjcx = new Vue({
...
@@ -353,6 +355,7 @@ let vue_sjcx = new Vue({
}
}
},
},
mounted
(){
mounted
(){
_that
=
this
;
$
(
"
#kssj
"
).
val
(
getTime_extent
(
6
).
pre_rq_start
+
'
-
'
+
getTime
().
jssj
);
$
(
"
#kssj
"
).
val
(
getTime_extent
(
6
).
pre_rq_start
+
'
-
'
+
getTime
().
jssj
);
$
.
ajax
({
$
.
ajax
({
url
:
"
/dept/listAllvideoIdsByDeptid
"
,
url
:
"
/dept/listAllvideoIdsByDeptid
"
,
...
@@ -362,10 +365,11 @@ let vue_sjcx = new Vue({
...
@@ -362,10 +365,11 @@ let vue_sjcx = new Vue({
deptid
:
getCookie
(
"
bjpt_deptId
"
),
deptid
:
getCookie
(
"
bjpt_deptId
"
),
},
},
success
:
function
(
result
)
{
success
:
function
(
result
)
{
vue_sjcx
.
jk_s
=
[];
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
_that
.
jk_s
=
[];
if
(
result
.
data
.
length
>
0
)
{
if
(
result
.
data
.
length
>
0
)
{
vue_sjcx
.
jk_s
=
result
.
data
;
_that
.
jk_s
=
result
.
data
;
}
}
}
}
}
}
...
@@ -379,13 +383,13 @@ let vue_sjcx = new Vue({
...
@@ -379,13 +383,13 @@ let vue_sjcx = new Vue({
alarmlevel
:
''
,
alarmlevel
:
''
,
},
},
success
:
function
(
result
)
{
success
:
function
(
result
)
{
vue_sjcx
.
arr_cllx
=
[];
_that
.
arr_cllx
=
[];
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
if
(
result
.
data
.
length
>
0
)
{
if
(
result
.
data
.
length
>
0
)
{
result
.
data
.
forEach
((
item
,
index
)
=>
{
result
.
data
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
id
!=
'
TRICYCLE
'
&&
item
.
id
!=
'
CART
'
if
(
item
.
id
!=
'
TRICYCLE
'
&&
item
.
id
!=
'
CART
'
)
)
vue_sjcx
.
arr_cllx
.
push
({
id
:
item
.
id
,
value
:
item
.
name
});
_that
.
arr_cllx
.
push
({
id
:
item
.
id
,
value
:
item
.
name
});
})
})
;
;
setTimeout
(
function
()
{
setTimeout
(
function
()
{
...
@@ -405,14 +409,14 @@ let vue_sjcx = new Vue({
...
@@ -405,14 +409,14 @@ let vue_sjcx = new Vue({
alarmlevel
:
''
,
alarmlevel
:
''
,
},
},
success
:
function
(
result
)
{
success
:
function
(
result
)
{
vue_sjcx
.
data_sjlxs
=
[];
_that
.
data_sjlxs
=
[];
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
if
(
result
.
data
.
length
>
0
)
{
if
(
result
.
data
.
length
>
0
)
{
vue_sjcx
.
data_sjlxs
=
result
.
data
;
_that
.
data_sjlxs
=
result
.
data
;
}
}
}
}
vue_sjcx
.
data_sjlxs
.
unshift
({
name
:
'
全部
'
,
id
:
""
,
type
:
""
,});
_that
.
data_sjlxs
.
unshift
({
name
:
'
全部
'
,
id
:
""
,
type
:
""
,});
}
}
});
});
this
.
xzml
();
this
.
xzml
();
...
@@ -676,7 +680,7 @@ let vue_sjsstxnow = new Vue({
...
@@ -676,7 +680,7 @@ let vue_sjsstxnow = new Vue({
state_cli
:
function
(
item
,
e
,
index
,
type
)
{
state_cli
:
function
(
item
,
e
,
index
,
type
)
{
let
json_s
=
[];
let
json_s
=
[];
json_s
.
push
({
json_s
.
push
({
recordid
:
item
.
record
id
+
''
,
id
:
item
.
id
+
''
,
channelid
:
item
.
channelid
,
channelid
:
item
.
channelid
,
fdid
:
item
.
fdid
,
fdid
:
item
.
fdid
,
recordtime
:
item
.
recordtime
,
recordtime
:
item
.
recordtime
,
...
@@ -871,7 +875,8 @@ wss.onmessage = function (evt) {
...
@@ -871,7 +875,8 @@ wss.onmessage = function (evt) {
//jk_video_id为监控id
//jk_video_id为监控id
// let a_id = data.data.video_id.slice(0, data.data.video_id.length - 1) + (parseInt(data.data.video_id.slice(data.data.video_id.length - 1, data.data.video_id.length)) + 1) + '';
// let a_id = data.data.video_id.slice(0, data.data.video_id.length - 1) + (parseInt(data.data.video_id.slice(data.data.video_id.length - 1, data.data.video_id.length)) + 1) + '';
let
jk_video_id
=
data
.
fdid
+
"
_
"
+
data
.
channelid
;
// let jk_video_id = data.fdid + "_" + data.channelid;
let
jk_video_id
=
data
.
fdid
;
// let jk_video_id = data.data.video_id;
// let jk_video_id = data.data.video_id;
vue_sjcx
.
jk_s
.
forEach
((
item
,
index
)
=>
{
vue_sjcx
.
jk_s
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
VIDOID
==
jk_video_id
if
(
item
.
VIDOID
==
jk_video_id
...
...
src/main/resources/templates/error/500.html
View file @
238fd7d4
...
@@ -51,7 +51,6 @@
...
@@ -51,7 +51,6 @@
<img
class=
"error-page-img"
th:src=
"@{/images/ic_500.svg}"
>
<img
class=
"error-page-img"
th:src=
"@{/images/ic_500.svg}"
>
<div
class=
"error-page-info"
>
<div
class=
"error-page-info"
>
<h1>
500
</h1>
<h1>
500
</h1>
<h1
th:text=
"${message}"
></h1>
<div
class=
"error-page-info-desc"
>
诶呦,服务器开了个小差~
</div>
<div
class=
"error-page-info-desc"
>
诶呦,服务器开了个小差~
</div>
</div>
</div>
</div>
</div>
...
...
src/main/resources/templates/login.html
View file @
238fd7d4
...
@@ -97,18 +97,7 @@
...
@@ -97,18 +97,7 @@
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
function
oauth2_github
()
{
$
.
get
(
'
/oauth2/render/github
'
,
function
(
data
)
{
console
.
log
(
data
);
handlerResult
(
data
,
renderDone
);
});
}
function
oauth2_gitee
()
{
$
.
get
(
'
/oauth2/render/gitee
'
,
function
(
result
)
{
handlerResult
(
result
,
renderDone
);
});
}
function
renderDone
(
data
)
{
function
renderDone
(
data
)
{
var
winObj
=
window
.
open
(
data
,
'
newwindow
'
,
'
height=500, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no
'
);
var
winObj
=
window
.
open
(
data
,
'
newwindow
'
,
'
height=500, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no
'
);
...
...
src/main/resources/templates/page/jgsbgl.html
View file @
238fd7d4
...
@@ -248,21 +248,18 @@
...
@@ -248,21 +248,18 @@
</tr>
</tr>
<tr
v-show=
"notljt==1"
>
<tr
v-show=
"notljt==1"
>
<td
width=
"120px"
>
检测对象
<font
color=
"red"
>
*
</font></td>
<td
width=
"120px"
>
检测对象
<font
color=
"red"
>
*
</font></td>
<td
width=
"240px"
>
<td
width=
"240px"
>
<select
class=
"form-control"
id=
"objectType"
required
>
<select
class=
"form-control"
id=
"objectType"
required
>
<option
th:value=
"0"
>
所有
</option>
<option
th:value=
"1"
>
<option
th:value=
"1"
>
人脸
所有
</option>
</option>
<option
th:value=
"
2
"
>
<option
th:value=
"
5
"
>
机动车
机动车
</option>
</option>
<option
th:value=
"
3
"
>
<option
th:value=
"
4
"
>
非机动车
非机动车
</option>
</option>
<option
th:value=
"
4
"
>
<option
th:value=
"
7
"
>
人
人
</option>
</option>
</select>
</select>
...
@@ -307,12 +304,12 @@
...
@@ -307,12 +304,12 @@
<td
width=
"100px"
>
执行时间间隔
<font
color=
"red"
>
*
</font></td>
<td
width=
"100px"
>
执行时间间隔
<font
color=
"red"
>
*
</font></td>
<td
width=
"240px"
>
<input
type=
"number"
required
class=
"form-control"
max=
"59"
min=
"1"
id=
"schedulerRule"
>
</td>
<td
width=
"240px"
>
<input
type=
"number"
required
class=
"form-control"
max=
"59"
min=
"1"
id=
"schedulerRule"
>
</td>
</tr>
</tr>
<tr
v-show=
"notljt==1"
>
<tr
v-show=
"notljt==1
|| notljt==2
"
>
<td>
告警阀值
<font
color=
"red"
>
*
</font></td>
<td>
告警阀值
<font
color=
"red"
>
*
</font></td>
<td
width=
"240px"
><input
type=
"number"
required
id=
"thresholdValue"
class=
"form-control"
min=
"0"
th:value=
"0"
>
</td>
<td
width=
"240px"
><input
type=
"number"
required
id=
"thresholdValue"
class=
"form-control"
min=
"0"
th:value=
"0"
>
</td>
</tr>
</tr>
<tr
v-show=
"notljt==1"
id=
"threshold"
>
<tr
v-show=
"notljt==1
|| notljt==2
"
id=
"threshold"
>
<td>
是否自动推送
<font
color=
"red"
>
*
</font></td>
<td>
是否自动推送
<font
color=
"red"
>
*
</font></td>
<td
width=
"240px"
>
<td
width=
"240px"
>
<select
class=
"form-control"
id=
"autosend"
required
>
<select
class=
"form-control"
id=
"autosend"
required
>
...
@@ -349,7 +346,7 @@
...
@@ -349,7 +346,7 @@
style=
"float: left;padding-left: 12px;padding-top: 10px;"
>
刷新图片
</a>
style=
"float: left;padding-left: 12px;padding-top: 10px;"
>
刷新图片
</a>
</td>
</td>
</tr>
</tr>
<tr
v-show=
"notljt==1"
>
<tr
v-show=
"notljt==1
|| notljt==2
"
>
<td
width=
"150px"
>
告警回调地址
<font
color=
"red"
>
*
</font></td>
<td
width=
"150px"
>
告警回调地址
<font
color=
"red"
>
*
</font></td>
<td
colspan=
"1"
><input
required
type=
"text"
class=
"form-control"
id=
"url"
>
</td>
<td
colspan=
"1"
><input
required
type=
"text"
class=
"form-control"
id=
"url"
>
</td>
</tr>
</tr>
...
@@ -457,8 +454,14 @@
...
@@ -457,8 +454,14 @@
init
(
cvw
,
cvh
,
imgw
,
imgh
)
{
init
(
cvw
,
cvh
,
imgw
,
imgh
)
{
var
item
=
this
.
layers
[
1
];
var
item
=
this
.
layers
[
1
];
this
.
ratew
=
cvw
/
imgw
;
this
.
ratew
=
cvw
/
imgw
;
this
.
rateh
=
cvh
/
imgh
;
this
.
rateh
=
cvh
/
imgh
;
console
.
log
(
"
ratew==
"
+
this
.
ratew
);
console
.
log
(
"
rateh==
"
+
this
.
rateh
);
this
.
ctx
.
beginPath
();
this
.
ctx
.
beginPath
();
this
.
startX
=
(
item
.
x1
)
*
this
.
ratew
;
this
.
startX
=
(
item
.
x1
)
*
this
.
ratew
;
this
.
startY
=
(
item
.
y1
)
*
this
.
rateh
;
this
.
startY
=
(
item
.
y1
)
*
this
.
rateh
;
...
@@ -482,6 +485,7 @@
...
@@ -482,6 +485,7 @@
//设置图片为canvas的背景
//设置图片为canvas的背景
setImageBackground
(
src
)
{
setImageBackground
(
src
)
{
debugger
const
img
=
new
Image
();
const
img
=
new
Image
();
img
.
src
=
src
;
img
.
src
=
src
;
img
.
onload
=
()
=>
img
.
onload
=
()
=>
...
@@ -658,7 +662,6 @@
...
@@ -658,7 +662,6 @@
let
allNotIn
=
1
;
let
allNotIn
=
1
;
let
item
=
this
.
layers
[
0
];
let
item
=
this
.
layers
[
0
];
this
.
ctx
.
beginPath
();
this
.
ctx
.
beginPath
();
console
.
log
(
item
.
x1
);
this
.
ctx
.
rect
(
item
.
x1
,
item
.
y1
,
item
.
width
,
item
.
height
);
this
.
ctx
.
rect
(
item
.
x1
,
item
.
y1
,
item
.
width
,
item
.
height
);
this
.
ctx
.
strokeStyle
=
item
.
strokeStyle
;
this
.
ctx
.
strokeStyle
=
item
.
strokeStyle
;
if
(
this
.
ctx
.
isPointInPath
(
x
*
this
.
scale
,
y
*
this
.
scale
))
{
if
(
this
.
ctx
.
isPointInPath
(
x
*
this
.
scale
,
y
*
this
.
scale
))
{
...
@@ -763,6 +766,11 @@
...
@@ -763,6 +766,11 @@
}))
}))
var
ratew
=
this
.
config
.
width
/
this
.
canvas
.
width
;
var
ratew
=
this
.
config
.
width
/
this
.
canvas
.
width
;
var
rateh
=
this
.
config
.
height
/
this
.
canvas
.
height
;
var
rateh
=
this
.
config
.
height
/
this
.
canvas
.
height
;
console
.
log
(
ratew
);
console
.
log
(
"
this.ratew==
"
+
this
.
ratew
);
console
.
log
(
"
rateh==
"
+
rateh
);
console
.
log
(
"
this.rateh==
"
+
this
.
rateh
);
console
.
log
(
"
this.startX==
"
+
this
.
startX
);
this
.
layers
.
splice
(
1
,
1
,
this
.
fixPosition
({
this
.
layers
.
splice
(
1
,
1
,
this
.
fixPosition
({
x1
:
Math
.
ceil
(
this
.
startX
*
ratew
),
x1
:
Math
.
ceil
(
this
.
startX
*
ratew
),
...
@@ -772,6 +780,8 @@
...
@@ -772,6 +780,8 @@
strokeStyle
:
this
.
config
.
solidColor
,
strokeStyle
:
this
.
config
.
solidColor
,
type
:
this
.
type
type
:
this
.
type
}));
}));
document
.
getElementById
(
'
objectxy
'
).
value
=
Math
.
ceil
(
this
.
startX
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
(
this
.
startY
*
this
.
rateh
)
document
.
getElementById
(
'
objectxy
'
).
value
=
Math
.
ceil
(
this
.
startX
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
(
this
.
startY
*
this
.
rateh
)
+
"
,
"
+
Math
.
ceil
((
this
.
endX
-
this
.
startX
)
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
((
this
.
endY
-
this
.
startY
)
*
this
.
rateh
);
+
"
,
"
+
Math
.
ceil
((
this
.
endX
-
this
.
startX
)
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
((
this
.
endY
-
this
.
startY
)
*
this
.
rateh
);
...
...
src/main/resources/templates/page/jksj.html
View file @
238fd7d4
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
var
DTree
=
dtree
.
render
({
var
DTree
=
dtree
.
render
({
elem
:
"
#menuTree
"
,
elem
:
"
#menuTree
"
,
url
:
"
/depttree/videotree/
"
+
getCookie
(
"
bjpt_deptId
"
),
url
:
"
/depttree/videotree/
"
+
getCookie
(
"
bjpt_deptId
"
)
+
"
/
"
+
getCookie
(
"
bjpt_realName
"
)
,
dataStyle
:
"
layuiStyle
"
,
dataStyle
:
"
layuiStyle
"
,
initLevel
:
5
,
// 初始打开节点级别
initLevel
:
5
,
// 初始打开节点级别
method
:
"
GET
"
,
method
:
"
GET
"
,
...
...
src/main/resources/templates/page/rwpfhistory.html
View file @
238fd7d4
...
@@ -59,8 +59,8 @@
...
@@ -59,8 +59,8 @@
</span>
</span>
<div
style=
"padding: 10px"
>
<div
style=
"padding: 10px"
>
<span
class=
"div-right-top"
>
<span
class=
"div-right-top"
>
<img
src=
"../img/back.png"
title=
"回退
"
@
click=
"back()"
>
<img
v-show=
"taskwpmodel_select!=1"
src=
"../img/back.png"
title=
"撤回
"
@
click=
"back()"
>
<img
src=
"../img/pftask.png"
title=
"派发"
@
click=
"distributed()"
></span>
<img
v-show=
"taskwpmodel_select!=2"
src=
"../img/pftask.png"
title=
"派发"
@
click=
"distributed()"
></span>
</div>
</div>
<div
style=
"height:calc(100% - 164px);margin-top: 20px;"
class=
"tables"
>
<div
style=
"height:calc(100% - 164px);margin-top: 20px;"
class=
"tables"
>
<ul
class=
"div-ul div-pub-gt"
v-if=
"show"
>
<ul
class=
"div-ul div-pub-gt"
v-if=
"show"
>
...
...
src/main/resources/templates/page/sjcx.html
View file @
238fd7d4
...
@@ -107,11 +107,11 @@
...
@@ -107,11 +107,11 @@
<!--<span>辖区名称:</span>-->
<!--<span>辖区名称:</span>-->
<!--<span v-text="item.xzmc"></span>-->
<!--<span v-text="item.xzmc"></span>-->
<!--</div>-->
<!--</div>-->
<div
v-show=
"item.targetnum!=null && item.targetnum
>0
"
>
<div
v-show=
"item.targetnum!=null && item.targetnum
!=''
"
>
<span
>
密度:
</span>
<span
v-show=
"item.recordtype=='60'"
>
检测值(戴口罩/总人数/阀值):
<span
>
{{item.targetnum}}
</span>
</span>
<span
v-
text=
"item.targetnum!=null"
>
{{item.targetnum==null?'':item.targetnum.split('/')[0]}}
</span>
<span
v-
show=
"item.recordtype=='10'"
>
检测值(总数/阀值):
<span
>
{{item.targetnum}}
</span>
</span>
<span
>
警界值:
</span>
<span
v-show=
"item.recordtype=='12'"
>
检测值(总数):
<span
>
{{item.targetnum}}
</span>
</span>
<span
v-text=
"item.targetnum!=null"
>
{{item.targetnum==null?'':item.targetnum.split('/')[1]}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"li-bottom"
>
<div
class=
"li-bottom"
>
...
...
src/main/resources/templates/page/test.html
View file @
238fd7d4
...
@@ -105,6 +105,11 @@
...
@@ -105,6 +105,11 @@
type
:
this
.
type
type
:
this
.
type
}));
}));
this
.
ctx
.
stroke
();
this
.
ctx
.
stroke
();
console
.
log
(
"
cvw==
"
+
cvw
);
console
.
log
(
"
cvh==
"
+
cvh
);
console
.
log
(
"
imgw==
"
+
imgw
);
console
.
log
(
"
imgh==
"
+
imgh
);
parent
.
document
.
getElementById
(
'
objectxy
'
).
value
=
Math
.
ceil
(
this
.
startX
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
(
this
.
startY
*
this
.
rateh
)
parent
.
document
.
getElementById
(
'
objectxy
'
).
value
=
Math
.
ceil
(
this
.
startX
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
(
this
.
startY
*
this
.
rateh
)
+
"
,
"
+
Math
.
ceil
((
this
.
endX
-
this
.
startX
)
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
((
this
.
endY
-
this
.
startY
)
*
this
.
rateh
);
+
"
,
"
+
Math
.
ceil
((
this
.
endX
-
this
.
startX
)
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
((
this
.
endY
-
this
.
startY
)
*
this
.
rateh
);
}
}
...
@@ -402,8 +407,15 @@
...
@@ -402,8 +407,15 @@
strokeStyle
:
this
.
config
.
solidColor
,
strokeStyle
:
this
.
config
.
solidColor
,
type
:
this
.
type
type
:
this
.
type
}));
}));
parent
.
document
.
getElementById
(
'
objectxy
'
).
value
=
Math
.
ceil
(
this
.
startX
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
(
this
.
startY
*
this
.
rateh
)
+
"
,
"
+
Math
.
ceil
((
this
.
endX
-
this
.
startX
)
*
this
.
ratew
)
+
"
,
"
+
Math
.
ceil
((
this
.
endY
-
this
.
startY
)
*
this
.
rateh
);
console
.
log
(
"
ratew==
"
+
ratew
);
console
.
log
(
"
rateh==
"
+
rateh
);
console
.
log
(
"
this.rateh==
"
+
this
.
rateh
);
console
.
log
(
"
this.ratew==
"
+
this
.
ratew
);
console
.
log
(
"
this.startX==
"
+
this
.
startX
);
parent
.
document
.
getElementById
(
'
objectxy
'
).
value
=
Math
.
ceil
(
this
.
startX
*
ratew
)
+
"
,
"
+
Math
.
ceil
(
this
.
startY
*
rateh
)
+
"
,
"
+
Math
.
ceil
((
this
.
endX
-
this
.
startX
)
*
ratew
)
+
"
,
"
+
Math
.
ceil
((
this
.
endY
-
this
.
startY
)
*
rateh
);
}
else
if
(
this
.
optype
>=
3
)
{
}
else
if
(
this
.
optype
>=
3
)
{
this
.
fixPosition
(
this
.
currentR
);
this
.
fixPosition
(
this
.
currentR
);
...
...
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