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
9bfad430
Commit
9bfad430
authored
Sep 05, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.15-税友户配置拦截权限2
parent
ee025262
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
257 additions
and
55 deletions
+257
-55
UpmsDaprUtils.java
...fu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
+13
-1
HouseConfigConstants.java
...d/plus/v1/yifu/social/constants/HouseConfigConstants.java
+2
-1
SysHouseHoldInfoServiceImpl.java
...yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
+163
-46
UserController.java
...u/cloud/plus/v1/yifu/admin/controller/UserController.java
+14
-5
SysUserMapper.java
...m/yifu/cloud/plus/v1/yifu/admin/mapper/SysUserMapper.java
+4
-1
SysUserService.java
...yifu/cloud/plus/v1/yifu/admin/service/SysUserService.java
+4
-0
SysUserServiceImpl.java
...d/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
+29
-0
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+28
-1
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
View file @
9bfad430
...
@@ -185,7 +185,7 @@ public class UpmsDaprUtils {
...
@@ -185,7 +185,7 @@ public class UpmsDaprUtils {
/**
/**
* @param paramVo 用户IDList + 菜单Id
* @param paramVo 用户IDList + 菜单Id
* @Description: 判断用户是否有菜单
* @Description: 判断用户
的角色
是否有菜单
* @Author: hgw
* @Author: hgw
* @Date: 2025/9/4 16:09
* @Date: 2025/9/4 16:09
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo>
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo>
...
@@ -195,4 +195,16 @@ public class UpmsDaprUtils {
...
@@ -195,4 +195,16 @@ public class UpmsDaprUtils {
,
"/user/inner/judgeDispatchAudit"
,
paramVo
,
KeyValueReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/user/inner/judgeDispatchAudit"
,
paramVo
,
KeyValueReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
/**
* @param paramVo 用户IDList + 菜单Id
* @Description: 判断用户的权限(用户拼接用户组)是否有菜单
* @Author: hgw
* @Date: 2025/9/4 16:09
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo>
**/
public
R
<
KeyValueReturnVo
>
judgeDiyAuthMenuByUserId
(
ListAndStringVo
paramVo
)
{
return
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/user/inner/judgeDiyAuthMenuByUserId"
,
paramVo
,
KeyValueReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/constants/HouseConfigConstants.java
View file @
9bfad430
...
@@ -23,7 +23,8 @@ public class HouseConfigConstants {
...
@@ -23,7 +23,8 @@ public class HouseConfigConstants {
public
static
final
String
ERROR_TEMPLATE_THREE
=
"是否自动办理只能为【是】或者【否】"
;
public
static
final
String
ERROR_TEMPLATE_THREE
=
"是否自动办理只能为【是】或者【否】"
;
public
static
final
String
ERROR_TEMPLATE_FOUR
=
"未找到对应的审核人或办理人的人员信息"
;
public
static
final
String
ERROR_TEMPLATE_AUDIT_USER
=
"未找到对应的审核人信息"
;
public
static
final
String
ERROR_TEMPLATE_HANDLE_USER
=
"未找到对应的办理人信息"
;
public
static
final
String
ERROR_TEMPLATE_FIVE
=
"社保账户,社保密码和医保账户,医保密码的账号和密码必须都填写或者都不填写"
;
public
static
final
String
ERROR_TEMPLATE_FIVE
=
"社保账户,社保密码和医保账户,医保密码的账号和密码必须都填写或者都不填写"
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
View file @
9bfad430
...
@@ -179,9 +179,6 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -179,9 +179,6 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
**/
**/
private
String
judgeAuditAndHandleAuth
(
String
type
,
String
auditUser
,
String
auditUserName
,
String
handleUser
,
String
handleUserName
)
{
private
String
judgeAuditAndHandleAuth
(
String
type
,
String
auditUser
,
String
auditUserName
,
String
handleUser
,
String
handleUserName
)
{
List
<
String
>
userIdList
=
new
ArrayList
<>();
userIdList
.
add
(
auditUser
);
String
returnStr
=
""
;
String
returnStr
=
""
;
String
valueStr
;
String
valueStr
;
String
typeName
=
"社保"
;
String
typeName
=
"社保"
;
...
@@ -189,14 +186,19 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -189,14 +186,19 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
typeName
=
"公积金"
;
typeName
=
"公积金"
;
}
}
String
auditNo
=
"审核人("
+
auditUserName
+
")账号没有派单审核角色,不能授权为审核人,"
;
String
auditNo
=
"审核人("
+
auditUserName
+
")账号没有派单审核角色,不能授权为审核人,"
;
String
handleNo
=
"办理人("
+
auditUserName
+
")账号没有"
+
typeName
+
"的办理角色,不能授权为办理人,"
;
List
<
String
>
userIdList
=
new
ArrayList
<>();
// 1:角色菜单
// 派单审核
String
menuId
;
String
menuId
=
"1549677464986763265"
;
ListAndStringVo
paramVo
=
new
ListAndStringVo
();
ListAndStringVo
paramVo
=
new
ListAndStringVo
();
R
<
KeyValueReturnVo
>
returnVoR
;
// 1审核人:
if
(
Common
.
isNotNull
(
auditUser
))
{
userIdList
.
add
(
auditUser
);
// 【角色】的【派单审核】菜单
menuId
=
"1549677464986763265"
;
paramVo
.
setIdList
(
userIdList
);
paramVo
.
setIdList
(
userIdList
);
paramVo
.
setIdString
(
menuId
);
paramVo
.
setIdString
(
menuId
);
R
<
KeyValueReturnVo
>
returnVoR
=
upmsDaprUtils
.
judgeMenuByUserIdAndMenuId
(
paramVo
);
returnVoR
=
upmsDaprUtils
.
judgeMenuByUserIdAndMenuId
(
paramVo
);
if
(
returnVoR
!=
null
&&
returnVoR
.
getData
()
!=
null
&&
returnVoR
.
getData
().
getKeyValueMap
()
!=
null
&&
!
returnVoR
.
getData
().
getKeyValueMap
().
isEmpty
())
{
if
(
returnVoR
!=
null
&&
returnVoR
.
getData
()
!=
null
&&
returnVoR
.
getData
().
getKeyValueMap
()
!=
null
&&
!
returnVoR
.
getData
().
getKeyValueMap
().
isEmpty
())
{
valueStr
=
returnVoR
.
getData
().
getKeyValueMap
().
get
(
auditUser
);
valueStr
=
returnVoR
.
getData
().
getKeyValueMap
().
get
(
auditUser
);
if
(
Common
.
isEmpty
(
valueStr
)
||
CommonConstants
.
ZERO_STRING
.
equals
(
valueStr
))
{
if
(
Common
.
isEmpty
(
valueStr
)
||
CommonConstants
.
ZERO_STRING
.
equals
(
valueStr
))
{
...
@@ -206,6 +208,30 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -206,6 +208,30 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
returnStr
=
auditNo
;
returnStr
=
auditNo
;
}
}
auditNo
=
"审核人("
+
auditUserName
+
")账号没有派单审核用户组权限,不能授权为审核人,"
;
// 【数据权限】的【派单审核】菜单
menuId
=
"1549677464986763265"
;
paramVo
=
new
ListAndStringVo
();
paramVo
.
setIdList
(
userIdList
);
paramVo
.
setIdString
(
menuId
);
returnVoR
=
upmsDaprUtils
.
judgeDiyAuthMenuByUserId
(
paramVo
);
if
(
returnVoR
!=
null
&&
returnVoR
.
getData
()
!=
null
&&
returnVoR
.
getData
().
getKeyValueMap
()
!=
null
&&
!
returnVoR
.
getData
().
getKeyValueMap
().
isEmpty
())
{
valueStr
=
returnVoR
.
getData
().
getKeyValueMap
().
get
(
auditUser
);
if
(
Common
.
isEmpty
(
valueStr
)
||
CommonConstants
.
ZERO_STRING
.
equals
(
valueStr
))
{
returnStr
+=
auditNo
;
}
}
else
{
returnStr
+=
auditNo
;
}
}
// 2办理人
if
(
Common
.
isNotNull
(
auditUser
))
{
String
handleNo
=
"办理人("
+
handleUserName
+
")账号没有"
+
typeName
+
"的办理角色,不能授权为办理人,"
;
// 1:角色菜单
// 社保、公积金办理,换成用办理人查询:
// 社保、公积金办理,换成用办理人查询:
userIdList
=
new
ArrayList
<>();
userIdList
=
new
ArrayList
<>();
userIdList
.
add
(
handleUser
);
userIdList
.
add
(
handleUser
);
...
@@ -242,8 +268,44 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -242,8 +268,44 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
}
}
}
// TODO-2:数据权限菜单:
handleNo
=
"办理人("
+
handleUserName
+
")账号没有"
+
typeName
+
"的用户组权限,不能授权为办理人,"
;
// 社保、公积金办理,换成用办理人查询:
userIdList
=
new
ArrayList
<>();
userIdList
.
add
(
handleUser
);
// 社保办理
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
))
{
menuId
=
"1549678343483736066"
;
paramVo
=
new
ListAndStringVo
();
paramVo
.
setIdList
(
userIdList
);
paramVo
.
setIdString
(
menuId
);
returnVoR
=
upmsDaprUtils
.
judgeDiyAuthMenuByUserId
(
paramVo
);
if
(
returnVoR
!=
null
&&
returnVoR
.
getData
()
!=
null
&&
returnVoR
.
getData
().
getKeyValueMap
()
!=
null
&&
!
returnVoR
.
getData
().
getKeyValueMap
().
isEmpty
())
{
valueStr
=
returnVoR
.
getData
().
getKeyValueMap
().
get
(
handleUser
);
if
(
Common
.
isEmpty
(
valueStr
)
||
CommonConstants
.
ZERO_STRING
.
equals
(
valueStr
))
{
returnStr
+=
handleNo
;
}
}
else
{
returnStr
+=
handleNo
;
}
}
// 公积金办理
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
))
{
menuId
=
"1549678424018567170"
;
paramVo
=
new
ListAndStringVo
();
paramVo
.
setIdList
(
userIdList
);
paramVo
.
setIdString
(
menuId
);
returnVoR
=
upmsDaprUtils
.
judgeDiyAuthMenuByUserId
(
paramVo
);
if
(
returnVoR
!=
null
&&
returnVoR
.
getData
()
!=
null
&&
returnVoR
.
getData
().
getKeyValueMap
()
!=
null
&&
!
returnVoR
.
getData
().
getKeyValueMap
().
isEmpty
())
{
valueStr
=
returnVoR
.
getData
().
getKeyValueMap
().
get
(
handleUser
);
if
(
Common
.
isEmpty
(
valueStr
)
||
CommonConstants
.
ZERO_STRING
.
equals
(
valueStr
))
{
returnStr
+=
handleNo
;
}
}
else
{
returnStr
+=
handleNo
;
}
}
}
if
(
Common
.
isNotNull
(
returnStr
))
{
if
(
Common
.
isNotNull
(
returnStr
))
{
returnStr
+=
"请找管理员协助补足权限后重新授权。"
;
returnStr
+=
"请找管理员协助补足权限后重新授权。"
;
...
@@ -326,6 +388,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -326,6 +388,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if
(
isEdit
&&
(
Common
.
isEmpty
(
hold
.
getAuditUser
())
||
Common
.
isEmpty
(
hold
.
getHandleUser
())))
{
if
(
isEdit
&&
(
Common
.
isEmpty
(
hold
.
getAuditUser
())
||
Common
.
isEmpty
(
hold
.
getHandleUser
())))
{
return
R
.
failed
(
"审核人或办理人必填!"
);
return
R
.
failed
(
"审核人或办理人必填!"
);
}
}
// 判断审核人与办理人的权限:
String
judgeAuth
=
this
.
judgeAuditAndHandleAuth
(
hold
.
getType
()
,
hold
.
getAuditUser
(),
hold
.
getAuditUserName
()
,
hold
.
getHandleUser
(),
hold
.
getHandleUserName
());
if
(
Common
.
isNotNull
(
judgeAuth
))
{
return
R
.
failed
(
judgeAuth
);
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
hold
.
getDelFlag
())
if
(
CommonConstants
.
ONE_STRING
.
equals
(
hold
.
getDelFlag
())
&&
baseSetInfoMapper
.
selectCount
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
&&
baseSetInfoMapper
.
selectCount
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
holdInfo
.
getType
())
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
holdInfo
.
getType
())
...
@@ -570,11 +639,15 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -570,11 +639,15 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
String
errorMsg
;
String
errorMsg
;
// 个性化校验逻辑
// 个性化校验逻辑
// 执行数据插入操作组装
// 执行数据插入操作组装
TSocialHouseholdInsertVo
excel
;
SysHouseHoldInfo
household
;
// 判断户的审核人与办理人是否有对应的菜单和数据权限,有才可以,没有则不行
String
judgeAuth
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
TSocialHouseholdInsertVo
excel
=
excelVOList
.
get
(
i
);
excel
=
excelVOList
.
get
(
i
);
//所属机构去空
//所属机构去空
excel
.
setOrganName
(
excel
.
getOrganName
().
replace
(
" "
,
""
));
excel
.
setOrganName
(
excel
.
getOrganName
().
replace
(
" "
,
""
));
SysHouseHoldInfo
household
=
new
SysHouseHoldInfo
();
household
=
new
SysHouseHoldInfo
();
BeanCopyUtils
.
copyProperties
(
excel
,
household
);
BeanCopyUtils
.
copyProperties
(
excel
,
household
);
excel
.
setProvince
(
areaMap
.
get
(
excel
.
getProvince
()).
getAreaName
());
excel
.
setProvince
(
areaMap
.
get
(
excel
.
getProvince
()).
getAreaName
());
excel
.
setCity
(
areaMap
.
get
(
excel
.
getCity
()).
getAreaName
());
excel
.
setCity
(
areaMap
.
get
(
excel
.
getCity
()).
getAreaName
());
...
@@ -628,8 +701,20 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -628,8 +701,20 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
}
auditUser
=
userMap
.
get
(
excel
.
getAuditUserName
());
auditUser
=
userMap
.
get
(
excel
.
getAuditUserName
());
handlerUser
=
userMap
.
get
(
excel
.
getHandleUserName
());
handlerUser
=
userMap
.
get
(
excel
.
getHandleUserName
());
if
(
Common
.
isEmpty
(
auditUser
)
||
Common
.
isEmpty
(
handlerUser
))
{
if
(
Common
.
isEmpty
(
auditUser
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_FOUR
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_AUDIT_USER
,
excel
));
continue
;
}
if
(
Common
.
isEmpty
(
handlerUser
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_HANDLE_USER
,
excel
));
continue
;
}
// 判断审核人与办理人的权限:
judgeAuth
=
this
.
judgeAuditAndHandleAuth
(
CommonConstants
.
ZERO_STRING
,
auditUser
.
getUserId
(),
excel
.
getAuditUserName
()
,
handlerUser
.
getUserId
(),
excel
.
getHandleUserName
());
if
(
Common
.
isNotNull
(
judgeAuth
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
judgeAuth
,
excel
));
continue
;
continue
;
}
}
if
(
mobileCheck
(
excel
.
getPhone
()))
{
if
(
mobileCheck
(
excel
.
getPhone
()))
{
...
@@ -696,6 +781,10 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -696,6 +781,10 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
String
errorMsg
;
String
errorMsg
;
// 个性化校验逻辑
// 个性化校验逻辑
// 执行数据插入操作 组装
// 执行数据插入操作 组装
SysUser
auditUser
;
SysUser
handlerUser
;
// 判断户的审核人与办理人是否有对应的菜单和数据权限,有才可以,没有则不行
String
judgeAuth
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
TSocialHouseholdUpdateVo
excel
=
excelVOList
.
get
(
i
);
TSocialHouseholdUpdateVo
excel
=
excelVOList
.
get
(
i
);
info
=
this
.
getOne
(
Wrappers
.<
SysHouseHoldInfo
>
query
().
lambda
()
info
=
this
.
getOne
(
Wrappers
.<
SysHouseHoldInfo
>
query
().
lambda
()
...
@@ -770,11 +859,39 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -770,11 +859,39 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_FIVE
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_FIVE
,
excel
));
continue
;
continue
;
}
}
if
((
Common
.
isNotNull
(
excel
.
getAuditUserName
())
&&
Common
.
isEmpty
(
userMap
.
get
(
excel
.
getAuditUserName
())))
if
(
Common
.
isNotNull
(
excel
.
getAuditUserName
()))
{
||
(
Common
.
isNotNull
(
excel
.
getHandleUserName
())
&&
Common
.
isEmpty
(
userMap
.
get
(
excel
.
getHandleUserName
()))))
{
auditUser
=
userMap
.
get
(
excel
.
getAuditUserName
());
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_FOUR
,
excel
));
if
(
auditUser
==
null
||
Common
.
isEmpty
(
auditUser
.
getUserId
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_AUDIT_USER
,
excel
));
continue
;
}
else
{
// 判断审核人与办理人的权限:
judgeAuth
=
this
.
judgeAuditAndHandleAuth
(
CommonConstants
.
ZERO_STRING
,
auditUser
.
getUserId
(),
excel
.
getAuditUserName
()
,
null
,
null
);
if
(
Common
.
isNotNull
(
judgeAuth
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
judgeAuth
,
excel
));
continue
;
}
}
}
if
(
Common
.
isNotNull
(
excel
.
getHandleUserName
()))
{
handlerUser
=
userMap
.
get
(
excel
.
getHandleUserName
());
if
(
handlerUser
==
null
||
Common
.
isEmpty
(
handlerUser
.
getUserId
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_HANDLE_USER
,
excel
));
continue
;
continue
;
}
else
{
// 判断审核人与办理人的权限:
judgeAuth
=
this
.
judgeAuditAndHandleAuth
(
CommonConstants
.
ZERO_STRING
,
null
,
null
,
handlerUser
.
getUserId
(),
excel
.
getHandleUserName
()
);
if
(
Common
.
isNotNull
(
judgeAuth
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
judgeAuth
,
excel
));
continue
;
}
}
}
}
if
(
Common
.
isNotNull
(
excel
.
getPhone
())
&&
mobileCheck
(
excel
.
getPhone
()))
{
if
(
Common
.
isNotNull
(
excel
.
getPhone
())
&&
mobileCheck
(
excel
.
getPhone
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_EIGHT
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_TEMPLATE_EIGHT
,
excel
));
continue
;
continue
;
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/UserController.java
View file @
9bfad430
...
@@ -770,11 +770,9 @@ public class UserController {
...
@@ -770,11 +770,9 @@ public class UserController {
}
}
/**
/**
* @Author huych
* @Author hgw
* @Description 根据项目id和用户id查询csp部门信息
* @Description 判断用户的角色是否有菜单
* @Date 14:27 2025/3/10
* @Date 2025-9-5 10:00:19
* @Param
* @return
**/
**/
@Inner
@Inner
@PostMapping
(
"/inner/judgeDispatchAudit"
)
@PostMapping
(
"/inner/judgeDispatchAudit"
)
...
@@ -782,4 +780,15 @@ public class UserController {
...
@@ -782,4 +780,15 @@ public class UserController {
return
userService
.
judgeDispatchAudit
(
paramVo
);
return
userService
.
judgeDispatchAudit
(
paramVo
);
}
}
/**
* @Author hgw
* @Description 判断用户的权限(用户拼接用户组)是否有菜单
* @Date 2025-9-5 10:00:34
**/
@Inner
@PostMapping
(
"/inner/judgeDiyAuthMenuByUserId"
)
public
KeyValueReturnVo
judgeDiyAuthMenuByUserId
(
@RequestBody
ListAndStringVo
paramVo
)
{
return
userService
.
judgeDiyAuthMenuByUserId
(
paramVo
);
}
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/mapper/SysUserMapper.java
View file @
9bfad430
...
@@ -109,6 +109,9 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
...
@@ -109,6 +109,9 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
List
<
String
>
getCspUserByProjectNo
(
@Param
(
"projectNo"
)
String
projectNo
);
List
<
String
>
getCspUserByProjectNo
(
@Param
(
"projectNo"
)
String
projectNo
);
// 判断用户是否有菜单
// 判断用户
的角色
是否有菜单
List
<
KeyValueVo
>
judgeMenuByUserId
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"menuId"
)
String
menuId
);
List
<
KeyValueVo
>
judgeMenuByUserId
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"menuId"
)
String
menuId
);
// 判断用户的权限(用户拼接用户组)是否有菜单
List
<
KeyValueVo
>
judgeDiyAuthMenuByUserId
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"menuId"
)
String
menuId
);
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/SysUserService.java
View file @
9bfad430
...
@@ -215,5 +215,9 @@ public interface SysUserService extends IService<SysUser> {
...
@@ -215,5 +215,9 @@ public interface SysUserService extends IService<SysUser> {
SysCspDeptVo
selectCspDeptByUserDeptId
(
SysCspDeptVo
vo
);
SysCspDeptVo
selectCspDeptByUserDeptId
(
SysCspDeptVo
vo
);
// 判断用户的角色是否有菜单
KeyValueReturnVo
judgeDispatchAudit
(
ListAndStringVo
paramVo
);
KeyValueReturnVo
judgeDispatchAudit
(
ListAndStringVo
paramVo
);
// 判断用户的权限(用户拼接用户组)是否有菜单
KeyValueReturnVo
judgeDiyAuthMenuByUserId
(
ListAndStringVo
paramVo
);
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
9bfad430
...
@@ -1024,6 +1024,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -1024,6 +1024,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
return
vo
;
return
vo
;
}
}
/**
* @Description: 判断用户的角色是否有菜单
* @Author: hgw
* @Date: 2025/9/5 10:01
* @return: com.yifu.cloud.plus.v1.yifu.admin.api.vo.KeyValueReturnVo
**/
@Override
@Override
public
KeyValueReturnVo
judgeDispatchAudit
(
ListAndStringVo
paramVo
)
{
public
KeyValueReturnVo
judgeDispatchAudit
(
ListAndStringVo
paramVo
)
{
List
<
String
>
idList
=
paramVo
.
getIdList
();
List
<
String
>
idList
=
paramVo
.
getIdList
();
...
@@ -1034,6 +1040,29 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -1034,6 +1040,29 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
return
vo
;
return
vo
;
}
}
List
<
KeyValueVo
>
voList
=
baseMapper
.
judgeMenuByUserId
(
idList
,
menuId
);
List
<
KeyValueVo
>
voList
=
baseMapper
.
judgeMenuByUserId
(
idList
,
menuId
);
return
getKeyValueReturnVo
(
vo
,
voList
);
}
/**
* @Description: 判断用户的权限(用户拼接用户组)是否有菜单
* @Author: hgw
* @Date: 2025/9/5 10:01
* @return: com.yifu.cloud.plus.v1.yifu.admin.api.vo.KeyValueReturnVo
**/
@Override
public
KeyValueReturnVo
judgeDiyAuthMenuByUserId
(
ListAndStringVo
paramVo
)
{
List
<
String
>
idList
=
paramVo
.
getIdList
();
// 派单审核 menuId = "1549677464986763265"
String
menuId
=
paramVo
.
getIdString
();
KeyValueReturnVo
vo
=
new
KeyValueReturnVo
();
if
(
idList
==
null
||
idList
.
isEmpty
()
||
Common
.
isEmpty
(
menuId
))
{
return
vo
;
}
List
<
KeyValueVo
>
voList
=
baseMapper
.
judgeDiyAuthMenuByUserId
(
idList
,
menuId
);
return
getKeyValueReturnVo
(
vo
,
voList
);
}
private
KeyValueReturnVo
getKeyValueReturnVo
(
KeyValueReturnVo
vo
,
List
<
KeyValueVo
>
voList
)
{
if
(
voList
!=
null
&&
!
voList
.
isEmpty
())
{
if
(
voList
!=
null
&&
!
voList
.
isEmpty
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
for
(
KeyValueVo
keyValueVo
:
voList
)
{
for
(
KeyValueVo
keyValueVo
:
voList
)
{
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
9bfad430
...
@@ -415,7 +415,7 @@
...
@@ -415,7 +415,7 @@
) and a.del_flag='0'
) and a.del_flag='0'
</select>
</select>
<!-- 判断用户是否有菜单 -->
<!-- 判断用户是否有菜单
(用在户配置审核人办理人提交时的判断)
-->
<select
id=
"judgeMenuByUserId"
resultType=
"com.yifu.cloud.plus.v1.yifu.admin.api.vo.KeyValueVo"
>
<select
id=
"judgeMenuByUserId"
resultType=
"com.yifu.cloud.plus.v1.yifu.admin.api.vo.KeyValueVo"
>
select u.user_id keyStr,count(1) valueStr
select u.user_id keyStr,count(1) valueStr
from sys_user u
from sys_user u
...
@@ -431,4 +431,31 @@
...
@@ -431,4 +431,31 @@
and u.del_flag ='0' and r.del_flag='0' and m.del_flag='0'
and u.del_flag ='0' and r.del_flag='0' and m.del_flag='0'
GROUP BY u.user_id
GROUP BY u.user_id
</select>
</select>
<!-- 判断用户的数据权限是否有菜单(用在户配置审核人办理人提交时的判断) -->
<select
id=
"judgeDiyAuthMenuByUserId"
resultType=
"com.yifu.cloud.plus.v1.yifu.admin.api.vo.KeyValueVo"
>
select keyStr,count(1) valueStr from (
select
a.link_id keyStr
from sys_data_auth a
LEFT JOIN sys_diy_sql_menu_rel r on a.id=r.sys_data_auth_id
where a.link_type = '1' and r.menu_id = #{menuId}
and a.link_id in
<foreach
collection=
"idList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
union all
select
u.user_id keyStr
from sys_data_auth a
LEFT JOIN sys_diy_sql_menu_rel r on a.id=r.sys_data_auth_id
LEFT JOIN sys_user u on u.user_group=a.link_id
where a.link_type = '0' and r.menu_id = #{menuId}
and u.user_id in
<foreach
collection=
"idList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
) a
GROUP BY a.keyStr
</select>
</mapper>
</mapper>
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