|
@@ -218,6 +218,7 @@ public class CoreServiceImpl implements CoreService {
|
|
LarkRobotUtil.sendMessage("获取例外设置失败,accountId=" + accountId);
|
|
LarkRobotUtil.sendMessage("获取例外设置失败,accountId=" + accountId);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+ //根据例外设置账号判断,当天已经有发送成功的记录,确保不会生成新的例外操作计划
|
|
boolean isSend = false;
|
|
boolean isSend = false;
|
|
List<PlanAccount> planAccountList = planAccountService.getPlanAccount(accountId);
|
|
List<PlanAccount> planAccountList = planAccountService.getPlanAccount(accountId);
|
|
for (PlanAccount planAccount : planAccountList) {
|
|
for (PlanAccount planAccount : planAccountList) {
|
|
@@ -230,6 +231,8 @@ public class CoreServiceImpl implements CoreService {
|
|
if (isSend) {
|
|
if (isSend) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //例外设置的新增和更新
|
|
List<PlanAccount> normalPlanAccounts = planAccountList.stream().filter(e -> e.getIsDelete() == 0).filter(e -> e.getPublishOpenFlag() == 1).collect(Collectors.toList());
|
|
List<PlanAccount> normalPlanAccounts = planAccountList.stream().filter(e -> e.getIsDelete() == 0).filter(e -> e.getPublishOpenFlag() == 1).collect(Collectors.toList());
|
|
if (CollectionUtils.isEmpty(normalPlanAccounts)) {
|
|
if (CollectionUtils.isEmpty(normalPlanAccounts)) {
|
|
Optional<PlanAccount> firstAccount = planAccounts.stream().min((a1, a2) -> -a1.getPublishNum().compareTo(a2.getPublishNum()));
|
|
Optional<PlanAccount> firstAccount = planAccounts.stream().min((a1, a2) -> -a1.getPublishNum().compareTo(a2.getPublishNum()));
|
|
@@ -266,6 +269,7 @@ public class CoreServiceImpl implements CoreService {
|
|
planAccount.setPushType(accountSpecialSettings.getPushType());
|
|
planAccount.setPushType(accountSpecialSettings.getPushType());
|
|
if (PublishGzhPushTypeEnum.manual_push.getVal().equals(accountSpecialSettings.getPushType())) {
|
|
if (PublishGzhPushTypeEnum.manual_push.getVal().equals(accountSpecialSettings.getPushType())) {
|
|
planAccount.setPublishWindowStart(accountSpecialSettings.getPublishPushTime());
|
|
planAccount.setPublishWindowStart(accountSpecialSettings.getPublishPushTime());
|
|
|
|
+ //保证手动推送的结束时间在推送开始时间之后
|
|
planAccount.setPublishWindowEnd("23:00:00");
|
|
planAccount.setPublishWindowEnd("23:00:00");
|
|
} else {
|
|
} else {
|
|
planAccount.setPublishPushTime(accountSpecialSettings.getPublishPushTime());
|
|
planAccount.setPublishPushTime(accountSpecialSettings.getPublishPushTime());
|