From 7d1be645c268b02d7eaced160ce8183830613d23 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 4 Apr 2023 09:40:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=BE=E7=BD=AESpringContextHolder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/src/main/java/com/ningdatech/pmapi/App.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/App.java b/pmapi/src/main/java/com/ningdatech/pmapi/App.java index 93837f8..e231688 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/App.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/App.java @@ -1,11 +1,12 @@ package com.ningdatech.pmapi; import com.ningdatech.basic.util.SpringUtils; +import com.ningdatech.pmapi.common.util.SpringContextHolder; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ApplicationContext; -import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; @@ -30,4 +31,9 @@ public class App { SpringUtils.setApplicationContext(context); } + @Bean + public SpringContextHolder springContextHolder() { + return new SpringContextHolder(); + } + } From b30a354ff49770c9abb54c13ad22556443f46b19 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 4 Apr 2023 09:50:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AF=B7=E5=81=87=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java index e5df123..b7f0959 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java @@ -70,7 +70,6 @@ import java.util.stream.Collectors; @AllArgsConstructor public class LeaveManage { - private final ExpertInviteTask inviteTask; private final IMeetingService meetingService; private final IMeetingExpertService meetingExpertService; private final IExpertLeaveService leaveService; @@ -78,10 +77,6 @@ public class LeaveManage { private final IExpertMetaApplyService metaApplyService; private final FileService fileService; private final IExpertUserFullInfoService userFullInfoService; - private final YxtCallOrSmsHelper yxtCallOrSmsHelper; - private final IUserInfoService userInfoService; - - private static final int HOURS_BEFORE_MEETING = 12; public void cancelMeetingExpertByLeave(Long meetingExpertId, ExpertAttendStatusEnum status) { MeetingExpert update = buildMeetingExpertUpdate(meetingExpertId, status); @@ -195,9 +190,6 @@ public class LeaveManage { } po.setStartTime(meeting.getStartTime()); po.setEndTime(meeting.getEndTime()); - if (now.plusHours(HOURS_BEFORE_MEETING).isAfter(po.getStartTime())) { - throw BizException.wrap("会议临期" + HOURS_BEFORE_MEETING + "小时内,不能在线请假,请电话该主题事务的联系人。"); - } MeetingExpert expert = meetingExpertService.getByMeetingIdAndExpertId(po.getMeetingId(), leaveUserId); if (!expert.getStatus().equals(ExpertAttendStatusEnum.AGREED.getCode())) { // 非确认参加状态无法临时请假 @@ -211,7 +203,6 @@ public class LeaveManage { } LeaveManage proxy = (LeaveManage) AopContext.currentProxy(); proxy.cancelMeetingExpertByLeave(expert.getId(), ExpertAttendStatusEnum.ON_LEAVE); - inviteTask.notifyInviteTask(meeting.getId(), Boolean.FALSE); // 临时请假无需审核 leave.setAuditId(0L); leave.setStatus(LeaveStatusEnum.PASSED.getCode());