fix 嘉宾上传文件
This commit is contained in:
+1
-1
@@ -203,7 +203,7 @@ 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) {
|
||||||
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.COMMITTEE_MEETING_INT, true);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.COMMITTEE_MEETING_INT, false);
|
||||||
return Result.OK("上传资料成功!",strings);
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -190,7 +190,7 @@ 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) {
|
||||||
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.COUNCIL_MEETING_INT, true);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.COUNCIL_MEETING_INT, false);
|
||||||
return Result.OK("上传资料成功!",strings);
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -201,7 +201,7 @@ 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) {
|
||||||
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.INTERNATIONAL_MEETING_INT, true);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.INTERNATIONAL_MEETING_INT, false);
|
||||||
|
|
||||||
return Result.OK("上传资料成功!",strings);
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -201,7 +201,7 @@ 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) {
|
||||||
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.OTHER_MEETING_INT, true);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.OTHER_MEETING_INT, false);
|
||||||
return Result.OK("上传资料成功!",strings);
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -27,6 +27,7 @@ import com.jero.data.service.IPayCaseCouncilSubitemService;
|
|||||||
import com.jero.meeting.common.MeetingCommon;
|
import com.jero.meeting.common.MeetingCommon;
|
||||||
import com.jero.meeting.common.MeetingSubitemCommon;
|
import com.jero.meeting.common.MeetingSubitemCommon;
|
||||||
import com.jero.meeting.entity.*;
|
import com.jero.meeting.entity.*;
|
||||||
|
import com.jero.meeting.mapper.PayMeetingGuestsFileMapper;
|
||||||
import com.jero.meeting.service.*;
|
import com.jero.meeting.service.*;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -101,6 +102,8 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
|||||||
private IPayMeetingContactsService meetingContactsService;
|
private IPayMeetingContactsService meetingContactsService;
|
||||||
@Resource
|
@Resource
|
||||||
private IPayMeetingStandardService payMeetingStandardService;
|
private IPayMeetingStandardService payMeetingStandardService;
|
||||||
|
@Resource
|
||||||
|
private PayMeetingGuestsFileMapper meetingGuestsFileMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@@ -464,7 +467,7 @@ 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) {
|
||||||
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.INTERNATIONAL_MEETING_INT, true);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.INTERNATIONAL_MEETING_INT, false);
|
||||||
return Result.OK("上传资料成功!",strings);
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -270,7 +270,7 @@ 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) {
|
||||||
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.STANDARD_MEETING_INT, true);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.STANDARD_MEETING_INT, false);
|
||||||
return Result.OK("上传资料成功!",strings);
|
return Result.OK("上传资料成功!",strings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -208,7 +208,7 @@ 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) {
|
||||||
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.WORKING_GROUP_MEETING_INT, true);
|
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.WORKING_GROUP_MEETING_INT, false);
|
||||||
return Result.OK("上传资料成功!",strings);
|
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);
|
||||||
|
|
||||||
List<String> uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon, Boolean saveFileFlag);
|
List<String> uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon, Boolean isGuestsUpload);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传会议纪要
|
* 上传会议纪要
|
||||||
|
|||||||
+25
-10
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.meeting.service.impl;
|
package com.jero.meeting.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -59,6 +60,7 @@ 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.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.logging.log4j.util.Strings;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.util.CollectionUtils;
|
import org.apache.shiro.util.CollectionUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -1010,12 +1012,12 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
if (StringUtils.isNotBlank(meetingData)) {
|
if (StringUtils.isNotBlank(meetingData)) {
|
||||||
meetingDataList.addAll(Arrays.asList(meetingData.split(",")));
|
meetingDataList.addAll(Arrays.asList(meetingData.split(",")));
|
||||||
}
|
}
|
||||||
LambdaQueryWrapper<PayMeetingGuestsFile> wrapper1 = new LambdaQueryWrapper<>();
|
//LambdaQueryWrapper<PayMeetingGuestsFile> wrapper1 = new LambdaQueryWrapper<>();
|
||||||
wrapper1.eq(PayMeetingGuestsFile::getMeetingId,meetingId);
|
//wrapper1.eq(PayMeetingGuestsFile::getMeetingId,meetingId);
|
||||||
List<PayMeetingGuestsFile> payMeetingGuestsFiles = meetingGuestsFileMapper.selectList(wrapper1);
|
//List<PayMeetingGuestsFile> payMeetingGuestsFiles = meetingGuestsFileMapper.selectList(wrapper1);
|
||||||
List<String> collect = payMeetingGuestsFiles.stream().map(PayMeetingGuestsFile::getFileId).collect(Collectors.toList());
|
//List<String> collect = payMeetingGuestsFiles.stream().map(PayMeetingGuestsFile::getFileId).collect(Collectors.toList());
|
||||||
meetingDataList.addAll(collect);
|
//meetingDataList.addAll(collect);
|
||||||
meeting.setMeetingData(String.join(",",meetingDataList));
|
//meeting.setMeetingData(String.join(",",meetingDataList));
|
||||||
}
|
}
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
@@ -1105,7 +1107,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public List<String> uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon, Boolean saveFileFlag) {
|
public List<String> uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon, Boolean isGuestsUpload) {
|
||||||
List<String> listMsg = new ArrayList<>();
|
List<String> listMsg = new ArrayList<>();
|
||||||
String id = uploadFileVO.getId();
|
String id = uploadFileVO.getId();
|
||||||
LambdaQueryWrapper<PayMeeting> payMeetingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PayMeeting> payMeetingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -1119,13 +1121,26 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
|||||||
}
|
}
|
||||||
meetingCommon = payMeeting.getMeetingType();
|
meetingCommon = payMeeting.getMeetingType();
|
||||||
String fileIds = uploadFileVO.getFileIds();
|
String fileIds = uploadFileVO.getFileIds();
|
||||||
if (saveFileFlag){
|
List<String> meetingFileIdList = Arrays.asList(fileIds.split(","));
|
||||||
|
if (isGuestsUpload){
|
||||||
|
String meetingData = payMeeting.getMeetingData();
|
||||||
|
if (StringUtils.isNotBlank(meetingData)) {
|
||||||
|
List<String> oldMeetingDataList = Arrays.asList(meetingData.split(","));
|
||||||
|
oldMeetingDataList.addAll(meetingFileIdList);
|
||||||
|
meetingFileIdList = oldMeetingDataList;
|
||||||
|
fileIds = String.join(",", meetingFileIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//删除嘉宾文件
|
||||||
|
LambdaQueryWrapper<PayMeetingGuestsFile> deleteWrapper = new LambdaQueryWrapper<>();
|
||||||
|
deleteWrapper.eq(PayMeetingGuestsFile::getMeetingId,id);
|
||||||
|
deleteWrapper.notIn(PayMeetingGuestsFile::getFileId,meetingFileIdList);
|
||||||
|
meetingGuestsFileMapper.delete(deleteWrapper);
|
||||||
|
|
||||||
LambdaUpdateWrapper<PayMeeting> wrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<PayMeeting> wrapper = new LambdaUpdateWrapper<>();
|
||||||
wrapper.eq(PayMeeting::getId, id);
|
wrapper.eq(PayMeeting::getId, id);
|
||||||
wrapper.set(PayMeeting::getMeetingData, fileIds);
|
wrapper.set(PayMeeting::getMeetingData, fileIds);
|
||||||
update(wrapper);
|
update(wrapper);
|
||||||
}
|
|
||||||
List<String> meetingFileIdList = Arrays.asList(fileIds.split(","));
|
|
||||||
//如果过滤后为空则不发邮件
|
//如果过滤后为空则不发邮件
|
||||||
if (meetingFileIdList.isEmpty()) {
|
if (meetingFileIdList.isEmpty()) {
|
||||||
return listMsg;
|
return listMsg;
|
||||||
|
|||||||
+14
-1
@@ -80,6 +80,7 @@ import com.jero.temporary.service.IPayContactsManagementTemporaryService;
|
|||||||
import com.jero.util.ObjRecordUtil;
|
import com.jero.util.ObjRecordUtil;
|
||||||
import com.jero.util.module.ObjRecordUtilModule;
|
import com.jero.util.module.ObjRecordUtilModule;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.logging.log4j.util.Strings;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -1815,7 +1816,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
uploadFileVO.setFileIds(fileIds);
|
uploadFileVO.setFileIds(fileIds);
|
||||||
|
|
||||||
|
|
||||||
meetingService.uploadFileSendMsg(uploadFileVO, null,false);
|
meetingService.uploadFileSendMsg(uploadFileVO, null,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1843,6 +1844,18 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
wrapper.eq(PayMeetingGuestsFile::getContactsId,sysUserId);
|
wrapper.eq(PayMeetingGuestsFile::getContactsId,sysUserId);
|
||||||
wrapper.in(PayMeetingGuestsFile::getFileId,fileIdList);
|
wrapper.in(PayMeetingGuestsFile::getFileId,fileIdList);
|
||||||
meetingGuestsFileMapper.delete(wrapper);
|
meetingGuestsFileMapper.delete(wrapper);
|
||||||
|
|
||||||
|
PayMeeting meeting = meetingService.getById(meetingId);
|
||||||
|
String meetingData = meeting.getMeetingData();
|
||||||
|
List<String> meetingDataList = new ArrayList<>();
|
||||||
|
if (StringUtils.isNotBlank(meetingData)){
|
||||||
|
meetingDataList = Arrays.asList(meetingData.split(","));
|
||||||
|
meetingDataList.removeAll(fileIdList);
|
||||||
|
}
|
||||||
|
LambdaUpdateWrapper<PayMeeting> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.eq(PayMeeting::getId, meetingId);
|
||||||
|
updateWrapper.set(PayMeeting::getMeetingData, String.join(",",meetingDataList));
|
||||||
|
meetingService.update(updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user