executeDistribution(); return success($result); } /** * 获取分发统计信息 * @return \think\Response */ public function getDistributionStats() { $result = (new ServiceLogsDistributionService())->getDistributionStats(); return success($result); } /** * 获取待分发的服务记录列表 * @return \think\Response */ public function getPendingDistributionList() { $data = $this->request->params([ ["distribution_status", ""], ["date_range", ""] ]); $where = []; if (!empty($data['distribution_status'])) { $where['distribution_status'] = $data['distribution_status']; } if (!empty($data['date_range'])) { $where['date_range'] = $data['date_range']; } $result = (new ServiceLogsDistributionService())->getPendingDistributionList($where); return success($result); } /** * 重置分发状态 * @return \think\Response */ public function resetDistributionStatus() { $data = $this->request->params([ ["ids", []], ["type", "both"] ]); if (empty($data['ids'])) { return error('请选择要重置的记录'); } $result = (new ServiceLogsDistributionService())->resetDistributionStatus($data['ids'], $data['type']); return success($result); } /** * 获取教务和教练人员列表 * @return \think\Response */ public function getStaffList() { $result = (new ServiceLogsDistributionService())->getStaffList(); return success($result); } }