Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
a87f1790
Commit
a87f1790
authored
Oct 27, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
c4619dde
72e032f0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
272 additions
and
478 deletions
+272
-478
TCutsomerDataPermisson.java
.../plus/v1/yifu/archives/entity/TCutsomerDataPermisson.java
+66
-95
TCutsomerDataPermissonController.java
...archives/controller/TCutsomerDataPermissonController.java
+27
-22
TCutsomerDataPermissonMapper.java
...v1/yifu/archives/mapper/TCutsomerDataPermissonMapper.java
+5
-15
TCutsomerDataPermissonService.java
.../yifu/archives/service/TCutsomerDataPermissonService.java
+11
-46
TCutsomerDataPermissonServiceImpl.java
...hives/service/impl/TCutsomerDataPermissonServiceImpl.java
+17
-139
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+23
-18
TCutsomerDataPermissonMapper.xml
...rc/main/resources/mapper/TCutsomerDataPermissonMapper.xml
+52
-125
UpmsDaprUtils.java
...fu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
+3
-2
TDispatchAuditExportVo.java
.../cloud/plus/v1/yifu/social/vo/TDispatchAuditExportVo.java
+24
-7
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+4
-2
SysUserListVo.java
...m/yifu.cloud.plus.v1/yifu/admin/api/vo/SysUserListVo.java
+19
-0
UserController.java
...u.cloud.plus.v1/yifu/admin/controller/UserController.java
+21
-7
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TCutsomerDataPermisson.java
View file @
a87f1790
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
/**
/**
...
@@ -21,106 +21,77 @@ import java.time.LocalDateTime;
...
@@ -21,106 +21,77 @@ import java.time.LocalDateTime;
* @date 2019-07-19 16:22:22
* @date 2019-07-19 16:22:22
*/
*/
@Data
@Data
@AllArgsConstructor
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_cutsomer_data_permisson"
)
@TableName
(
"t_cutsomer_data_permisson"
)
@Schema
(
description
=
"客户数据权限表"
)
@Schema
(
description
=
"客户数据权限表"
)
public
class
TCutsomerDataPermisson
extends
Model
<
TCutsomerDataPermisson
>
{
public
class
TCutsomerDataPermisson
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
,
name
=
"id"
)
@Schema
(
description
=
"主键"
,
name
=
"id"
)
private
String
id
;
private
String
id
;
/**
* 是否是数据所有者(0是1否)
@Length
(
max
=
1
,
message
=
"状态不能超过1个字符"
)
*/
@ExcelAttribute
(
name
=
"状态"
,
maxLength
=
1
)
@NotBlank
(
message
=
"是否是数据所有者(0是1否)不能为空"
)
@Schema
(
description
=
"状态0启用1禁用"
)
@Length
(
max
=
1
,
message
=
"是否是数据所有者(0是1否)不能超过1个字符"
)
private
String
status
;
@ExcelAttribute
(
name
=
"是否是数据所有者(0是1否)"
,
isNotEmpty
=
true
,
errorInfo
=
"是否是数据所有者(0是1否)不能为空"
,
maxLength
=
1
)
@Schema
(
description
=
"是否是数据所有者(0是1否)"
,
name
=
"isOwner"
)
@Length
(
max
=
32
,
message
=
"备注不能超过32个字符"
)
private
String
isOwner
;
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
32
)
/**
@Schema
(
description
=
"备注"
)
* 客户id
private
String
remark
;
*/
@Length
(
max
=
32
,
message
=
"客户id不能超过32个字符"
)
@ExcelAttribute
(
name
=
"客户id"
,
maxLength
=
32
)
@Schema
(
description
=
"客户id"
,
name
=
"customerId"
)
private
String
customerId
;
/**
* 合同主体id
*/
@Length
(
max
=
32
,
message
=
"合同主体id不能超过32个字符"
)
@ExcelAttribute
(
name
=
"合同主体id"
,
maxLength
=
32
)
@Schema
(
description
=
"合同主体id"
,
name
=
"contractId"
)
private
String
contractId
;
/**
* 项目id
*/
@Length
(
max
=
32
,
message
=
"项目id不能超过32个字符"
)
@Length
(
max
=
32
,
message
=
"项目id不能超过32个字符"
)
@ExcelAttribute
(
name
=
"项目id"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"项目id"
,
maxLength
=
32
)
@Schema
(
description
=
"项目id"
,
name
=
"settleDomainI
d"
)
@Schema
(
description
=
"项目i
d"
)
private
String
settleDomainId
;
private
String
settleDomainId
;
/**
* 授权来源
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
*/
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@NotBlank
(
message
=
"授权来源不能为空"
)
@Schema
(
description
=
"项目名称"
)
@Length
(
max
=
50
,
message
=
"授权来源不能超过50个字符"
)
private
String
settleDomainName
;
@ExcelAttribute
(
name
=
"授权来源"
,
isNotEmpty
=
true
,
errorInfo
=
"授权来源不能为空"
,
maxLength
=
50
)
@Schema
(
description
=
"授权来源"
,
name
=
"permissonSrc"
)
@Length
(
max
=
32
,
message
=
"项目编码不能超过32个字符"
)
private
String
permissonSrc
;
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
32
)
/**
@Schema
(
description
=
"项目编码"
)
* 授权等级
private
String
settleDomainNo
;
*/
@NotBlank
(
message
=
"授权等级不能为空"
)
@Schema
(
description
=
"创建人-姓名"
)
@ExcelAttribute
(
name
=
"授权等级"
,
isNotEmpty
=
true
,
errorInfo
=
"授权等级不能为空"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@Schema
(
description
=
"授权等级"
,
name
=
"permissonLevel"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
private
Integer
permissonLevel
;
@ExcelProperty
(
"创建人"
)
/**
private
String
createName
;
* 授权人
*/
@Schema
(
description
=
"创建人"
)
@NotBlank
(
message
=
"授权人不能为空"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@Length
(
max
=
32
,
message
=
"授权人不能超过32个字符"
)
@ExcelIgnore
@Schema
(
description
=
"授权人"
,
name
=
"permissionUser"
)
private
String
createBy
;
private
String
permissionUser
;
/**
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
* 被授权人
@Schema
(
description
=
"创建时间"
)
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@NotBlank
(
message
=
"被授权人不能为空"
)
@NotBlank
(
message
=
"被授权人不能为空"
)
@Length
(
max
=
32
,
message
=
"被授权人不能超过32个字符"
)
@Length
(
max
=
32
,
message
=
"被授权人不能超过32个字符"
)
@ExcelAttribute
(
name
=
"被授权人"
,
isNotEmpty
=
true
,
errorInfo
=
"被授权人不能为空"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"被授权人"
,
isNotEmpty
=
true
,
errorInfo
=
"被授权人不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"被授权人"
,
name
=
"bePermissonUser"
)
@Schema
(
description
=
"被授权人"
)
private
String
bePermissonUser
;
private
String
userId
;
/**
* 被授权时间
@ExcelAttribute
(
name
=
"登录名"
,
maxLength
=
50
)
*/
@Schema
(
description
=
"登录名"
)
@NotBlank
(
message
=
"被授权时间不能为空"
)
private
String
userLoginName
;
@ExcelAttribute
(
name
=
"被授权时间"
,
isNotEmpty
=
true
,
errorInfo
=
"被授权时间不能为空"
)
@Schema
(
description
=
"被授权时间"
,
name
=
"bePermissionTime"
)
@ExcelAttribute
(
name
=
"用户名称"
,
maxLength
=
50
)
private
LocalDateTime
bePermissionTime
;
@Schema
(
description
=
"用户名称(汉字)"
)
/**
private
String
userNickName
;
* 备注
*/
@Length
(
max
=
50
,
message
=
"备注不能超过50个字符"
)
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
50
)
@Schema
(
description
=
"备注"
,
name
=
"remark"
)
private
String
remark
;
@Length
(
max
=
1
,
message
=
"是否是客服不能超过1个字符"
)
@ExcelAttribute
(
name
=
"所在部门"
,
maxLength
=
50
)
@Schema
(
description
=
"
是否是客服(0是1否)"
,
name
=
"isCustomerService
"
)
@Schema
(
description
=
"
所在部门
"
)
private
String
isCustomerServic
e
;
private
String
userDeptNam
e
;
@Schema
(
description
=
"类型0:客户1:合同2:项目"
,
name
=
"type"
)
@ExcelIgnore
@Schema
(
description
=
"授权来源0ekp,1mvp,2mvp复制"
,
name
=
"type"
)
private
String
type
;
private
String
type
;
/**
* 无参构造方法
* @Author pwang
* @Date 2019-11-15 12:12
* @param
* @return
**/
public
TCutsomerDataPermisson
(){
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCutsomerDataPermissonController.java
View file @
a87f1790
...
@@ -6,9 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -6,9 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCutsomerDataPermissonService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCutsomerDataPermissonService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
@@ -20,6 +18,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
...
@@ -20,6 +18,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
/**
/**
...
@@ -45,9 +44,21 @@ public class TCutsomerDataPermissonController {
...
@@ -45,9 +44,21 @@ public class TCutsomerDataPermissonController {
*/
*/
@Operation
(
description
=
"简单分页查询"
)
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TCutsomerDataPermisson
Vo
>>
getTCutsomerDataPermissonPage
(
Page
<
TCutsomerDataPermissonVo
>
page
,
TCutsomerDataPermissonVo
tCutsomerDataPermisson
)
{
public
R
<
IPage
<
TCutsomerDataPermisson
>>
getTCutsomerDataPermissonPage
(
Page
<
TCutsomerDataPermisson
>
page
,
TCutsomerDataPermisson
tCutsomerDataPermisson
)
{
return
new
R
<>(
tCutsomerDataPermissonService
.
getTCutsomerDataPermissonPage
(
page
,
tCutsomerDataPermisson
));
return
new
R
<>(
tCutsomerDataPermissonService
.
getTCutsomerDataPermissonPage
(
page
,
tCutsomerDataPermisson
));
}
}
/**
* 导出list
* @param tCutsomerDataPermisson 客户数据权限表
* @return
*/
@Operation
(
description
=
"导出的list"
)
@GetMapping
(
"/getList"
)
public
R
<
List
<
TCutsomerDataPermisson
>>
getTCutsomerDataPermissonList
(
TCutsomerDataPermisson
tCutsomerDataPermisson
)
{
return
new
R
<>(
tCutsomerDataPermissonService
.
getTCutsomerDataPermissonList
(
tCutsomerDataPermisson
));
}
/**
/**
* @Author fxj
* @Author fxj
* @Description 获取实体的权限: type-类型0:客户1:合同2:项目(不传默认2项目)
* @Description 获取实体的权限: type-类型0:客户1:合同2:项目(不传默认2项目)
...
@@ -55,21 +66,11 @@ public class TCutsomerDataPermissonController {
...
@@ -55,21 +66,11 @@ public class TCutsomerDataPermissonController {
* @Param
* @Param
* @return
* @return
**/
**/
@Operation
(
description
=
"获取实体的权限:
type-类型0:客户1:合同2:项目(不传默认2项目)
"
)
@Operation
(
description
=
"获取实体的权限:
默认项目
"
)
@GetMapping
(
"/getPermissonByTypeAndId"
)
@GetMapping
(
"/getPermissonByTypeAndId"
)
public
R
<
IPage
<
TCutsomerDataPermisson
>>
getTCutsomerDataPermissonByTypeAndId
(
String
id
,
String
type
)
{
public
R
<
IPage
<
TCutsomerDataPermisson
>>
getTCutsomerDataPermissonByTypeAndId
(
@RequestParam
String
settleDomainId
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"实体id"
);
}
TCutsomerDataPermisson
tp
=
new
TCutsomerDataPermisson
();
TCutsomerDataPermisson
tp
=
new
TCutsomerDataPermisson
();
tp
.
setSettleDomainId
(
settleDomainId
);
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
type
)){
tp
.
setCustomerId
(
id
);
}
else
if
(
CommonConstants
.
dingleDigitStrArray
[
1
].
equals
(
type
)){
tp
.
setContractId
(
id
);
}
else
{
tp
.
setSettleDomainId
(
id
);
}
return
new
R
(
tCutsomerDataPermissonService
.
list
(
Wrappers
.
lambdaQuery
(
tp
)));
return
new
R
(
tCutsomerDataPermissonService
.
list
(
Wrappers
.
lambdaQuery
(
tp
)));
}
}
...
@@ -83,7 +84,7 @@ public class TCutsomerDataPermissonController {
...
@@ -83,7 +84,7 @@ public class TCutsomerDataPermissonController {
@Operation
(
description
=
"权限复制 权限同项目分配客服(wxhr:tsettledomain_assign_customerservice)"
)
@Operation
(
description
=
"权限复制 权限同项目分配客服(wxhr:tsettledomain_assign_customerservice)"
)
@GetMapping
(
"/copy"
)
@GetMapping
(
"/copy"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tsettledomain_assign_customerservice')"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tsettledomain_assign_customerservice')"
)
public
R
insertForCopyCutsomerDataPermisson
(
String
[]
srcUser
,
String
[]
beUser
)
{
public
R
<
String
>
insertForCopyCutsomerDataPermisson
(
String
[]
srcUser
,
String
[]
beUser
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
R
result
=
tCutsomerDataPermissonService
.
insertForCopyCutsomerDataPermisson
(
srcUser
,
beUser
,
user
);
R
result
=
tCutsomerDataPermissonService
.
insertForCopyCutsomerDataPermisson
(
srcUser
,
beUser
,
user
);
if
(
CommonConstants
.
SUCCESS
.
equals
(
result
.
getCode
())){
//权限刷新
if
(
CommonConstants
.
SUCCESS
.
equals
(
result
.
getCode
())){
//权限刷新
...
@@ -112,7 +113,9 @@ public class TCutsomerDataPermissonController {
...
@@ -112,7 +113,9 @@ public class TCutsomerDataPermissonController {
@SysLog
(
"新增客户数据权限表"
)
@SysLog
(
"新增客户数据权限表"
)
@PostMapping
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:tcutsomerdatapermisson_add')"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tcutsomerdatapermisson_add')"
)
public
R
save
(
@RequestBody
TCutsomerDataPermisson
tCutsomerDataPermisson
){
public
R
<
Boolean
>
save
(
@RequestBody
TCutsomerDataPermisson
tCutsomerDataPermisson
){
YifuUser
user
=
SecurityUtils
.
getUser
();
settleDomainService
.
removeSettleCache
(
user
,
Arrays
.
asList
(
tCutsomerDataPermisson
.
getUserId
()));
return
new
R
<>(
tCutsomerDataPermissonService
.
save
(
tCutsomerDataPermisson
));
return
new
R
<>(
tCutsomerDataPermissonService
.
save
(
tCutsomerDataPermisson
));
}
}
...
@@ -125,7 +128,9 @@ public class TCutsomerDataPermissonController {
...
@@ -125,7 +128,9 @@ public class TCutsomerDataPermissonController {
@SysLog
(
"修改客户数据权限表"
)
@SysLog
(
"修改客户数据权限表"
)
@PutMapping
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:tcutsomerdatapermisson_edit')"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tcutsomerdatapermisson_edit')"
)
public
R
update
(
@RequestBody
TCutsomerDataPermisson
tCutsomerDataPermisson
){
public
R
<
Boolean
>
update
(
@RequestBody
TCutsomerDataPermisson
tCutsomerDataPermisson
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
settleDomainService
.
removeSettleCache
(
user
,
Arrays
.
asList
(
tCutsomerDataPermisson
.
getUserId
()));
return
new
R
<>(
tCutsomerDataPermissonService
.
updateById
(
tCutsomerDataPermisson
));
return
new
R
<>(
tCutsomerDataPermissonService
.
updateById
(
tCutsomerDataPermisson
));
}
}
...
@@ -138,14 +143,14 @@ public class TCutsomerDataPermissonController {
...
@@ -138,14 +143,14 @@ public class TCutsomerDataPermissonController {
@SysLog
(
"删除客户数据权限表"
)
@SysLog
(
"删除客户数据权限表"
)
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tcutsomerdatapermisson_del')"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tcutsomerdatapermisson_del')"
)
public
R
removeById
(
@PathVariable
String
id
){
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
){
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
TCutsomerDataPermisson
tdp
=
tCutsomerDataPermissonService
.
getById
(
id
);
TCutsomerDataPermisson
tdp
=
tCutsomerDataPermissonService
.
getById
(
id
);
if
(
null
==
tdp
){
if
(
null
==
tdp
){
return
new
R
<>(
"权限已删除!"
);
return
new
R
<>(
true
);
}
}
//刷新缓存
//刷新缓存
settleDomainService
.
removeSettleCache
(
user
,
Arrays
.
asList
(
tdp
.
get
BePermissonUser
()));
settleDomainService
.
removeSettleCache
(
user
,
Arrays
.
asList
(
tdp
.
get
UserId
()));
return
new
R
<>(
tCutsomerDataPermissonService
.
removeById
(
id
));
return
new
R
<>(
tCutsomerDataPermissonService
.
removeById
(
id
));
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TCutsomerDataPermissonMapper.java
View file @
a87f1790
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -16,24 +18,16 @@ import java.util.List;
...
@@ -16,24 +18,16 @@ import java.util.List;
*/
*/
@Mapper
@Mapper
public
interface
TCutsomerDataPermissonMapper
extends
BaseMapper
<
TCutsomerDataPermisson
>
{
public
interface
TCutsomerDataPermissonMapper
extends
BaseMapper
<
TCutsomerDataPermisson
>
{
/**
* 分页count
* @Author pwang
* @Date 2020-06-28 15:25
* @param tCutsomerDataPermisson
* @return
**/
long
getTCutsomerDataPermissonPageCount
(
@Param
(
"tCutsomerDataPermisson"
)
TCutsomerDataPermisson
tCutsomerDataPermisson
);
/**
/**
* 客户数据权限表简单分页查询
* 客户数据权限表简单分页查询
* @param tCutsomerDataPermisson 客户数据权限表
* @param tCutsomerDataPermisson 客户数据权限表
* @return
* @return
*/
*/
List
<
TCutsomerDataPermissonVo
>
getTCutsomerDataPermissonPage
(
@Param
(
"tCutsomerDataPermisson"
)
TCutsomerDataPermissonVo
tCutsomerDataPermisson
,
@Param
(
"page"
)
Long
page
,
@Param
(
"size"
)
Long
size
);
IPage
<
TCutsomerDataPermisson
>
getTCutsomerDataPermissonPage
(
Page
<
TCutsomerDataPermisson
>
page
,
@Param
(
"tCutsomerDataPermisson"
)
TCutsomerDataPermisson
tCutsomerDataPermisson
);
List
<
TCutsomerDataPermisson
>
getTCutsomerDataPermissonPage
(
@Param
(
"tCutsomerDataPermisson"
)
TCutsomerDataPermisson
tCutsomerDataPermisson
);
String
getOwnerIdByIdAndType
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"type"
)
int
type
);
/**
/**
* 获取当前登录人拥有的所有项目权限
* 获取当前登录人拥有的所有项目权限
...
@@ -43,8 +37,4 @@ public interface TCutsomerDataPermissonMapper extends BaseMapper<TCutsomerDataPe
...
@@ -43,8 +37,4 @@ public interface TCutsomerDataPermissonMapper extends BaseMapper<TCutsomerDataPe
* @return
* @return
**/
**/
List
<
TCutsomerDataPermisson
>
selectAllSettleDomainPermissionByUserId
(
@Param
(
"userId"
)
String
userId
);
List
<
TCutsomerDataPermisson
>
selectAllSettleDomainPermissionByUserId
(
@Param
(
"userId"
)
String
userId
);
String
getCustomerServiceByid
(
@Param
(
"id"
)
String
id
);
String
getUserByid
(
@Param
(
"settleId"
)
String
settleId
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TCutsomerDataPermissonService.java
View file @
a87f1790
...
@@ -8,6 +8,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo;
...
@@ -8,6 +8,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
java.util.List
;
/**
/**
* 客户数据权限表
* 客户数据权限表
*
*
...
@@ -21,44 +23,17 @@ public interface TCutsomerDataPermissonService extends IService<TCutsomerDataPer
...
@@ -21,44 +23,17 @@ public interface TCutsomerDataPermissonService extends IService<TCutsomerDataPer
* @param tCutsomerDataPermisson 客户数据权限表
* @param tCutsomerDataPermisson 客户数据权限表
* @return
* @return
*/
*/
IPage
<
TCutsomerDataPermissonVo
>
getTCutsomerDataPermissonPage
(
Page
<
TCutsomerDataPermissonVo
>
page
,
TCutsomerDataPermissonVo
tCutsomerDataPermisson
);
IPage
<
TCutsomerDataPermisson
>
getTCutsomerDataPermissonPage
(
Page
<
TCutsomerDataPermisson
>
page
,
TCutsomerDataPermisson
tCutsomerDataPermisson
);
/**
* 查询数据所有者id
* @Author pwang
* @Date 2019-07-24 15:31
* @param domainId 实体id
* @param type 实体类型0:单位1:部门2:项目
* @return 返回数据所有者的id串
**/
String
findOwnerIdByIdAndType
(
String
domainId
,
int
type
);
/**
* 查询数据所有者
* @Author pwang
* @Date 2019-07-24 15:31
* @param domainId 实体id
* @param type 实体类型0:单位1:部门2:项目
* @return 返回数据所有者
**/
YifuUser
findOwnerByIdAndType
(
String
domainId
,
int
type
);
// /**
// * 获取当前登录人拥有的所有项目权限
// * @Author fxj
// * @Date 2019-08-26
// * @param userId
// * @return
// **/
// List<TCutsomerDataPermisson> selectAllSettleDomainPermissionByUserId(int userId);
String
getCustomerServiceByid
(
String
id
);
/**
/**
*
获取所有有权限的用户
*
@param tCutsomerDataPermisson
* @
Author pwang
* @
Description: 导出获取list
* @
Date 2019-11-28 14:54
* @
Author: hgw
* @
param settleId
* @
Date: 2022/10/26 17:23
* @return
* @return
: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson>
**/
**/
String
getUserByid
(
String
settleId
);
List
<
TCutsomerDataPermisson
>
getTCutsomerDataPermissonList
(
TCutsomerDataPermisson
tCutsomerDataPermisson
);
/**
/**
* 权限复制 将srcUserList里面的所有用户权限(表)赋给 beUser 所有人
* 权限复制 将srcUserList里面的所有用户权限(表)赋给 beUser 所有人
* @Author pwang
* @Author pwang
...
@@ -68,15 +43,5 @@ public interface TCutsomerDataPermissonService extends IService<TCutsomerDataPer
...
@@ -68,15 +43,5 @@ public interface TCutsomerDataPermissonService extends IService<TCutsomerDataPer
* @param user user授权人
* @param user user授权人
* @return
* @return
**/
**/
R
insertForCopyCutsomerDataPermisson
(
String
[]
srcUserList
,
String
[]
beUser
,
YifuUser
user
);
R
<
String
>
insertForCopyCutsomerDataPermisson
(
String
[]
srcUserList
,
String
[]
beUser
,
YifuUser
user
);
/**
* 专用方法 不建议调用 存在sql注入风险
* @Author pwang
* @Date 2020-07-02 19:00
* @param sql
* @param beUser
* @param user
* @return
**/
R
insertCutsomerDataPermissonBySql
(
String
sql
,
String
beUser
,
YifuUser
user
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCutsomerDataPermissonServiceImpl.java
View file @
a87f1790
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
a87f1790
...
@@ -21,8 +21,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -21,8 +21,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TCutsomerDataPermissonMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TCutsomerDataPermissonMapper
;
...
@@ -169,11 +171,11 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
...
@@ -169,11 +171,11 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
}
// 处理服务团队数据权限 2022-09-19 fxj
// 处理服务团队数据权限 2022-09-19 fxj
if
(
Common
.
isNotNull
(
tSettleDomain
.
getServiceTeam
())){
if
(
Common
.
isNotNull
(
tSettleDomain
.
getServiceTeam
())){
R
<
AllUserNa
Vo
>
res
=
upmsDaprUtils
.
getUserIdsByUserNames
(
tSettleDomain
.
getServiceTeam
());
R
<
SysUserList
Vo
>
res
=
upmsDaprUtils
.
getUserIdsByUserNames
(
tSettleDomain
.
getServiceTeam
());
if
(
Common
.
isNotNull
(
res
)
&&
Common
.
isNotNull
(
res
.
getData
())
&&
Common
.
isNotNull
(
res
.
getData
().
getUser
Ids
())){
if
(
Common
.
isNotNull
(
res
)
&&
Common
.
isNotNull
(
res
.
getData
())
&&
Common
.
isNotNull
(
res
.
getData
().
getUser
List
())){
// 先清理缓存
// 先清理缓存
this
.
removeSettleCache
(
null
,
res
.
getData
().
getUserIds
());
this
.
removeSettleCache
(
null
,
res
.
getData
().
getUserIds
());
saveForEkp
(
res
.
getData
().
getUser
Ids
(),
tSettleDomain
.
getId
()
);
saveForEkp
(
res
.
getData
().
getUser
List
(),
tSettleDomain
);
}
}
}
}
tSettleDomain
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
tSettleDomain
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
...
@@ -206,25 +208,28 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
...
@@ -206,25 +208,28 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
* @Param
* @Param
* @return
* @return
**/
**/
public
boolean
saveForEkp
(
List
<
S
tring
>
userIds
,
String
domainId
){
public
boolean
saveForEkp
(
List
<
S
ysUser
>
userIds
,
TSettleDomain
domain
){
// 1. 先清除现有的这些
认
的项目权限
// 1. 先清除现有的这些
人
的项目权限
permissonMapper
.
delete
(
Wrappers
.<
TCutsomerDataPermisson
>
query
().
lambda
()
permissonMapper
.
delete
(
Wrappers
.<
TCutsomerDataPermisson
>
query
().
lambda
()
.
in
(
TCutsomerDataPermisson:
:
get
BePermissonUser
,
userIds
)
.
in
(
TCutsomerDataPermisson:
:
get
UserId
,
userIds
)
.
eq
(
TCutsomerDataPermisson:
:
getSettleDomainId
,
domain
Id
));
.
eq
(
TCutsomerDataPermisson:
:
getSettleDomainId
,
domain
.
getId
()
));
// 2.新增新的项目人员权限
// 2.新增新的项目人员权限
TCutsomerDataPermisson
pm
;
TCutsomerDataPermisson
pm
;
if
(
Common
.
isNotNull
(
userIds
)){
if
(
Common
.
isNotNull
(
userIds
))
{
for
(
S
tring
uId:
userIds
){
for
(
S
ysUser
user
:
userIds
){
pm
=
new
TCutsomerDataPermisson
();
pm
=
new
TCutsomerDataPermisson
();
pm
.
setIsCustomerService
(
CommonConstants
.
ZERO_STRING
);
pm
.
setStatus
(
CommonConstants
.
ZERO_STRING
);
pm
.
setIsOwner
(
CommonConstants
.
ONE_STRING
);
pm
.
setUserId
(
user
.
getUserId
());
pm
.
setPermissonSrc
(
"EKP服务团队"
);
pm
.
setUserLoginName
(
user
.
getUsername
());
pm
.
setPermissonLevel
(
CommonConstants
.
ONE_INT
);
pm
.
setUserNickName
(
user
.
getNickname
());
pm
.
setBePermissonUser
(
uId
);
pm
.
setUserDeptName
(
user
.
getDeptName
());
pm
.
setBePermissionTime
(
LocalDateTime
.
now
());
pm
.
setCreateTime
(
LocalDateTime
.
now
());
pm
.
setSettleDomainId
(
domainId
);
pm
.
setSettleDomainId
(
domain
.
getId
());
pm
.
setPermissionUser
(
CommonConstants
.
ONE_STRING
);
pm
.
setSettleDomainName
(
domain
.
getDepartName
());
pm
.
setType
(
CommonConstants
.
TWO_STRING
);
pm
.
setSettleDomainNo
(
domain
.
getDepartNo
());
pm
.
setCreateBy
(
CommonConstants
.
ONE_STRING
);
pm
.
setCreateName
(
"EKP同步"
);
pm
.
setType
(
CommonConstants
.
ZERO_STRING
);
permissonMapper
.
insert
(
pm
);
permissonMapper
.
insert
(
pm
);
}
}
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCutsomerDataPermissonMapper.xml
View file @
a87f1790
...
@@ -6,145 +6,72 @@
...
@@ -6,145 +6,72 @@
<resultMap
id=
"tCutsomerDataPermissonMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson"
>
<resultMap
id=
"tCutsomerDataPermissonMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson"
>
<id
property=
"id"
column=
"ID"
/>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"isOwner"
column=
"IS_OWNER
"
/>
<result
property=
"status"
column=
"STATUS
"
/>
<result
property=
"c
ontractId"
column=
"CONTRACT_ID
"
/>
<result
property=
"c
reateBy"
column=
"CREATE_BY
"
/>
<result
property=
"c
ustomerId"
column=
"CUSTOMER_ID
"
/>
<result
property=
"c
reateName"
column=
"CREATE_NAME
"
/>
<result
property=
"
permissonSrc"
column=
"PERMISSON_SRC
"
/>
<result
property=
"
createTime"
column=
"CREATE_TIME
"
/>
<result
property=
"
permissonLevel"
column=
"PERMISSON_LEVEL
"
/>
<result
property=
"
userId"
column=
"USER_ID
"
/>
<result
property=
"
permissionUser"
column=
"PERMISSION_USER
"
/>
<result
property=
"
userLoginName"
column=
"USER_LOGIN_NAME
"
/>
<result
property=
"
bePermissonUser"
column=
"BE_PERMISSON_USER
"
/>
<result
property=
"
userNickName"
column=
"USER_NICK_NAME
"
/>
<result
property=
"
bePermissionTime"
column=
"BE_PERMISSION_TI
ME"
/>
<result
property=
"
userDeptName"
column=
"USER_DEPT_NA
ME"
/>
<result
property=
"remark"
column=
"REMARK"
/>
<result
property=
"remark"
column=
"REMARK"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"settleDomainId"
column=
"SETTLE_DOMAIN_ID"
/>
<result
property=
"settleDomainId"
column=
"SETTLE_DOMAIN_ID"
/>
</resultMap>
<result
property=
"settleDomainName"
column=
"SETTLE_DOMAIN_NAME"
/>
<resultMap
id=
"tCutsomerDataPermissonMapVo"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo"
>
<result
property=
"settleDomainNo"
column=
"SETTLE_DOMAIN_NO"
/>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"isOwner"
column=
"IS_OWNER"
/>
<result
property=
"contractId"
column=
"CONTRACT_ID"
/>
<result
property=
"customerId"
column=
"CUSTOMER_ID"
/>
<result
property=
"permissonSrc"
column=
"PERMISSON_SRC"
/>
<result
property=
"permissonLevel"
column=
"PERMISSON_LEVEL"
/>
<result
property=
"permissionUser"
column=
"PERMISSION_USER"
/>
<result
property=
"bePermissonUser"
column=
"BE_PERMISSON_USER"
/>
<result
property=
"bePermissionTime"
column=
"BE_PERMISSION_TIME"
/>
<result
property=
"remark"
column=
"REMARK"
/>
<result
property=
"settleDomainId"
column=
"SETTLE_DOMAIN_ID"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"permissionUserName"
column=
"nickname"
/>
</resultMap>
</resultMap>
<sql
id=
"base_column_list"
>
<sql
id=
"base_column_list"
>
a.ID,
a.ID
a.IS_OWNER,
,a.STATUS
a.CONTRACT_ID,
,a.REMARK
a.CUSTOMER_ID,
,a.SETTLE_DOMAIN_ID
a.PERMISSON_SRC,
,a.CREATE_BY
a.PERMISSON_LEVEL,
,a.CREATE_NAME
a.PERMISSION_USER,
,a.CREATE_TIME
a.BE_PERMISSON_USER,
,a.USER_ID
a.BE_PERMISSION_TIME,
,a.USER_LOGIN_NAME
a.REMARK,
,a.USER_NICK_NAME
a.SETTLE_DOMAIN_ID,
,a.USER_DEPT_NAME
a.type
,a.TYPE
,a.SETTLE_DOMAIN_NAME
,a.SETTLE_DOMAIN_NO
</sql>
</sql>
<sql
id=
"where_getTCutsomerDataPermissonPage"
>
<sql
id=
"where_getTCutsomerDataPermissonPage"
>
<if
test=
"tCutsomerDataPermisson.bePermissonUser != null and tCutsomerDataPermisson.bePermissonUser.trim() != ''"
>
<if
test=
"tCutsomerDataPermisson != null"
>
AND a.BE_PERMISSON_USER = #{tCutsomerDataPermisson.bePermissonUser}
<if
test=
"tCutsomerDataPermisson.userNickName != null and tCutsomerDataPermisson.userNickName.trim() != ''"
>
</if>
AND a.USER_NICK_NAME like concat('%',#{tCutsomerDataPermisson.userNickName},'%')
<if
test=
"tCutsomerDataPermisson.type != null and tCutsomerDataPermisson.type.trim() != ''"
>
AND a.type = #{tCutsomerDataPermisson.type}
</if>
</if>
<if
test=
"tCutsomerDataPermisson.name != null and tCutsomerDataPermisson.n
ame.trim() != ''"
>
<if
test=
"tCutsomerDataPermisson.userLoginName != null and tCutsomerDataPermisson.userLoginN
ame.trim() != ''"
>
AND a.name like '%${tCutsomerDataPermisson.name}%'
AND a.USER_LOGIN_NAME like concat('%',#{tCutsomerDataPermisson.userLoginName},'%')
</if>
</if>
<if
test=
"tCutsomerDataPermisson.id != null and tCutsomerDataPermisson.id
.trim() != ''"
>
<if
test=
"tCutsomerDataPermisson.userDeptName != null and tCutsomerDataPermisson.userDeptName
.trim() != ''"
>
AND a.ID = #{tCutsomerDataPermisson.id}
AND a.USER_DEPT_NAME like concat('%',#{tCutsomerDataPermisson.userDeptName},'%')
</if>
</if>
<if
test=
"tCutsomerDataPermisson.isOwner != null and tCutsomerDataPermisson.isOwner
.trim() != ''"
>
<if
test=
"tCutsomerDataPermisson.status != null and tCutsomerDataPermisson.status
.trim() != ''"
>
AND a.IS_OWNER = #{tCutsomerDataPermisson.isOwner
}
AND a.STATUS = #{tCutsomerDataPermisson.status
}
</if>
</if>
<if
test=
"tCutsomerDataPermisson.permissonSrc != null and tCutsomerDataPermisson.permissonSrc
.trim() != ''"
>
<if
test=
"tCutsomerDataPermisson.settleDomainName != null and tCutsomerDataPermisson.settleDomainName
.trim() != ''"
>
AND a.PERMISSON_SRC = #{tCutsomerDataPermisson.permissonSrc}
AND a.SETTLE_DOMAIN_NAME like '%${tCutsomerDataPermisson.settleDomainName}%'
</if>
</if>
<if
test=
"tCutsomerDataPermisson.permissonLevel != null and tCutsomerDataPermisson.permissonLevel
.trim() != ''"
>
<if
test=
"tCutsomerDataPermisson.settleDomainNo != null and tCutsomerDataPermisson.settleDomainNo
.trim() != ''"
>
AND a.PERMISSON_LEVEL = #{tCutsomerDataPermisson.permissonLevel}
AND a.SETTLE_DOMAIN_NO like '%${tCutsomerDataPermisson.settleDomainNo}%'
</if>
</if>
<if
test=
"tCutsomerDataPermisson.permissionUser != null and tCutsomerDataPermisson.permissionUser.trim() != ''"
>
AND a.PERMISSION_USER = #{tCutsomerDataPermisson.permissionUser}
</if>
<if
test=
"tCutsomerDataPermisson.bePermissionTime != null and tCutsomerDataPermisson.bePermissionTime.trim() != ''"
>
AND a.BE_PERMISSION_TIME = #{tCutsomerDataPermisson.bePermissionTime}
</if>
<if
test=
"tCutsomerDataPermisson.remark != null and tCutsomerDataPermisson.remark.trim() != ''"
>
AND a.REMARK = #{tCutsomerDataPermisson.remark}
</if>
</if>
</sql>
</sql>
<select
id=
"getTCutsomerDataPermissonPageCount"
resultType=
"java.lang.Long"
>
<!--分页查询-->
SELECT
<select
id=
"getTCutsomerDataPermissonPage"
resultMap=
"tCutsomerDataPermissonMap"
>
count(1)
FROM view_cutsomer_permisson a
where 1=1
<include
refid=
"where_getTCutsomerDataPermissonPage"
/>
</select>
<!--查询-->
<select
id=
"getTCutsomerDataPermissonPage"
resultMap=
"tCutsomerDataPermissonMapVo"
>
SELECT
SELECT
<include
refid=
"base_column_list"
/>
<include
refid=
"base_column_list"
/>
,a.name
from t_cutsomer_data_permisson a
,u.nickname
from view_cutsomer_permisson a
left join yifu_cloud.sys_user u on a.PERMISSION_USER = u.user_id
where 1=1
where 1=1
<include
refid=
"where_getTCutsomerDataPermissonPage"
/>
<include
refid=
"where_getTCutsomerDataPermissonPage"
/>
ORDER BY a.BE_PERMISSION_TIME DESC
ORDER BY a.CREATE_TIME DESC
<if
test=
"null != page and null != size"
>
limit #{page},#{size}
</if>
</select>
<select
id=
"getOwnerIdByIdAndType"
resultType=
"java.lang.String"
>
SELECT BE_PERMISSON_USER FROM t_cutsomer_data_permisson
WHERE IS_OWNER = '0'
<if
test=
"0==type"
>
AND CUSTOMER_ID = '${domainId}'
</if>
<if
test=
"1==type"
>
AND CONTRACT_ID = '${domainId}'
</if>
<if
test=
"2==type"
>
AND SETTLE_DOMAIN_ID = '${domainId}'
</if>
ORDER BY BE_PERMISSION_TIME ASC
limit 1
</select>
</select>
<!-- 获取当前登录人拥有的所有项目权限 -->
<!-- 获取当前登录人拥有的所有项目权限 -->
<select
id=
"selectAllSettleDomainPermissionByUserId"
resultMap=
"tCutsomerDataPermissonMap"
>
<select
id=
"selectAllSettleDomainPermissionByUserId"
resultMap=
"tCutsomerDataPermissonMap"
>
SELECT
SELECT
<include
refid=
"base_column_list"
/>
<include
refid=
"base_column_list"
/>
FROM t_cutsomer_data_permisson a
FROM t_cutsomer_data_permisson a
WHERE 1=1
WHERE a.STATUS = '0' and a.USER_ID = #{userId}
AND SETTLE_DOMAIN_ID IS NOT NULL
AND BE_PERMISSON_USER = '${userId}'
</select>
</select>
<select
id=
"getCustomerServiceByid"
resultType=
"java.lang.String"
>
SELECT
GROUP_CONCAT(distinct BE_PERMISSON_USER )
FROM
t_cutsomer_data_permisson
WHERE
IS_CUSTOMER_SERVICE = '0'
AND SETTLE_DOMAIN_ID = '${id}'
</select>
<select
id=
"getUserByid"
resultType=
"java.lang.String"
>
SELECT
GROUP_CONCAT(distinct BE_PERMISSON_USER )
FROM
t_cutsomer_data_permisson
WHERE
SETTLE_DOMAIN_ID = '${settleId}'
</select>
</mapper>
</mapper>
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
View file @
a87f1790
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
@@ -59,8 +60,8 @@ public class UpmsDaprUtils {
...
@@ -59,8 +60,8 @@ public class UpmsDaprUtils {
* @Param
* @Param
* @return
* @return
**/
**/
public
R
<
AllUserNa
Vo
>
getUserIdsByUserNames
(
String
usernames
)
{
public
R
<
SysUserList
Vo
>
getUserIdsByUserNames
(
String
usernames
)
{
R
<
AllUserNaVo
>
allUserVoR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
(),
"/user/inner/getUserIdsByUserNames"
,
usernames
,
AllUserNa
Vo
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
SysUserListVo
>
allUserVoR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
(),
"/user/inner/getUserIdsByUserNames"
,
usernames
,
SysUserList
Vo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
allUserVoR
)){
if
(
Common
.
isEmpty
(
allUserVoR
)){
return
R
.
failed
(
"获取指定用户名对应用户IDs失败!"
);
return
R
.
failed
(
"获取指定用户名对应用户IDs失败!"
);
}
}
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchAuditExportVo.java
View file @
a87f1790
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
...
@@ -51,12 +52,6 @@ public class TDispatchAuditExportVo {
...
@@ -51,12 +52,6 @@ public class TDispatchAuditExportVo {
@ExcelProperty
(
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
private
String
empIdcard
;
@ExcelAttribute
(
name
=
"员工类型"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@Schema
(
description
=
"员工类型"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工类型"
)
private
String
empType
;
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@Schema
(
description
=
"客户名称"
)
@Schema
(
description
=
"客户名称"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
...
@@ -90,6 +85,7 @@ public class TDispatchAuditExportVo {
...
@@ -90,6 +85,7 @@ public class TDispatchAuditExportVo {
/**
/**
* 合同起始时间
* 合同起始时间
*/
*/
@DateTimeFormat
(
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"合同起始时间"
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"合同起始时间"
,
isDate
=
true
)
@Schema
(
description
=
"合同起始时间"
)
@Schema
(
description
=
"合同起始时间"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
...
@@ -107,6 +103,7 @@ public class TDispatchAuditExportVo {
...
@@ -107,6 +103,7 @@ public class TDispatchAuditExportVo {
/**
/**
* 合同到期时间
* 合同到期时间
*/
*/
@DateTimeFormat
(
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"合同到期时间"
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"合同到期时间"
,
isDate
=
true
)
@Schema
(
description
=
"合同到期时间"
)
@Schema
(
description
=
"合同到期时间"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
...
@@ -163,6 +160,7 @@ public class TDispatchAuditExportVo {
...
@@ -163,6 +160,7 @@ public class TDispatchAuditExportVo {
/**
/**
* 离职日期
* 离职日期
*/
*/
@DateTimeFormat
(
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"离职日期"
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"离职日期"
,
isDate
=
true
)
@Schema
(
description
=
"离职日期"
)
@Schema
(
description
=
"离职日期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
...
@@ -176,10 +174,28 @@ public class TDispatchAuditExportVo {
...
@@ -176,10 +174,28 @@ public class TDispatchAuditExportVo {
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"减少原因"
)
@ExcelProperty
(
"减少原因"
)
private
String
reduceReason
;
private
String
reduceReason
;
/**
* 社保起缴日期
*/
@DateTimeFormat
(
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"社保起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"社保起缴日期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保起缴日期"
)
private
Date
socialStartDate
;
/**
* 公积金起缴日期
*/
@DateTimeFormat
(
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"公积金起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"公积金起缴日期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金起缴日期"
)
private
Date
providentStart
;
/**
/**
* 社保停缴日期
* 社保停缴日期
*/
*/
@DateTimeFormat
(
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"社保停缴日期"
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"社保停缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"社保停缴日期"
)
@Schema
(
description
=
"社保停缴日期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
...
@@ -189,6 +205,7 @@ public class TDispatchAuditExportVo {
...
@@ -189,6 +205,7 @@ public class TDispatchAuditExportVo {
/**
/**
* 公积金停缴日期
* 公积金停缴日期
*/
*/
@DateTimeFormat
(
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"公积金停缴日期"
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"公积金停缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"公积金停缴日期"
)
@Schema
(
description
=
"公积金停缴日期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
a87f1790
...
@@ -148,7 +148,6 @@
...
@@ -148,7 +148,6 @@
<resultMap
id=
"exportAuditMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchAuditExportVo"
>
<resultMap
id=
"exportAuditMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchAuditExportVo"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empType"
column=
"EMP_TYPE"
/>
<result
property=
"belongUnitName"
column=
"BELONG_UNIT_NAME"
/>
<result
property=
"belongUnitName"
column=
"BELONG_UNIT_NAME"
/>
<result
property=
"settleDomainName"
column=
"SETTLE_DOMAIN_NAME"
/>
<result
property=
"settleDomainName"
column=
"SETTLE_DOMAIN_NAME"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"type"
column=
"TYPE"
/>
...
@@ -178,7 +177,9 @@
...
@@ -178,7 +177,9 @@
<result
property=
"personalUnemploymentCardinal"
column=
"PERSONAL_UNEMPLOYMENT_CARDINAL"
/>
<result
property=
"personalUnemploymentCardinal"
column=
"PERSONAL_UNEMPLOYMENT_CARDINAL"
/>
<result
property=
"personalBigailmentMoney"
column=
"PERSONAL_BIGAILMENT_MONEY"
/>
<result
property=
"personalBigailmentMoney"
column=
"PERSONAL_BIGAILMENT_MONEY"
/>
<result
property=
"unitBigailmentMoney"
column=
"UNIT_BIGAILMENT_MONEY"
/>
<result
property=
"unitBigailmentMoney"
column=
"UNIT_BIGAILMENT_MONEY"
/>
<result
property=
"socialStartDate"
column=
"SOCIAL_START_DATE"
/>
<result
property=
"providentStart"
column=
"PROVIDENT_START"
/>
<result
property=
"unitProvidengCardinal"
column=
"UNIT_PROVIDENG_CARDINAL"
/>
<result
property=
"unitProvidengCardinal"
column=
"UNIT_PROVIDENG_CARDINAL"
/>
<result
property=
"personalProvidentCardinal"
column=
"PERSONAL_PROVIDENT_CARDINAL"
/>
<result
property=
"personalProvidentCardinal"
column=
"PERSONAL_PROVIDENT_CARDINAL"
/>
<result
property=
"unitProvidentPer"
column=
"UNIT_PROVIDENT_PER"
/>
<result
property=
"unitProvidentPer"
column=
"UNIT_PROVIDENT_PER"
/>
...
@@ -613,7 +614,6 @@
...
@@ -613,7 +614,6 @@
select
select
a.EMP_NAME,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_IDCARD,
a.EMP_TYPE,
a.BELONG_UNIT_NAME,
a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SETTLE_DOMAIN_NAME,
a.TYPE,
a.TYPE,
...
@@ -630,6 +630,7 @@
...
@@ -630,6 +630,7 @@
a.FUND_REDUCE_DATE,
a.FUND_REDUCE_DATE,
a.LEAVE_DATE,
a.LEAVE_DATE,
a.REDUCE_REASON,
a.REDUCE_REASON,
b.SOCIAL_START_DATE,
b.PAYMENT_TYPE,
b.PAYMENT_TYPE,
b.RECORD_BASE,
b.RECORD_BASE,
b.UNIT_PENSION_CARDINAL,
b.UNIT_PENSION_CARDINAL,
...
@@ -643,6 +644,7 @@
...
@@ -643,6 +644,7 @@
b.PERSONAL_BIGAILMENT_MONEY,
b.PERSONAL_BIGAILMENT_MONEY,
b.UNIT_BIGAILMENT_MONEY,
b.UNIT_BIGAILMENT_MONEY,
c.UNIT_PROVIDENG_CARDINAL,
c.UNIT_PROVIDENG_CARDINAL,
c.PROVIDENT_START,
c.PERSONAL_PROVIDENT_CARDINAL,
c.PERSONAL_PROVIDENT_CARDINAL,
c.UNIT_PROVIDENT_PER,
c.UNIT_PROVIDENT_PER,
c.PERSONAL_PROVIDENT_PER
c.PERSONAL_PROVIDENT_PER
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/vo/SysUserListVo.java
0 → 100644
View file @
a87f1790
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author Hgw
* @Date 2022-10-26 17:09:09
* @Description
* @Version 1.0
*/
@Data
public
class
SysUserListVo
implements
Serializable
{
private
List
<
SysUser
>
userList
;
private
List
<
String
>
userIds
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/UserController.java
View file @
a87f1790
...
@@ -25,10 +25,7 @@ import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
...
@@ -25,10 +25,7 @@ import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserDTO
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserDTO
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserInfoVO
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysUserService
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysUserService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
...
@@ -304,8 +301,8 @@ public class UserController {
...
@@ -304,8 +301,8 @@ public class UserController {
**/
**/
@Inner
@Inner
@PostMapping
(
value
=
{
"/inner/getUserIdsByUserNames"
})
@PostMapping
(
value
=
{
"/inner/getUserIdsByUserNames"
})
public
AllUserNa
Vo
getUserIdsByUserNames
(
@RequestBody
String
usernames
)
{
public
SysUserList
Vo
getUserIdsByUserNames
(
@RequestBody
String
usernames
)
{
AllUserNaVo
naVo
=
new
AllUserNa
Vo
();
SysUserListVo
naVo
=
new
SysUserList
Vo
();
if
(
Common
.
isEmpty
(
usernames
)){
if
(
Common
.
isEmpty
(
usernames
)){
return
naVo
;
return
naVo
;
}
}
...
@@ -315,9 +312,9 @@ public class UserController {
...
@@ -315,9 +312,9 @@ public class UserController {
List
<
String
>
userIds
=
new
ArrayList
<>();
List
<
String
>
userIds
=
new
ArrayList
<>();
for
(
SysUser
u:
sysUsers
){
for
(
SysUser
u:
sysUsers
){
userIds
.
add
(
u
.
getUserId
());
userIds
.
add
(
u
.
getUserId
());
}
}
naVo
.
setUserIds
(
userIds
);
naVo
.
setUserIds
(
userIds
);
naVo
.
setUserList
(
sysUsers
);
}
}
return
naVo
;
return
naVo
;
}
}
...
@@ -362,4 +359,21 @@ public class UserController {
...
@@ -362,4 +359,21 @@ public class UserController {
}
}
return
userIds
.
toString
();
return
userIds
.
toString
();
}
}
/**
* @param nickName 用户名称
* @return 上级部门用户列表
*/
@GetMapping
(
"/getSysUserList"
)
@Operation
(
summary
=
"获取所有系统人员"
,
description
=
"获取所有系统人员"
)
public
R
<
List
<
SysUser
>>
getSysUserList
(
@RequestParam
(
required
=
false
)
String
nickName
)
{
List
<
SysUser
>
sysUserList
;
if
(
Common
.
isNotNull
(
nickName
))
{
sysUserList
=
userService
.
list
(
Wrappers
.<
SysUser
>
query
().
lambda
().
like
(
SysUser:
:
getNickname
,
nickName
));
}
else
{
sysUserList
=
userService
.
list
();
}
return
R
.
ok
(
sysUserList
);
}
}
}
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