fix 74162 分发后提示语有缺失

This commit is contained in:
lijiarao
2023-07-27 18:35:01 +08:00
parent 6d9b9c0b83
commit 9c0fa5cb66
@@ -205,17 +205,19 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
throw new JeroBootException("分发失败!");
}
// 发送消息
int success = list.size();
int failed = 0;
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String finalMsg = msg;
List<String> listMsg = new ArrayList<>();
list.forEach(p->{
for (PayContactsManagementTemporary p : list) {
try {
List<PayWorkingGroupDistributionRecord> listStr = listPayWorkingGroupDistributionRecord.stream().filter(item->
(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1) ?
Objects.equals(item.getTemporaryContactsId(),p.getId()) :
Objects.equals(item.getContactsId(),p.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listStr)){
return;
continue;
}
// 发送消息
@@ -249,10 +251,13 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
}
}catch (Exception e){
if(e.getMessage().contains("邮件发送") && !listMsg.contains(p.getName() + "邮件发送失败")){
success--;
failed++;
listMsg.add(p.getCompanyName()+"-"+p.getName() + "邮件发送失败");
}
}
});
}
listMsg.add(0,"成功"+success+"条数据,失败"+failed+"条数据");
return listMsg;
}