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
92e8b945
Commit
92e8b945
authored
Jul 25, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量审核
parent
4b48583b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
516 additions
and
26 deletions
+516
-26
YifuUser.java
.../com/yifu/cloud/plus/v1/yifu/common/core/vo/YifuUser.java
+8
-1
pom.xml
yifu-common/yifu-common-dapr/pom.xml
+6
-0
CheckDaprUtil.java
...fu/cloud/plus/v1/yifu/common/dapr/util/CheckDaprUtil.java
+49
-0
YifuUserDetailsService.java
.../yifu/common/security/service/YifuUserDetailsService.java
+1
-1
DispatchConstants.java
...loud/plus/v1/yifu/social/constants/DispatchConstants.java
+192
-0
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+1
-0
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+42
-3
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+3
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+194
-18
ServiceUtil.java
.../com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
+0
-2
SysUser.java
...com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysUser.java
+6
-0
SysUserServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
+14
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/vo/YifuUser.java
View file @
92e8b945
...
...
@@ -40,6 +40,12 @@ public class YifuUser extends User {
@Getter
private
final
Long
deptId
;
/**
* 部门名称
*/
@Getter
private
final
String
deptName
;
/**
* 用户名称
*/
...
...
@@ -64,12 +70,13 @@ public class YifuUser extends User {
@Getter
private
final
String
userGroup
;
public
YifuUser
(
String
id
,
Long
deptId
,
String
username
,
String
nickname
,
String
systemFlag
,
String
password
,
String
phone
,
boolean
enabled
,
public
YifuUser
(
String
id
,
Long
deptId
,
String
deptName
,
String
username
,
String
nickname
,
String
systemFlag
,
String
password
,
String
phone
,
boolean
enabled
,
boolean
accountNonExpired
,
boolean
credentialsNonExpired
,
boolean
accountNonLocked
,
String
userGroup
,
Collection
<?
extends
GrantedAuthority
>
authorities
)
{
super
(
username
,
password
,
enabled
,
accountNonExpired
,
credentialsNonExpired
,
accountNonLocked
,
authorities
);
this
.
id
=
id
;
this
.
deptId
=
deptId
;
this
.
deptName
=
deptName
;
this
.
phone
=
phone
;
this
.
nickname
=
nickname
;
this
.
systemFlag
=
systemFlag
;
...
...
yifu-common/yifu-common-dapr/pom.xml
View file @
92e8b945
...
...
@@ -23,6 +23,12 @@
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-check-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<properties>
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/CheckDaprUtil.java
0 → 100644
View file @
92e8b945
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
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.archives.vo.*
;
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.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Author fxj
* @Date 2022/7/11
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties
(
DaprCheckProperties
.
class
)
public
class
CheckDaprUtil
{
@Autowired
private
DaprCheckProperties
daprCheckProperties
;
/**
* @Author fxj
* @Description 身份证&姓名一致性校验
* @Date 21:15 2022/7/18
* @Param
* @return
**/
public
R
<
TCheckIdCard
>
checkIdCardSingle
(
TCheckIdCard
tCheckIdCard
){
R
<
TCheckIdCard
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
(),
"/tcheckidcard/inner/checkIdCardSingle"
,
JSON
.
toJSONString
(
tCheckIdCard
),
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"校验身份证信息失败!"
);
}
return
res
;
}
}
yifu-common/yifu-common-security/src/main/java/com/yifu.cloud.plus.v1/yifu/common/security/service/YifuUserDetailsService.java
View file @
92e8b945
...
...
@@ -69,7 +69,7 @@ public interface YifuUserDetailsService extends UserDetailsService, Ordered {
SysUser
user
=
info
.
getSysUser
();
// 构造security用户
return
new
YifuUser
(
user
.
getUserId
(),
user
.
getDeptId
(),
user
.
getUsername
(),
user
.
getNickname
(),
user
.
getSystemFlag
(),
return
new
YifuUser
(
user
.
getUserId
(),
user
.
getDeptId
(),
user
.
getDeptName
(),
user
.
getUsername
(),
user
.
getNickname
(),
user
.
getSystemFlag
(),
SecurityConstants
.
BCRYPT
+
user
.
getPassword
(),
user
.
getPhone
(),
true
,
true
,
true
,
StrUtil
.
equals
(
user
.
getLockFlag
(),
CommonConstants
.
STATUS_NORMAL
),
user
.
getUserGroup
(),
authorities
);
}
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/constants/DispatchConstants.java
0 → 100644
View file @
92e8b945
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
constants
;
public
class
DispatchConstants
{
public
static
final
String
UPDATE_SOCIAL_AND_FUND_FAIL
=
"更新社保或公积金办理状态失败!"
;
public
static
final
String
NO_CONTRACT_INFO
=
"无合同数据,请补充合同信息后导入(合同名称、合同类型等信息)!"
;
public
static
final
String
ADD_EMP_CONTRACTOR_FAIL
=
"新增员工合同失败:"
;
public
static
final
String
ADD_EMP_FAIL
=
"新增员工失败:"
;
public
static
final
String
PARAM_ERROR
=
"传参有误!"
;
public
static
final
String
DISPATCH_AUDIT_ERROR
=
"派单审核异常:"
;
public
static
final
String
NO_OPERATOR_DATA
=
"无数据可操作"
;
public
static
final
String
EMP_CONTRACTOR_SERVER_ERROR
=
"员工合同新增服务异常!"
;
public
static
final
String
FUND_REDUCE_FAIL
=
"公积金派减失败:"
;
public
static
final
String
EMP_PHONE_INVALID
=
"档案手机号无效,请更新档案或模板的手机号码!"
;
public
static
final
String
DISPATCH_PHONE_NOT_EMPTY
=
"派单手机号不可为空,请更新档案或模板的手机号码!"
;
/**
* 社保派单
* '缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) PAYMENT_TYPE
*/
enum
PaymentType
{
LATEST
(
"0"
,
"最低"
),
SHORT
(
"1"
,
"自定义"
),
BATCHADD
(
"2"
,
"最高"
);
private
String
code
;
private
String
desc
;
PaymentType
(
String
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getDesc
()
{
return
desc
;
}
}
/**
* 社保
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
SOCIAL_INFO
=
"tSocialInfo"
;
/**
* 公积金
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
PROVIDENT_INFO
=
"tProvidentFund"
;
/**
* 员工ID传参有误
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
PARAM_EMPLOYEE_ID_EMPTY
=
"传参有误:员工ID不可为空"
;
/**
* 无对应员工ID的员工数据
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
NO_EMPLOYEE_OF_ID
=
"无对应员工ID的员工信息"
;
/**
* 员工、社保、公积金信息
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
EMPLOYEE_SOCIAL_FUND_INFO
=
"员工、社保、公积金信息"
;
/**
* 派单ID不可为空,多个ID请用逗号分割
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
DISPATCH_ID_NOT_EMPTY
=
"派单ID不可为空,多个ID请用逗号分割!"
;
/**
* offical
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
OFFICE
=
"offical"
;
/**
* add
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
ADD
=
"add"
;
/**
* minus
* @Author fxj
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
MINUS
=
"minus"
;
/**
* 更新缴费库薪资结算状态失败
* @Author fxj
* @Date 2022-01-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
UPDATE_RELATION_FROM_SALARY_FAILED
=
"更新缴费库薪资结算状态失败,请重新尝试或联系管理人员!"
;
public
static
final
String
UNIT_PENSION_CARDINAL_NOT_NULL
=
"单位养老基数不能为空!"
;
public
static
final
String
UNIT_MEDICAL_CARDINAL_NOT_NULL
=
"单位医疗基数不能为空!"
;
public
static
final
String
UNIT_UNEMPLOYMENT_CARDINAL_NOT_NULL
=
"单位失业基数不能为空!"
;
public
static
final
String
UNIT_INJURY_CARDINAL_NOT_NULL
=
"单位工伤基数不能为空!"
;
public
static
final
String
UNIT_BIRTH_CARDINAL_NOT_NULL
=
"单位生育基数不能为空!"
;
public
static
final
String
PERSONAL_PENSION_CARDINAL_NOT_NULL
=
"个人养老基数不能为空!"
;
public
static
final
String
PERSONAL_MEDICAL_CARDINAL_NOT_NULL
=
"个人医疗基数不能为空!"
;
public
static
final
String
PERSONAL_UNEMPLOYMENT_CARDINAL_NOT_NULL
=
"个人失业基数不能为空!"
;
public
static
final
String
UNIT_PENSION_CARDINAL_LIMIT_ERROR
=
"单位养老基数不可大于上限或小于下限!"
;
public
static
final
String
UNIT_MEDICAL_CARDINAL_LIMIT_ERROR
=
"单位医疗基数不可大于上限或小于下限!"
;
public
static
final
String
UNIT_UNEMPLOYMENT_CARDINAL_LIMIT_ERROR
=
"单位失业基数不可大于上限或小于下限!"
;
public
static
final
String
UNIT_INJURY_CARDINAL_LIMIT_ERROR
=
"单位工伤基数不可大于上限或小于下限!"
;
public
static
final
String
UNIT_BIRTH_CARDINAL_LIMIT_ERROR
=
"单位生育基数不可大于上限或小于下限!"
;
public
static
final
String
PERSONAL_PENSION_CARDINAL_LIMIT_ERROR
=
"个人养老基数不可大于上限或小于下限!"
;
public
static
final
String
PERSONAL_MEDICAL_CARDINAL_LIMIT_ERROR
=
"个人医疗基数不可大于上限或小于下限!"
;
public
static
final
String
PERSONAL_UNEMPLOYMENT_CARDINAL_LIMIT_ERROR
=
"个人失业基数不可大于上限或小于下限!"
;
public
static
final
String
UNIT_FUND_CARDINAL_LIMIT_ERROR
=
"公积金基数不可大于上限或小于下限!"
;
public
static
final
String
EMPLOYEE
=
"员工:"
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
View file @
92e8b945
...
...
@@ -388,6 +388,7 @@ public class TDispatchInfo extends BaseEntity {
@Schema
(
description
=
"审核意见"
)
@ExcelProperty
(
"审核意见"
)
private
String
auditRemark
;
/**
* 公积金办理备注
*/
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
92e8b945
...
...
@@ -26,16 +26,16 @@ 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.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.http.HttpHeaders
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -43,13 +43,13 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 派单信息记录表
*
* @author fxj
* @date 2022-07-15 11:38:05
*/
@Log4j2
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tdispatchinfo"
)
...
...
@@ -230,4 +230,43 @@ public class TDispatchInfoController {
public
R
<
List
<
ErrorMessage
>>
importListReduce
(
@RequestBody
MultipartFile
file
){
return
tDispatchInfoService
.
importReduceDiy
(
file
.
getInputStream
());
}
/**
* @Author fxj
* @Description 派单申请批量审核
* @Date 16:54 2022/7/25
* @Param
* @return
**/
@Operation
(
description
=
"派单申请批量审核,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyAudit')"
)
@PostMapping
(
"/addApplyAudit"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tdispatchinfo_addApplyAudit')"
)
public
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
,
@RequestParam
(
name
=
"auditStatus"
,
required
=
true
)
String
auditStatus
,
@RequestParam
(
name
=
"auditRemark"
,
required
=
false
)
String
auditRemark
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
)
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
try
{
if
(!
Common
.
isNotNull
(
ids
))
{
return
R
.
failed
(
DispatchConstants
.
DISPATCH_ID_NOT_EMPTY
);
}
Integer
flag
=
1
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
auditStatus
))
{
//审核通过
flag
=
CommonConstants
.
ZERO_INT
;
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
auditStatus
))
{
//审核不通过
flag
=
CommonConstants
.
ONE_INT
;
}
else
{
return
R
.
failed
(
"派单审核状态参数异常:0待审核 1审核通过 2审核不通过"
);
}
List
<
ErrorMessage
>
errorInfo
=
tDispatchInfoService
.
addBatchApplyAudit
(
Common
.
initStrToList
(
ids
,
CommonConstants
.
COMMA_STRING
),
user
,
flag
,
auditStatus
,
null
==
auditRemark
?
""
:
auditRemark
);
return
R
.
ok
(
errorInfo
,
"派单审核结果:"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"派单审核异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"数据异常,派单审核失败!"
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
92e8b945
...
...
@@ -21,6 +21,7 @@ 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.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
...
...
@@ -53,4 +54,6 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R
<
Boolean
>
removeByIdDiy
(
String
id
);
DispatchDetailVo
getSocialAndFundInfoById
(
String
id
);
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
initStrToList
,
YifuUser
user
,
Integer
flag
,
String
auditStatus
,
String
auditRemark
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
92e8b945
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
View file @
92e8b945
...
...
@@ -20,9 +20,7 @@ public class ServiceUtil {
/**
* @Description: 返回字符串对应的int值
* @Author: hgw
* @Date: 2022/7/18 17:29
* @return: int
**/
public
static
int
convertStringToInt
(
String
num1
)
{
if
(
Common
.
isEmpty
(
num1
)
||
!
Common
.
isNumber
(
num1
))
{
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysUser.java
View file @
92e8b945
...
...
@@ -97,6 +97,12 @@ public class SysUser extends BaseEntity {
@Schema
(
description
=
"用户所属部门id"
)
private
Long
deptId
;
/**
* 部门名称
*/
@Schema
(
description
=
"部门名称"
)
private
String
deptName
;
/**
* 用户分组
*/
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
92e8b945
...
...
@@ -40,6 +40,7 @@ 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.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.ldap.entity.PersonVo
;
...
...
@@ -96,6 +97,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
BeanUtils
.
copyProperties
(
userDto
,
sysUser
);
sysUser
.
setDelFlag
(
CommonConstants
.
STATUS_NORMAL
);
sysUser
.
setPassword
(
ENCODER
.
encode
(
userDto
.
getPassword
()));
initDeptName
(
sysUser
);
baseMapper
.
insert
(
sysUser
);
userDto
.
getRole
().
stream
().
map
(
roleId
->
{
SysUserRole
userRole
=
new
SysUserRole
();
...
...
@@ -106,6 +108,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
return
Boolean
.
TRUE
;
}
private
void
initDeptName
(
SysUser
sysUser
)
{
if
(
Common
.
isNotNull
(
sysUser
.
getDeptId
())){
SysDept
sysDept
=
sysDeptMapper
.
selectById
(
sysUser
.
getDeptId
());
if
(
Common
.
isNotNull
(
sysDept
))
{
sysUser
.
setDeptName
(
sysDept
.
getName
());
}
}
}
/**
* 通过查用户的全部信息
* @param sysUser 用户
...
...
@@ -198,6 +209,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
sysUser
.
setPhone
(
userDto
.
getPhone
());
sysUser
.
setUserId
(
userVO
.
getUserId
());
sysUser
.
setAvatar
(
userDto
.
getAvatar
());
sysUser
.
setDeptId
(
userDto
.
getDeptId
());
initDeptName
(
sysUser
);
return
this
.
updateById
(
sysUser
);
}
...
...
@@ -214,7 +227,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
SysUser
sysUser
=
new
SysUser
();
BeanUtils
.
copyProperties
(
userDto
,
sysUser
);
sysUser
.
setUpdateTime
(
LocalDateTime
.
now
());
initDeptName
(
sysUser
);
/*if (StrUtil.isNotBlank(userDto.getPassword())) {
sysUser.setPassword(ENCODER.encode(userDto.getPassword()));
}*/
...
...
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