Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RuoYi-Vue-master
Project
Project
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
融通安全管理系统
RuoYi-Vue-master
Commits
e0f56c03
Commit
e0f56c03
authored
Jan 11, 2024
by
yf
Browse files
Options
Browse Files
Download
Plain Diff
合并冲突
parents
68e48ebd
86edbc00
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
393 additions
and
81 deletions
+393
-81
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskDetailAbnormalController.java
...gtong/controller/CurrentRiskDetailAbnormalController.java
+3
-3
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskTask.java
...m/censoft/censoftrongtong/controller/CurrentRiskTask.java
+32
-33
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserHolidayController.java
...rongtong/controller/CurrentRiskUserHolidayController.java
+24
-27
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolController.java
...trongtong/controller/CurrentRiskUserPatrolController.java
+25
-0
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/CurrentRiskPostList.java
...m/censoft/censoftrongtong/domain/CurrentRiskPostList.java
+6
-6
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/CurrentRiskUserPatrol.java
...censoft/censoftrongtong/domain/CurrentRiskUserPatrol.java
+7
-2
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/CurrentRiskUserPatrolVO.java
...nsoft/censoftrongtong/domain/CurrentRiskUserPatrolVO.java
+92
-0
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/RiskExistingListPatrolVO.java
...soft/censoftrongtong/domain/RiskExistingListPatrolVO.java
+4
-0
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/mapper/CurrentRiskUserPatrolMapper.java
...t/censoftrongtong/mapper/CurrentRiskUserPatrolMapper.java
+9
-0
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/ICurrentRiskUserPatrolService.java
...ensoftrongtong/service/ICurrentRiskUserPatrolService.java
+13
-1
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/CurrentRiskUserPatrolServiceImpl.java
...ngtong/service/impl/CurrentRiskUserPatrolServiceImpl.java
+19
-6
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskDetailAbnormalMapper.xml
...sources/mapper/system/CurrentRiskDetailAbnormalMapper.xml
+114
-0
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskUserPatrolDetailMapper.xml
...urces/mapper/system/CurrentRiskUserPatrolDetailMapper.xml
+6
-1
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskUserPatrolMapper.xml
...n/resources/mapper/system/CurrentRiskUserPatrolMapper.xml
+38
-1
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
...on/src/main/java/com/ruoyi/common/constant/Constants.java
+1
-1
No files found.
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskDetailAbnormalController.java
View file @
e0f56c03
...
@@ -81,7 +81,7 @@ public class CurrentRiskDetailAbnormalController extends BaseController
...
@@ -81,7 +81,7 @@ public class CurrentRiskDetailAbnormalController extends BaseController
/**
/**
* 新增现状风险巡查异常信息
* 新增现状风险巡查异常信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskAbnormal:add')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskAbnormal:add
11
')"
)
@Log
(
title
=
"现状风险巡查异常信息"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"现状风险巡查异常信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/save1"
)
@PostMapping
(
"/save1"
)
public
AjaxResult
add1
(
@RequestBody
CurrentRiskDetailAbnormal
currentRiskDetailAbnormal
)
public
AjaxResult
add1
(
@RequestBody
CurrentRiskDetailAbnormal
currentRiskDetailAbnormal
)
...
@@ -92,10 +92,10 @@ public class CurrentRiskDetailAbnormalController extends BaseController
...
@@ -92,10 +92,10 @@ public class CurrentRiskDetailAbnormalController extends BaseController
/**
/**
* 新增现状风险巡查异常信息(附件处理)
* 新增现状风险巡查异常信息(附件处理)
*/
*/
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskAbnormal:add')"
)
//
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add')")
@Log
(
title
=
"现状风险巡查异常信息"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"现状风险巡查异常信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
AjaxResult
add
(
@RequestBody
CurrentRiskDetailAbnormal
currentRiskDetailAbnormal
,
@RequestParam
(
value
=
"file[]"
,
required
=
false
)
MultipartFile
[]
file
)
public
AjaxResult
add
(
CurrentRiskDetailAbnormal
currentRiskDetailAbnormal
,
@RequestParam
(
value
=
"file[]"
,
required
=
false
)
MultipartFile
[]
file
)
{
{
if
(
file
!=
null
)
{
if
(
file
!=
null
)
{
String
userId
=
getUserId
()
+
""
;
String
userId
=
getUserId
()
+
""
;
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskTask.java
View file @
e0f56c03
...
@@ -37,29 +37,29 @@ public class CurrentRiskTask {
...
@@ -37,29 +37,29 @@ public class CurrentRiskTask {
/**
/**
* 每天零点发送任务
* 每天零点发送任务
*
* @param isDailypOther 除每月 1 号外,是否新增日查之外的巡查 默认不新增
* @param isDailypOther 除每月 1 号外,是否新增日查之外的巡查 默认不新增
*/
*/
private
void
senTask
(
boolean
isDailypOther
)
{
public
void
senTask
(){
boolean
isDailypOther
=
false
;
//判断是否查询当天巡查任务是否发放
//判断是否查询当天巡查任务是否发放
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
int
hour
=
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
);
int
hour
=
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
);
int
day
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
);
int
day
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
);
//查询所有的任务列表
//查询所有的任务列表
QueryWrapper
<
CurrentRiskPostList
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
CurrentRiskPostList
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
"0"
);
queryWrapper
.
eq
(
"status"
,
"0"
);
List
<
CurrentRiskPostList
>
currentRiskPostLists
=
currentRiskPostListService
.
list
();
List
<
CurrentRiskPostList
>
currentRiskPostLists
=
currentRiskPostListService
.
list
();
if
(
CollectionUtils
.
isEmpty
(
currentRiskPostLists
))
{
if
(
CollectionUtils
.
isEmpty
(
currentRiskPostLists
))
{
return
;
return
;
}
}
//查询所有人的巡查类型,按巡查类型分类
//查询所有人的巡查类型,按巡查类型分类
List
<
CurrentRiskPostList
>
patrolTypeList
=
currentRiskPostListService
.
selectCurrentRiskPostListList3
();
List
<
CurrentRiskPostList
>
patrolTypeList
=
currentRiskPostListService
.
selectCurrentRiskPostListList3
();
for
(
CurrentRiskPostList
patrolType
:
patrolTypeList
)
{
for
(
CurrentRiskPostList
patrolType
:
patrolTypeList
){
//初始化用户巡查总表
//初始化用户巡查总表
CurrentRiskUserPatrol
currentRiskUserPatrol
=
new
CurrentRiskUserPatrol
();
CurrentRiskUserPatrol
currentRiskUserPatrol
=
new
CurrentRiskUserPatrol
();
//开始时间,结束时间
//开始时间,结束时间
try
{
try
{
initTime
(
currentRiskUserPatrol
,
patrolType
.
getPatrolType
());
initTime
(
currentRiskUserPatrol
,
patrolType
.
getPatrolType
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
info
(
"初始化时间出错"
);
log
.
info
(
"初始化时间出错"
);
...
@@ -67,27 +67,27 @@ public class CurrentRiskTask {
...
@@ -67,27 +67,27 @@ public class CurrentRiskTask {
//查询当天巡查任务是否发放
//查询当天巡查任务是否发放
//查询是否发送过
//查询是否发送过
QueryWrapper
<
CurrentRiskUserPatrol
>
patrolQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
CurrentRiskUserPatrol
>
patrolQueryWrapper
=
new
QueryWrapper
<>();
patrolQueryWrapper
.
eq
(
"user_id"
,
patrolType
.
getUserId
()).
eq
(
"risk_post_id"
,
patrolType
.
getPostId
())
patrolQueryWrapper
.
eq
(
"user_id"
,
patrolType
.
getUserId
()).
eq
(
"risk_post_id"
,
patrolType
.
getPostId
())
.
eq
(
"patrol_type"
,
patrolType
.
getPatrolType
())
.
eq
(
"patrol_type"
,
patrolType
.
getPatrolType
())
.
ge
(
"start_time"
,
currentRiskUserPatrol
.
getStartTime
()).
le
(
"start_time"
,
currentRiskUserPatrol
.
getEndTime
());
.
ge
(
"start_time"
,
currentRiskUserPatrol
.
getStartTime
()).
le
(
"start_time"
,
currentRiskUserPatrol
.
getEndTime
());
//如果是日查 且 属于主动点击行为,则进行校验
//如果是日查 且 属于主动点击行为,则进行校验
if
(
hour
>
2
&&
patrolType
.
getPatrolType
().
equals
(
CycleType
.
DAILY
.
getValue
()))
{
if
(
hour
>
2
&&
patrolType
.
getPatrolType
().
equals
(
CycleType
.
DAILY
.
getValue
()))
{
if
(
currentRiskUserPatrolService
.
count
(
patrolQueryWrapper
)
>
0
)
{
if
(
currentRiskUserPatrolService
.
count
(
patrolQueryWrapper
)
>
0
)
{
continue
;
continue
;
}
}
}
}
// 大于1号 且 非日查 要添加 计划查询的数据要进行测验
// 大于1号 且 非日查 要添加 计划查询的数据要进行测验
if
(
day
>
1
&&
isDailypOther
&&
!
patrolType
.
getPatrolType
().
equals
(
CycleType
.
DAILY
.
getValue
()))
{
if
(
day
>
1
&&
isDailypOther
&&
!
patrolType
.
getPatrolType
().
equals
(
CycleType
.
DAILY
.
getValue
()))
{
if
(
currentRiskUserPatrolService
.
count
(
patrolQueryWrapper
)
>
0
)
{
if
(
currentRiskUserPatrolService
.
count
(
patrolQueryWrapper
)
>
0
)
{
continue
;
continue
;
}
}
}
}
//新增任务
//新增任务
List
<
CurrentRiskPostList
>
saveCurrentRiskPostLists
=
currentRiskPostLists
.
stream
().
List
<
CurrentRiskPostList
>
saveCurrentRiskPostLists
=
currentRiskPostLists
.
stream
().
filter
(
currentRiskPostList
->
currentRiskPostList
.
getPostId
().
equals
(
patrolType
.
getPostId
())
filter
(
currentRiskPostList
->
currentRiskPostList
.
getPostId
().
equals
(
patrolType
.
getPostId
())
&&
currentRiskPostList
.
getPatrolType
().
equals
(
patrolType
.
getPatrolType
())
&&
currentRiskPostList
.
getPatrolType
().
equals
(
patrolType
.
getPatrolType
())
&&
currentRiskPostList
.
getUserId
().
equals
(
patrolType
.
getUserId
())).
collect
(
Collectors
.
toList
());
&&
currentRiskPostList
.
getUserId
().
equals
(
patrolType
.
getUserId
())).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
saveCurrentRiskPostLists
))
{
if
(
CollectionUtils
.
isEmpty
(
saveCurrentRiskPostLists
))
{
continue
;
continue
;
}
}
currentRiskPostLists
.
removeAll
(
saveCurrentRiskPostLists
);
currentRiskPostLists
.
removeAll
(
saveCurrentRiskPostLists
);
...
@@ -102,7 +102,7 @@ public class CurrentRiskTask {
...
@@ -102,7 +102,7 @@ public class CurrentRiskTask {
currentRiskUserPatrolService
.
insertCurrentRiskUserPatrol
(
currentRiskUserPatrol
);
currentRiskUserPatrolService
.
insertCurrentRiskUserPatrol
(
currentRiskUserPatrol
);
//新增巡查明细信息
//新增巡查明细信息
List
<
CurrentRiskUserPatrolDetail
>
list
=
new
ArrayList
<>();
List
<
CurrentRiskUserPatrolDetail
>
list
=
new
ArrayList
<>();
saveCurrentRiskPostLists
.
forEach
(
saveCurrentRiskPostList
->
{
saveCurrentRiskPostLists
.
forEach
(
saveCurrentRiskPostList
->{
CurrentRiskUserPatrolDetail
currentRiskUserPatrolDetail
=
new
CurrentRiskUserPatrolDetail
();
CurrentRiskUserPatrolDetail
currentRiskUserPatrolDetail
=
new
CurrentRiskUserPatrolDetail
();
currentRiskUserPatrolDetail
.
setCurrentRiskId
(
saveCurrentRiskPostList
.
getCurrentRiskId
());
currentRiskUserPatrolDetail
.
setCurrentRiskId
(
saveCurrentRiskPostList
.
getCurrentRiskId
());
currentRiskUserPatrolDetail
.
setPatrolId
(
currentRiskUserPatrol
.
getId
());
currentRiskUserPatrolDetail
.
setPatrolId
(
currentRiskUserPatrol
.
getId
());
...
@@ -120,11 +120,10 @@ public class CurrentRiskTask {
...
@@ -120,11 +120,10 @@ public class CurrentRiskTask {
/**
/**
* 开始时间,结束时间计算
* 开始时间,结束时间计算
*
* @param currentRiskUserPatrol 对象
* @param currentRiskUserPatrol 对象
* @param patrolType
巡检类型 0 日查 1 周查 2 月查 3 季查 4 年查
* @param patrolType 巡检类型 0 日查 1 周查 2 月查 3 季查 4 年查
*/
*/
private
void
initTime
(
CurrentRiskUserPatrol
currentRiskUserPatrol
,
String
patrolType
)
throws
Exception
{
private
void
initTime
(
CurrentRiskUserPatrol
currentRiskUserPatrol
,
String
patrolType
)
throws
Exception
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
int
currentYear
=
calendar
.
get
(
Calendar
.
YEAR
);
int
currentYear
=
calendar
.
get
(
Calendar
.
YEAR
);
...
@@ -132,47 +131,47 @@ public class CurrentRiskTask {
...
@@ -132,47 +131,47 @@ public class CurrentRiskTask {
String
startTime
=
""
;
String
startTime
=
""
;
String
endTime
=
""
;
String
endTime
=
""
;
//日查
//日查
if
(
patrolType
.
equals
(
CycleType
.
DAILY
.
getValue
()))
{
if
(
patrolType
.
equals
(
CycleType
.
DAILY
.
getValue
()))
{
startTime
=
SDF
.
format
(
calendar
.
getTime
())
+
" 00:00:00"
;
startTime
=
SDF
.
format
(
calendar
.
getTime
())
+
" 00:00:00"
;
endTime
=
SDF
.
format
(
calendar
.
getTime
())
+
" 23:59:59"
;
endTime
=
SDF
.
format
(
calendar
.
getTime
())
+
" 23:59:59"
;
}
}
//周查
//周查
if
(
patrolType
.
equals
(
CycleType
.
WEEKLY
.
getValue
()))
{
if
(
patrolType
.
equals
(
CycleType
.
WEEKLY
.
getValue
()))
{
// 获取当前是周几,注意返回值是1-7,1表示周日,2表示周一,以此类推
// 获取当前是周几,注意返回值是1-7,1表示周日,2表示周一,以此类推
int
dayOfWeek
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
);
int
dayOfWeek
=
calendar
.
get
(
Calendar
.
DAY_OF_WEEK
);
if
(
dayOfWeek
==
1
)
{
if
(
dayOfWeek
==
1
)
{
calendar
.
add
(
Calendar
.
DATE
,
-
6
);
calendar
.
add
(
Calendar
.
DATE
,
-
6
);
}
else
{
}
else
{
calendar
.
add
(
Calendar
.
DATE
,
2
-
dayOfWeek
);
calendar
.
add
(
Calendar
.
DATE
,
2
-
dayOfWeek
);
}
}
startTime
=
SDF
.
format
(
calendar
.
getTime
())
+
" 00:00:00"
;
startTime
=
SDF
.
format
(
calendar
.
getTime
())
+
" 00:00:00"
;
calendar
.
add
(
Calendar
.
DATE
,
6
);
calendar
.
add
(
Calendar
.
DATE
,
6
);
endTime
=
SDF
.
format
(
calendar
.
getTime
())
+
" 23:59:59"
;
endTime
=
SDF
.
format
(
calendar
.
getTime
())
+
" 23:59:59"
;
}
}
//月查
//月查
if
(
patrolType
.
equals
(
CycleType
.
MONTH
.
getValue
()))
{
if
(
patrolType
.
equals
(
CycleType
.
MONTH
.
getValue
()))
{
startTime
=
currentYear
+
"-"
+
currentMonth
+
"-01 00:00:00"
;
startTime
=
currentYear
+
"-"
+
currentMonth
+
"-01 00:00:00"
;
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
int
lastDayOfMonth
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
);
int
lastDayOfMonth
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
);
endTime
=
currentYear
+
"-"
+
currentMonth
+
"-"
+
lastDayOfMonth
+
" 23:59:59"
;
endTime
=
currentYear
+
"-"
+
currentMonth
+
"-"
+
lastDayOfMonth
+
" 23:59:59"
;
}
}
//季查
//季查
if
(
patrolType
.
equals
(
CycleType
.
QUARTERLY
.
getValue
()))
{
if
(
patrolType
.
equals
(
CycleType
.
QUARTERLY
.
getValue
()))
{
// 获取当前月份,注意返回值是0-11,因此需要加1
// 获取当前月份,注意返回值是0-11,因此需要加1
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
// 获取当前季度,注意返回值是1-4,1表示第一季度,以此类推
// 获取当前季度,注意返回值是1-4,1表示第一季度,以此类推
int
quarter
=
(
month
-
1
)
/
3
+
1
;
int
quarter
=
(
month
-
1
)
/
3
+
1
;
//季度初始月份
//季度初始月份
int
quarterMonth
=
1
+
(
3
*
(
quarter
-
1
));
int
quarterMonth
=
1
+
(
3
*
(
quarter
-
1
));
startTime
=
currentYear
+
"-"
+
quarterMonth
+
"-01 00:00:00"
;
startTime
=
currentYear
+
"-"
+
quarterMonth
+
"-01 00:00:00"
;
calendar
.
setTime
(
SDF
.
parse
(
startTime
));
calendar
.
setTime
(
SDF
.
parse
(
startTime
));
calendar
.
add
(
Calendar
.
MONTH
,
2
);
calendar
.
add
(
Calendar
.
MONTH
,
2
);
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
int
lastDayOfMonth
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
);
int
lastDayOfMonth
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
);
endTime
=
currentYear
+
"-"
+
currentMonth
+
"-"
+
lastDayOfMonth
+
" 23:59:59"
;
endTime
=
currentYear
+
"-"
+
currentMonth
+
"-"
+
lastDayOfMonth
+
" 23:59:59"
;
}
}
//年查
//年查
if
(
patrolType
.
equals
(
CycleType
.
YEARLY
.
getValue
()))
{
if
(
patrolType
.
equals
(
CycleType
.
YEARLY
.
getValue
()))
{
startTime
=
currentYear
+
"-01-01 00:00:00"
;
startTime
=
currentYear
+
"-01-01 00:00:00"
;
endTime
=
currentYear
+
"-12-31 23:59:59"
;
endTime
=
currentYear
+
"-12-31 23:59:59"
;
}
}
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserHolidayController.java
View file @
e0f56c03
package
com
.
censoft
.
censoftrongtong
.
controller
;
package
com
.
censoft
.
censoftrongtong
.
controller
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday
;
import
com.censoft.censoftrongtong.service.ICurrentRiskUserHolidayService
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.system.service.ISysUserService
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
java.util.Date
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
java.util.List
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday
;
import
com.censoft.censoftrongtong.service.ICurrentRiskUserHolidayService
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.common.core.page.TableDataInfo
;
/**
/**
* 现状风险巡查用户请假Controller
* 现状风险巡查用户请假Controller
...
@@ -49,13 +41,18 @@ public class CurrentRiskUserHolidayController extends BaseController {
...
@@ -49,13 +41,18 @@ public class CurrentRiskUserHolidayController extends BaseController {
public
TableDataInfo
list
(
CurrentRiskUserHoliday
currentRiskUserHoliday
)
{
public
TableDataInfo
list
(
CurrentRiskUserHoliday
currentRiskUserHoliday
)
{
startPage
();
startPage
();
QueryWrapper
<
CurrentRiskUserHoliday
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
CurrentRiskUserHoliday
>
queryWrapper
=
new
QueryWrapper
<>();
if
(
"0"
.
equals
(
currentRiskUserHoliday
.
getType
()))
{
if
(
currentRiskUserHoliday
.
getType
()==
null
)
{
//申请人
queryWrapper
.
eq
(
"apply_user_id"
,
getUserId
());
}
else
{
}
else
{
if
(
"0"
.
equals
(
currentRiskUserHoliday
.
getType
()))
{
//审批人
//申请人
queryWrapper
.
in
(
"apply_user_id"
,
currentRiskUserHolidayService
.
memberUserIds
(
getUserId
()));
queryWrapper
.
eq
(
"apply_user_id"
,
getUserId
());
}
else
{
//审批人
queryWrapper
.
in
(
"apply_user_id"
,
currentRiskUserHolidayService
.
memberUserIds
(
getUserId
()));
}
}
}
if
(!
StringUtils
.
isEmpty
(
currentRiskUserHoliday
.
getStatus
()))
{
if
(!
StringUtils
.
isEmpty
(
currentRiskUserHoliday
.
getStatus
()))
{
queryWrapper
.
eq
(
"status"
,
currentRiskUserHoliday
.
getStatus
());
queryWrapper
.
eq
(
"status"
,
currentRiskUserHoliday
.
getStatus
());
}
}
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolController.java
View file @
e0f56c03
package
com
.
censoft
.
censoftrongtong
.
controller
;
package
com
.
censoft
.
censoftrongtong
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.censoft.censoftrongtong.service.ICurrentRiskDetailAbnormalService
;
import
com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService
;
import
com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.controller.BaseController
;
...
@@ -27,6 +31,7 @@ import java.util.List;
...
@@ -27,6 +31,7 @@ import java.util.List;
@RequestMapping
(
value
=
{
"/risk/riskUserPatrol"
,
"/app-api/risk/riskUserPatrol"
})
@RequestMapping
(
value
=
{
"/risk/riskUserPatrol"
,
"/app-api/risk/riskUserPatrol"
})
public
class
CurrentRiskUserPatrolController
extends
BaseController
{
public
class
CurrentRiskUserPatrolController
extends
BaseController
{
private
ICurrentRiskUserPatrolService
currentRiskUserPatrolService
;
private
ICurrentRiskUserPatrolService
currentRiskUserPatrolService
;
private
ICurrentRiskDetailAbnormalService
currentRiskDetailAbnormalService
;
@GetMapping
(
"/getPatrolProjectList"
)
@GetMapping
(
"/getPatrolProjectList"
)
public
AjaxResult
getPatrolProjectList
()
{
public
AjaxResult
getPatrolProjectList
()
{
...
@@ -67,6 +72,26 @@ public class CurrentRiskUserPatrolController extends BaseController {
...
@@ -67,6 +72,26 @@ public class CurrentRiskUserPatrolController extends BaseController {
return
success
(
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolById
(
id
));
return
success
(
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolById
(
id
));
}
}
/**
* 获取巡查记录详情查看
*/
@GetMapping
(
value
=
"/patrolInfoDetail/{id}"
)
public
AjaxResult
getPatrolInfoDetail
(
@PathVariable
(
"id"
)
Long
id
)
{
CurrentRiskUserPatrolVO
currentRiskUserPatrolVO
=
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolDetail
(
id
);
if
(
currentRiskUserPatrolVO
!=
null
){
if
(
currentRiskUserPatrolVO
.
getExceptStatus
()!=
null
&&
currentRiskUserPatrolVO
.
getExceptStatus
().
equals
(
"1"
))
{
//如果有异常信息加入详情
QueryWrapper
<
CurrentRiskDetailAbnormal
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
CurrentRiskDetailAbnormal:
:
getPatrolId
,
id
);
CurrentRiskDetailAbnormal
currentRiskDetailAbnormal
=
currentRiskDetailAbnormalService
.
getOne
(
queryWrapper
);
if
(
currentRiskDetailAbnormal
!=
null
)
{
currentRiskUserPatrolVO
.
setCurrentailAbnormal
(
currentRiskDetailAbnormal
);
}
}
}
return
success
(
currentRiskUserPatrolVO
);
}
/**
/**
* 新增巡查执行管理
* 新增巡查执行管理
*/
*/
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/CurrentRiskPostList.java
View file @
e0f56c03
package
com
.
censoft
.
censoftrongtong
.
domain
;
package
com
.
censoft
.
censoftrongtong
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntityClean
;
import
com.ruoyi.common.core.domain.BaseEntityClean
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
/**
/**
* 现状风险岗位用户巡查清单对象 current_risk_post_list
* 现状风险岗位用户巡查清单对象 current_risk_post_list
...
@@ -50,10 +48,12 @@ public class CurrentRiskPostList extends BaseEntityClean
...
@@ -50,10 +48,12 @@ public class CurrentRiskPostList extends BaseEntityClean
/** 删除标志(0代表存在 1代表删除) */
/** 删除标志(0代表存在 1代表删除) */
private
String
delFlag
;
private
String
delFlag
;
@TableField
(
exist
=
false
)
private
String
currentRiskType
;
private
String
currentRiskType
;
@TableField
(
exist
=
false
)
private
Long
currentRiskId2
;
private
Long
currentRiskId2
;
@TableField
(
exist
=
false
)
private
String
currentRiskType2
;
private
String
currentRiskType2
;
@TableField
(
exist
=
false
)
private
String
nickName
;
private
String
nickName
;
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/CurrentRiskUserPatrol.java
View file @
e0f56c03
package
com
.
censoft
.
censoftrongtong
.
domain
;
package
com
.
censoft
.
censoftrongtong
.
domain
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntityClean
;
import
com.ruoyi.common.core.domain.BaseEntityClean
;
import
lombok.Data
;
import
lombok.Data
;
import
com.ruoyi.common.annotation.Excel
;
import
java.util.Date
;
/**
/**
* 巡查执行管理对象 current_risk_user_patrol
* 巡查执行管理对象 current_risk_user_patrol
...
@@ -64,4 +65,8 @@ public class CurrentRiskUserPatrol extends BaseEntityClean
...
@@ -64,4 +65,8 @@ public class CurrentRiskUserPatrol extends BaseEntityClean
private
String
riskPostName
;
private
String
riskPostName
;
private
String
nickName
;
private
String
nickName
;
/** 状态 0 正常 1 异常 */
private
String
exceptStatus
;
/** 项目名称 */
private
String
projectName
;
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/CurrentRiskUserPatrolVO.java
0 → 100644
View file @
e0f56c03
package
com
.
censoft
.
censoftrongtong
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 巡查执行管理对象 current_risk_user_patrol
*
* @author baode
* @date 2023-12-05
*/
@Data
public
class
CurrentRiskUserPatrolVO
{
/**
* 项目信息
*/
/** 项目名称 */
private
String
projectName
;
/**
* 现状风险类型
*/
private
String
type
;
/**
* 现状风险信息
*/
private
String
level
;
/** 风险因素 */
private
String
factor
;
/** 工程技术措施 */
private
String
measuresProject
;
/** 管理措施 */
private
String
measuresAdministration
;
/** 应急处置措施 */
private
String
measuresEmergency
;
/**
* 巡查信息
*/
private
Long
id
;
private
Long
userId
;
/** 项目 id */
private
Long
projectId
;
/** 现状风险岗位 id */
private
Long
riskPostId
;
/** 巡查类型 0 日查 1 周查 2 月查 3 季查 4 年查 */
private
Integer
patrolType
;
/** 状态 0 未巡查 1 已巡查 */
private
String
status
;
/** 开始巡查时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
startTime
;
/** 结束巡查时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
endTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
validityTime
;
private
String
riskPostName
;
private
String
nickName
;
/** 状态 0 正常 1 异常 */
private
String
exceptStatus
;
/**
* 异常信息
*/
CurrentRiskDetailAbnormal
currentailAbnormal
;
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/RiskExistingListPatrolVO.java
View file @
e0f56c03
...
@@ -12,4 +12,8 @@ public class RiskExistingListPatrolVO extends RiskPlanExistingList{
...
@@ -12,4 +12,8 @@ public class RiskExistingListPatrolVO extends RiskPlanExistingList{
private
String
patrolStatus
;
private
String
patrolStatus
;
private
Long
projectId
;
private
Long
projectId
;
private
Long
buildId
;
private
String
address
;
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/mapper/CurrentRiskUserPatrolMapper.java
View file @
e0f56c03
package
com
.
censoft
.
censoftrongtong
.
mapper
;
package
com
.
censoft
.
censoftrongtong
.
mapper
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.github.yulichang.base.MPJBaseMapper
;
import
com.github.yulichang.base.MPJBaseMapper
;
...
@@ -22,6 +23,14 @@ public interface CurrentRiskUserPatrolMapper extends MPJBaseMapper<CurrentRiskU
...
@@ -22,6 +23,14 @@ public interface CurrentRiskUserPatrolMapper extends MPJBaseMapper<CurrentRiskU
*/
*/
public
CurrentRiskUserPatrol
selectCurrentRiskUserPatrolById
(
Long
id
);
public
CurrentRiskUserPatrol
selectCurrentRiskUserPatrolById
(
Long
id
);
/**
* 巡查记录详情
*
* @param id 巡查记录主键
* @return 巡查执行管理
*/
public
CurrentRiskUserPatrolVO
selectCurrentRiskUserPatrolDetail
(
Long
id
);
/**
/**
* 根据用户id获取巡检项目
* 根据用户id获取巡检项目
* @param userId
* @param userId
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/ICurrentRiskUserPatrolService.java
View file @
e0f56c03
package
com
.
censoft
.
censoftrongtong
.
service
;
package
com
.
censoft
.
censoftrongtong
.
service
;
import
java.util.List
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.github.yulichang.base.MPJBaseService
;
import
com.github.yulichang.base.MPJBaseService
;
import
java.util.List
;
/**
/**
* 巡查执行管理Service接口
* 巡查执行管理Service接口
*
*
...
@@ -12,6 +14,8 @@ import com.github.yulichang.base.MPJBaseService;
...
@@ -12,6 +14,8 @@ import com.github.yulichang.base.MPJBaseService;
*/
*/
public
interface
ICurrentRiskUserPatrolService
extends
MPJBaseService
<
CurrentRiskUserPatrol
>
public
interface
ICurrentRiskUserPatrolService
extends
MPJBaseService
<
CurrentRiskUserPatrol
>
{
{
/**
/**
* 查询巡查执行管理
* 查询巡查执行管理
*
*
...
@@ -20,6 +24,14 @@ public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRi
...
@@ -20,6 +24,14 @@ public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRi
*/
*/
public
CurrentRiskUserPatrol
selectCurrentRiskUserPatrolById
(
Long
id
);
public
CurrentRiskUserPatrol
selectCurrentRiskUserPatrolById
(
Long
id
);
/**
* 巡查记录详情
*
* @param id 巡查记录主键
* @return 巡查执行管理
*/
public
CurrentRiskUserPatrolVO
selectCurrentRiskUserPatrolDetail
(
Long
id
);
/**
/**
* 查询巡查执行管理列表
* 查询巡查执行管理列表
*
*
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/CurrentRiskUserPatrolServiceImpl.java
View file @
e0f56c03
package
com
.
censoft
.
censoftrongtong
.
service
.
impl
;
package
com
.
censoft
.
censoftrongtong
.
service
.
impl
;
import
java.util.List
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.ruoyi.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper
;
import
com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService
;
import
com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService
;
import
com.github.yulichang.base.MPJBaseServiceImpl
;
import
com.github.yulichang.base.MPJBaseServiceImpl
;
import
com.ruoyi.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* 巡查执行管理Service业务层处理
* 巡查执行管理Service业务层处理
*
*
...
@@ -34,6 +35,18 @@ public class CurrentRiskUserPatrolServiceImpl extends MPJBaseServiceImpl<Current
...
@@ -34,6 +35,18 @@ public class CurrentRiskUserPatrolServiceImpl extends MPJBaseServiceImpl<Current
return
currentRiskUserPatrolMapper
.
selectCurrentRiskUserPatrolById
(
id
);
return
currentRiskUserPatrolMapper
.
selectCurrentRiskUserPatrolById
(
id
);
}
}
/**
* 查询记录
*
* @param id 巡查记录主键
* @return 巡查执行管理
*/
@Override
public
CurrentRiskUserPatrolVO
selectCurrentRiskUserPatrolDetail
(
Long
id
)
{
return
currentRiskUserPatrolMapper
.
selectCurrentRiskUserPatrolDetail
(
id
);
}
/**
/**
* 查询巡查执行管理列表
* 查询巡查执行管理列表
*
*
...
...
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskDetailAbnormalMapper.xml
0 → 100644
View file @
e0f56c03
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.censoft.censoftrongtong.mapper.CurrentRiskDetailAbnormalMapper"
>
<resultMap
type=
"com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal"
id=
"CurrentRiskDetailAbnormalResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"patrolId"
column=
"patrol_id"
/>
<result
property=
"patrolDetailId"
column=
"patrol_detail_id"
/>
<result
property=
"riskContent"
column=
"risk_content"
/>
<result
property=
"riskLocation"
column=
"risk_location"
/>
<result
property=
"abnormalPics"
column=
"abnormal_pics"
/>
<result
property=
"abnormalDesc"
column=
"abnormal_desc"
/>
<result
property=
"assessmentLevel"
column=
"assessment_level"
/>
<result
property=
"sortNum"
column=
"sort_num"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectCurrentRiskDetailAbnormalVo"
>
select id, patrol_id, patrol_detail_id, risk_content, risk_location, abnormal_desc, assessment_level, sort_num, del_flag, create_by, create_time, update_by, update_time, remark,abnormal_pics from current_risk_detail_abnormal
</sql>
<select
id=
"selectCurrentRiskDetailAbnormalList"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal"
resultMap=
"CurrentRiskDetailAbnormalResult"
>
<include
refid=
"selectCurrentRiskDetailAbnormalVo"
/>
<where>
<if
test=
"patrolId != null "
>
and patrol_id = #{patrolId}
</if>
<if
test=
"patrolDetailId != null "
>
and patrol_detail_id = #{patrolDetailId}
</if>
<if
test=
"riskContent != null and riskContent != ''"
>
and risk_content = #{riskContent}
</if>
<if
test=
"riskLocation != null and riskLocation != ''"
>
and risk_location = #{riskLocation}
</if>
<if
test=
"abnormalDesc != null and abnormalDesc != ''"
>
and abnormal_desc = #{abnormalDesc}
</if>
<if
test=
"assessmentLevel != null and assessmentLevel != ''"
>
and assessment_level = #{assessmentLevel}
</if>
<if
test=
"sortNum != null "
>
and sort_num = #{sortNum}
</if>
</where>
</select>
<select
id=
"selectCurrentRiskDetailAbnormalById"
parameterType=
"Long"
resultMap=
"CurrentRiskDetailAbnormalResult"
>
<include
refid=
"selectCurrentRiskDetailAbnormalVo"
/>
where id = #{id}
</select>
<insert
id=
"insertCurrentRiskDetailAbnormal"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into current_risk_detail_abnormal
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"patrolId != null"
>
patrol_id,
</if>
<if
test=
"patrolDetailId != null"
>
patrol_detail_id,
</if>
<if
test=
"riskContent != null"
>
risk_content,
</if>
<if
test=
"riskLocation != null"
>
risk_location,
</if>
<if
test=
"abnormalDesc != null"
>
abnormal_desc,
</if>
<if
test=
"abnormalPics != null"
>
abnormal_pics,
</if>
<if
test=
"assessmentLevel != null"
>
assessment_level,
</if>
<if
test=
"sortNum != null"
>
sort_num,
</if>
<if
test=
"delFlag != null"
>
del_flag,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"patrolId != null"
>
#{patrolId},
</if>
<if
test=
"patrolDetailId != null"
>
#{patrolDetailId},
</if>
<if
test=
"riskContent != null"
>
#{riskContent},
</if>
<if
test=
"riskLocation != null"
>
#{riskLocation},
</if>
<if
test=
"abnormalDesc != null"
>
#{abnormalDesc},
</if>
<if
test=
"abnormalPics != null"
>
#{abnormalPics},
</if>
<if
test=
"assessmentLevel != null"
>
#{assessmentLevel},
</if>
<if
test=
"sortNum != null"
>
#{sortNum},
</if>
<if
test=
"delFlag != null"
>
#{delFlag},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updateCurrentRiskDetailAbnormal"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal"
>
update current_risk_detail_abnormal
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"patrolId != null"
>
patrol_id = #{patrolId},
</if>
<if
test=
"patrolDetailId != null"
>
patrol_detail_id = #{patrolDetailId},
</if>
<if
test=
"riskContent != null"
>
risk_content = #{riskContent},
</if>
<if
test=
"riskLocation != null"
>
risk_location = #{riskLocation},
</if>
<if
test=
"abnormalPics != null"
>
abnormal_pics = #{abnormalPics},
</if>
<if
test=
"abnormalDesc != null"
>
abnormal_desc = #{abnormalDesc},
</if>
<if
test=
"assessmentLevel != null"
>
assessment_level = #{assessmentLevel},
</if>
<if
test=
"sortNum != null"
>
sort_num = #{sortNum},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteCurrentRiskDetailAbnormalById"
parameterType=
"Long"
>
delete from current_risk_detail_abnormal where id = #{id}
</delete>
<delete
id=
"deleteCurrentRiskDetailAbnormalByIds"
parameterType=
"String"
>
delete from current_risk_detail_abnormal where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskUserPatrolDetailMapper.xml
View file @
e0f56c03
...
@@ -200,11 +200,16 @@
...
@@ -200,11 +200,16 @@
c.factor_items,
c.factor_items,
a.id patrolDetailId,
a.id patrolDetailId,
a.patrol_id patrolId,
a.patrol_id patrolId,
a.STATUS patrolStatus
a.STATUS patrolStatus,
d.address,
d.id buildId
FROM
FROM
current_risk_user_patrol_detail a
current_risk_user_patrol_detail a
INNER JOIN current_risk_user_patrol b ON a.patrol_id = b.id
INNER JOIN current_risk_user_patrol b ON a.patrol_id = b.id
INNER JOIN risk_plan_existing_list c ON a.current_risk_id = c.id
INNER JOIN risk_plan_existing_list c ON a.current_risk_id = c.id
INNER JOIN ledger_room r on c.room_id=r.id
INNER JOIN ledger_floor f on r.floor_id=f.id
INNER JOIN ledger_building d on f.building_id=d.id
where b.project_id=#{projectId} and b.user_id=#{userId}
where b.project_id=#{projectId} and b.user_id=#{userId}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskUserPatrolMapper.xml
View file @
e0f56c03
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"projectId"
column=
"project_id"
/>
<result
property=
"projectId"
column=
"project_id"
/>
<result
property=
"projectName"
column=
"project_name"
/>
<result
property=
"riskPostId"
column=
"risk_post_id"
/>
<result
property=
"riskPostId"
column=
"risk_post_id"
/>
<result
property=
"patrolType"
column=
"patrol_type"
/>
<result
property=
"patrolType"
column=
"patrol_type"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"status"
column=
"status"
/>
...
@@ -23,6 +24,7 @@
...
@@ -23,6 +24,7 @@
<result
property=
"riskPostName"
column=
"risk_post_name"
/>
<result
property=
"riskPostName"
column=
"risk_post_name"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"validityTime"
column=
"validity_time"
/>
<result
property=
"validityTime"
column=
"validity_time"
/>
<result
property=
"exceptStatus"
column=
"except_status"
/>
</resultMap>
</resultMap>
<sql
id=
"selectCurrentRiskUserPatrolVo"
>
<sql
id=
"selectCurrentRiskUserPatrolVo"
>
...
@@ -52,6 +54,7 @@
...
@@ -52,6 +54,7 @@
a.id,
a.id,
a.user_id,
a.user_id,
a.project_id,
a.project_id,
p.name project_name,
a.risk_post_id,
a.risk_post_id,
a.patrol_type,
a.patrol_type,
a.STATUS,
a.STATUS,
...
@@ -66,9 +69,12 @@
...
@@ -66,9 +69,12 @@
a.update_time,
a.update_time,
a.remark,
a.remark,
b.risk_post_name,
b.risk_post_name,
c.nick_name
c.nick_name,
d.status except_status
FROM
FROM
current_risk_user_patrol a
current_risk_user_patrol a
LEFT JOIN ledger_project p on a.project_id=p.id
LEFT JOIN current_risk_user_patrol_detail d on a.id=d.patrol_id
LEFT JOIN current_risk_post b on a.risk_post_id = b.id
LEFT JOIN current_risk_post b on a.risk_post_id = b.id
LEFT JOIN sys_user c on a.user_id = c.user_id
LEFT JOIN sys_user c on a.user_id = c.user_id
<where>
<where>
...
@@ -83,6 +89,37 @@
...
@@ -83,6 +89,37 @@
</where>
</where>
</select>
</select>
<select
id=
"selectCurrentRiskUserPatrolDetail"
parameterType=
"Long"
resultType=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolVO"
>
SELECT
a.id,
p.NAME project_name,
e.type,
e.LEVEL,
e.factor,
e.measures_project,
e.measures_administration,
e.measures_emergency,
a.user_id,
a.project_id,
a.risk_post_id,
a.patrol_type,
a.STATUS,
a.start_time,
a.end_time,
a.validity_time,
b.risk_post_name,
c.nick_name,
d.STATUS except_status
FROM
current_risk_user_patrol a
LEFT JOIN ledger_project p ON a.project_id = p.id
LEFT JOIN current_risk_user_patrol_detail d ON a.id = d.patrol_id
LEFT JOIN risk_plan_existing_list e ON d.current_risk_id = e.id
LEFT JOIN current_risk_post b ON a.risk_post_id = b.id
LEFT JOIN sys_user c ON a.user_id = c.user_id
where a.id = #{id}
</select>
<select
id=
"getPatrolProjectList"
resultType=
"com.censoft.censoftrongtong.domain.LedgerProject"
>
<select
id=
"getPatrolProjectList"
resultType=
"com.censoft.censoftrongtong.domain.LedgerProject"
>
select b.id,b.name,b.type,b.business,b.address from current_risk_user_patrol a LEFT JOIN ledger_project b on
select b.id,b.name,b.type,b.business,b.address from current_risk_user_patrol a LEFT JOIN ledger_project b on
a.project_id=b.id
a.project_id=b.id
...
...
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
View file @
e0f56c03
...
@@ -132,7 +132,7 @@ public class Constants
...
@@ -132,7 +132,7 @@ public class Constants
/**
/**
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
*/
*/
public
static
final
String
[]
JOB_WHITELIST_STR
=
{
"com.ruoyi"
};
public
static
final
String
[]
JOB_WHITELIST_STR
=
{
"com.ruoyi"
,
"com.censoft"
};
/**
/**
* 定时任务违规的字符
* 定时任务违规的字符
...
...
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