From 5ca0e0b5c800e7fe8713a67f536381bfd8356cf3 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Fri, 29 Oct 2021 16:38:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug=2041739=20=E4=BC=9A=E8=AE=AE=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4--=E5=AF=BC=E5=87=BA--=E6=95=B0=E6=8D=AE=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=90=8E=E6=8F=90=E7=A4=BA=E2=80=9C=E6=B2=A1=E6=9C=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommitteeMeetingController.java | 27 +----- .../CommitteeMeetingSituationController.java | 85 +------------------ .../controller/InternalMeetingController.java | 27 +----- .../controller/OtherMeetingController.java | 27 +----- .../OtherMeetingSituationController.java | 81 +----------------- .../StandardsMeetingController.java | 27 +----- .../StandardsMeetingSituationController.java | 81 +----------------- .../WorkGroupMeetingController.java | 27 +----- .../WorkGroupMeetingSituationController.java | 81 +----------------- .../meeting/service/IPayMeetingService.java | 2 + .../service/impl/PayMeetingServiceImpl.java | 17 ++++ .../impl/PayMeetingSituationServiceImpl.java | 9 +- .../PayMemberProjectController.java | 3 - .../PayMemberProjectSubitemController.java | 3 - 14 files changed, 51 insertions(+), 446 deletions(-) diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/CommitteeMeetingController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/CommitteeMeetingController.java index 4eae05fd..7b4da6d9 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/CommitteeMeetingController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/CommitteeMeetingController.java @@ -226,10 +226,6 @@ public class CommitteeMeetingController extends JeroController 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()); @@ -291,25 +287,8 @@ public class CommitteeMeetingController extends JeroController 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, "会议管理"); } /** diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/CommitteeMeetingSituationController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/CommitteeMeetingSituationController.java index fb2746fe..60c37b62 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/CommitteeMeetingSituationController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/CommitteeMeetingSituationController.java @@ -192,89 +192,10 @@ public class CommitteeMeetingSituationController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap()); - List pageList = payMeetingSituationService.list(queryWrapper); - // 过滤选中数据 - String selections = request.getParameter("selections"); - if (oConvertUtils.isNotEmpty(selections)) { - List 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 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 objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE); + Class aClass = payMeetingSituationService.getaClass(MEETING_TYPE); + return super.exportListXls(objects, aClass, "参会人员信息"); } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/InternalMeetingController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/InternalMeetingController.java index 247dd5d8..9c3f9a65 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/InternalMeetingController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/InternalMeetingController.java @@ -225,10 +225,6 @@ public class InternalMeetingController extends JeroController 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()); @@ -290,25 +286,8 @@ public class InternalMeetingController extends JeroController 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, "会议管理"); } /** diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/OtherMeetingController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/OtherMeetingController.java index 8ce52b56..96c868ed 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/OtherMeetingController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/OtherMeetingController.java @@ -225,10 +225,6 @@ public class OtherMeetingController extends JeroController 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()); @@ -290,25 +286,8 @@ public class OtherMeetingController extends JeroController 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, "会议管理"); } /** diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/OtherMeetingSituationController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/OtherMeetingSituationController.java index 9c217660..2c4ec397 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/OtherMeetingSituationController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/OtherMeetingSituationController.java @@ -178,84 +178,9 @@ public class OtherMeetingSituationController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap()); - List pageList = payMeetingSituationService.list(queryWrapper); - // 过滤选中数据 - String selections = request.getParameter("selections"); - if (oConvertUtils.isNotEmpty(selections)) { - List 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 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 objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE); + Class aClass = payMeetingSituationService.getaClass(MEETING_TYPE); + return super.exportListXls(objects, aClass, "参会人员信息"); } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/StandardsMeetingController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/StandardsMeetingController.java index c75a9cc8..4e8ddba9 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/StandardsMeetingController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/StandardsMeetingController.java @@ -252,10 +252,6 @@ public class StandardsMeetingController extends JeroController 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()); @@ -317,25 +313,8 @@ public class StandardsMeetingController extends JeroController 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, "会议管理"); } /** diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/StandardsMeetingSituationController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/StandardsMeetingSituationController.java index f2a04e73..49a1b0f7 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/StandardsMeetingSituationController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/StandardsMeetingSituationController.java @@ -178,84 +178,9 @@ public class StandardsMeetingSituationController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap()); - List pageList = payMeetingSituationService.list(queryWrapper); - // 过滤选中数据 - String selections = request.getParameter("selections"); - if (oConvertUtils.isNotEmpty(selections)) { - List 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 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 objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE); + Class aClass = payMeetingSituationService.getaClass(MEETING_TYPE); + return super.exportListXls(objects, aClass, "参会人员信息"); } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/WorkGroupMeetingController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/WorkGroupMeetingController.java index ad2614b2..7b764e5f 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/WorkGroupMeetingController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/WorkGroupMeetingController.java @@ -227,10 +227,6 @@ public class WorkGroupMeetingController extends JeroController 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()); @@ -292,25 +288,8 @@ public class WorkGroupMeetingController extends JeroController 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, "会议管理"); } /** diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/WorkGroupMeetingSituationController.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/WorkGroupMeetingSituationController.java index 6e630bf5..167da37f 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/WorkGroupMeetingSituationController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/controller/WorkGroupMeetingSituationController.java @@ -178,84 +178,9 @@ public class WorkGroupMeetingSituationController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap()); - List pageList = payMeetingSituationService.list(queryWrapper); - // 过滤选中数据 - String selections = request.getParameter("selections"); - if (oConvertUtils.isNotEmpty(selections)) { - List 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 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 objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE); + Class aClass = payMeetingSituationService.getaClass(MEETING_TYPE); + return super.exportListXls(objects, aClass, "参会人员信息"); } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/IPayMeetingService.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/IPayMeetingService.java index 9b05b720..6f125667 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/IPayMeetingService.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/IPayMeetingService.java @@ -71,4 +71,6 @@ public interface IPayMeetingService extends IService { IPage queryPageList(PayMeeting payMeeting, Integer pageNo, Integer pageSize, HttpServletRequest req); void uploadFileSendMsg(UploadFileVO uploadFileVO, Integer meetingCommon); + + Class getaClass(Integer meetingType); } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/impl/PayMeetingServiceImpl.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/impl/PayMeetingServiceImpl.java index 720decd9..94c663f5 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/impl/PayMeetingServiceImpl.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/impl/PayMeetingServiceImpl.java @@ -692,4 +692,21 @@ public class PayMeetingServiceImpl extends ServiceImpl 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; + } } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/impl/PayMeetingSituationServiceImpl.java b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/impl/PayMeetingSituationServiceImpl.java index 4689ef8f..44d3c806 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/impl/PayMeetingSituationServiceImpl.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/meeting/service/impl/PayMeetingSituationServiceImpl.java @@ -1209,6 +1209,11 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl 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 queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, request.getParameterMap()); String particularYear = request.getParameter("particularYear"); if (StringUtils.isNotBlank(particularYear)){ @@ -1223,9 +1228,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl 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 exportList = new ArrayList<>(); for (PayMeetingSituation meetingSituation : pageList) { @@ -1276,7 +1278,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl getaClass(Integer meetingType) { Class classToExport = null; diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/member/controller/PayMemberProjectController.java b/jero-boot-incoming-payment/src/main/java/com/jero/member/controller/PayMemberProjectController.java index ca18a8db..498f40d9 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/member/controller/PayMemberProjectController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/member/controller/PayMemberProjectController.java @@ -276,9 +276,6 @@ public class PayMemberProjectController extends JeroController 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()); diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/member/controller/PayMemberProjectSubitemController.java b/jero-boot-incoming-payment/src/main/java/com/jero/member/controller/PayMemberProjectSubitemController.java index aabaaef5..936724dd 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/member/controller/PayMemberProjectSubitemController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/member/controller/PayMemberProjectSubitemController.java @@ -219,9 +219,6 @@ public class PayMemberProjectSubitemController extends JeroController 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, "会员项目成员表"); }