Merge remote-tracking branch 'origin/dev/feat/partner1.3_20230904' into dev/feat/partner1.3_20230904

This commit is contained in:
俞扬
2023-09-05 20:36:46 +08:00
5 changed files with 19 additions and 16 deletions

View File

@@ -65,7 +65,7 @@ public interface HyPartnerLineInfoService {
* @param lineIdList
* @return
*/
Boolean allocationInvestmentManager(LoginUserInfo user, List<Long> lineIdList);
Boolean allocationInvestmentManager(LoginUserInfo user, String userId,List<Long> lineIdList);
/**

View File

@@ -272,8 +272,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
}
@Override
public Boolean allocationInvestmentManager(LoginUserInfo user, List<Long> lineIdList) {
if (user==null|| CollectionUtils.isEmpty(lineIdList)){
public Boolean allocationInvestmentManager(LoginUserInfo operateUser,String userId, List<Long> lineIdList) {
if (StringUtils.isEmpty(userId)|| CollectionUtils.isEmpty(lineIdList)){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
//加盟上线索集合
@@ -287,7 +287,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
closeLineList.stream().forEach(x->{
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
hyPartnerLineInfoDO.setPartnerId(x.getPartnerId());
hyPartnerLineInfoDO.setInvestmentManager(user.getUserId());
hyPartnerLineInfoDO.setInvestmentManager(userId);
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
hyPartnerLineInfoDO.setLineStatus(1);
@@ -307,22 +307,22 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
//没有结束的线索直接分配招商经理
List<HyPartnerLineInfoDO> otherLineList = partnerLineInfoList.stream().filter(x -> x.getCloseTime() == null).collect(Collectors.toList());
List<Long> otherLineIdList = otherLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList());
hyPartnerLineInfoDAO.updateInvestmentManager(user.getUserId(), otherLineIdList);
hyPartnerLineInfoDAO.updateInvestmentManager(userId, otherLineIdList);
//添加日志
partnerLineInfoList.forEach(x->{
//给招商经理发送飞书工作通知
List<String> userIdList = new ArrayList<>();
userIdList.add(user.getUserId());
userIdList.add(userId);
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(x.getPartnerId());
String dateTime = DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC_7);
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER,userIdList,dateTime,hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getMobile());
LineLogInfo lineLogInfo = new LineLogInfo(x.getPartnerId(), x.getId(), user.getUserId(),
user.getName(), OperateTypeEnum.ALLOCATION_INVESTMENT_MANAGER,
LineLogInfo lineLogInfo = new LineLogInfo(x.getPartnerId(), x.getId(), operateUser.getUserId(),
operateUser.getName(), OperateTypeEnum.ALLOCATION_INVESTMENT_MANAGER,
WorkflowStageEnum.getWorkflowStageByCode(x.getWorkflowStage()),
x.getWorkflowStatus(), "");
AllocationInvestmentManagerLogDTO logDTO = AllocationInvestmentManagerLogDTO.builder().allocationUserId(user.getUserId()).allocationUsername(user.getName())
.mobile(user.getMobile()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC_2)).build();
AllocationInvestmentManagerLogDTO logDTO = AllocationInvestmentManagerLogDTO.builder().allocationUserId(operateUser.getUserId()).allocationUsername(operateUser.getName())
.mobile(operateUser.getMobile()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC_2)).build();
lineLogInfo.setData(logDTO);
hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo);
});
@@ -510,9 +510,9 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
//通过 拒绝添加日志
if ("pass".equals(closeFollowRequest.getType())||"reject".equals(closeFollowRequest.getType())){
if (WorkflowStageEnum.INTENT.getCode().equals(hyPartnerLineInfoDO.getWorkflowStage())&&"reject".equals(closeFollowRequest.getType())){
LineLogInfo lineLogInfo = new LineLogInfo(hyPartnerLineInfoDO.getPartnerId(), hyPartnerLineInfoDO.getId(), user.getUserId(),
user.getName(), OperateTypeEnum.REMOVE_BLACKLIST,
user.getName(), OperateTypeEnum.CLOSE_FOLLOW,
WorkflowStageEnum.getWorkflowStageByCode(oldWorkflowStage),
oldWorkflowStatus, "");
CloseOrPassFollowLogDTO log = CloseOrPassFollowLogDTO.builder().operateUserId(user.getUserId()).passReason(closeFollowRequest.getPassReason()).rejectRealReason(closeFollowRequest.getRejectRealReason())

View File

@@ -533,8 +533,10 @@ public class InterviewServiceImpl implements InterviewService {
record.setFeishuCalendarId(userCalendarEvent.getCalendarId());
record.setFeishuScheduleId(userCalendarEvent.getEventId());
record.setApplicationApproved(1);
//如果同意的时候已经超过预约时间,直接进入面试阶段
if (DateUtil.parseDateTime(interviewVO.getStartTime()).isBeforeOrEquals(new Date())) {
//如果同意的时候已经超过预约时间前 5 分钟,直接进入面试已开始阶段
DateTime interviewStartTime = DateUtil.offsetMinute(DateUtil.parseDateTime(interviewVO.getStartTime()), -5);
Date now = new Date();
if (interviewStartTime.isBeforeOrEquals(now)) {
record.setRoomStatus(RoomStatus.OPEN.getCode());
record.setActualEndTime(new Date());
}
@@ -545,7 +547,7 @@ public class InterviewServiceImpl implements InterviewService {
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
hyPartnerInterviewDO.setId(Long.valueOf(interviewVO.getInterviewId()));
//更新面试状态和线索子流程状态
if (DateUtil.parseDateTime(interviewVO.getStartTime()).isBeforeOrEquals(new Date())) {
if (interviewStartTime.isBeforeOrEquals(now)) {
interviewDAO.updateInterviewWorkflowStatus(request.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_3);
} else {
interviewDAO.updateInterviewWorkflowStatus(request.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_2);