package com.fs.hisapi.service.impl;
import com.fs.hisapi.config.HisApiConfig;
import com.fs.hisapi.domain.ApiResponse;
import com.fs.hisapi.service.HisApiService;
import com.fs.hisapi.util.HttpUtil;
import com.fs.hisapi.param.CancelOrderParam;
import com.fs.hisapi.param.DrugParam;
import com.fs.hisapi.param.CreateOrderParam;
import org.springframework.stereotype.Service;

@Service
public class HisApiServiceImpl implements HisApiService {

    //获取订单
    public  ApiResponse getDrug(DrugParam drugVO){
        drugVO.setHospital_code(HisApiConfig.hospital_code);
        return  HttpUtil.endHisApi(HisApiConfig.selectDrugUrl, drugVO);
    }
    //创建订单
    public ApiResponse createOrder(CreateOrderParam createOrderVO){
        createOrderVO.setHospital_code(HisApiConfig.hospital_code);
      return HttpUtil.endHisApi(HisApiConfig.createOrderUrl,createOrderVO);
    }
    //取消订单
    public ApiResponse cancelOrder(CancelOrderParam cancelOrderVO){
        cancelOrderVO.setHospital_code(HisApiConfig.hospital_code);
        return HttpUtil.endHisApi(HisApiConfig.cancelOrderUrl,cancelOrderVO);
    }













}
