Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
Overview
Overview
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
胡园园
yanxuan-qc-change-system
Commits
53300920
Commit
53300920
authored
Dec 13, 2022
by
穆龙飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify:增加部门信息
parent
15632bf8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
0 deletions
+117
-0
ChangeFlowBiz.java
...om/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
+37
-0
OrgPosDTO.java
...tease/mail/yanxuan/change/integration/flow/OrgPosDTO.java
+37
-0
UserQueryDTO.java
...se/mail/yanxuan/change/integration/flow/UserQueryDTO.java
+25
-0
IusRpcService.java
...il/yanxuan/change/integration/flow/ius/IusRpcService.java
+9
-0
IusUserInfoRsp.java
...nxuan/change/integration/flow/ius/rsp/IusUserInfoRsp.java
+9
-0
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
View file @
53300920
...
@@ -16,6 +16,11 @@ import java.util.stream.Collectors;
...
@@ -16,6 +16,11 @@ import java.util.stream.Collectors;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
com.netease.mail.yanxuan.change.integration.flow.OrgPosDTO
;
import
com.netease.mail.yanxuan.change.integration.flow.UserQueryDTO
;
import
com.netease.mail.yanxuan.change.integration.flow.ius.IusRpcService
;
import
com.netease.mail.yanxuan.change.integration.flow.ius.rsp.IusUserInfoRsp
;
import
com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.Workbook
;
...
@@ -147,6 +152,9 @@ public class ChangeFlowBiz {
...
@@ -147,6 +152,9 @@ public class ChangeFlowBiz {
private
IusService
iusService
;
private
IusService
iusService
;
@Autowired
@Autowired
private
IusRpcService
iusRpcService
;
@Autowired
private
SupplierSendService
sendSupplierEmail
;
private
SupplierSendService
sendSupplierEmail
;
public
String
createAndSubmit
(
ChangeFlowCreateReq
changeFlowCreateReq
)
{
public
String
createAndSubmit
(
ChangeFlowCreateReq
changeFlowCreateReq
)
{
...
@@ -877,6 +885,35 @@ public class ChangeFlowBiz {
...
@@ -877,6 +885,35 @@ public class ChangeFlowBiz {
PageVO
pageVO
=
buildPageVo
(
changeRecordPageInfo
.
getTotal
(),
pageSize
,
page
);
PageVO
pageVO
=
buildPageVo
(
changeRecordPageInfo
.
getTotal
(),
pageSize
,
page
);
ChangeFlowListVO
changeFlowListVO
=
new
ChangeFlowListVO
();
ChangeFlowListVO
changeFlowListVO
=
new
ChangeFlowListVO
();
changeFlowListVO
.
setPageVo
(
pageVO
);
changeFlowListVO
.
setPageVo
(
pageVO
);
try
{
Set
<
String
>
commanderList
=
list
.
stream
().
map
(
ChangeFlowVO:
:
getChangeCommander
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
creatorList
=
list
.
stream
().
map
(
ChangeFlowVO:
:
getChangeCreator
).
collect
(
Collectors
.
toSet
());
commanderList
.
addAll
(
creatorList
);
AjaxResponse
<
List
<
IusUserInfoRsp
>>
userListInfo
=
iusRpcService
.
queryUserListInfo
(
UserQueryDTO
.
builder
().
uids
(
new
ArrayList
<>(
commanderList
)).
build
());
List
<
IusUserInfoRsp
>
data
=
userListInfo
.
getData
();
list
.
forEach
(
i
->
{
Optional
<
IusUserInfoRsp
>
commander
=
data
.
stream
().
filter
(
u
->
u
.
getUid
().
equals
(
i
.
getChangeCommander
())).
findAny
();
Optional
<
IusUserInfoRsp
>
creator
=
data
.
stream
().
filter
(
u
->
u
.
getUid
().
equals
(
i
.
getChangeCreator
())).
findAny
();
if
(
commander
.
isPresent
())
{
Optional
<
OrgPosDTO
>
anyOrg
=
commander
.
get
().
getOrgPosList
().
stream
().
filter
(
o
->
o
.
getLevel
()
==
3
).
findAny
();
String
orgName
=
"无三级部门"
;
if
(
anyOrg
.
isPresent
())
{
orgName
=
anyOrg
.
get
().
getOrgPosName
();
}
i
.
setChangeCommander
(
commander
.
get
().
getName
()
+
"("
+
orgName
+
")"
);
}
if
(
creator
.
isPresent
())
{
Optional
<
OrgPosDTO
>
anyOrg
=
creator
.
get
().
getOrgPosList
().
stream
().
filter
(
o
->
o
.
getLevel
()
==
3
).
findAny
();
String
orgName
=
"无三级部门"
;
if
(
anyOrg
.
isPresent
())
{
orgName
=
anyOrg
.
get
().
getOrgPosName
();
}
i
.
setChangeCommander
(
commander
.
get
().
getName
()
+
"("
+
orgName
+
")"
);
}
});
}
catch
(
Exception
ex
)
{
log
.
error
(
"add org has ex"
,
ex
);
}
changeFlowListVO
.
setChangeFlowList
(
list
);
changeFlowListVO
.
setChangeFlowList
(
list
);
return
changeFlowListVO
;
return
changeFlowListVO
;
}
}
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/OrgPosDTO.java
0 → 100644
View file @
53300920
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
;
import
lombok.Data
;
@Data
public
class
OrgPosDTO
{
/**
*部门id
*/
private
Long
orgPosId
;
/**
*部门名称
*/
private
String
orgPosName
;
/**
*上一级部门id
*/
private
Long
parentOrgPosId
;
/**
*部门结构类型 0:职能部门,1:项目部门
*/
private
Integer
posStructType
;
/**
*部门的级别
*/
private
Integer
level
;
/**
* 对应oa
*/
private
String
deptId
;
}
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/UserQueryDTO.java
0 → 100644
View file @
53300920
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
UserQueryDTO
{
/**
* 邮箱集合
*/
private
List
<
String
>
uids
;
/**
* 用户邮箱类型 0 严选员工,1 非严选员工
*/
private
Integer
userType
=
0
;
}
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/ius/IusRpcService.java
View file @
53300920
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
.
ius
;
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
.
ius
;
import
com.netease.mail.yanxuan.change.integration.flow.UserQueryDTO
;
import
com.netease.mail.yanxuan.change.integration.flow.ius.req.IusDepartmentReq
;
import
com.netease.mail.yanxuan.change.integration.flow.ius.req.IusDepartmentReq
;
import
com.netease.mail.yanxuan.change.integration.flow.ius.rsp.IusUserInfoRsp
;
import
com.netease.mail.yanxuan.change.integration.flow.ius.rsp.IusUserInfoRsp
;
import
com.netease.mail.yanxuan.change.integration.flow.ius.rsp.OrgPosLeaderChainRsp
;
import
com.netease.mail.yanxuan.change.integration.flow.ius.rsp.OrgPosLeaderChainRsp
;
...
@@ -32,6 +33,14 @@ public interface IusRpcService {
...
@@ -32,6 +33,14 @@ public interface IusRpcService {
AjaxResponse
<
IusUserInfoRsp
>
queryUserInfo
(
@RequestParam
(
name
=
"uid"
)
String
uid
);
AjaxResponse
<
IusUserInfoRsp
>
queryUserInfo
(
@RequestParam
(
name
=
"uid"
)
String
uid
);
/**
/**
* 获取指定用户信息,是否返回操作记录、关联的角色信息。当uid和userId都传时,需保证指向同一个用户。
* @param query
* @return
*/
@GetMapping
(
"/v1/qc/user/query"
)
AjaxResponse
<
List
<
IusUserInfoRsp
>>
queryUserListInfo
(
@RequestBody
UserQueryDTO
query
);
/**
* 查询指定用户部门下的上级部门(含本部门)负责人链(支持一级或多级)
* 查询指定用户部门下的上级部门(含本部门)负责人链(支持一级或多级)
* @param uid
* @param uid
* @return
* @return
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/ius/rsp/IusUserInfoRsp.java
View file @
53300920
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
.
ius
.
rsp
;
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
.
ius
.
rsp
;
import
com.netease.mail.yanxuan.change.integration.flow.OrgPosDTO
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* @author WangJiaXiang
* @author WangJiaXiang
* @date 2022/11/25/025$
* @date 2022/11/25/025$
...
@@ -33,4 +37,9 @@ public class IusUserInfoRsp {
...
@@ -33,4 +37,9 @@ public class IusUserInfoRsp {
private
String
userId
;
private
String
userId
;
private
String
virtual
;
private
String
virtual
;
/**
* 部门信息列表
*/
private
List
<
OrgPosDTO
>
orgPosList
=
new
ArrayList
<>();
}
}
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