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
8423133e
Commit
8423133e
authored
Jan 08, 2024
by
yf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改巡查管理相关接口
parent
944d8c92
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
214 additions
and
127 deletions
+214
-127
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserHolidayController.java
...rongtong/controller/CurrentRiskUserHolidayController.java
+27
-33
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolController.java
...trongtong/controller/CurrentRiskUserPatrolController.java
+20
-17
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolDetailController.java
...ong/controller/CurrentRiskUserPatrolDetailController.java
+3
-3
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/RiskExistingListPatrolVO.java
...soft/censoftrongtong/domain/RiskExistingListPatrolVO.java
+2
-0
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/mapper/CurrentRiskUserPatrolDetailMapper.java
...oftrongtong/mapper/CurrentRiskUserPatrolDetailMapper.java
+1
-1
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/mapper/CurrentRiskUserPatrolMapper.java
...t/censoftrongtong/mapper/CurrentRiskUserPatrolMapper.java
+10
-0
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/ICurrentRiskUserPatrolDetailService.java
...rongtong/service/ICurrentRiskUserPatrolDetailService.java
+1
-1
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/ICurrentRiskUserPatrolService.java
...ensoftrongtong/service/ICurrentRiskUserPatrolService.java
+7
-0
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/CurrentRiskUserPatrolDetailServiceImpl.java
.../service/impl/CurrentRiskUserPatrolDetailServiceImpl.java
+2
-2
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/CurrentRiskUserPatrolServiceImpl.java
...ngtong/service/impl/CurrentRiskUserPatrolServiceImpl.java
+14
-0
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskUserPatrolDetailMapper.xml
...urces/mapper/system/CurrentRiskUserPatrolDetailMapper.xml
+39
-12
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskUserPatrolMapper.xml
...n/resources/mapper/system/CurrentRiskUserPatrolMapper.xml
+88
-58
No files found.
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserHolidayController.java
View file @
8423133e
...
@@ -31,15 +31,14 @@ import com.ruoyi.common.core.page.TableDataInfo;
...
@@ -31,15 +31,14 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
/**
* 现状风险巡查用户请假Controller
* 现状风险巡查用户请假Controller
*
*
* @author ruoyi
* @author ruoyi
* @date 2023-12-05
* @date 2023-12-05
*/
*/
@RestController
@RestController
@AllArgsConstructor
@AllArgsConstructor
@RequestMapping
(
value
=
{
"/risk/currentRiskHoliday"
,
"/app-api/risk/currentRiskHoliday"
})
@RequestMapping
(
value
=
{
"/risk/currentRiskHoliday"
,
"/app-api/risk/currentRiskHoliday"
})
public
class
CurrentRiskUserHolidayController
extends
BaseController
public
class
CurrentRiskUserHolidayController
extends
BaseController
{
{
private
ICurrentRiskUserHolidayService
currentRiskUserHolidayService
;
private
ICurrentRiskUserHolidayService
currentRiskUserHolidayService
;
private
ISysUserService
sysUserService
;
private
ISysUserService
sysUserService
;
...
@@ -47,32 +46,32 @@ public class CurrentRiskUserHolidayController extends BaseController
...
@@ -47,32 +46,32 @@ public class CurrentRiskUserHolidayController extends BaseController
* 查询现状风险巡查用户请假列表
* 查询现状风险巡查用户请假列表
*/
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
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
(
"0"
.
equals
(
currentRiskUserHoliday
.
getType
()))
{
//申请人
//申请人
queryWrapper
.
eq
(
"apply_user_id"
,
getUserId
());
queryWrapper
.
eq
(
"apply_user_id"
,
getUserId
());
}
else
{
}
else
{
//审批人
//审批人
queryWrapper
.
in
(
"apply_user_id"
,
currentRiskUserHolidayService
.
memberUserIds
(
getUserId
()));
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
());
}
}
queryWrapper
.
orderByAsc
(
" status"
);
queryWrapper
.
orderByAsc
(
" status"
);
queryWrapper
.
orderByDesc
(
"holiday_time"
);
queryWrapper
.
orderByDesc
(
"holiday_time"
);
List
<
CurrentRiskUserHoliday
>
list
=
currentRiskUserHolidayService
.
list
(
queryWrapper
);
List
<
CurrentRiskUserHoliday
>
list
=
currentRiskUserHolidayService
.
list
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
list
)){
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
list
.
forEach
(
holiday
->{
list
.
forEach
(
holiday
->
{
if
(
"0"
.
equals
(
currentRiskUserHoliday
.
getType
())){
if
(
"0"
.
equals
(
currentRiskUserHoliday
.
getType
()))
{
holiday
.
setApplyUserName
(
getUsername
());
SysUser
sysUser
=
sysUserService
.
selectUserById
(
getUserId
());
}
else
{
holiday
.
setApplyUserName
(
sysUser
.
getNickName
());
SysUser
sysUser
=
sysUserService
.
selectUserById
(
holiday
.
getApplyUserId
());
}
else
{
holiday
.
setApplyUserName
(
sysUser
.
getNickName
());
SysUser
sysUser
=
sysUserService
.
selectUserById
(
holiday
.
getApplyUserId
());
holiday
.
setApplyUserName
(
sysUser
.
getNickName
());
}
}
if
(
holiday
.
getApproveUserId
()
!=
null
)
{
if
(
holiday
.
getApproveUserId
()
!=
null
)
{
SysUser
sysUser
=
sysUserService
.
selectUserById
(
holiday
.
getApproveUserId
());
SysUser
sysUser
=
sysUserService
.
selectUserById
(
holiday
.
getApproveUserId
());
holiday
.
setApproveUserName
(
sysUser
.
getNickName
());
holiday
.
setApproveUserName
(
sysUser
.
getNickName
());
}
}
...
@@ -87,8 +86,7 @@ public class CurrentRiskUserHolidayController extends BaseController
...
@@ -87,8 +86,7 @@ public class CurrentRiskUserHolidayController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:export')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:export')"
)
@Log
(
title
=
"现状风险巡查用户请假"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"现状风险巡查用户请假"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
CurrentRiskUserHoliday
currentRiskUserHoliday
)
public
void
export
(
HttpServletResponse
response
,
CurrentRiskUserHoliday
currentRiskUserHoliday
)
{
{
List
<
CurrentRiskUserHoliday
>
list
=
currentRiskUserHolidayService
.
selectCurrentRiskUserHolidayList
(
currentRiskUserHoliday
);
List
<
CurrentRiskUserHoliday
>
list
=
currentRiskUserHolidayService
.
selectCurrentRiskUserHolidayList
(
currentRiskUserHoliday
);
ExcelUtil
<
CurrentRiskUserHoliday
>
util
=
new
ExcelUtil
<
CurrentRiskUserHoliday
>(
CurrentRiskUserHoliday
.
class
);
ExcelUtil
<
CurrentRiskUserHoliday
>
util
=
new
ExcelUtil
<
CurrentRiskUserHoliday
>(
CurrentRiskUserHoliday
.
class
);
util
.
exportExcel
(
response
,
list
,
"现状风险巡查用户请假数据"
);
util
.
exportExcel
(
response
,
list
,
"现状风险巡查用户请假数据"
);
...
@@ -99,8 +97,7 @@ public class CurrentRiskUserHolidayController extends BaseController
...
@@ -99,8 +97,7 @@ public class CurrentRiskUserHolidayController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:query')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:query')"
)
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
return
success
(
currentRiskUserHolidayService
.
selectCurrentRiskUserHolidayById
(
id
));
return
success
(
currentRiskUserHolidayService
.
selectCurrentRiskUserHolidayById
(
id
));
}
}
...
@@ -110,15 +107,14 @@ public class CurrentRiskUserHolidayController extends BaseController
...
@@ -110,15 +107,14 @@ public class CurrentRiskUserHolidayController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:add')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:add')"
)
@Log
(
title
=
"现状风险巡查用户请假"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"现状风险巡查用户请假"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
public
AjaxResult
add
(
@RequestBody
CurrentRiskUserHoliday
currentRiskUserHoliday
)
public
AjaxResult
add
(
@RequestBody
CurrentRiskUserHoliday
currentRiskUserHoliday
)
{
{
if
(
null
==
currentRiskUserHoliday
.
getId
())
{
if
(
null
==
currentRiskUserHoliday
.
getId
()){
currentRiskUserHoliday
.
setApplyUserId
(
getUserId
());
currentRiskUserHoliday
.
setApplyUserId
(
getUserId
());
currentRiskUserHoliday
.
setApplyTime
(
new
Date
());
currentRiskUserHoliday
.
setApplyTime
(
new
Date
());
currentRiskUserHoliday
.
setStatus
(
"0"
);
currentRiskUserHoliday
.
setStatus
(
"0"
);
//TODO 查询上级项目经理 改为已知晓,不做逻辑处理
//TODO 查询上级项目经理 改为已知晓,不做逻辑处理
currentRiskUserHolidayService
.
insertCurrentRiskUserHoliday
(
currentRiskUserHoliday
);
currentRiskUserHolidayService
.
insertCurrentRiskUserHoliday
(
currentRiskUserHoliday
);
}
else
{
}
else
{
currentRiskUserHoliday
.
setApproveTime
(
new
Date
());
currentRiskUserHoliday
.
setApproveTime
(
new
Date
());
currentRiskUserHoliday
.
setApproveUserId
(
getUserId
());
currentRiskUserHoliday
.
setApproveUserId
(
getUserId
());
currentRiskUserHolidayService
.
updateCurrentRiskUserHoliday
(
currentRiskUserHoliday
);
currentRiskUserHolidayService
.
updateCurrentRiskUserHoliday
(
currentRiskUserHoliday
);
...
@@ -132,8 +128,7 @@ public class CurrentRiskUserHolidayController extends BaseController
...
@@ -132,8 +128,7 @@ public class CurrentRiskUserHolidayController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:edit')"
)
@Log
(
title
=
"现状风险巡查用户请假"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"现状风险巡查用户请假"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
public
AjaxResult
edit
(
@RequestBody
CurrentRiskUserHoliday
currentRiskUserHoliday
)
public
AjaxResult
edit
(
@RequestBody
CurrentRiskUserHoliday
currentRiskUserHoliday
)
{
{
return
toAjax
(
currentRiskUserHolidayService
.
updateCurrentRiskUserHoliday
(
currentRiskUserHoliday
));
return
toAjax
(
currentRiskUserHolidayService
.
updateCurrentRiskUserHoliday
(
currentRiskUserHoliday
));
}
}
...
@@ -142,9 +137,8 @@ public class CurrentRiskUserHolidayController extends BaseController
...
@@ -142,9 +137,8 @@ public class CurrentRiskUserHolidayController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:currentRiskHoliday:remove')"
)
@Log
(
title
=
"现状风险巡查用户请假"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"现状风险巡查用户请假"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
{
return
toAjax
(
currentRiskUserHolidayService
.
deleteCurrentRiskUserHolidayByIds
(
ids
));
return
toAjax
(
currentRiskUserHolidayService
.
deleteCurrentRiskUserHolidayByIds
(
ids
));
}
}
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolController.java
View file @
8423133e
...
@@ -2,6 +2,9 @@ package com.censoft.censoftrongtong.controller;
...
@@ -2,6 +2,9 @@ package com.censoft.censoftrongtong.controller;
import
java.util.List
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.censoft.censoftrongtong.service.ILedgerProjectService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -23,23 +26,28 @@ import com.ruoyi.common.core.page.TableDataInfo;
...
@@ -23,23 +26,28 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
/**
* 巡查执行管理Controller
* 巡查执行管理Controller
*
*
* @author baode
* @author baode
* @date 2023-12-05
* @date 2023-12-05
*/
*/
@RestController
@RestController
@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
{
{
@Autowired
@Autowired
private
ICurrentRiskUserPatrolService
currentRiskUserPatrolService
;
private
ICurrentRiskUserPatrolService
currentRiskUserPatrolService
;
@GetMapping
(
"/getPatrolProjectList"
)
private
List
<
LedgerProject
>
getPatrolProjectList
()
{
List
<
LedgerProject
>
list
=
currentRiskUserPatrolService
.
getPatrolProjectList
(
getUserId
());
return
list
;
}
/**
/**
* 查询巡查执行管理列表
* 查询巡查执行管理列表
*/
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
CurrentRiskUserPatrol
currentRiskUserPatrol
)
public
TableDataInfo
list
(
CurrentRiskUserPatrol
currentRiskUserPatrol
)
{
{
startPage
();
startPage
();
List
<
CurrentRiskUserPatrol
>
list
=
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolList
(
currentRiskUserPatrol
);
List
<
CurrentRiskUserPatrol
>
list
=
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolList
(
currentRiskUserPatrol
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
...
@@ -51,8 +59,7 @@ public class CurrentRiskUserPatrolController extends BaseController
...
@@ -51,8 +59,7 @@ public class CurrentRiskUserPatrolController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:export')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:export')"
)
@Log
(
title
=
"巡查执行管理"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"巡查执行管理"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
CurrentRiskUserPatrol
currentRiskUserPatrol
)
public
void
export
(
HttpServletResponse
response
,
CurrentRiskUserPatrol
currentRiskUserPatrol
)
{
{
List
<
CurrentRiskUserPatrol
>
list
=
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolList
(
currentRiskUserPatrol
);
List
<
CurrentRiskUserPatrol
>
list
=
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolList
(
currentRiskUserPatrol
);
ExcelUtil
<
CurrentRiskUserPatrol
>
util
=
new
ExcelUtil
<
CurrentRiskUserPatrol
>(
CurrentRiskUserPatrol
.
class
);
ExcelUtil
<
CurrentRiskUserPatrol
>
util
=
new
ExcelUtil
<
CurrentRiskUserPatrol
>(
CurrentRiskUserPatrol
.
class
);
util
.
exportExcel
(
response
,
list
,
"巡查执行管理数据"
);
util
.
exportExcel
(
response
,
list
,
"巡查执行管理数据"
);
...
@@ -63,8 +70,7 @@ public class CurrentRiskUserPatrolController extends BaseController
...
@@ -63,8 +70,7 @@ public class CurrentRiskUserPatrolController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:query')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:query')"
)
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
return
success
(
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolById
(
id
));
return
success
(
currentRiskUserPatrolService
.
selectCurrentRiskUserPatrolById
(
id
));
}
}
...
@@ -74,8 +80,7 @@ public class CurrentRiskUserPatrolController extends BaseController
...
@@ -74,8 +80,7 @@ public class CurrentRiskUserPatrolController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:add')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:add')"
)
@Log
(
title
=
"巡查执行管理"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"巡查执行管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"save"
)
@PostMapping
(
"save"
)
public
AjaxResult
add
(
@RequestBody
CurrentRiskUserPatrol
currentRiskUserPatrol
)
public
AjaxResult
add
(
@RequestBody
CurrentRiskUserPatrol
currentRiskUserPatrol
)
{
{
return
toAjax
(
currentRiskUserPatrolService
.
insertCurrentRiskUserPatrol
(
currentRiskUserPatrol
));
return
toAjax
(
currentRiskUserPatrolService
.
insertCurrentRiskUserPatrol
(
currentRiskUserPatrol
));
}
}
...
@@ -85,8 +90,7 @@ public class CurrentRiskUserPatrolController extends BaseController
...
@@ -85,8 +90,7 @@ public class CurrentRiskUserPatrolController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:edit')"
)
@Log
(
title
=
"巡查执行管理"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"巡查执行管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
public
AjaxResult
edit
(
@RequestBody
CurrentRiskUserPatrol
currentRiskUserPatrol
)
public
AjaxResult
edit
(
@RequestBody
CurrentRiskUserPatrol
currentRiskUserPatrol
)
{
{
return
toAjax
(
currentRiskUserPatrolService
.
updateCurrentRiskUserPatrol
(
currentRiskUserPatrol
));
return
toAjax
(
currentRiskUserPatrolService
.
updateCurrentRiskUserPatrol
(
currentRiskUserPatrol
));
}
}
...
@@ -95,9 +99,8 @@ public class CurrentRiskUserPatrolController extends BaseController
...
@@ -95,9 +99,8 @@ public class CurrentRiskUserPatrolController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('risk:riskUserPatrol:remove')"
)
@Log
(
title
=
"巡查执行管理"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"巡查执行管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
{
return
toAjax
(
currentRiskUserPatrolService
.
deleteCurrentRiskUserPatrolByIds
(
ids
));
return
toAjax
(
currentRiskUserPatrolService
.
deleteCurrentRiskUserPatrolByIds
(
ids
));
}
}
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/CurrentRiskUserPatrolDetailController.java
View file @
8423133e
...
@@ -64,11 +64,11 @@ public class CurrentRiskUserPatrolDetailController extends BaseController
...
@@ -64,11 +64,11 @@ public class CurrentRiskUserPatrolDetailController extends BaseController
* 查询现状风险用户巡查明细列表
* 查询现状风险用户巡查明细列表
*/
*/
@GetMapping
(
"/detailList"
)
@GetMapping
(
"/detailList"
)
public
TableDataInfo
detailList
(
CurrentRiskUserPatrolDetail
currentRiskUserPatrolDetail
)
public
TableDataInfo
detailList
(
RiskExistingListPatrolVO
query
)
{
{
startPage
();
startPage
();
String
patrolId
=
String
.
valueOf
(
currentRiskUserPatrolDetail
.
getPatrol
Id
());
query
.
setUserId
(
getUser
Id
());
List
<
RiskExistingListPatrolVO
>
list
=
currentRiskUserPatrolDetailService
.
riskExistingLists
(
patrolId
);
List
<
RiskExistingListPatrolVO
>
list
=
currentRiskUserPatrolDetailService
.
riskExistingLists
(
query
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/RiskExistingListPatrolVO.java
View file @
8423133e
...
@@ -10,4 +10,6 @@ public class RiskExistingListPatrolVO extends RiskPlanExistingList{
...
@@ -10,4 +10,6 @@ public class RiskExistingListPatrolVO extends RiskPlanExistingList{
private
String
patrolId
;
private
String
patrolId
;
private
String
patrolStatus
;
private
String
patrolStatus
;
private
Long
projectId
;
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/mapper/CurrentRiskUserPatrolDetailMapper.java
View file @
8423133e
...
@@ -62,5 +62,5 @@ public interface CurrentRiskUserPatrolDetailMapper extends MPJBaseMapper<Curren
...
@@ -62,5 +62,5 @@ public interface CurrentRiskUserPatrolDetailMapper extends MPJBaseMapper<Curren
*/
*/
public
int
deleteCurrentRiskUserPatrolDetailByIds
(
Long
[]
ids
);
public
int
deleteCurrentRiskUserPatrolDetailByIds
(
Long
[]
ids
);
List
<
RiskExistingListPatrolVO
>
riskExistingLists
(
@Param
(
"patrolId"
)
String
patrolId
);
List
<
RiskExistingListPatrolVO
>
riskExistingLists
(
RiskExistingListPatrolVO
model
);
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/mapper/CurrentRiskUserPatrolMapper.java
View file @
8423133e
...
@@ -2,6 +2,7 @@ package com.censoft.censoftrongtong.mapper;
...
@@ -2,6 +2,7 @@ package com.censoft.censoftrongtong.mapper;
import
java.util.List
;
import
java.util.List
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.github.yulichang.base.MPJBaseMapper
;
import
com.github.yulichang.base.MPJBaseMapper
;
/**
/**
...
@@ -20,6 +21,15 @@ public interface CurrentRiskUserPatrolMapper extends MPJBaseMapper<CurrentRiskU
...
@@ -20,6 +21,15 @@ public interface CurrentRiskUserPatrolMapper extends MPJBaseMapper<CurrentRiskU
*/
*/
public
CurrentRiskUserPatrol
selectCurrentRiskUserPatrolById
(
Long
id
);
public
CurrentRiskUserPatrol
selectCurrentRiskUserPatrolById
(
Long
id
);
/**
* 根据用户id获取巡检项目
* @param userId
* @return
*/
public
List
<
LedgerProject
>
getPatrolProjectList
(
Long
userId
);
/**
/**
* 查询巡查执行管理列表
* 查询巡查执行管理列表
*
*
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/ICurrentRiskUserPatrolDetailService.java
View file @
8423133e
...
@@ -60,5 +60,5 @@ public interface ICurrentRiskUserPatrolDetailService extends MPJBaseService<Cur
...
@@ -60,5 +60,5 @@ public interface ICurrentRiskUserPatrolDetailService extends MPJBaseService<Cur
*/
*/
public
int
deleteCurrentRiskUserPatrolDetailById
(
Long
id
);
public
int
deleteCurrentRiskUserPatrolDetailById
(
Long
id
);
List
<
RiskExistingListPatrolVO
>
riskExistingLists
(
String
patrolId
);
List
<
RiskExistingListPatrolVO
>
riskExistingLists
(
RiskExistingListPatrolVO
model
);
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/ICurrentRiskUserPatrolService.java
View file @
8423133e
...
@@ -2,6 +2,7 @@ package com.censoft.censoftrongtong.service;
...
@@ -2,6 +2,7 @@ package com.censoft.censoftrongtong.service;
import
java.util.List
;
import
java.util.List
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.github.yulichang.base.MPJBaseService
;
import
com.github.yulichang.base.MPJBaseService
;
/**
/**
* 巡查执行管理Service接口
* 巡查执行管理Service接口
...
@@ -27,6 +28,12 @@ public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRi
...
@@ -27,6 +28,12 @@ public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRi
*/
*/
public
List
<
CurrentRiskUserPatrol
>
selectCurrentRiskUserPatrolList
(
CurrentRiskUserPatrol
currentRiskUserPatrol
);
public
List
<
CurrentRiskUserPatrol
>
selectCurrentRiskUserPatrolList
(
CurrentRiskUserPatrol
currentRiskUserPatrol
);
/**
* 根据用户id查询巡检项目列表
* @param userId
* @return
*/
public
List
<
LedgerProject
>
getPatrolProjectList
(
Long
userId
);
/**
/**
* 新增巡查执行管理
* 新增巡查执行管理
*
*
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/CurrentRiskUserPatrolDetailServiceImpl.java
View file @
8423133e
...
@@ -97,7 +97,7 @@ public class CurrentRiskUserPatrolDetailServiceImpl extends MPJBaseServiceImpl<C
...
@@ -97,7 +97,7 @@ public class CurrentRiskUserPatrolDetailServiceImpl extends MPJBaseServiceImpl<C
}
}
@Override
@Override
public
List
<
RiskExistingListPatrolVO
>
riskExistingLists
(
String
patrolId
)
{
public
List
<
RiskExistingListPatrolVO
>
riskExistingLists
(
RiskExistingListPatrolVO
model
)
{
return
currentRiskUserPatrolDetailMapper
.
riskExistingLists
(
patrolId
);
return
currentRiskUserPatrolDetailMapper
.
riskExistingLists
(
model
);
}
}
}
}
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/CurrentRiskUserPatrolServiceImpl.java
View file @
8423133e
package
com
.
censoft
.
censoftrongtong
.
service
.
impl
;
package
com
.
censoft
.
censoftrongtong
.
service
.
impl
;
import
java.util.List
;
import
java.util.List
;
import
com.censoft.censoftrongtong.domain.LedgerProject
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -44,6 +46,18 @@ public class CurrentRiskUserPatrolServiceImpl extends MPJBaseServiceImpl<Current
...
@@ -44,6 +46,18 @@ public class CurrentRiskUserPatrolServiceImpl extends MPJBaseServiceImpl<Current
return
currentRiskUserPatrolMapper
.
selectCurrentRiskUserPatrolList
(
currentRiskUserPatrol
);
return
currentRiskUserPatrolMapper
.
selectCurrentRiskUserPatrolList
(
currentRiskUserPatrol
);
}
}
/**
* 根据用户id获取巡检项目
* @param userId
* @return
*/
@Override
public
List
<
LedgerProject
>
getPatrolProjectList
(
Long
userId
)
{
return
currentRiskUserPatrolMapper
.
getPatrolProjectList
(
userId
);
}
/**
/**
* 新增巡查执行管理
* 新增巡查执行管理
*
*
...
...
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskUserPatrolDetailMapper.xml
View file @
8423133e
...
@@ -167,17 +167,44 @@
...
@@ -167,17 +167,44 @@
<result
property=
"patrolStatus"
column=
"patrolStatus"
/>
<result
property=
"patrolStatus"
column=
"patrolStatus"
/>
</resultMap>
</resultMap>
<select
id=
"riskExistingLists"
resultMap=
"RiskPlanExistingListResult"
parameterType=
"java.lang.String"
>
<select
id=
"riskExistingLists"
resultMap=
"RiskPlanExistingListResult"
>
select b.id,b.user_id,b.inherent_id,
SELECT
b.plan_id,b.room_id,b.name,b.factor,b.type,
b.project_id,
b.level,b.presence_location,b.picture_file_ids,b.measures_project,b.measures_project_file_ids,
b.user_id,
b.measures_administration,b.measures_dept_name,b.measures_user_name,b.measures_user_phone,
c.id,
b.measures_administration_file_ids,b.measures_emergency,
c.inherent_id,
b.measures_emergency_file_ids,b.reference_basis,b.del_flag,b.create_by,
c.plan_id,
b.create_time,b.update_by,b.update_time,b.remark,b.factor_items,
c.room_id,
a.id patrolDetailId,a.patrol_id patrolId,a.STATUS patrolStatus
c.NAME,
from current_risk_user_patrol_detail a
c.factor,
INNER JOIN risk_plan_existing_list b ON a.current_risk_id = b.id
c.type,
where a.patrol_id = #{patrolId}
c.LEVEL,
c.presence_location,
c.picture_file_ids,
c.measures_project,
c.measures_project_file_ids,
c.measures_administration,
c.measures_dept_name,
c.measures_user_name,
c.measures_user_phone,
c.measures_administration_file_ids,
c.measures_emergency,
c.measures_emergency_file_ids,
c.reference_basis,
c.del_flag,
c.create_by,
c.create_time,
c.update_by,
c.update_time,
c.remark,
c.factor_items,
a.id patrolDetailId,
a.patrol_id patrolId,
a.STATUS patrolStatus
FROM
current_risk_user_patrol_detail a
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
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 @
8423133e
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper"
>
<mapper
namespace=
"com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper"
>
<resultMap
type=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
id=
"CurrentRiskUserPatrolResult"
>
<resultMap
type=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
id=
"CurrentRiskUserPatrolResult"
>
<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=
"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"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"sortNum"
column=
"sort_num"
/>
<result
property=
"sortNum"
column=
"sort_num"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"remark"
column=
"remark"
/>
<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"
/>
</resultMap>
</resultMap>
<sql
id=
"selectCurrentRiskUserPatrolVo"
>
<sql
id=
"selectCurrentRiskUserPatrolVo"
>
select a.id, user_id, project_id, risk_post_id, patrol_type, status, start_time, end_time, sort_num, a.validity_time,
select a.id,
del_flag, create_by, create_time, update_by, update_time, remark from current_risk_user_patrol a
user_id,
project_id,
risk_post_id,
patrol_type,
status,
start_time,
end_time,
sort_num,
a.validity_time,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark
from current_risk_user_patrol a
</sql>
</sql>
<select
id=
"selectCurrentRiskUserPatrolList"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
resultMap=
"CurrentRiskUserPatrolResult"
>
<select
id=
"selectCurrentRiskUserPatrolList"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
resultMap=
"CurrentRiskUserPatrolResult"
>
SELECT
SELECT
a.id,
a.id,
a.user_id,
a.user_id,
a.project_id,
a.project_id,
a.risk_post_id,
a.risk_post_id,
a.patrol_type,
a.patrol_type,
a.STATUS,
a.STATUS,
a.start_time,
a.start_time,
a.end_time,
a.end_time,
a.sort_num,
a.sort_num,
a.del_flag,
a.del_flag,
a.create_by,
a.create_by,
a.create_time,
a.create_time,
a.validity_time,
a.validity_time,
a.update_by,
a.update_by,
a.update_time,
a.update_time,
a.remark,
a.remark,
b.risk_post_name,
b.risk_post_name,
c.nick_name
c.nick_name
FROM
FROM
current_risk_user_patrol a
current_risk_user_patrol a
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>
<if
test=
"userId != null "
>
and a.user_id = #{userId}
</if>
<if
test=
"userId != null "
>
and a.user_id = #{userId}
</if>
<if
test=
"projectId != null "
>
and a.project_id = #{projectId}
</if>
<if
test=
"projectId != null "
>
and a.project_id = #{projectId}
</if>
<if
test=
"riskPostId != null "
>
and a.risk_post_id = #{riskPostId}
</if>
<if
test=
"riskPostId != null "
>
and a.risk_post_id = #{riskPostId}
</if>
<if
test=
"patrolType != null "
>
and a.patrol_type = #{patrolType}
</if>
<if
test=
"patrolType != null "
>
and a.patrol_type = #{patrolType}
</if>
<if
test=
"status != null and status != ''"
>
and a.status = #{status}
</if>
<if
test=
"status != null and status != ''"
>
and a.status = #{status}
</if>
<if
test=
"startTime != null "
>
and a.start_time = #{startTime}
</if>
<if
test=
"startTime != null "
>
and a.start_time = #{startTime}
</if>
<if
test=
"endTime != null "
>
and a.end_time = #{endTime}
</if>
<if
test=
"endTime != null "
>
and a.end_time = #{endTime}
</if>
<if
test=
"sortNum != null "
>
and a.sort_num = #{sortNum}
</if>
<if
test=
"sortNum != null "
>
and a.sort_num = #{sortNum}
</if>
</where>
</select>
<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
a.project_id=b.id
<where>
and del_flage=0
<if
test=
"userId != null "
>
and a.user_id = #{userId}
</if>
</where>
</where>
</select>
</select>
<select
id=
"selectCurrentRiskUserPatrolById"
parameterType=
"Long"
resultMap=
"CurrentRiskUserPatrolResult"
>
<select
id=
"selectCurrentRiskUserPatrolById"
parameterType=
"Long"
resultMap=
"CurrentRiskUserPatrolResult"
>
<include
refid=
"selectCurrentRiskUserPatrolVo"
/>
<include
refid=
"selectCurrentRiskUserPatrolVo"
/>
where id = #{id}
where id = #{id}
</select>
</select>
<insert
id=
"insertCurrentRiskUserPatrol"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertCurrentRiskUserPatrol"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into current_risk_user_patrol
insert into current_risk_user_patrol
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
...
@@ -89,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -89,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"validityTime != null"
>
validity_time,
</if>
<if
test=
"validityTime != null"
>
validity_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"projectId != null"
>
#{projectId},
</if>
<if
test=
"projectId != null"
>
#{projectId},
</if>
...
@@ -106,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -106,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"validityTime != null"
>
#{validityTime},
</if>
<if
test=
"validityTime != null"
>
#{validityTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateCurrentRiskUserPatrol"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
>
<update
id=
"updateCurrentRiskUserPatrol"
parameterType=
"com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
>
...
@@ -131,11 +159,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -131,11 +159,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
</update>
<delete
id=
"deleteCurrentRiskUserPatrolById"
parameterType=
"Long"
>
<delete
id=
"deleteCurrentRiskUserPatrolById"
parameterType=
"Long"
>
delete from current_risk_user_patrol where id = #{id}
delete
from current_risk_user_patrol
where id = #{id}
</delete>
</delete>
<delete
id=
"deleteCurrentRiskUserPatrolByIds"
parameterType=
"String"
>
<delete
id=
"deleteCurrentRiskUserPatrolByIds"
parameterType=
"String"
>
delete from current_risk_user_patrol where id in
delete from current_risk_user_patrol where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
#{id}
</foreach>
</foreach>
...
...
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