| | |
| | | // 获取当前星期 |
| | | Integer weekDay = DateUtil.dayOfWeekEnum(appointmentDay).getIso8601Value(); |
| | | // 预约时间段配置匹配的性格分析师 |
| | | List<MentalAnalysisTimeConfig> eqWorkerTimeConfigList = mentalAnalysisTimeConfigService.getWorkerListByAppointmentTime(1, weekDay, appointmentDayYmd, beginTimePoint, endTimePoint); |
| | | List<MentalAnalysisTimeConfig> eqWorkerTimeConfigList = mentalAnalysisTimeConfigService.getWorkerListByAppointmentTime(CustomerMentalAnalysisStatusEnum.ON_WORK.getCode(), weekDay, appointmentDayYmd, beginTimePoint, endTimePoint); |
| | | // 分析师ID(预约时间段配置匹配) |
| | | List<Long> eqWorkerIdByTimeConfigList = eqWorkerTimeConfigList.isEmpty() ? Collections.singletonList(0L) : |
| | | eqWorkerTimeConfigList.stream() |
| | |
| | | } |
| | | |
| | | // 分配性格分析师 |
| | | Long consultWorkerId = customerService.randomWorkerIdByLineStatusAndPostNeWorkerId(ImStatusEnum.ON_LINE.getCode(), null, PostIdEnum.PO_31.getCode(), CustomerWorkStatusEnum.ON_WORK.getCode(), eqWorkerIdList, neWorkerIdList); |
| | | Long consultWorkerId = customerService.randomWorkerIdByLineStatusAndPostNeWorkerId(ImStatusEnum.ON_LINE.getCode(), null, PostIdEnum.PO_31.getCode(), CustomerWorkStatusEnum.ON_WORK.getCode(), CustomerMentalAnalysisStatusEnum.ON_WORK.getCode(), eqWorkerIdList, neWorkerIdList); |
| | | if (consultWorkerId == null) { |
| | | consultWorkerId = customerService.randomWorkerIdByLineStatusAndPostNeWorkerId(null, null, PostIdEnum.PO_31.getCode(), CustomerWorkStatusEnum.ON_WORK.getCode(), eqWorkerIdList, neWorkerIdList); |
| | | consultWorkerId = customerService.randomWorkerIdByLineStatusAndPostNeWorkerId(null, null, PostIdEnum.PO_31.getCode(), CustomerWorkStatusEnum.ON_WORK.getCode(), CustomerMentalAnalysisStatusEnum.ON_WORK.getCode(), eqWorkerIdList, neWorkerIdList); |
| | | } |
| | | |
| | | return consultWorkerId; |