package cn.com.ty.lift.ud.chat.service;

import cn.com.ty.lift.ud.chat.controller.model.LiftCaseReq;
import cn.com.ty.lift.ud.chat.controller.query.LiftCaseQuery;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;

import com.baomidou.mybatisplus.extension.service.IService;

import cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity;
import cn.com.xwy.boot.web.dto.RestResponse;

/**
 * 诊单 -Service
 * 
 * @author Xson
 * @date 2020-04-23
 */
public interface ILiftCaseService extends IService<LiftCaseEntity> {

    /**
     * 诊单创建
     * 
     * @param req
     * @return
     */
    RestResponse createLiftCase(LiftCaseReq req);

    /**
     * 分页查询
     * 
     * @param request
     * @return
     */
    RestResponse selectByExample(LiftCaseQuery request);

    /**
     * 根据id获取对象
     * 
     * @param id
     * @return
     */
    LiftCaseEntity getOneMoreById(Long id);

    /**
     * 完善诊单质料，生成订单
     * 
     * @param request
     */
    RestResponse generateOrder(LiftCaseQuery request);

    /**
     * 完善诊单，创建房间，出诊专用
     * 
     * @param request
     * @return
     */
    RestResponse generateRoom(LiftCaseQuery request);

    /**
     * 获取平台问诊服务费
     * 
     */
    RestResponse platformServiceFee();

    RestResponse queryPageByInvoiceId(LiftCaseQuery request);

    void updateStatusById(Long caseId, Integer status);

    /**
     * 邀请专家接单
     * 
     * @param request
     * @return
     */
    RestResponse inviteExperts(LiftCaseEntity request);

    RestResponse userMakeSureCase(Long id);

    RestResponse toOffer(LiftCaseEntity liftCaseEntity);

    RestResponse chargeMakeSureCase(LiftCaseEntity liftCaseEntity);

    RestResponse chargeToClock(LiftCaseEntity liftCaseEntity);

    RestResponse userToClock(Long id);

    RestResponse refusedExperts(Long id);

    List<String> findListByUserId(String userId);

    RestResponse getAllCaseToInvoice(Long userId);
    
    LiftCaseEntity getAllById(Long id);

    BigDecimal getExpertFee(Long chargerId);

    void sureLiftCaseTask();
    
    void refusedLiftCaseTask();
    
    RestResponse invitationExpert(LiftCaseEntity liftCaseEntity);
    
    RestResponse updateCustomerServiceId(LiftCaseEntity liftCaseEntity);
    
    void updateColorGrade();

    RestResponse getMyCase(Long userId);

    /**
     * 取消订单
     */
    RestResponse cancelCase(Long id);

    /**
     * 查询订单详情
     * @param id
     * @return
     */
    RestResponse queryDetail(Long id);
}
