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
2532f8b5
Commit
2532f8b5
authored
Jun 07, 2022
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug6259
parent
542a9b05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
26 deletions
+32
-26
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+5
-5
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+27
-21
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgPersonController.java
View file @
2532f8b5
...
@@ -116,14 +116,14 @@ public class OrgPersonController extends BaseController {
...
@@ -116,14 +116,14 @@ public class OrgPersonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新人员数据"
,
notes
=
"更新人员数据"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新人员数据"
,
notes
=
"更新人员数据"
)
public
ResponseModel
<?>
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
OrgPersonV
o
,
public
ResponseModel
<?>
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
orgPersonDt
o
,
@PathVariable
Long
id
)
throws
Exception
{
@PathVariable
Long
id
)
throws
Exception
{
OrgPersonV
o
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
orgPersonDt
o
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
/*同步修改关联账号用户名 chenzhao*/
/*同步修改关联账号用户名 chenzhao*/
AgencyUserModel
amosUser
=
Privilege
.
agencyUserClient
.
queryByUserId
(
OrgPersonV
o
.
getAmosOrgId
()).
getResult
();
AgencyUserModel
amosUser
=
Privilege
.
agencyUserClient
.
queryByUserId
(
orgPersonDt
o
.
getAmosOrgId
()).
getResult
();
OrgPersonV
o
.
setAmosOrgCode
(
amosUser
.
getRealName
());
orgPersonDt
o
.
setAmosOrgCode
(
amosUser
.
getRealName
());
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
updateByIdOrgPerson
(
OrgPersonV
o
,
id
));
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
updateByIdOrgPerson
(
orgPersonDt
o
,
id
));
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
2532f8b5
...
@@ -667,15 +667,14 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -667,15 +667,14 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
}
@Override
@Override
public
void
saveOrgUsr
(
OrgUsr
orgUsr
,
OrgUsr
o
ri
OrgUsr
)
throws
Exception
{
public
void
saveOrgUsr
(
OrgUsr
orgUsr
,
OrgUsr
o
ld
OrgUsr
)
throws
Exception
{
if
(
oriOrgUsr
.
getParentId
()
!=
oriOrgUsr
.
getParentId
(
))
{
if
(
!
orgUsr
.
getParentId
().
equals
(
oldOrgUsr
.
getParentId
()
))
{
OrgUsr
parent
=
getById
(
orgUsr
.
getParentId
());
OrgUsr
parent
=
getById
(
orgUsr
.
getParentId
());
if
(
parent
!=
null
&&
!
ObjectUtils
.
isEmpty
(
parent
.
getBizOrgCode
()))
{
if
(
parent
!=
null
&&
!
ObjectUtils
.
isEmpty
(
parent
.
getBizOrgCode
()))
{
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
}
}
updateChildOrgCode
(
oriOrgUsr
.
getBizOrgCode
(),
orgUsr
.
getBizOrgCode
());
updateChildOrgCode
(
oldOrgUsr
.
getBizOrgCode
(),
orgUsr
.
getBizOrgCode
());
orgUsr
.
setParentId
(
oriOrgUsr
.
getParentId
());
}
}
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
orgUsr
.
setRecDate
(
new
Date
());
orgUsr
.
setRecDate
(
new
Date
());
...
@@ -1077,44 +1076,45 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -1077,44 +1076,45 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
}
@Override
@Override
public
OrgPersonDto
updateByIdOrgPerson
(
OrgPersonDto
OrgPersonV
o
,
Long
id
)
throws
Exception
{
public
OrgPersonDto
updateByIdOrgPerson
(
OrgPersonDto
orgPersonDt
o
,
Long
id
)
throws
Exception
{
try
{
try
{
updatePersonNumber
(
id
,
OrgPersonV
o
);
updatePersonNumber
(
id
,
orgPersonDt
o
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
info
(
"同步修改培训计划中的人员编号:---------------"
+
id
);
logger
.
info
(
"同步修改培训计划中的人员编号:---------------"
+
id
);
}
}
// 修改人员信息
// 修改人员信息
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
o
ri
OrgUsr
=
getById
(
id
);
OrgUsr
o
ld
OrgUsr
=
getById
(
id
);
BeanUtils
.
copyProperties
(
OrgPersonV
o
,
orgUsr
);
BeanUtils
.
copyProperties
(
orgPersonDt
o
,
orgUsr
);
/*
/*
* Bug 2647 编辑用户所属单位后按单位筛选人员结果错误 增加了 638 639 两行代码 根据修改的部门调整部门code 2021-09-03 陈召
* Bug 2647 编辑用户所属单位后按单位筛选人员结果错误 增加了 638 639 两行代码 根据修改的部门调整部门code 2021-09-03 陈召
* 开始
* 开始
*/
*/
OrgUsr
parent
=
getById
(
OrgPersonVo
.
getParentId
());
// 下面saveOrgUsr有处理逻辑,这段代码多余
if
(
parent
!=
null
)
{
// OrgUsr parent = getById(OrgPersonVo.getParentId());
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
// if (parent != null) {
}
// orgUsr.setBizOrgCode(parent.getBizOrgCode() + getOrgCodeStr());
// }
/*
/*
* Bug 2647 编辑用户所属单位后按单位筛选人员结果错误 增加了 638 639 两行代码 根据修改的部门调整部门code 2021-09-03 陈召
* Bug 2647 编辑用户所属单位后按单位筛选人员结果错误 增加了 638 639 两行代码 根据修改的部门调整部门code 2021-09-03 陈召
* 结束
* 结束
*/
*/
orgUsr
.
setSequenceNbr
(
id
);
orgUsr
.
setSequenceNbr
(
id
);
if
(!
ObjectUtils
.
isEmpty
(
OrgPersonV
o
.
getAmosOrgId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
orgPersonDt
o
.
getAmosOrgId
()))
{
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
queryByUserId
(
OrgPersonV
o
.
getAmosOrgId
()).
getResult
();
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
queryByUserId
(
orgPersonDt
o
.
getAmosOrgId
()).
getResult
();
// o
ri
OrgUsr.setAmosOrgCode(user.getRealName()); 去掉AmosOrgCode by litw
// o
ld
OrgUsr.setAmosOrgCode(user.getRealName()); 去掉AmosOrgCode by litw
// 2021年9月10日
// 2021年9月10日
o
ri
OrgUsr
.
setAmosOrgId
(
user
.
getUserId
());
o
ld
OrgUsr
.
setAmosOrgId
(
user
.
getUserId
());
// orgUsr.setAmosOrgCode(user.getRealName()); 去掉AmosOrgCode by litw 2021年9月10日
// orgUsr.setAmosOrgCode(user.getRealName()); 去掉AmosOrgCode by litw 2021年9月10日
orgUsr
.
setAmosOrgId
(
user
.
getUserId
());
orgUsr
.
setAmosOrgId
(
user
.
getUserId
());
}
}
saveOrgUsr
(
orgUsr
,
o
ri
OrgUsr
);
saveOrgUsr
(
orgUsr
,
o
ld
OrgUsr
);
// 保存动态表单数据
// 保存动态表单数据
updateDynamicFormInstance
(
orgUsr
.
getSequenceNbr
(),
OrgPersonV
o
.
getDynamicFormValue
());
updateDynamicFormInstance
(
orgUsr
.
getSequenceNbr
(),
orgPersonDt
o
.
getDynamicFormValue
());
if
(
orgUsr
.
getBizOrgCode
()
!=
null
)
{
if
(
orgUsr
.
getBizOrgCode
()
!=
null
)
{
OrgPersonV
o
.
setBizOrgCode
(
orgUsr
.
getBizOrgCode
());
orgPersonDt
o
.
setBizOrgCode
(
orgUsr
.
getBizOrgCode
());
}
}
return
OrgPersonV
o
;
return
orgPersonDt
o
;
}
}
void
updatePersonNumber
(
Long
id
,
OrgPersonDto
OrgPersonVo
)
{
void
updatePersonNumber
(
Long
id
,
OrgPersonDto
OrgPersonVo
)
{
...
@@ -2789,7 +2789,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -2789,7 +2789,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
public
OrgUsr
peopleSaveOrgUsr
(
PeopleBasicInfoDto
peopleBasicInfoDto
)
{
public
OrgUsr
peopleSaveOrgUsr
(
PeopleBasicInfoDto
peopleBasicInfoDto
)
{
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
orgUsr
=
new
OrgUsr
();
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
orgUsr
.
setBizOrgCode
(
peopleBasicInfoDto
.
getBizOrgCode
());
if
(
ValidationUtil
.
isEmpty
(
peopleBasicInfoDto
.
getSequenceNbr
()))
{
// 新增
// cb_org_user表biz_org_code表示该资源自己的编码,同一单位下唯一。只用父单位bizOrgCode会引起bug6259,遂改为父单位bizOrgCode + getOrgCodeStr()
orgUsr
.
setBizOrgCode
(
peopleBasicInfoDto
.
getBizOrgCode
()
+
getOrgCodeStr
());
}
else
{
// 编辑
OrgUsr
o
=
getById
(
peopleBasicInfoDto
.
getSequenceNbr
());
orgUsr
.
setBizOrgCode
(
o
.
getBizOrgCode
());
}
orgUsr
.
setAmosOrgId
(
peopleBasicInfoDto
.
getAmosUserId
());
orgUsr
.
setAmosOrgId
(
peopleBasicInfoDto
.
getAmosUserId
());
orgUsr
.
setAmosOrgCode
(
peopleBasicInfoDto
.
getAmosName
());
orgUsr
.
setAmosOrgCode
(
peopleBasicInfoDto
.
getAmosName
());
orgUsr
.
setBizOrgName
(
peopleBasicInfoDto
.
getName
());
orgUsr
.
setBizOrgName
(
peopleBasicInfoDto
.
getName
());
...
...
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