package com.fs.his.service;

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

import com.fs.common.core.domain.R;
import com.fs.company.domain.CompanyUser;
import com.fs.his.domain.FsPackage;
import com.fs.his.domain.FsPackageOrder;
import com.fs.his.domain.FsStorePayment;
import com.fs.his.dto.PackageOrderDTO;
import com.fs.his.param.*;
import com.fs.his.vo.*;
import io.swagger.models.auth.In;

/**
 * 套餐订单Service接口
 *
 * @author fs
 * @date 2023-08-25
 */
public interface IFsPackageOrderService
{
    /**
     * 查询套餐订单
     *
     * @param orderId 套餐订单主键
     * @return 套餐订单
     */
    public FsPackageOrder selectFsPackageOrderByOrderId(Long orderId);

    public FsPackageOrderVO selectFsPackageOrderByOrderIdVO(Long orderId);
    /**
     * 查询套餐订单列表
     *
     * @param fsPackageOrder 套餐订单
     * @return 套餐订单集合
     */
    public List<FsPackageOrder> selectFsPackageOrderList(FsPackageOrder fsPackageOrder);

    /**
     * 新增套餐订单
     *
     * @param fsPackageOrder 套餐订单
     * @return 结果
     */
    public int insertFsPackageOrder(FsPackageOrder fsPackageOrder);

    /**
     * 修改套餐订单
     *
     * @param fsPackageOrder 套餐订单
     * @return 结果
     */
    public int updateFsPackageOrder(FsPackageOrder fsPackageOrder);

    /**
     * 批量删除套餐订单
     *
     * @param orderIds 需要删除的套餐订单主键集合
     * @return 结果
     */
    public int deleteFsPackageOrderByOrderIds(Long[] orderIds);

    /**
     * 删除套餐订单信息
     *
     * @param orderId 套餐订单主键
     * @return 结果
     */
    public int deleteFsPackageOrderByOrderId(Long orderId);

    List<FsPackageOrderListVO> selectFsPackageOrderListVO(FsPackageOrderParam fsPackageOrder);

    Integer PackageOrderRefund(Long orderId);

    R confirmOrder(FsPackageOrderConfirmParam param);

    R createOrder(FsPackageOrderCreateParam param);

    R computeOrder(FsPackageOrderComputeParam param);

    R payOrder(FsPackageOrderPayParam param);

//    R  payConfirm(String orderSn,String payCode, String tradeNo,String payType,Integer type);
    R  payConfirm(String orderSn,String payCode, String tradeNo,String payType,Integer type,String bankTransactionId,String bankSerialNo);

    List<FsPackageOrderListUVO> selectFsPackageOrderListUVO(FsPackageOrderListUParam param);

    List<FsStorePayment> selectFsPackagePaymentByOrderId(Long orderId);

    List<FsPackageOrderExcelVO> selectFsPackageOrderExcelListVO(FsPackageOrderParam fsPackageOrder);

    Integer PackageInquiryOrderRefund(Long orderId);

    Integer PackageStoreOrderRefund(Long orderId,String opeName);

    R payment(FsPackageOrderDoPayParam param);

    R cancel(FsPackageOrderCancelParam param);

    R addPackageOrder(FsPackageOrderAddParam fsPackageOrder);

    byte[] getWxaCodeUnLimit(Long orderId);

    R aliPayment(FsPackageOrderDoPayParam param);

    R H5WxPayment(FsPackageOrderDoPayParam param);

    R h5AliPayment(FsPackageOrderDoPayParam param);

    Integer selectFsPackageOrderCount(Integer status,Long userId);

    Boolean isEntityNull(FsPackageOrderParam fsPackageOrder);

    Long selectFsPackageOrderExcelListVOCount(FsPackageOrderParam fsPackageOrder);

    void exportData(FsPackageOrderParam fsPackageOrder);

    FsPackage selectFsPackageByOrderId(Long packageOrderId);

    List<PackageOrderDTO> getNewOrder();

    R getWxaCodePackageOrderUnLimit(Long orderId);

    /**
     * 套餐包制单
     */
    R createPackageOrder(CompanyUser companyUser,Long packageId);

    /**
     * 更新套餐订单金额
     * @param createOrderKey 键
     * @param money 订单金额
     * @param payAmount 支付金额
     * @param payType 支付类型 1-全款 2-物流代收
     */
    R updatePackageOrderMoney(String createOrderKey, BigDecimal money, BigDecimal payAmount, Integer payType);


    R getPackageOrder(String createOrderKey);

    List<FsPackageOrder> selectOutTimeOrderList(Integer unPayTime);

    R editPatientImages(Long orderId, String imagesList);

    FsUserInfoCollectionAndStoreOrderVo selectInformationCollectionByStoreOrderId(Long orderId);
}
