瀏覽代碼

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 年之前
父節點
當前提交
603106bba7
共有 2 個文件被更改,包括 15 次插入2 次删除
  1. +13
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java
  2. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java

+ 13
- 2
pmapi/src/main/java/com/ningdatech/pmapi/leave/manage/LeaveManage.java 查看文件

@@ -39,6 +39,7 @@ import com.ningdatech.pmapi.leave.service.IExpertLeaveService;
import com.ningdatech.pmapi.meeting.entity.domain.Meeting;
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatusEnum;
import com.ningdatech.pmapi.meeting.helper.YxtCallOrSmsHelper;
import com.ningdatech.pmapi.meeting.service.IMeetingExpertService;
@@ -70,6 +71,7 @@ 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;
@@ -77,6 +79,10 @@ 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 = 2;

public void cancelMeetingExpertByLeave(Long meetingExpertId, ExpertAttendStatusEnum status) {
MeetingExpert update = buildMeetingExpertUpdate(meetingExpertId, status);
@@ -190,8 +196,11 @@ 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())) {
if (!ExpertAttendStatusEnum.AGREED.eq(expert.getStatus())) {
// 非确认参加状态无法临时请假
throw BizException.wrap("未同意参加该会议,无法临时请假");
}
@@ -203,10 +212,12 @@ public class LeaveManage {
}
LeaveManage proxy = (LeaveManage) AopContext.currentProxy();
proxy.cancelMeetingExpertByLeave(expert.getId(), ExpertAttendStatusEnum.ON_LEAVE);
if (ExpertInviteTypeEnum.RANDOM.eq(meeting.getInviteType())) {
inviteTask.notifyInviteTask(meeting.getId(), Boolean.FALSE);
}
// 临时请假无需审核
leave.setAuditId(0L);
leave.setStatus(LeaveStatusEnum.PASSED.getCode());
// 临时请假需通知专家管理进行专家补抽
}
if (type != LeaveTypeEnum.TEMPORARY) {
ExpertMetaApply apply = getExpertMetaApply(po, leaveUserId, applyUserId, now);


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java 查看文件

@@ -99,6 +99,8 @@ public class PrequalificationDeclaredProjectManage {
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");

//要判断 当前操作人 是不是项目主管单位的人
VUtils.isTrue(Objects.isNull(user.getOrganizationCode()))
.throwMessage(String.format("当前登录人没有单位 【%s】",user.getRealName()));
VUtils.isTrue(!user.getOrganizationCode().equals(projectInfo.getSuperOrgCode()))
.throwMessage(String.format("只有主管单位 【%s】的人 才能够提交",projectInfo.getSuperOrg()));



Loading…
取消
儲存