增加招商经理同意面试预约操作日志记录

This commit is contained in:
feng.li
2023-12-12 17:30:57 +08:00
parent 85991fcc15
commit af8727ff6e
6 changed files with 45 additions and 23 deletions

View File

@@ -24,6 +24,9 @@ public enum OperateLogFieldValueEnum {
AFTER_INVESTMENT_MANAGER_USERNAME("afterInvestmentManagerUsername", "转让后的招商经理姓名"), AFTER_INVESTMENT_MANAGER_USERNAME("afterInvestmentManagerUsername", "转让后的招商经理姓名"),
AFTER_INVESTMENT_MANAGER_MOBILE("afterInvestmentManagerMobile", "转让后的招商经理手机好"), AFTER_INVESTMENT_MANAGER_MOBILE("afterInvestmentManagerMobile", "转让后的招商经理手机好"),
INTERVIEW_AGREEMENT_RAW_DATETIME("rawInterviewDateTime", "同意的面试预约原始申请时间"),
INTERVIEW_PLAN_ID("interviewPlanId", "面试计划id"),
BEFORE_INTERVIEW_TIME("beforeInterviewTime", "修改前的面试时间"), BEFORE_INTERVIEW_TIME("beforeInterviewTime", "修改前的面试时间"),
AFTER_INTERVIEW_TIME("afterInterviewTime", "修改后的面试时间"), AFTER_INTERVIEW_TIME("afterInterviewTime", "修改后的面试时间"),

View File

@@ -21,7 +21,7 @@ public enum OperateTypeEnum {
CLOSE_FOLLOW("close_follow", "结束跟进", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REJECT_PUBLIC_REASON, REJECT_REAL_REASON, CERTIFY_FILE)), CLOSE_FOLLOW("close_follow", "结束跟进", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REJECT_PUBLIC_REASON, REJECT_REAL_REASON, CERTIFY_FILE)),
TRANSFER_INVESTMENT_MANAGER("transfer_investment_manager", "转让招商经理", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INVESTMENT_MANAGER_USERNAME, BEFORE_INVESTMENT_MANAGER_MOBILE, AFTER_INVESTMENT_MANAGER_USERNAME, AFTER_INVESTMENT_MANAGER_MOBILE)), TRANSFER_INVESTMENT_MANAGER("transfer_investment_manager", "转让招商经理", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INVESTMENT_MANAGER_USERNAME, BEFORE_INVESTMENT_MANAGER_MOBILE, AFTER_INVESTMENT_MANAGER_USERNAME, AFTER_INVESTMENT_MANAGER_MOBILE)),
INTERVIEW_APPOINTMENT("interview_appointment", "预约面试时间", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)), INTERVIEW_APPOINTMENT("interview_appointment", "预约面试时间", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
INTERVIEW_APPOINTMENT_AGREEMENT("interview_appointment_agreement", "同意面试预约申请", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)), INTERVIEW_APPOINTMENT_AGREEMENT("interview_appointment_agreement", "同意面试预约申请", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, INTERVIEW_AGREEMENT_RAW_DATETIME, INTERVIEW_PLAN_ID)),
AUTO_OPEN_INTERVIEW("auto_open_interview", "自动打开面试房间", Arrays.asList(OPERATE_TIME)), AUTO_OPEN_INTERVIEW("auto_open_interview", "自动打开面试房间", Arrays.asList(OPERATE_TIME)),
INTERVIEWER_BOOK_INTERVIEW("interviewer_book_interview", "招商经理主动预约面试时间", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)), INTERVIEWER_BOOK_INTERVIEW("interviewer_book_interview", "招商经理主动预约面试时间", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
MODIFY_INTERVIEW_TIME("modify_interview_time", "修改面试时间", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INTERVIEW_TIME, AFTER_INTERVIEW_TIME)), MODIFY_INTERVIEW_TIME("modify_interview_time", "修改面试时间", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INTERVIEW_TIME, AFTER_INTERVIEW_TIME)),

View File

@@ -0,0 +1,26 @@
package com.cool.store.dto.log;
import lombok.Builder;
import lombok.Data;
/**
* @author Fun Li 2023/12/12 15:48
* @version 1.0
*/
@Data
@Builder
public class ApproveAppointmentDTO {
private String operateTime;
private String operateUsername;
private String operateUserId;
private String mobile;
private String rawInterviewDateTime;
private String interviewPlanId;
}

View File

