Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
dqms
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuhuanchao
dqms
Commits
eff7a397
Commit
eff7a397
authored
Nov 14, 2022
by
PC-202210251227\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据权限
parent
f6ae235e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
8 deletions
+18
-8
DqPersonelController.java
...a/io/hmit/modules/dq/controller/DqPersonelController.java
+6
-1
DqRegionController.java
...ava/io/hmit/modules/dq/controller/DqRegionController.java
+1
-1
DqPersonelServiceImpl.java
...o/hmit/modules/dq/service/impl/DqPersonelServiceImpl.java
+5
-2
SysUserController.java
...ava/io/hmit/modules/sys/controller/SysUserController.java
+4
-2
DqPersonelDao.xml
hmit-admin/src/main/resources/mapper/dq/DqPersonelDao.xml
+2
-2
No files found.
hmit-admin/src/main/java/io/hmit/modules/dq/controller/DqPersonelController.java
View file @
eff7a397
package
io
.
hmit
.
modules
.
dq
.
controller
;
import
io.hmit.common.annotation.DataFilter
;
import
io.hmit.common.annotation.LogOperation
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.exception.ErrorCode
;
...
...
@@ -59,6 +60,7 @@ public class DqPersonelController {
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@RequiresPermissions
(
"dq:dqpersonel:page"
)
@DataFilter
()
public
Result
<
PageData
<
DqPersonelDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
DqPersonelDTO
>
page
=
dqPersonelService
.
page
(
params
);
...
...
@@ -95,6 +97,8 @@ public class DqPersonelController {
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
dto
.
setDeptId
(
dto
.
getDqRegionId
());
dqPersonelService
.
update
(
dto
);
return
new
Result
<>();
...
...
@@ -126,6 +130,7 @@ public class DqPersonelController {
@ApiOperation
(
"导出"
)
@LogOperation
(
"导出"
)
@RequiresPermissions
(
"dq:dqpersonel:export"
)
@DataFilter
()
public
void
export
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
)
throws
Exception
{
List
<
DqPersonelDTO
>
list
=
dqPersonelService
.
list
(
params
);
...
...
@@ -134,7 +139,7 @@ public class DqPersonelController {
@PostMapping
(
"upload"
)
@ApiOperation
(
value
=
"上传文件"
)
@RequiresPermissions
(
"
sys:oss:all
"
)
@RequiresPermissions
(
"
dq:dqpersonel:delete
"
)
public
Result
<
Map
<
String
,
Object
>>
upload
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
if
(
file
.
isEmpty
())
{
...
...
hmit-admin/src/main/java/io/hmit/modules/dq/controller/DqRegionController.java
View file @
eff7a397
...
...
@@ -70,7 +70,7 @@ public class DqRegionController {
@GetMapping
(
"list"
)
@ApiOperation
(
"列表"
)
@RequiresPermissions
(
"dq:dq
region
:info"
)
@RequiresPermissions
(
"dq:dq
personel
:info"
)
public
Result
<
List
<
DqRegionDTO
>>
list
(){
return
new
Result
<
List
<
DqRegionDTO
>>().
ok
(
dqRegionService
.
list
(
new
HashMap
<>()));
...
...
hmit-admin/src/main/java/io/hmit/modules/dq/service/impl/DqPersonelServiceImpl.java
View file @
eff7a397
...
...
@@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.utils.easyExcel.DqPersonelExcelIn
;
import
io.hmit.common.utils.easyExcel.DqPersonelExcelListener
;
...
...
@@ -42,8 +43,10 @@ public class DqPersonelServiceImpl extends CrudServiceImpl<DqPersonelDao, DqPers
String
id
=
(
String
)
params
.
get
(
"id"
);
QueryWrapper
<
DqPersonelEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
orderByDesc
(
"dq_region_id"
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
).
orderByDesc
(
"dq_region_id"
);
if
(
params
.
get
(
Constant
.
SQL_FILTER
)!=
null
){
wrapper
.
apply
(
params
.
get
(
Constant
.
SQL_FILTER
)
!=
null
,
params
.
get
(
Constant
.
SQL_FILTER
).
toString
());
}
return
wrapper
;
}
...
...
hmit-admin/src/main/java/io/hmit/modules/sys/controller/SysUserController.java
View file @
eff7a397
package
io
.
hmit
.
modules
.
sys
.
controller
;
import
io.hmit.common.annotation.DataFilter
;
import
io.hmit.common.annotation.LogOperation
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.exception.ErrorCode
;
...
...
@@ -62,6 +63,7 @@ public class SysUserController {
@ApiImplicitParam
(
name
=
"deptId"
,
value
=
"部门ID"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@RequiresPermissions
(
"sys:user:page"
)
@DataFilter
(
deptId
=
"dept_id"
)
public
Result
<
PageData
<
SysUserDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageData
<
SysUserDTO
>
page
=
sysUserService
.
page
(
params
);
...
...
@@ -128,7 +130,7 @@ public class SysUserController {
/* SM 登录加密 */
// 对密码解密
dto
.
setPassword
(
SMUtil
.
SMDecryptSM2AndSM4
(
dto
.
getKey
(),
dto
.
getPassword
()));
//
dto.setPassword(SMUtil.SMDecryptSM2AndSM4(dto.getKey(), dto.getPassword()));
/* ! SM 登录加密 */
sysUserService
.
save
(
dto
);
...
...
@@ -147,7 +149,7 @@ public class SysUserController {
/* SM 登录加密 */
// 对密码解密
dto
.
setPassword
(
SMUtil
.
SMDecryptSM2AndSM4
(
dto
.
getKey
(),
dto
.
getPassword
()));
//
dto.setPassword(SMUtil.SMDecryptSM2AndSM4(dto.getKey(), dto.getPassword()));
/* ! SM 登录加密 */
sysUserService
.
update
(
dto
);
...
...
hmit-admin/src/main/resources/mapper/dq/DqPersonelDao.xml
View file @
eff7a397
...
...
@@ -28,10 +28,10 @@
<insert
id=
"saveList"
>
INSERT INTO `dq_personel`(`name`,`idcard`,`idcard_type`,`community`,`address`,`dq_region_id`,
`mobile`,`type`,`status`,`age`,`body_status`,`data_status`) VALUES
`mobile`,`type`,`status`,`age`,`body_status`,`data_status`
,`dept_id`
) VALUES
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.name},#{item.idcard},#{item.idcardType},#{item.community},#{item.address},#{item.dqRegionId},#{item.mobile},
#{item.type},#{item.status},#{item.age},#{item.bodyStatus},#{item.dataStatus})
#{item.type},#{item.status},#{item.age},#{item.bodyStatus},#{item.dataStatus}
,#{item.deptId}
)
</foreach>
ON DUPLICATE KEY UPDATE
idcard = values(idcard)
...
...
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