Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
48443c7a
Commit
48443c7a
authored
Apr 22, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加参数
parent
bb6bf195
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+47
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
48443c7a
...
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import
com.yeejoin.amos.feign.privilege.client.DepartmentClient
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -83,6 +84,52 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto,PersonBas
//获取人员账号信息
PersonAccount
personAccount
=
model
.
getPersonAccount
();
//新增平台账号
//组装数据
UserDto
usd
=
new
UserDto
();
//应用
usd
.
setAppCodes
(
personAccount
.
getApplication
());
//公司
usd
.
setCompanySeqs
(
personUser
.
getProjectId
().
toString
());
//部门
usd
.
setDeptSeqs
(
personUser
.
getDepartmentId
()!=
null
?
personUser
.
getDepartmentId
().
toString
():
null
);
//手机号
usd
.
setMobile
(
personUser
.
getPhone
());
//角色
Map
<
String
,
List
<
String
>>
map
=
new
HashMap
<>();
if
(
personUser
.
getDepartmentId
()!=
null
){
map
.
put
(
personUser
.
getDepartmentId
().
toString
(),
personAccount
.
getRoles
());
}
else
{
map
.
put
(
personUser
.
getProjectId
().
toString
(),
personAccount
.
getRoles
());
}
usd
.
setOrgRoleSeqs
(
map
);
//密码
usd
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getPassword
(),
"qaz"
));
//二次密码
usd
.
setRePassword
(
DesUtil
.
encode
(
personAccount
.
getSecondaryPassword
(),
"qaz"
));
//用户名
usd
.
setRealName
(
personUser
.
getName
());
//角色
usd
.
setRoleSeqs
(
personAccount
.
getRoles
());
//账号
usd
.
setUserName
(
personAccount
.
getAccountName
());
//orgcode
//公司名称
//部门名称
//平台USERID
//人员基础信息
PersonBasic
personBasic
=
new
PersonBasic
();
BeanUtils
.
copyProperties
(
personUser
,
personBasic
);
...
...
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