@@ -11,10 +11,7 @@ import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyIntendDevMappingDAO; import com.cool.store.dao.HyIntendDevMappingDAO;
import com.cool.store.dao.HyInterviewDAO; import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dao.HyPartnerExhibitionDAO; import com.cool.store.dao.HyPartnerExhibitionDAO;
import com.cool.store.dto.log.EntrustOthersDTO; import com.cool.store.dto.log.*;
import com.cool.store.dto.log.LogBasicDTO;
import com.cool.store.dto.log.ModifyInterviewTimeDTO;
import com.cool.store.dto.log.ReInterviewDTO;
import com.cool.store.dto.partner.EnterInterviewDto; import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.*; import com.cool.store.enums.*;
@@ -489,23 +486,9 @@ public class InterviewServiceImpl implements InterviewService {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
} }
//创建日程信息
// CreateCalendarEventDTO createCalendarEventDTO = new CreateCalendarEventDTO();
// createCalendarEventDTO.setStartTime(DateUtil.parse(interviewVO.getStartTime()).getTime());
// createCalendarEventDTO.setEndTime(DateUtil.parse(interviewVO.getEndTime()).getTime());
// createCalendarEventDTO.setUserId(request.getInterviewerId());
// createCalendarEventDTO.setJoinUserIds(Arrays.asList(request.getInterviewerId()));
// createCalendarEventDTO.setSummary(generateInterviewTitle(request.getPartnerLineId()));
// UserCalendarsEventDTO userCalendarEvent = isvHttpRequest.createUserCalendarEvent(createCalendarEventDTO);
// if (userCalendarEvent == null || StringUtil.isEmpty(userCalendarEvent.getEventId())) {
// throw new ServiceException(ErrorCodeEnum.CREATE_CALENDAR_EVENT_FAIL);
// }
//更新面试计划信息 //更新面试计划信息
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO(); HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
record.setId(Long.valueOf(request.getInterviewPlanId())); record.setId(Long.valueOf(request.getInterviewPlanId()));
// record.setFeishuCalendarId(userCalendarEvent.getCalendarId());
// record.setFeishuScheduleId(userCalendarEvent.getEventId());
record.setApplicationApproved(1); record.setApplicationApproved(1);
//如果同意的时候已经超过预约的时间前 5 分钟,直接进入面试已开始阶段 //如果同意的时候已经超过预约的时间前 5 分钟,直接进入面试已开始阶段
DateTime interviewStartTime = DateUtil.offsetMinute(DateUtil.parseDateTime(interviewVO.getStartTime()), -5); DateTime interviewStartTime = DateUtil.offsetMinute(DateUtil.parseDateTime(interviewVO.getStartTime()), -5);
@@ -526,7 +509,6 @@ public class InterviewServiceImpl implements InterviewService {
} else { } else {
interviewDAO.updateInterviewWorkflowStatus(request.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_2); interviewDAO.updateInterviewWorkflowStatus(request.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_2);
} }
// hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTERVIEW_2.getCode()));
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(new Date());
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
@@ -534,11 +516,22 @@ public class InterviewServiceImpl implements InterviewService {
HyPartnerLineInfoDO hyPartnerLineDO = new HyPartnerLineInfoDO(); HyPartnerLineInfoDO hyPartnerLineDO = new HyPartnerLineInfoDO();
hyPartnerLineDO.setId(request.getPartnerLineId()); hyPartnerLineDO.setId(request.getPartnerLineId());
hyPartnerLineDO.setWorkflowStage(WorkflowStageEnum.INTERVIEW.getCode()); hyPartnerLineDO.setWorkflowStage(WorkflowStageEnum.INTERVIEW.getCode());
// hyPartnerLineDO.setWorkflowStatus(WorkflowStatusEnum.INTERVIEW_2.getCode());
hyPartnerLineDO.setUpdateTime(new Date()); hyPartnerLineDO.setUpdateTime(new Date());
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO); hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO);
//异步发送短信给加盟商 //异步发送短信给加盟商
eventCenterHttpRequest.sendSmsVariable(partnerBaseInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS,DateUtil.format(DateUtil.parse(interviewVO.getStartTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN),wechatMiniAppService.getMiniAppUrl()); eventCenterHttpRequest.sendSmsVariable(partnerBaseInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS,DateUtil.format(DateUtil.parse(interviewVO.getStartTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN),wechatMiniAppService.getMiniAppUrl());
//记录日志
LoginUserInfo user = CurrentUserHolder.getUser();
ApproveAppointmentDTO appointmentLog = ApproveAppointmentDTO.builder()
.interviewPlanId(request.getInterviewPlanId())
.rawInterviewDateTime(DateUtil.format(DateUtil.parse(interviewVO.getStartTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN))
.operateTime(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_MINUTE_PATTERN))
.operateUsername(user.getName())
.operateUserId(user.getUserId())
.mobile(user.getMobile())
.build();
logService.recordBizLog(user, interviewVO.getPartnerLineId(), OperateTypeEnum.INTERVIEW_APPOINTMENT_AGREEMENT, appointmentLog);
} }
@Override @Override

View File

@@ -25,7 +25,7 @@ import java.util.List;
* @description: * @description:
* @date 2023/05/15 02:52 * @date 2023/05/15 02:52
*/ */
@Profile({"local", "dev", "ab", "test"}) @Profile({"local", "dev", "ab", "test", "pre"})
@Configuration @Configuration
@EnableSwagger2 @EnableSwagger2
@EnableKnife4j @EnableKnife4j

View File

@@ -27,7 +27,7 @@ import java.util.List;
* @description: * @description:
* @date 2023/05/15 02:52 * @date 2023/05/15 02:52
*/ */
@Profile({"local", "dev", "ab", "test"}) @Profile({"local", "dev", "ab", "test", "pre"})
@Configuration @Configuration
@EnableSwagger2 @EnableSwagger2
@EnableKnife4j @EnableKnife4j