package com.ywt.alipaympapi.controller;

import com.ywt.model.PageVO;
import com.ywt.model.ResponseVO;
import com.ywt.request.queue.QueryQueueListRequest;
import com.ywt.request.register.QueryDepDoctorListRequest;
import com.ywt.request.register.QueryDepOrderSourceRemainRequest;
import com.ywt.request.register.QueryDepartmentListRequest;
import com.ywt.request.register.QueryDoctorListRequest;
import com.ywt.request.register.QueryDoctorInfoRequest;
import com.ywt.request.register.QueryDoctorOrderSourceListRequest;
import com.ywt.request.register.QueryHospitalDistrictListRequest;
import com.ywt.response.queue.QueryQueueListResponse;
import com.ywt.response.register.QueryDepDoctorListResponseData;
import com.ywt.response.register.QueryDepOrderSourceRemainResponseData;
import com.ywt.response.register.QueryDepartmentListResponseData;
import com.ywt.response.register.QueryDoctorListResponseData;
import com.ywt.response.register.QueryDoctorInfoResponseData;
import com.ywt.response.register.QueryDoctorOrderSourceListResponseData;
import com.ywt.response.register.QueryHospitalDistrictListResponseData;
import com.ywt.alipaympapi.service.IsvRegisterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Desc
 */
@RestController
@Slf4j
public class PlanController {

    @Autowired
    private IsvRegisterService isvRegisterService;

    /**
     * 科室列表查询
     *
     * @param request
     * @return
     */
    @PostMapping("isvRequest.order.departmentList")
    public ResponseVO<List<QueryDepartmentListResponseData>> queryDepartmentList(QueryDepartmentListRequest request) throws Exception{

        return ResponseVO.success(isvRegisterService.queryDepartmentList(request));
    }

    /**
     * 科室余号查询
     *
     * @param request
     * @return
     */
    @PostMapping("isvRequest.order.depOrderSourceRemain")
    public ResponseVO<List<QueryDepOrderSourceRemainResponseData>> queryDepOrderSourceRemain(QueryDepOrderSourceRemainRequest request) {

        return ResponseVO.success(isvRegisterService.queryDepOrderSourceRemain(request));
    }

    /**
     * 科室医生查询
     *
     * @param request
     * @return
     */
    @PostMapping("isvRequest.order.depDoctorList")
    public ResponseVO<PageVO<QueryDepDoctorListResponseData>> queryDepDoctorList(QueryDepDoctorListRequest request) {

        PageVO<QueryDepDoctorListResponseData> data = isvRegisterService.queryDepDoctorList(request);


        return ResponseVO.success(data);

    }

    /**
     * 医生号院查询
     *
     * @param request
     * @return
     */
    @PostMapping("isvRequest.order.doctorOrderSourceList")
    public ResponseVO<List<QueryDoctorOrderSourceListResponseData>> queryDoctorOrderSourceList(QueryDoctorOrderSourceListRequest request) {

        return ResponseVO.success(isvRegisterService.queryDoctorOrderSourceList(request));
    }
    /**
     * 院区列表查询
     *
     * @param request
     * @return
     */
    @PostMapping("isvRequest.order.queryHospitalDistrictList")
    public ResponseVO<List<QueryHospitalDistrictListResponseData>> queryHospitalDistrictList(QueryHospitalDistrictListRequest request){
        return ResponseVO.success(isvRegisterService.queryHospitalDistrictList(request));
    }
    /**
     * 排队列表查询
     *
     * @param request
     * @return
     */
    @PostMapping("isvRequest.queue.queryList")
    public ResponseVO<List<QueryQueueListResponse>> queryQueueList(QueryQueueListRequest request) throws Exception{
        return ResponseVO.success(isvRegisterService.queryQueueList(request));
    }
    /**
     * 查询医生简介
     *
     * @param request
     * @return
     */
    @PostMapping("isvRequest.doctor.doctorInfo")
    public ResponseVO<QueryDoctorInfoResponseData> queryDoctorInfo(QueryDoctorInfoRequest request){
        return ResponseVO.success(isvRegisterService.queryDoctorInfo(request));
    }
    /**
     * 医生科室列表查询
     *
     * @param request
     * @return
     */
    @PostMapping("isvRequest.other.doctorList")
    public ResponseVO<PageVO<QueryDoctorListResponseData>> queryDoctorDepartmentList(QueryDoctorListRequest request){
        return ResponseVO.success(isvRegisterService.queryDoctorList(request));
    }
}
