update 会议上传文件发邮件处理
This commit is contained in:
+2
-2
@@ -205,8 +205,8 @@ public class CommitteeMeetingController extends JeroController<PayMeeting, IPayM
|
|||||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||||
@PostMapping(value = "/uploadFile")
|
@PostMapping(value = "/uploadFile")
|
||||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||||
payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.COMMITTEE_MEETING_INT);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.COMMITTEE_MEETING_INT);
|
||||||
return Result.OK("上传资料成功!");
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -190,8 +190,8 @@ public class CouncilMeetingController extends JeroController<PayMeeting, IPayMee
|
|||||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||||
@PostMapping(value = "/uploadFile")
|
@PostMapping(value = "/uploadFile")
|
||||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||||
payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.COUNCIL_MEETING_INT);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.COUNCIL_MEETING_INT);
|
||||||
return Result.OK("上传资料成功!");
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -203,9 +203,9 @@ public class InternalMeetingController extends JeroController<PayMeeting, IPayMe
|
|||||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||||
@PostMapping(value = "/uploadFile")
|
@PostMapping(value = "/uploadFile")
|
||||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||||
payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.INTERNATIONAL_MEETING_INT);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.INTERNATIONAL_MEETING_INT);
|
||||||
|
|
||||||
return Result.OK("上传资料成功!");
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -203,8 +203,8 @@ public class OtherMeetingController extends JeroController<PayMeeting, IPayMeeti
|
|||||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||||
@PostMapping(value = "/uploadFile")
|
@PostMapping(value = "/uploadFile")
|
||||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||||
payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.OTHER_MEETING_INT);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.OTHER_MEETING_INT);
|
||||||
return Result.OK("上传资料成功!");
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -467,8 +467,8 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
|||||||
@PostMapping(value = "/uploadFile")
|
@PostMapping(value = "/uploadFile")
|
||||||
@Transactional
|
@Transactional
|
||||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||||
payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.INTERNATIONAL_MEETING_INT);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.INTERNATIONAL_MEETING_INT);
|
||||||
return Result.OK("上传资料成功!");
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "生成base64")
|
@ApiOperation(value = "生成base64")
|
||||||
|
|||||||
+2
-2
@@ -274,8 +274,8 @@ public class StandardsMeetingController extends JeroController<PayMeeting, IPayM
|
|||||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||||
@PostMapping(value = "/uploadFile")
|
@PostMapping(value = "/uploadFile")
|
||||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||||
payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.STANDARD_MEETING_INT);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.STANDARD_MEETING_INT);
|
||||||
return Result.OK("上传资料成功!");
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -225,8 +225,8 @@ public class WorkGroupMeetingController extends JeroController<PayMeeting, IPayM
|
|||||||
@ApiOperation(value = "上传资料", notes = "上传资料")
|
@ApiOperation(value = "上传资料", notes = "上传资料")
|
||||||
@PostMapping(value = "/uploadFile")
|
@PostMapping(value = "/uploadFile")
|
||||||
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
|
||||||
payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.WORKING_GROUP_MEETING_INT);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.WORKING_GROUP_MEETING_INT);
|
||||||
return Result.OK("上传资料成功!");
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -73,7 +73,7 @@ public interface IPayMeetingService extends IService<PayMeeting> {
|
|||||||
|
|
||||||
IPage<PayMeeting> queryMeetingSummary(MeetingSummary meetingSummary, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
IPage<PayMeeting> queryMeetingSummary(MeetingSummary meetingSummary, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||||
|
|
||||||
void uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon);
|
List<String> uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传会议纪要
|
* 上传会议纪要
|
||||||
|
|||||||
+19
-7
@@ -51,15 +51,12 @@ import com.jero.member.service.ITbMemberProjectService;
|
|||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
import com.jero.project.entity.PayWorkingGroup;
|
import com.jero.project.entity.PayWorkingGroup;
|
||||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
|
||||||
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
|
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
|
||||||
import com.jero.project.service.IPayWorkingGroupService;
|
import com.jero.project.service.IPayWorkingGroupService;
|
||||||
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
|
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
|
||||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||||
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
import com.jero.standards.xuanguan.stablecrosstraining.entity.StableCrossTraining;
|
||||||
import com.jero.standards.xuanguan.stablecrosstraining.service.IStableCrossTrainingService;
|
import com.jero.standards.xuanguan.stablecrosstraining.service.IStableCrossTrainingService;
|
||||||
import org.apache.commons.beanutils.ConvertUtils;
|
|
||||||
import org.apache.commons.beanutils.ConvertUtilsBean;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.util.CollectionUtils;
|
import org.apache.shiro.util.CollectionUtils;
|
||||||
@@ -1092,7 +1089,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon) {
|
public List<String> uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon) {
|
||||||
|
List<String> listMsg = new ArrayList<>();
|
||||||
String id = uploadFileVO.getId();
|
String id = uploadFileVO.getId();
|
||||||
PayMeeting payMeeting = getOne(
|
PayMeeting payMeeting = getOne(
|
||||||
new LambdaQueryWrapper<PayMeeting>()
|
new LambdaQueryWrapper<PayMeeting>()
|
||||||
@@ -1110,7 +1108,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
List<String> meetingFileIdList = Arrays.asList(fileIds.split(","));
|
List<String> meetingFileIdList = Arrays.asList(fileIds.split(","));
|
||||||
//如果过滤后为空则不发邮件
|
//如果过滤后为空则不发邮件
|
||||||
if (meetingFileIdList.isEmpty()) {
|
if (meetingFileIdList.isEmpty()) {
|
||||||
return;
|
return listMsg;
|
||||||
}
|
}
|
||||||
//如果是标协会议就同步文件
|
//如果是标协会议就同步文件
|
||||||
if (meetingCommon.equals(MeetingCommon.STANDARD_MEETING_INT)) {
|
if (meetingCommon.equals(MeetingCommon.STANDARD_MEETING_INT)) {
|
||||||
@@ -1137,12 +1135,14 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
.eq(PayMeetingSituation::getCheckResult, MeetingSubitemCommon.SIGNUP_STATUS_1)
|
.eq(PayMeetingSituation::getCheckResult, MeetingSubitemCommon.SIGNUP_STATUS_1)
|
||||||
);
|
);
|
||||||
if (payMeetingSituations.isEmpty()) {
|
if (payMeetingSituations.isEmpty()) {
|
||||||
return;
|
return listMsg;
|
||||||
}
|
}
|
||||||
//当前登录人
|
//当前登录人
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
//获得参会人
|
//获得参会人
|
||||||
List<String> companyContactIdList = payMeetingSituations.stream().map(PayMeetingSituation::getCompanyContactId).collect(Collectors.toList());
|
List<String> companyContactIdList = payMeetingSituations.stream().map(PayMeetingSituation::getCompanyContactId).collect(Collectors.toList());
|
||||||
|
int success = companyContactIdList.size();
|
||||||
|
int failed = 0;
|
||||||
for (String contactId : companyContactIdList) {
|
for (String contactId : companyContactIdList) {
|
||||||
PayContactsManagement payContactsManagement = payContactsManagementService.getById(contactId);
|
PayContactsManagement payContactsManagement = payContactsManagementService.getById(contactId);
|
||||||
// 发送消息
|
// 发送消息
|
||||||
@@ -1164,8 +1164,20 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("id", payMeeting.getId());
|
json.put("id", payMeeting.getId());
|
||||||
sendMessageDTO.setBusId(json.toJSONString());
|
sendMessageDTO.setBusId(json.toJSONString());
|
||||||
sendMessageService.SendMessageService(sendMessageDTO);
|
try{
|
||||||
|
sendMessageService.SendMessageService(sendMessageDTO);
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
String name = payContactsManagement.getName();
|
||||||
|
if(e.getMessage().contains("邮件发送") && !listMsg.contains(name + "邮件发送失败")){
|
||||||
|
success--;
|
||||||
|
failed++;
|
||||||
|
listMsg.add(name + "邮件发送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
listMsg.add(0,"成功"+success+"条数据,失败"+failed+"条数据");
|
||||||
|
return listMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user