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
b48a0c2a
Commit
b48a0c2a
authored
Feb 19, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提供角色类表接口
parent
6ba0fda2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
1733 additions
and
111 deletions
+1733
-111
DaprPermissionProperties.java
.../v1/yifu/common/dapr/config/DaprPermissionProperties.java
+39
-0
PermissionDaprUtil.java
...oud/plus/v1/yifu/common/dapr/util/PermissionDaprUtil.java
+34
-0
spring.factories
...-common-dapr/src/main/resources/META-INF/spring.factories
+1
-0
PersonVo.java
.../yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
+5
-0
PersonAttributesMapper.java
...us/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
+3
-0
SysUserRoleRes.java
.../cloud/plus/v1/yifu/permission/entity/SysUserRoleRes.java
+10
-0
SysUserRoleResController.java
...us/v1/permission/controller/SysUserRoleResController.java
+15
-0
SysRoleInfoMapper.java
...fu/cloud/plus/v1/permission/mapper/SysRoleInfoMapper.java
+2
-2
SysUserInfoMapper.java
...fu/cloud/plus/v1/permission/mapper/SysUserInfoMapper.java
+1
-1
SysUserRoleResMapper.java
...cloud/plus/v1/permission/mapper/SysUserRoleResMapper.java
+1
-1
SysRoleInfoService.java
.../cloud/plus/v1/permission/service/SysRoleInfoService.java
+2
-2
SysUserRoleResService.java
...oud/plus/v1/permission/service/SysUserRoleResService.java
+3
-0
SysRoleInfoServiceImpl.java
...us/v1/permission/service/impl/SysRoleInfoServiceImpl.java
+2
-2
SysUserInfoServiceImpl.java
...us/v1/permission/service/impl/SysUserInfoServiceImpl.java
+5
-4
SysUserRoleResServiceImpl.java
...v1/permission/service/impl/SysUserRoleResServiceImpl.java
+11
-2
SysRoleInfoMapper.xml
...ssion-biz/src/main/resources/mapper/SysRoleInfoMapper.xml
+1
-1
SysUserInfoMapper.xml
...ssion-biz/src/main/resources/mapper/SysUserInfoMapper.xml
+2
-2
SysUserRoleResMapper.xml
...on-biz/src/main/resources/mapper/SysUserRoleResMapper.xml
+2
-1
TDispatchSocialFundInfo.java
...d/plus/v1/yifu/social/entity/TDispatchSocialFundInfo.java
+1241
-0
TSocialFundInfo.java
...ifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
+9
-0
DispatchDetailVo.java
...m/yifu/cloud/plus/v1/yifu/social/vo/DispatchDetailVo.java
+5
-4
TDispatchSocialFundInfoController.java
.../social/controller/TDispatchSocialFundInfoController.java
+39
-0
TDispatchSocialFundInfoMapper.java
.../v1/yifu/social/mapper/TDispatchSocialFundInfoMapper.java
+33
-0
TDispatchSocialFundInfoService.java
...1/yifu/social/service/TDispatchSocialFundInfoService.java
+31
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+53
-5
TDispatchSocialFundInfoServiceImpl.java
...cial/service/impl/TDispatchSocialFundInfoServiceImpl.java
+39
-0
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+85
-79
HcmInitRoleInfoVo.java
...fu.cloud.plus.v1/yifu/admin/api/vo/HcmInitRoleInfoVo.java
+21
-0
SysUserServiceImpl.java
...d/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
+38
-5
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/config/DaprPermissionProperties.java
0 → 100644
View file @
b48a0c2a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
/**
* @Author huyc
* @Date 2024-1-31 15:38:08
* @Description
* @Version 1.0
*/
@Data
@Component
@PropertySource
(
"classpath:daprConfig.properties"
)
@ConfigurationProperties
(
value
=
"dapr.permission"
,
ignoreInvalidFields
=
false
)
public
class
DaprPermissionProperties
{
/*
* @author fxj
* @date 14:34
* @Description dapr sidercar url 如:http://localhost:3005/v1.0/invoke/
**/
String
appUrl
;
/*
* @author fxj
* @date 14:35
* @decription app_id 如:"yifu_upms_sider"
**/
String
appId
;
String
appPort
;
String
httpPort
;
String
grpcPort
;
String
metricsPort
;
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/PermissionDaprUtil.java
0 → 100644
View file @
b48a0c2a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.HcmInitRoleInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprPermissionProperties
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
/**
* @Author huyc
* @Date 2024-01-31
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties
(
DaprPermissionProperties
.
class
)
public
class
PermissionDaprUtil
{
@Autowired
private
DaprPermissionProperties
daprProperties
;
/**
* @Author huyc
* @Description 新增用户初始化角色信息
* @Date 2024/1/31
* @Param
* @return
**/
public
void
saveSysUserRole
(
HcmInitRoleInfoVo
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/sysuserroleres/inner/saveSysUserRole"
,
JSON
.
toJSONString
(
infoVo
),
Object
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
yifu-common/yifu-common-dapr/src/main/resources/META-INF/spring.factories
View file @
b48a0c2a
...
...
@@ -5,4 +5,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.PermissionDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
View file @
b48a0c2a
...
...
@@ -67,6 +67,11 @@ public class PersonVo {
@Attribute
(
name
=
"userPassword"
)
private
String
password
;
/**
* 用户角色
*/
@Attribute
(
name
=
"x-init-role-ids"
)
private
String
roleIds
;
/**
* 创建时间
...
...
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
View file @
b48a0c2a
...
...
@@ -28,6 +28,9 @@ public class PersonAttributesMapper implements AttributesMapper<PersonVo> {
if
(
null
!=
attributes
.
get
(
"ou"
))
{
personVo
.
setDeptName
((
String
)
attributes
.
get
(
"ou"
).
get
());
}
if
(
null
!=
attributes
.
get
(
"x-init-role-ids"
))
{
personVo
.
setRoleIds
((
String
)
attributes
.
get
(
"x-init-role-ids"
).
get
());
}
return
personVo
;
}
}
yifu-permission/yifu-permission-api/src/main/java/com/yifu/cloud/plus/v1/yifu/permission/entity/SysUserRoleRes.java
View file @
b48a0c2a
...
...
@@ -64,6 +64,16 @@ public class SysUserRoleRes {
@Schema
(
description
=
"角色ID"
)
private
String
roleId
;
/**
* 登录名
*/
@ExcelAttribute
(
name
=
"登录名"
,
isNotEmpty
=
true
,
errorInfo
=
"登录名不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"登录名"
)
@Length
(
max
=
50
,
message
=
"登录名不能超过50个字符"
)
@ExcelProperty
(
"登录名"
)
@Schema
(
description
=
"登录名"
)
private
String
loginName
;
@TableField
(
exist
=
false
)
private
String
roleName
;
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/controller/SysUserRoleResController.java
View file @
b48a0c2a
...
...
@@ -3,8 +3,10 @@ package com.yifu.cloud.plus.v1.permission.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.permission.service.SysUserRoleResService
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.HcmInitRoleInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes
;
import
com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
...
...
@@ -121,4 +123,17 @@ public class SysUserRoleResController {
return
R
.
ok
(
sysUserRoleResService
.
removeById
(
fdId
));
}
/**
* @param vo
* @Description: 新增用户角色信息
* @Author: huyc
* @Date: 2024/2/18
* @return:
**/
@Inner
@PostMapping
(
"/inner/saveSysUserRole"
)
public
void
saveSysUserRole
(
@RequestBody
HcmInitRoleInfoVo
vo
)
{
sysUserRoleResService
.
saveSysUserRole
(
vo
);
}
}
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/mapper/SysRoleInfoMapper.java
View file @
b48a0c2a
...
...
@@ -51,13 +51,13 @@ public interface SysRoleInfoMapper extends BaseMapper<SysRoleInfo> {
List
<
String
>
getRoleDataAuthByRoleId
(
@Param
(
"roleIdList"
)
List
<
String
>
roleIdList
);
/**
* @param
userId
* @param
loginName
* @Description: 获取账号的所有权限
* @Author: hgw
* @Date: 2023/9/8 9:22
* @return: java.util.List<java.lang.String>
**/
List
<
String
>
getAllRoleDataAuthByUserId
(
@Param
(
"
userId"
)
String
userId
);
List
<
String
>
getAllRoleDataAuthByUserId
(
@Param
(
"
loginName"
)
String
loginName
);
/**
* @param roleName
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/mapper/SysUserInfoMapper.java
View file @
b48a0c2a
...
...
@@ -51,7 +51,7 @@ public interface SysUserInfoMapper extends BaseMapper<SysUserInfo> {
List
<
SysUserInfo
>
getEkpUser
();
List
<
SysUserRoleRes
>
getResAndRoleNameUserId
(
@Param
(
"
userId"
)
String
userId
);
List
<
SysUserRoleRes
>
getResAndRoleNameUserId
(
@Param
(
"
loginName"
)
String
loginName
);
/**
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/mapper/SysUserRoleResMapper.java
View file @
b48a0c2a
...
...
@@ -49,7 +49,7 @@ public interface SysUserRoleResMapper extends BaseMapper<SysUserRoleRes> {
**/
List
<
String
>
getSysUserByRoleId
(
@Param
(
"roleId"
)
String
roleId
);
boolean
deleteByUserId
(
@Param
(
"
userId"
)
String
userId
);
boolean
deleteByUserId
(
@Param
(
"
loginName"
)
String
loginName
);
boolean
deleteByRoleId
(
@Param
(
"roleId"
)
String
roleId
);
}
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/SysRoleInfoService.java
View file @
b48a0c2a
...
...
@@ -62,13 +62,13 @@ public interface SysRoleInfoService extends IService<SysRoleInfo> {
List
<
SysRoleInfo
>
noPageDiy
(
SysRoleInfoSearchVo
searchVo
);
/**
* @param
userId
* @param
loginName
* @Description: 各种角色的权限融合
* @Author: hgw
* @Date: 2023/8/30 18:06
* @return: java.lang.String
**/
String
getAllRoleDataAuthByUserId
(
String
userId
);
String
getAllRoleDataAuthByUserId
(
String
loginName
);
/**
* @param roleIdList
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/SysUserRoleResService.java
View file @
b48a0c2a
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.permission.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.HcmInitRoleInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes
;
import
com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo
;
...
...
@@ -52,4 +53,6 @@ public interface SysUserRoleResService extends IService<SysUserRoleRes> {
**/
boolean
deleteByRoleId
(
String
roleId
);
void
saveSysUserRole
(
HcmInitRoleInfoVo
vo
);
}
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysRoleInfoServiceImpl.java
View file @
b48a0c2a
...
...
@@ -137,8 +137,8 @@ public class SysRoleInfoServiceImpl extends ServiceImpl<SysRoleInfoMapper, SysRo
}
@Override
public
String
getAllRoleDataAuthByUserId
(
String
userId
)
{
List
<
String
>
authList
=
baseMapper
.
getAllRoleDataAuthByUserId
(
userId
);
public
String
getAllRoleDataAuthByUserId
(
String
loginName
)
{
List
<
String
>
authList
=
baseMapper
.
getAllRoleDataAuthByUserId
(
loginName
);
return
this
.
getAuths
(
authList
);
}
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysUserInfoServiceImpl.java
View file @
b48a0c2a
...
...
@@ -124,11 +124,11 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
SysUserInfoSaveVo
vo
=
new
SysUserInfoSaveVo
();
SysUserInfo
user
=
this
.
getById
(
fdId
);
if
(
user
!=
null
&&
Common
.
isNotNull
(
user
.
getFdId
()))
{
List
<
SysUserRoleRes
>
resList
=
baseMapper
.
getResAndRoleNameUserId
(
user
.
getFd
Id
());
List
<
SysUserRoleRes
>
resList
=
baseMapper
.
getResAndRoleNameUserId
(
user
.
getFd
LoginName
());
vo
.
setUser
(
user
);
if
(
resList
!=
null
&&
!
resList
.
isEmpty
())
{
// 各种角色的权限融合
String
dataAuth
=
sysRoleInfoService
.
getAllRoleDataAuthByUserId
(
user
.
getFd
Id
());
String
dataAuth
=
sysRoleInfoService
.
getAllRoleDataAuthByUserId
(
user
.
getFd
LoginName
());
vo
.
setDataAuth
(
dataAuth
);
}
vo
.
setResList
(
resList
);
...
...
@@ -148,12 +148,13 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
SysUserInfo
user
=
vo
.
getUser
();
List
<
SysUserRoleRes
>
resList
=
vo
.
getResList
();
if
(
user
!=
null
&&
Common
.
isNotNull
(
user
.
getFdName
())
&&
resList
!=
null
&&
!
resList
.
isEmpty
())
{
if
(
Common
.
isNotNull
(
user
.
getFd
Id
()))
{
sysUserRoleResService
.
deleteByUserId
(
user
.
getFd
Id
());
if
(
Common
.
isNotNull
(
user
.
getFd
LoginName
()))
{
sysUserRoleResService
.
deleteByUserId
(
user
.
getFd
LoginName
());
}
this
.
saveOrUpdate
(
user
);
for
(
SysUserRoleRes
res
:
resList
)
{
res
.
setUserId
(
user
.
getFdId
());
res
.
setLoginName
(
user
.
getFdLoginName
());
}
sysUserRoleResService
.
saveBatch
(
resList
);
return
R
.
ok
(
"保存成功"
);
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysUserRoleResServiceImpl.java
View file @
b48a0c2a
...
...
@@ -22,7 +22,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.permission.mapper.SysUserRoleResMapper
;
import
com.yifu.cloud.plus.v1.permission.service.SysUserRoleResService
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.HcmInitRoleInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes
;
import
com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -76,8 +78,8 @@ public class SysUserRoleResServiceImpl extends ServiceImpl<SysUserRoleResMapper,
}
@Override
public
boolean
deleteByUserId
(
String
userId
)
{
return
baseMapper
.
deleteByUserId
(
userId
);
public
boolean
deleteByUserId
(
String
loginName
)
{
return
baseMapper
.
deleteByUserId
(
loginName
);
}
@Override
...
...
@@ -85,6 +87,13 @@ public class SysUserRoleResServiceImpl extends ServiceImpl<SysUserRoleResMapper,
return
baseMapper
.
deleteByRoleId
(
roleId
);
}
@Override
public
void
saveSysUserRole
(
HcmInitRoleInfoVo
vo
)
{
SysUserRoleRes
roleRes
=
new
SysUserRoleRes
();
BeanCopyUtils
.
copyProperties
(
vo
,
roleRes
);
baseMapper
.
insert
(
roleRes
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
SysUserRoleResSearchVo
entity
)
{
LambdaQueryWrapper
<
SysUserRoleRes
>
wrapper
=
Wrappers
.
lambdaQuery
();
return
wrapper
;
...
...
yifu-permission/yifu-permission-biz/src/main/resources/mapper/SysRoleInfoMapper.xml
View file @
b48a0c2a
...
...
@@ -116,7 +116,7 @@
a.data_auth
FROM sys_role_info a
left join sys_user_role_res r on r.role_id = a.fd_id
where a.delete_flag = 0 and r.
user_id = #{userId
}
where a.delete_flag = 0 and r.
login_name = #{loginName
}
</select>
<!-- 根据角色Id获取所有的角色的权限-->
...
...
yifu-permission/yifu-permission-biz/src/main/resources/mapper/SysUserInfoMapper.xml
View file @
b48a0c2a
...
...
@@ -119,7 +119,7 @@
SELECT
<include
refid=
"Base_Column_List"
/>
FROM sys_user_info a
LEFT JOIN sys_user_role_res res on a.fd_
id=res.user_id
LEFT JOIN sys_user_role_res res on a.fd_
login_name=res.login_name
LEFT JOIN sys_role_info r on res.role_id=r.fd_id and r.delete_flag = 0 and r.status = 0
<where>
1=1
...
...
@@ -153,7 +153,7 @@
,r.role_name as roleName
FROM sys_user_role_res a
LEFT JOIN sys_role_info r on a.role_id=r.fd_id and r.delete_flag = 0 and r.status = 0
where a.
user_id=#{userId
}
where a.
login_name=#{loginName
}
</select>
<!--给EKP用的,获取列表是否全量的权限-->
...
...
yifu-permission/yifu-permission-biz/src/main/resources/mapper/SysUserRoleResMapper.xml
View file @
b48a0c2a
...
...
@@ -31,6 +31,7 @@
<sql
id=
"Base_Column_List"
>
a.fd_id,
a.user_id,
a.login_name,
a.role_id
</sql>
<sql
id=
"sysUserRoleRes_where"
>
...
...
@@ -68,7 +69,7 @@
<!-- 根据账号删除关联表 -->
<delete
id=
"deleteByUserId"
>
delete from sys_user_role_res where
user_id = #{userId
}
delete from sys_user_role_res where
login_name = #{loginName
}
</delete>
<!-- 根据角色删除关联表 -->
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchSocialFundInfo.java
0 → 100644
View file @
b48a0c2a
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
View file @
b48a0c2a
...
...
@@ -1212,6 +1212,15 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelProperty
(
"公积金状态"
)
private
String
fundStatus
;
/**
* 社保公积金查询的快照id
*/
@ExcelAttribute
(
name
=
"社保公积金查询的快照id"
,
maxLength
=
32
)
@Schema
(
description
=
"社保公积金查询的快照id"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保公积金查询的快照id"
)
private
String
reduceSocialFundId
;
/**
* 派单ID (实时更新)
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/DispatchDetailVo.java
View file @
b48a0c2a
...
...
@@ -3,10 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
lombok.Data
;
import
java.io.Serializable
;
...
...
@@ -40,6 +37,10 @@ public class DispatchDetailVo implements Serializable {
* 社保
**/
private
TSocialInfo
social
;
/**
* 社保
**/
private
TDispatchSocialFundInfo
dispatchSocial
;
/**
* 公积金
**/
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchSocialFundInfoController.java
0 → 100644
View file @
b48a0c2a
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2024-02-01 11:38:05
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tsocialfundinfo"
)
@Tag
(
name
=
"社保公积金查询表管理"
)
public
class
TDispatchSocialFundInfoController
{
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TDispatchSocialFundInfoMapper.java
0 → 100644
View file @
b48a0c2a
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchSocialFundInfo
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2024-02-01 11:38:05
*/
@Mapper
public
interface
TDispatchSocialFundInfoMapper
extends
BaseMapper
<
TDispatchSocialFundInfo
>
{
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchSocialFundInfoService.java
0 → 100644
View file @
b48a0c2a
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchSocialFundInfo
;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2024-02-01 11:38:05
*/
public
interface
TDispatchSocialFundInfoService
extends
IService
<
TDispatchSocialFundInfo
>
{
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
b48a0c2a
...
...
@@ -60,10 +60,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants;
import
com.yifu.cloud.plus.v1.yifu.social.constants.PreDispatchConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.*
;
import
com.yifu.cloud.plus.v1.yifu.social.util.DoSocialTask
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
...
...
@@ -73,6 +70,7 @@ import org.apache.poi.ss.usermodel.Cell;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.shardingsphere.transaction.annotation.ShardingTransactionType
;
import
org.apache.shardingsphere.transaction.core.TransactionType
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
...
...
@@ -136,6 +134,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Autowired
private
DoSocialTask
socialTask
;
private
final
TDispatchSocialFundInfoService
infoService
;
/**
* 派单信息记录表简单分页查询
*
...
...
@@ -347,6 +347,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TDispatchInfo:
:
getCreateName
,
entity
.
getCreateName
());
}
if
(
Common
.
isNotNull
(
entity
.
getEmpIdcard
()))
{
wrapper
.
eq
(
TDispatchInfo:
:
getEmpIdcard
,
entity
.
getEmpIdcard
());
}
return
wrapper
;
}
...
...
@@ -2990,6 +2993,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
socialFundMapper
.
updateById
(
socialFund
);
//派减时生成社保公积金查询快照
TDispatchSocialFundInfo
infoEntity
=
new
TDispatchSocialFundInfo
();
BeanUtils
.
copyProperties
(
socialFund
,
infoEntity
);
infoEntity
.
setReduceSocialFundId
(
dispatch
.
getId
());
infoService
.
save
(
infoEntity
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
));
}
catch
(
Exception
e
){
log
.
error
(
"批量派减异常:"
,
e
);
...
...
@@ -3217,6 +3225,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchInfo
dispatch
=
baseMapper
.
selectById
(
id
);
detailVo
.
setDispatch
(
dispatch
);
if
(
Common
.
isNotNull
(
dispatch
)){
TDispatchSocialFundInfo
info
=
infoService
.
getOne
(
Wrappers
.<
TDispatchSocialFundInfo
>
query
().
lambda
()
.
eq
(
TDispatchSocialFundInfo:
:
getReduceSocialFundId
,
id
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
info
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
dispatch
.
getType
())){
detailVo
.
setDispatchSocial
(
info
);
}
if
(
Common
.
isNotNull
(
dispatch
.
getSocialId
())){
detailVo
.
setSocial
(
socialMapper
.
selectById
(
dispatch
.
getSocialId
()));
}
...
...
@@ -3306,6 +3320,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
int
forecastFlag
;
// 是否SSC,true是
boolean
isSSC
;
TDispatchSocialFundInfo
socialFundInfo
;
for
(
TDispatchInfo
dis
:
dispatchs
)
{
isSSC
=
CommonConstants
.
FIVE_STRING
.
equals
(
dis
.
getStatus
());
forecastFlag
=
getForecastFlag
(
dis
);
...
...
@@ -3539,8 +3555,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dis
.
setAuditTime
(
now
);
baseMapper
.
updateById
(
dis
);
socialFundMapper
.
updateById
(
sf
);
//派减的申请审核完更新社保公积金查询快照表
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
()))
{
socialFundInfo
=
infoService
.
getOne
(
Wrappers
.<
TDispatchSocialFundInfo
>
query
().
lambda
()
.
eq
(
TDispatchSocialFundInfo:
:
getReduceSocialFundId
,
dis
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
socialFundInfo
))
{
socialFundInfo
.
setSocialStatus
(
sf
.
getSocialStatus
());
socialFundInfo
.
setSocialReduceStatus
(
sf
.
getSocialReduceStatus
());
socialFundInfo
.
setSocialReduceDate
(
sf
.
getSocialReduceDate
());
socialFundInfo
.
setSocialAddStatus
(
sf
.
getSocialAddStatus
());
socialFundInfo
.
setPensionHandle
(
sf
.
getPensionHandle
());
socialFundInfo
.
setMedicalHandle
(
sf
.
getMedicalHandle
());
socialFundInfo
.
setWorkInjuryHandle
(
sf
.
getWorkInjuryHandle
());
socialFundInfo
.
setUnemployHandle
(
sf
.
getUnemployHandle
());
socialFundInfo
.
setBirthHandle
(
sf
.
getBirthHandle
());
socialFundInfo
.
setBigailmentHandle
(
sf
.
getBigailmentHandle
());
infoService
.
updateById
(
socialFundInfo
);
}
}
// 派增审核不通过
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())
&&
CommonConstants
.
ONE_INT
==
flag
){
...
...
@@ -3752,6 +3788,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// auditFlag 表示社保办理无办理项是不保存
boolean
auditFlag
=
true
;
boolean
partSuccess
=
false
;
TDispatchSocialFundInfo
socialFundInfo
;
for
(
TDispatchInfo
dis
:
disList
)
{
auditFlag
=
true
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
typeSub
))
{
...
...
@@ -4062,6 +4099,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
baseMapper
.
updateById
(
dis
);
socialFundMapper
.
updateById
(
sf
);
//派减的申请审核完更新社保公积金查询快照表
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
()))
{
socialFundInfo
=
infoService
.
getOne
(
Wrappers
.<
TDispatchSocialFundInfo
>
query
().
lambda
()
.
eq
(
TDispatchSocialFundInfo:
:
getReduceSocialFundId
,
dis
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
socialFundInfo
))
{
BeanUtils
.
copyProperties
(
sf
,
socialFundInfo
);
infoService
.
updateById
(
socialFundInfo
);
}
}
//1.派增办理失败 刷新预估数据
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
()))
{
// 全部办理失败 社保和公积金派增办理失败 减少预估
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchSocialFundInfoServiceImpl.java
0 → 100644
View file @
b48a0c2a
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchSocialFundInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchSocialFundInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchSocialFundInfoService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2024-02-01 11:38:05
*/
@Log4j2
@RequiredArgsConstructor
@Service
public
class
TDispatchSocialFundInfoServiceImpl
extends
ServiceImpl
<
TDispatchSocialFundInfoMapper
,
TDispatchSocialFundInfo
>
implements
TDispatchSocialFundInfoService
{
}
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
b48a0c2a
This diff is collapsed.
Click to expand it.
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/vo/HcmInitRoleInfoVo.java
0 → 100644
View file @
b48a0c2a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
HcmInitRoleInfoVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Schema
(
description
=
"角色id"
)
private
String
roleId
;
@Schema
(
description
=
"用户id"
)
private
String
userId
;
@Schema
(
description
=
"登录名"
)
private
String
loginName
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
b48a0c2a
...
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.admin.service.impl;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -30,10 +31,7 @@ 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.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.util.ParamResolver
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.BusinessUserVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserPasswordVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.admin.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysMenuService
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysUserService
;
...
...
@@ -42,8 +40,12 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.enums.MenuTypeEnum
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.PermissionDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.ldap.entity.PersonVo
;
import
com.yifu.cloud.plus.v1.yifu.common.ldap.util.LdapUtil
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -92,6 +94,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
private
final
ArchivesDaprUtil
archivesDaprUtil
;
private
final
PermissionDaprUtil
permissionDaprUtil
;
/**
* 保存用户信息
* @param userDto DTO 对象
...
...
@@ -502,6 +506,35 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
if
(!
insertList
.
isEmpty
())
{
baseMapper
.
batchInsertUser
(
insertList
);
//新增用户的初始化角色
JSONObject
jsonObject
;
for
(
PersonVo
personVo
:
insertList
)
{
if
(
Common
.
isNotNull
(
personVo
.
getRoleIds
()))
{
SysUser
user
=
this
.
getOne
(
Wrappers
.<
SysUser
>
query
().
lambda
().
eq
(
SysUser:
:
getUsername
,
personVo
.
getUid
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
jsonObject
=
JSONObject
.
parseObject
(
personVo
.
getRoleIds
());
//获取mvp用户的角色
String
userRole
=
jsonObject
.
get
(
"hro"
)==
null
?
""
:
jsonObject
.
getString
(
"hro"
);
if
(!
userRole
.
isEmpty
())
{
Common
.
getList
(
userRole
).
stream
().
map
(
roleId
->
{
SysUserRole
role
=
new
SysUserRole
();
role
.
setUserId
(
user
.
getUserId
());
role
.
setRoleId
(
Long
.
valueOf
(
roleId
));
return
role
;
}).
forEach
(
sysUserRoleMapper:
:
insert
);
}
//获取ekp用户的角色
String
ekpUserRole
=
jsonObject
.
get
(
"ekp"
)==
null
?
""
:
jsonObject
.
getString
(
"ekp"
);
if
(!
ekpUserRole
.
isEmpty
())
{
for
(
String
roleId
:
Common
.
getList
(
ekpUserRole
))
{
HcmInitRoleInfoVo
vo
=
new
HcmInitRoleInfoVo
();
vo
.
setLoginName
(
user
.
getUsername
());
vo
.
setRoleId
(
roleId
);
permissionDaprUtil
.
saveSysUserRole
(
vo
);
}
}
}
}
}
}
List
<
SearchResultEntry
>
entryList
=
ldapUtil
.
getAllPersonNamesWithTraditionalWay
();
...
...
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