fix bug 41739 会议维护--导出--数据为空时,点击导出后提示“没有数据”

This commit is contained in:
lijiarao
2021-10-29 16:38:47 +08:00
parent e29fc1a80f
commit 5ca0e0b5c8
14 changed files with 51 additions and 446 deletions
@@ -226,10 +226,6 @@ public class CommitteeMeetingController extends JeroController<PayMeeting, IPayM
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = pageList.get(0).getMeetingType().toString();
for (PayMeeting meeting : pageList) {
//查询会议负责人
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
@@ -238,7 +234,7 @@ public class CommitteeMeetingController extends JeroController<PayMeeting, IPayM
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
PayMeetingVO payMeetingVO = new PayMeetingVO();
BeanUtils.copyProperties(meeting, payMeetingVO);
meetingType = meeting.getMeetingType().toString();
String meetingType = meeting.getMeetingType().toString();
String meetingType1 = sysBaseAPI.translateDict("meeting_type", meetingType);
payMeetingVO.setMeetingType(meetingType1);
payMeetingVO.setHotelContactsList(new ArrayList<>());
@@ -291,25 +287,8 @@ public class CommitteeMeetingController extends JeroController<PayMeeting, IPayM
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupMeetingExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsMeetingExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalMeetingExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = OtherMeetingExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeMeetingExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "会议管理");
Class<?> aClass = payMeetingService.getaClass(MeetingCommon.COMMITTEE_MEETING_INT);
return super.exportListXls(exportList, aClass, "会议管理");
}
/**
@@ -192,89 +192,10 @@ public class CommitteeMeetingSituationController extends JeroController<PayMeeti
@RequiresPermissions("committeeMeetingSituation:export")
@GetMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
String meetingId = payMeetingSituation.getMeetingId();
PayMeeting payMeeting = meetingService.getById(meetingId);
if (!Objects.equals(payMeeting.getMeetingType(),MEETING_TYPE)){
throw new JeroBootException("数据权限不足");
}
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
// 过滤选中数据
String selections = request.getParameter("selections");
if (oConvertUtils.isNotEmpty(selections)) {
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
List<Object> exportList = new ArrayList<>();
for (PayMeetingSituation meetingSituation : pageList) {
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());
meetingSituation.setCompanyName(companyManagement.getCompanyName());
switch (meetingType) {
case MeetingCommon.STANDARD_MEETING:
//保存数据
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
exportList.add(standardsSituationExcel);
// 工作组项目查询工作组项目名
break;
case MeetingCommon.WORKING_GROUP_MEETING:
//保存数据
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
exportList.add(workingGroupSituationExcel);
break;
case MeetingCommon.INTERNATIONAL_MEETING:
//保存数据
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
exportList.add(internationalSituationExcel);
break;
case MeetingCommon.OTHER_MEETING:
//保存数据
SituationExcel situationExcel = new SituationExcel();
BeanUtils.copyProperties(meetingSituation, situationExcel);
exportList.add(situationExcel);
break;
case MeetingCommon.COMMITTEE_MEETING:
//保存数据
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
exportList.add(committeeSituationExcel);
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupSituationExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsSituationExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalSituationExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = SituationExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeSituationExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "参会人员信息");
List<Object> objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE);
Class<?> aClass = payMeetingSituationService.getaClass(MEETING_TYPE);
return super.exportListXls(objects, aClass, "参会人员信息");
}
@@ -225,10 +225,6 @@ public class InternalMeetingController extends JeroController<PayMeeting, IPayMe
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = pageList.get(0).getMeetingType().toString();
for (PayMeeting meeting : pageList) {
//查询会议负责人
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
@@ -237,7 +233,7 @@ public class InternalMeetingController extends JeroController<PayMeeting, IPayMe
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
PayMeetingVO payMeetingVO = new PayMeetingVO();
BeanUtils.copyProperties(meeting, payMeetingVO);
meetingType = meeting.getMeetingType().toString();
String meetingType = meeting.getMeetingType().toString();
String meetingType1 = sysBaseAPI.translateDict("meeting_type", meetingType);
payMeetingVO.setMeetingType(meetingType1);
payMeetingVO.setHotelContactsList(new ArrayList<>());
@@ -290,25 +286,8 @@ public class InternalMeetingController extends JeroController<PayMeeting, IPayMe
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupMeetingExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsMeetingExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalMeetingExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = OtherMeetingExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeMeetingExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "会议管理");
Class<?> aClass = payMeetingService.getaClass(MeetingCommon.INTERNATIONAL_MEETING_INT);
return super.exportListXls(exportList, aClass, "会议管理");
}
/**
@@ -225,10 +225,6 @@ public class OtherMeetingController extends JeroController<PayMeeting, IPayMeeti
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = pageList.get(0).getMeetingType().toString();
for (PayMeeting meeting : pageList) {
//查询会议负责人
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
@@ -237,7 +233,7 @@ public class OtherMeetingController extends JeroController<PayMeeting, IPayMeeti
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
PayMeetingVO payMeetingVO = new PayMeetingVO();
BeanUtils.copyProperties(meeting, payMeetingVO);
meetingType = meeting.getMeetingType().toString();
String meetingType = meeting.getMeetingType().toString();
String meetingType1 = sysBaseAPI.translateDict("meeting_type", meetingType);
payMeetingVO.setMeetingType(meetingType1);
payMeetingVO.setHotelContactsList(new ArrayList<>());
@@ -290,25 +286,8 @@ public class OtherMeetingController extends JeroController<PayMeeting, IPayMeeti
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupMeetingExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsMeetingExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalMeetingExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = OtherMeetingExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeMeetingExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "会议管理");
Class<?> aClass = payMeetingService.getaClass(MeetingCommon.OTHER_MEETING_INT);
return super.exportListXls(exportList, aClass, "会议管理");
}
/**
@@ -178,84 +178,9 @@ public class OtherMeetingSituationController extends JeroController<PayMeetingSi
@RequiresPermissions("otherMeetingSituation:export")
@GetMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
// 过滤选中数据
String selections = request.getParameter("selections");
if (oConvertUtils.isNotEmpty(selections)) {
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
List<Object> exportList = new ArrayList<>();
for (PayMeetingSituation meetingSituation : pageList) {
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());
meetingSituation.setCompanyName(companyManagement.getCompanyName());
switch (meetingType) {
case MeetingCommon.STANDARD_MEETING:
//保存数据
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
exportList.add(standardsSituationExcel);
// 工作组项目查询工作组项目名
break;
case MeetingCommon.WORKING_GROUP_MEETING:
//保存数据
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
exportList.add(workingGroupSituationExcel);
break;
case MeetingCommon.INTERNATIONAL_MEETING:
//保存数据
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
exportList.add(internationalSituationExcel);
break;
case MeetingCommon.OTHER_MEETING:
//保存数据
SituationExcel situationExcel = new SituationExcel();
BeanUtils.copyProperties(meetingSituation, situationExcel);
exportList.add(situationExcel);
break;
case MeetingCommon.COMMITTEE_MEETING:
//保存数据
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
exportList.add(committeeSituationExcel);
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupSituationExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsSituationExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalSituationExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = SituationExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeSituationExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "参会人员信息");
List<Object> objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE);
Class<?> aClass = payMeetingSituationService.getaClass(MEETING_TYPE);
return super.exportListXls(objects, aClass, "参会人员信息");
}
@@ -252,10 +252,6 @@ public class StandardsMeetingController extends JeroController<PayMeeting, IPayM
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = pageList.get(0).getMeetingType().toString();
for (PayMeeting meeting : pageList) {
//查询会议负责人
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
@@ -264,7 +260,7 @@ public class StandardsMeetingController extends JeroController<PayMeeting, IPayM
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
PayMeetingVO payMeetingVO = new PayMeetingVO();
BeanUtils.copyProperties(meeting, payMeetingVO);
meetingType = meeting.getMeetingType().toString();
String meetingType = meeting.getMeetingType().toString();
String meetingType1 = sysBaseAPI.translateDict("meeting_type", meetingType);
payMeetingVO.setMeetingType(meetingType1);
payMeetingVO.setHotelContactsList(new ArrayList<>());
@@ -317,25 +313,8 @@ public class StandardsMeetingController extends JeroController<PayMeeting, IPayM
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupMeetingExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsMeetingExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalMeetingExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = OtherMeetingExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeMeetingExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "会议管理");
Class<?> aClass = payMeetingService.getaClass(MeetingCommon.STANDARD_MEETING_INT);
return super.exportListXls(exportList, aClass, "会议管理");
}
/**
@@ -178,84 +178,9 @@ public class StandardsMeetingSituationController extends JeroController<PayMeeti
@RequiresPermissions("standardsMeetingSituation:export")
@GetMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
// 过滤选中数据
String selections = request.getParameter("selections");
if (oConvertUtils.isNotEmpty(selections)) {
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
List<Object> exportList = new ArrayList<>();
for (PayMeetingSituation meetingSituation : pageList) {
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());
meetingSituation.setCompanyName(companyManagement.getCompanyName());
switch (meetingType) {
case MeetingCommon.STANDARD_MEETING:
//保存数据
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
exportList.add(standardsSituationExcel);
// 工作组项目查询工作组项目名
break;
case MeetingCommon.WORKING_GROUP_MEETING:
//保存数据
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
exportList.add(workingGroupSituationExcel);
break;
case MeetingCommon.INTERNATIONAL_MEETING:
//保存数据
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
exportList.add(internationalSituationExcel);
break;
case MeetingCommon.OTHER_MEETING:
//保存数据
SituationExcel situationExcel = new SituationExcel();
BeanUtils.copyProperties(meetingSituation, situationExcel);
exportList.add(situationExcel);
break;
case MeetingCommon.COMMITTEE_MEETING:
//保存数据
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
exportList.add(committeeSituationExcel);
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupSituationExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsSituationExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalSituationExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = SituationExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeSituationExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "参会人员信息");
List<Object> objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE);
Class<?> aClass = payMeetingSituationService.getaClass(MEETING_TYPE);
return super.exportListXls(objects, aClass, "参会人员信息");
}
@@ -227,10 +227,6 @@ public class WorkGroupMeetingController extends JeroController<PayMeeting, IPayM
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = pageList.get(0).getMeetingType().toString();
for (PayMeeting meeting : pageList) {
//查询会议负责人
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
@@ -239,7 +235,7 @@ public class WorkGroupMeetingController extends JeroController<PayMeeting, IPayM
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
PayMeetingVO payMeetingVO = new PayMeetingVO();
BeanUtils.copyProperties(meeting, payMeetingVO);
meetingType = meeting.getMeetingType().toString();
String meetingType = meeting.getMeetingType().toString();
String meetingType1 = sysBaseAPI.translateDict("meeting_type", meetingType);
payMeetingVO.setMeetingType(meetingType1);
payMeetingVO.setHotelContactsList(new ArrayList<>());
@@ -292,25 +288,8 @@ public class WorkGroupMeetingController extends JeroController<PayMeeting, IPayM
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupMeetingExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsMeetingExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalMeetingExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = OtherMeetingExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeMeetingExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "会议管理");
Class<?> aClass = payMeetingService.getaClass(MeetingCommon.WORKING_GROUP_MEETING_INT);
return super.exportListXls(exportList, aClass, "会议管理");
}
/**
@@ -178,84 +178,9 @@ public class WorkGroupMeetingSituationController extends JeroController<PayMeeti
@RequiresPermissions("workGroupMeetingSituation:export")
@GetMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
List<PayMeetingSituation> pageList = payMeetingSituationService.list(queryWrapper);
// 过滤选中数据
String selections = request.getParameter("selections");
if (oConvertUtils.isNotEmpty(selections)) {
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType = payMeetingSituationService.getMeetingType(payMeetingSituation);
List<Object> exportList = new ArrayList<>();
for (PayMeetingSituation meetingSituation : pageList) {
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());
meetingSituation.setCompanyName(companyManagement.getCompanyName());
switch (meetingType) {
case MeetingCommon.STANDARD_MEETING:
//保存数据
StandardsSituationExcel standardsSituationExcel = new StandardsSituationExcel();
BeanUtils.copyProperties(meetingSituation, standardsSituationExcel);
exportList.add(standardsSituationExcel);
// 工作组项目查询工作组项目名
break;
case MeetingCommon.WORKING_GROUP_MEETING:
//保存数据
WorkingGroupSituationExcel workingGroupSituationExcel = new WorkingGroupSituationExcel();
BeanUtils.copyProperties(meetingSituation, workingGroupSituationExcel);
exportList.add(workingGroupSituationExcel);
break;
case MeetingCommon.INTERNATIONAL_MEETING:
//保存数据
InternationalSituationExcel internationalSituationExcel = new InternationalSituationExcel();
BeanUtils.copyProperties(meetingSituation, internationalSituationExcel);
exportList.add(internationalSituationExcel);
break;
case MeetingCommon.OTHER_MEETING:
//保存数据
SituationExcel situationExcel = new SituationExcel();
BeanUtils.copyProperties(meetingSituation, situationExcel);
exportList.add(situationExcel);
break;
case MeetingCommon.COMMITTEE_MEETING:
//保存数据
CommitteeSituationExcel committeeSituationExcel = new CommitteeSituationExcel();
BeanUtils.copyProperties(meetingSituation, committeeSituationExcel);
exportList.add(committeeSituationExcel);
break;
}
}
Class<?> classToExport = null;
switch (meetingType) {
case MeetingCommon.WORKING_GROUP_MEETING:
classToExport = WorkingGroupSituationExcel.class;
break;
case MeetingCommon.STANDARD_MEETING:
classToExport = StandardsSituationExcel.class;
break;
case MeetingCommon.INTERNATIONAL_MEETING:
classToExport = InternationalSituationExcel.class;
break;
case MeetingCommon.OTHER_MEETING:
classToExport = SituationExcel.class;
break;
case MeetingCommon.COMMITTEE_MEETING:
classToExport = CommitteeSituationExcel.class;
break;
}
return super.exportListXls(exportList, classToExport, "参会人员信息");
List<Object> objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE);
Class<?> aClass = payMeetingSituationService.getaClass(MEETING_TYPE);
return super.exportListXls(objects, aClass, "参会人员信息");
}
@@ -71,4 +71,6 @@ public interface IPayMeetingService extends IService<PayMeeting> {
IPage<PayMeeting> queryPageList(PayMeeting payMeeting, Integer pageNo, Integer pageSize, HttpServletRequest req);
void uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon);
Class<?> getaClass(Integer meetingType);
}
@@ -692,4 +692,21 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
sendMessageService.SendMessageService(sendMessageDTO);
}
}
@Override
public Class<?> getaClass(Integer meetingType) {
Class<?> classToExport = null;
if (meetingType.equals(MeetingCommon.WORKING_GROUP_MEETING_INT)){
classToExport = WorkingGroupMeetingExcel.class;
}else if (meetingType.equals(MeetingCommon.STANDARD_MEETING_INT)){
classToExport = StandardsMeetingExcel.class;
}else if (meetingType.equals(MeetingCommon.INTERNATIONAL_MEETING_INT)){
classToExport = InternationalMeetingExcel.class;
}else if (meetingType.equals(MeetingCommon.OTHER_MEETING_INT)){
classToExport = OtherMeetingExcel.class;
}else if (meetingType.equals(MeetingCommon.COMMITTEE_MEETING_INT)){
classToExport = CommitteeMeetingExcel.class;
}
return classToExport;
}
}
@@ -1209,6 +1209,11 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
@Override
public List<Object> MeetingSituationGetModelAndView(HttpServletRequest request, PayMeetingSituation payMeetingSituation, Integer meetingType) {
String meetingId = payMeetingSituation.getMeetingId();
PayMeeting payMeeting = meetingService.getById(meetingId);
if (!Objects.equals(payMeeting.getMeetingType(),meetingType)){
throw new JeroBootException("数据权限不足");
}
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap());
String particularYear = request.getParameter("particularYear");
if (StringUtils.isNotBlank(particularYear)){
@@ -1223,9 +1228,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
String meetingType1 = getMeetingType(payMeetingSituation);
List<Object> exportList = new ArrayList<>();
for (PayMeetingSituation meetingSituation : pageList) {
@@ -1276,7 +1278,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
return exportList;
}
@Nullable
@Override
public Class<?> getaClass(Integer meetingType) {
Class<?> classToExport = null;
@@ -276,9 +276,6 @@ public class PayMemberProjectController extends JeroController<PayMemberProject,
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
for (PayMemberProject memberProject : pageList) {
LoginUser user = sysBaseAPI.getUserById(memberProject.getDirectorId());
memberProject.setDirectorName(user.getRealname());
@@ -219,9 +219,6 @@ public class PayMemberProjectSubitemController extends JeroController<PayMemberP
List<String> selectionList = Arrays.asList(selections.split(","));
pageList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
if (pageList.isEmpty()) {
throw new JeroBootException("没有数据");
}
return super.exportListXls(pageList, PayMemberProjectSubitem.class, "会员项目成员表");
}