goupan
2024-04-14 ca931b87c7d7de8d3c75d6a4a5f0693d77420c8c
common-buiness/src/main/java/cn/stylefeng/guns/modular/business/service/impl/MentalAppointmentServiceImpl.java
@@ -185,7 +185,7 @@
        // 获取当前星期
        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()
@@ -243,9 +243,9 @@
        }
        // 分配性格分析师
        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;