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
d0a4af4e
Commit
d0a4af4e
authored
Aug 05, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改待办任务 给执行人只发送任务不发送消息通知
parent
af0b28af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
22 deletions
+30
-22
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+7
-4
RulePlanService.java
...os/supervision/business/service/impl/RulePlanService.java
+23
-18
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanTaskServiceImpl.java
View file @
d0a4af4e
...
...
@@ -884,10 +884,13 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
log
.
info
(
String
.
format
(
"计划对象:%s"
,
JSON
.
toJSON
(
plan
)));
List
<
String
>
result
=
new
ArrayList
<>();
if
(
plan
.
getUserId
()
!=
null
){
String
userIdString
=
plan
.
getUserId
();
FeignClientResult
amosIdListByUserIds
=
jcsFeignClient
.
getAmosIdListByUserIds
(
userIdString
);
result
=
(
List
<
String
>)
amosIdListByUserIds
.
getResult
();
}
String
userIdString
=
plan
.
getUserId
();
FeignClientResult
amosIdListByUserIds
=
jcsFeignClient
.
getAmosIdListByUserIds
(
userIdString
);
List
<
String
>
result
=
(
List
<
String
>)
amosIdListByUserIds
.
getResult
();
// 规则推送消息
extraUserIds
.
removeAll
(
result
);
//给执行人只发送待办 不发通知
...
...
@@ -900,7 +903,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
// List<String> userIdList = Arrays.asList(userIdArr);
// 规则推送消息
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
任务型计划生成
,
result
);
// 根据bug5569
// 根据bug5569
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/RulePlanService.java
View file @
d0a4af4e
...
...
@@ -27,10 +27,7 @@ import org.springframework.stereotype.Service;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* @Author: xl
...
...
@@ -96,22 +93,30 @@ public class RulePlanService {
planRo
.
setIsSendApp
(
true
);
}
if
(
ValidationUtil
.
isEmpty
(
userIds
))
{
// 计划牵头责任人
String
leadPeopleIds
=
plan
.
getLeadPeopleIds
();
if
(!
ValidationUtil
.
isEmpty
(
plan
.
getUserId
())
&&
!
leadPeopleIds
.
contains
(
plan
.
getUserId
()))
{
leadPeopleIds
+=
","
+
plan
.
getUserId
();
}
userIds
=
(
List
<
String
>)
jcsFeignClient
.
getAmosIdListByUserIds
(
leadPeopleIds
).
getResult
();
}
//此处判断会导致给执行人和牵头人消息及任务都发送,产生Bug 先去除,如后续业务需要,在外层修改
// if (ValidationUtil.isEmpty(userIds)) {
// // 计划牵头责任人
// String leadPeopleIds = plan.getLeadPeopleIds();
// if (!ValidationUtil.isEmpty(plan.getUserId()) && !leadPeopleIds.contains(plan.getUserId())) {
// leadPeopleIds += "," + plan.getUserId();
// }
// userIds = (List<String>) jcsFeignClient.getAmosIdListByUserIds(leadPeopleIds).getResult();
// }
if
(!
ValidationUtil
.
isEmpty
(
extraUserIds
))
{
List
<
String
>
finalUserIds
=
userIds
;
extraUserIds
.
forEach
(
id
->
{
if
(!
finalUserIds
.
contains
(
id
))
{
finalUserIds
.
add
(
id
);
}
});
userIds
=
finalUserIds
;
if
(!
ValidationUtil
.
isEmpty
(
finalUserIds
))
{
extraUserIds
.
forEach
(
id
->
{
if
(!
finalUserIds
.
contains
(
id
))
{
finalUserIds
.
add
(
id
);
}
});
}
if
(!
ValidationUtil
.
isEmpty
(
finalUserIds
)){
userIds
=
finalUserIds
;
}
else
{
userIds
=
extraUserIds
;
}
}
planRo
.
setSendTime
(
DateUtil
.
date2LongStr
(
new
Date
()));
planRo
.
setRecivers
(
userIds
);
...
...
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