fix 46705,46981,46640,46638 企业端会议文件下载

This commit is contained in:
lijiarao
2022-01-07 15:00:08 +08:00
parent 2a0c6c1084
commit 40b0f33ce8
2 changed files with 12 additions and 20 deletions
@@ -25,6 +25,7 @@ import com.jero.data.service.IPayCaseCommitteeService;
import com.jero.data.service.IPayCaseCommitteeSubitemService;
import com.jero.data.service.IPayCaseCouncilSubitemService;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.common.MeetingSubitemCommon;
import com.jero.meeting.entity.PayMeeting;
import com.jero.meeting.entity.PayMeetingContacts;
import com.jero.meeting.entity.PayMeetingHotelContacts;
@@ -465,22 +466,9 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
throw new JeroBootException("会议不存在..");
}
Integer meetingType = payMeeting.getMeetingType();
//如果是工作组会议或者分标委会议或理事会会议,判断是否为成员
//如果是分标委会议或理事会会议,判断是否为成员
boolean isSubItem = false;
if (meetingType.equals(MeetingCommon.WORKING_GROUP_MEETING_INT)) {
LambdaQueryWrapper<PayWorkingGroupSubItem> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayWorkingGroupSubItem::getWorkingGroupId, payMeeting.getWorkingGroupId());
wrapper.and(i -> i.eq(PayWorkingGroupSubItem::getContactsIdOne, sysUserId)
.or()
.eq(PayWorkingGroupSubItem::getContactsIdTwo, sysUserId)
.or()
.eq(PayWorkingGroupSubItem::getContactsIdThree, sysUserId)
);
int count = payWorkingGroupSubItemService.count(wrapper);
if (count > 0) {
isSubItem = true;
}
} else if (meetingType.equals(MeetingCommon.COMMITTEE_MEETING_INT)) {
if (meetingType.equals(MeetingCommon.COMMITTEE_MEETING_INT)) {
LambdaQueryWrapper<PayCaseCommitteeSubitem> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayCaseCommitteeSubitem::getCommitteeId, payMeeting.getCaseCommitteeId());
wrapper.eq(PayCaseCommitteeSubitem::getContactsId, sysUserId);
@@ -512,16 +500,18 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
}
BigDecimal meetingCosts = payMeeting.getMeetingCosts();
//非免费会议并且非成员
if (!"0.00".equals(meetingCosts.toString()) && !isSubItem){
if (meetingCosts.compareTo(BigDecimal.ZERO) < 1 && !isSubItem){
QueryWrapper<PayMeetingSituation> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("meeting_id", meetingId);
queryWrapper1.eq("company_contact_id", sysUserId);
PayMeetingSituation one = payMeetingSituationService.getOne(queryWrapper1);
if (ObjectUtils.isEmpty(one)) {
PayMeetingSituation meetingSituation = payMeetingSituationService.getOne(queryWrapper1);
if (ObjectUtils.isEmpty(meetingSituation)) {
throw new JeroBootException("未报名会议。");
}
Integer checkResult = one.getCheckResult();
if (checkResult != 1) {
Integer checkResult = meetingSituation.getCheckResult();
Integer registerCheckResult = meetingSituation.getRegisterCheckResult();
if (!Objects.equals(checkResult, MeetingSubitemCommon.SIGNUP_STATUS_1)
|| !Objects.equals(registerCheckResult, MeetingSubitemCommon.SIGNUP_STATUS_1)) {
throw new JeroBootException("会议报名并审核通过后才可查看文件");
}
}
@@ -67,6 +67,7 @@
hotel_address,
meeting_files,
meeting_data,
meeting_minute,
remind,
payment_qr_code,
case_committee_id,
@@ -119,6 +120,7 @@
hotel_address,
meeting_files,
meeting_data,
meeting_minute,
remind,
payment_qr_code,
case_committee_id,