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
88d5fce8
Commit
88d5fce8
authored
Sep 16, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
parent
e9a2d03e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
4 deletions
+54
-4
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+16
-2
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+38
-2
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 @
88d5fce8
...
...
@@ -7,8 +7,12 @@ import com.yeejoin.amos.boot.module.common.api.dto.*;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -165,12 +169,22 @@ public class OrgPersonController {
@RequestMapping
(
value
=
"/{orgCode}/users"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据orgCode查询"
,
notes
=
"根据orgCode查询"
)
public
ResponseModel
<
Collection
<
OrgUsr
>>
selectUsersByOrgCode
(
HttpServletRequest
request
,
String
pageNum
,
String
pageSize
,
@PathVariable
Lo
ng
orgCode
)
{
String
pageSize
,
@PathVariable
Stri
ng
orgCode
)
{
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
columnMap
.
put
(
"is_delete"
,
CommonConstant
.
IS_DELETE_00
);
columnMap
.
put
(
"biz_org_code"
,
orgCode
);
columnMap
.
put
(
"biz_org_type"
,
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
listByMap
(
columnMap
));
Collection
<
OrgUsr
>
temp
=
iOrgUsrService
.
listByMap
(
columnMap
);
temp
.
stream
().
forEach
(
t
->
{
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
if
(
StringUtils
.
isNotEmpty
(
t
.
getAmosOrgId
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
t
.
getAmosOrgId
());
if
(
null
!=
result1
.
getResult
())
{
t
.
setAmosOrgCode
(
result1
.
getResult
().
getRealName
());
}
}
});
return
ResponseHelper
.
buildResponse
(
temp
);
}
/**
...
...
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 @
88d5fce8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.io.Serializable
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -379,7 +380,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
map
.
put
(
"pageNum"
,
(
pageBean
.
getCurrent
()
-
1
)
*
pageBean
.
getSize
());
map
.
put
(
"pageSize"
,
pageBean
.
getSize
());
List
<
Map
<
String
,
Object
>>
list
=
this
.
baseMapper
.
selectPersonList
(
map
);
list
.
stream
().
forEach
(
t
->
{
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
t
.
get
(
"amosOrgId"
).
toString
());
if
(
null
!=
result1
.
getResult
())
{
t
.
put
(
"amosOrgCode"
,
result1
.
getResult
().
getRealName
());
}
}
});
/*Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束*/
pageBean
.
setRecords
(
list
);
return
pageBean
;
...
...
@@ -543,7 +553,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
// 机场人员AMOS角色丢失修正, by litw start 2021年9月10日
if
(
null
!=
orgUsr
.
getAmosOrgId
(
))
{
if
(
StringUtils
.
isNotEmpty
(
orgUsr
.
getAmosOrgId
()
))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
orgUsr
.
getAmosOrgId
());
if
(
null
!=
result1
.
getResult
())
{
orgUsr
.
setAmosOrgCode
(
result1
.
getResult
().
getRealName
());
...
...
@@ -768,6 +778,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
OrgPersonFormDto
selectPersonByIdDetail
(
Long
id
)
throws
Exception
{
OrgUsr
orgUsr
=
getById
(
id
);
// 动态表单数据
List
<
FormValue
>
formValue
=
getFormValueDetail
(
id
);
OrgPersonFormDto
orgPersonFormVo
=
new
OrgPersonFormDto
(
formValue
);
...
...
@@ -788,6 +799,15 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
columnMap
.
put
(
"is_delete"
,
CommonConstant
.
IS_DELETE_00
);
columnMap
.
put
(
"biz_org_type"
,
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
Collection
<
OrgUsr
>
list
=
listByMap
(
columnMap
);
// list.stream().forEach(t-> {
// // BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
// if(StringUtils.isNotEmpty(t.getAmosOrgId())) {
// FeignClientResult<AgencyUserModel> result1 = Privilege.agencyUserClient.queryByUserId(t.getAmosOrgId());
// if(null !=result1.getResult()) {
// t.setAmosOrgCode(result1.getResult().getRealName());
// }
// }
// });
return
getTree
(
null
,
list
,
OrgUsr
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getBizOrgName"
,
"getParentId"
,
"getBizOrgType"
);
}
...
...
@@ -1455,7 +1475,23 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
orgUsrList
;
}
/**
* 重写getByid 方法 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
* @param id
* @return
*/
@Override
public
OrgUsr
getById
(
Serializable
id
)
{
OrgUsr
orgUser
=
this
.
baseMapper
.
selectById
(
id
);
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
if
(
orgUser
!=
null
&&
StringUtils
.
isNotEmpty
(
orgUser
.
getAmosOrgId
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
orgUser
.
getAmosOrgId
());
if
(
null
!=
result1
.
getResult
())
{
orgUser
.
setAmosOrgCode
(
result1
.
getResult
().
getRealName
());
}
}
return
orgUser
;
}
}
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