Ver código fonte

Merge remote-tracking branch 'origin/master'

master
CMM 1 ano atrás
pai
commit
c62c266c6b
2 arquivos alterados com 7 adições e 10 exclusões
  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 Ver arquivo

@@ -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 Ver arquivo

@@ -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());


Carregando…
Cancelar
Salvar