update 会议汇总导出时增加参会人
This commit is contained in:
+2
-3
@@ -141,9 +141,8 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
|
||||
IPage<PayMeeting> queryPageList = payMeetingService.queryMeetingSummary(meetingSummary, -1, -1, request);
|
||||
|
||||
//List<Object> exportList = payMeetingService.getExportList(request, queryPageList);
|
||||
List<Object> exportList = payMeetingService.getExportListSummary(request, queryPageList);
|
||||
Class<?> aClass = payMeetingService.getaClass(MeetingCommon.OTHER_MEETING_INT);
|
||||
return super.exportListXls(exportList, aClass, "会议管理");
|
||||
List<MeetingSummaryExcel> exportList = payMeetingService.getExportListSummary(request, queryPageList);
|
||||
return super.exportListXls(exportList, MeetingSummaryExcel.class, "会议管理");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,10 +14,12 @@ import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.meeting.valid.group.InternationalMeeting;
|
||||
import com.jero.meeting.valid.group.InternationalMeetingWasic;
|
||||
import com.jero.meeting.valid.group.StandardMeeting;
|
||||
import com.jero.meeting.vo.excel.SituationExcel;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
@@ -406,4 +408,10 @@ public class PayMeeting implements Serializable {
|
||||
/**起草组名称*/
|
||||
@ApiModelProperty(value = "起草组名称")
|
||||
private String draftingGroupName;
|
||||
|
||||
/**
|
||||
* 参会人列表
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<PayMeetingSituation> situationList;
|
||||
}
|
||||
|
||||
+2
-1
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.meeting.vo.PayMeetingVO;
|
||||
import com.jero.meeting.vo.PublishReminderVO;
|
||||
import com.jero.meeting.vo.UploadFileVO;
|
||||
import com.jero.meeting.vo.excel.MeetingSummaryExcel;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
@@ -91,7 +92,7 @@ public interface IPayMeetingService extends IService<PayMeeting> {
|
||||
*/
|
||||
List<Object> getExportList(HttpServletRequest request, IPage<PayMeeting> queryPageList);
|
||||
|
||||
List<Object> getExportListSummary(HttpServletRequest request, IPage<PayMeeting> queryPageList);
|
||||
List<MeetingSummaryExcel> getExportListSummary(HttpServletRequest request, IPage<PayMeeting> queryPageList);
|
||||
|
||||
/**
|
||||
* 根据参会人id获取会议信息
|
||||
|
||||
+52
-6
@@ -25,6 +25,7 @@ import com.jero.common.util.AuthenticationUtils;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.common.util.ValidUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.company.entity.PayCompanyManagement;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.company.service.IPayCompanyManagementService;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
@@ -142,6 +143,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
private IPayDraftingGroupService payDraftingGroupService;
|
||||
@Resource
|
||||
private IPayDraftingGroupSubItemContactsService draftingGroupSubItemContactsService;
|
||||
@Resource
|
||||
private IPayCompanyManagementService companyManagementService;
|
||||
@Resource
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
|
||||
/**
|
||||
* 新增会议
|
||||
@@ -1136,11 +1141,13 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
String participant = req.getParameter("participant");
|
||||
boolean flag1 = StringUtils.isNotBlank(enterpriseName);
|
||||
boolean flag2 = StringUtils.isNotBlank(participant);
|
||||
Map<String, List<PayMeetingSituation>> meetingIdSituationMap = new HashMap<>();
|
||||
if (flag1 || flag2) {
|
||||
LambdaQueryWrapper<PayMeetingSituation> pmsWrapper = new LambdaQueryWrapper<>();
|
||||
pmsWrapper.like(flag1, PayMeetingSituation::getCompanyName, enterpriseName);
|
||||
pmsWrapper.like(flag2, PayMeetingSituation::getCompanyContactName, participant);
|
||||
List<PayMeetingSituation> list = payMeetingSituationService.list(pmsWrapper);
|
||||
meetingIdSituationMap = CollStreamUtil.groupByKey(list, PayMeetingSituation::getMeetingId);
|
||||
List<String> idList = list.stream().map(PayMeetingSituation::getMeetingId).collect(Collectors.toList());
|
||||
if (idList.size() > 0) {
|
||||
queryWrapper.in("id", idList);
|
||||
@@ -1164,8 +1171,15 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
Page<PayMeeting> page = new Page<>(pageNo, pageSize);
|
||||
|
||||
IPage<PayMeeting> pageList = page(page, queryWrapper);
|
||||
List<PayMeeting> records = pageList.getRecords();
|
||||
// 过滤选中数据
|
||||
String selections = req.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
records = records.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
for (PayMeeting meeting : pageList.getRecords()) {
|
||||
for (PayMeeting meeting : records) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
|
||||
meeting.setDirectorName(user.getRealname());
|
||||
@@ -1173,6 +1187,30 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
PayMeetingVO payMeetingVO = new PayMeetingVO();
|
||||
BeanUtils.copyProperties(payMeetingVO, payMeeting);
|
||||
String meetingId = meeting.getId();
|
||||
List<PayMeetingSituation> payMeetingSituations;
|
||||
if (meetingIdSituationMap.containsKey(meetingId)){
|
||||
payMeetingSituations = meetingIdSituationMap.get(meetingId);
|
||||
}else {
|
||||
LambdaQueryWrapper<PayMeetingSituation> pmsWrapper = new LambdaQueryWrapper<>();
|
||||
pmsWrapper.eq(PayMeetingSituation::getMeetingId, meetingId);
|
||||
payMeetingSituations = payMeetingSituationService.list(pmsWrapper);
|
||||
}
|
||||
for (PayMeetingSituation meetingSituation : payMeetingSituations) {
|
||||
String companyContactId = meetingSituation.getCompanyContactId();
|
||||
PayContactsManagement contactsManagement = contactsManagementService.getById(companyContactId);
|
||||
meetingSituation.setCompanyContactName(contactsManagement.getName());
|
||||
meetingSituation.setPost(contactsManagement.getPost());
|
||||
meetingSituation.setPhone(PasswordUtil.decrypt(contactsManagement.getPhone()));
|
||||
meetingSituation.setEmail(PasswordUtil.decrypt(contactsManagement.getEmail()));
|
||||
PayCompanyManagement companyManagement = companyManagementService.getById(contactsManagement.getCompanyId());
|
||||
String checkFile = meetingSituation.getCheckFile();
|
||||
meetingSituation.setCompanyName(companyManagement.getCompanyName());
|
||||
if (StringUtils.isNotBlank(checkFile)) {
|
||||
OSSFile ossFile = iossFileService.getById(checkFile);
|
||||
meetingSituation.setCheckFile(ossFile.getUrl());
|
||||
}
|
||||
}
|
||||
meeting.setSituationList(payMeetingSituations);
|
||||
//查询酒店联系人列表
|
||||
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meetingId);
|
||||
@@ -1462,7 +1500,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Object> getExportListSummary(HttpServletRequest request, IPage<PayMeeting> queryPageList) {
|
||||
public List<MeetingSummaryExcel> getExportListSummary(HttpServletRequest request, IPage<PayMeeting> queryPageList) {
|
||||
List<PayMeeting> pageList = queryPageList.getRecords();
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
@@ -1473,7 +1511,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
if (pageList.isEmpty()) {
|
||||
throw new JeroBootException("没有数据");
|
||||
}
|
||||
List<Object> exportList = new ArrayList<>();
|
||||
List<MeetingSummaryExcel> exportList = new ArrayList<>();
|
||||
for (PayMeeting meeting : pageList) {
|
||||
//查询会议负责人
|
||||
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
|
||||
@@ -1519,9 +1557,17 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
}
|
||||
|
||||
//保存数据
|
||||
OtherMeetingExcel otherMeetingExcel = new OtherMeetingExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, otherMeetingExcel);
|
||||
exportList.add(otherMeetingExcel);
|
||||
MeetingSummaryExcel meetingSummaryExcel = new MeetingSummaryExcel();
|
||||
BeanUtils.copyProperties(payMeetingVO, meetingSummaryExcel);
|
||||
List<PayMeetingSituation> meetingSituationList = meeting.getSituationList();
|
||||
List<SituationExcel> situationList = new ArrayList<>();
|
||||
for (PayMeetingSituation payMeetingSituation : meetingSituationList) {
|
||||
SituationExcel situationExcel = new SituationExcel();
|
||||
BeanUtils.copyProperties(payMeetingSituation, situationExcel);
|
||||
situationList.add(situationExcel);
|
||||
}
|
||||
meetingSummaryExcel.setSituationList(situationList);
|
||||
exportList.add(meetingSummaryExcel);
|
||||
}
|
||||
return exportList;
|
||||
}
|
||||
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
package com.jero.meeting.vo.excel;
|
||||
|
||||
import com.jero.meeting.entity.PayMeetingContacts;
|
||||
import com.jero.meeting.entity.PayMeetingHotelContacts;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2024-01-29 15:03
|
||||
*/
|
||||
@Data
|
||||
public class MeetingSummaryExcel {
|
||||
/**会议名称*/
|
||||
@Excel(name = "会议名称", width = 15)
|
||||
private String meetingName;
|
||||
|
||||
/**会议类型*/
|
||||
@Excel(name = "会议类型", width = 15)
|
||||
private String meetingType;
|
||||
|
||||
/**开始时间*/
|
||||
@Excel(name = "会议开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date startTime;
|
||||
|
||||
/**结束时间*/
|
||||
@Excel(name = "会议结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date endTime;
|
||||
|
||||
/**年份*/
|
||||
@Excel(name = "年份", width = 15)
|
||||
private String particularYear;
|
||||
|
||||
/**召开地点*/
|
||||
@Excel(name = "召开地点", width = 15)
|
||||
private String venue;
|
||||
|
||||
/**详细地址*/
|
||||
@Excel(name = "详细地址", width = 15)
|
||||
private String address;
|
||||
|
||||
/**预计参加人数*/
|
||||
@Excel(name = "预计参加人数", width = 15)
|
||||
private String estimatedNumber;
|
||||
|
||||
/**会议内容*/
|
||||
@Excel(name = "会议内容", width = 15)
|
||||
private String meetingContent;
|
||||
|
||||
/**报名截止时间*/
|
||||
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date registerDeadline;
|
||||
|
||||
/**会议费用*/
|
||||
@Excel(name = "会议费用", width = 15)
|
||||
private BigDecimal meetingCosts;
|
||||
|
||||
/**会议负责人*/
|
||||
@Excel(name = "会议负责人", width = 15)
|
||||
private String directorName;
|
||||
|
||||
/**会议负责人手机号*/
|
||||
@Excel(name = "会议负责人手机号", width = 15)
|
||||
private String directorPhone;
|
||||
|
||||
/**酒店名称*/
|
||||
@Excel(name = "酒店名称", width = 15)
|
||||
private String hotelName;
|
||||
|
||||
/**酒店地址*/
|
||||
@Excel(name = "酒店地址", width = 15)
|
||||
private String hotelAddress;
|
||||
|
||||
/**
|
||||
* 会议关联酒店联系人列表
|
||||
*/
|
||||
private List<PayMeetingHotelContacts> hotelContactsList;
|
||||
/**
|
||||
* 会议联系人列表
|
||||
*/
|
||||
@ExcelCollection(name = "会议联系人列表")
|
||||
private List<PayMeetingContacts> meetingContactsList;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 参会人列表
|
||||
*/
|
||||
@ExcelCollection(name = "参会人列表")
|
||||
private List<SituationExcel> situationList;
|
||||
}
|
||||
Reference in New Issue
Block a user