瀏覽代碼

Merge remote-tracking branch 'origin/master'

master
CMM 1 年之前
父節點
當前提交
c62c266c6b
共有 2 個文件被更改,包括 7 次插入10 次删除
  1. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/App.java
  2. +0
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java

+ 7
- 1
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();
}

}

+ 0
- 9
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());


Loading…
取消
儲存