package com.hfkj.service.hlt;

import com.alibaba.fastjson.JSONObject;
import java.util.HashMap;
import java.util.Map;

/**
  * @ClassName HltCanteenService
  * @Author Sum1Dream
  * @Description 汇联通食堂功能
  * @Date 2024/7/30 下午5:31
 **/
public class HltCanteenService {

    /**
     * @MethodName canteenConsume
     * @Description: 食堂消费
     * @param orderNo
     * @param cardNo
     * @param instCode
     * @param canteenId 
     * @return: com.alibaba.fastjson.JSONObject
     * @Author: Sum1Dream
     * @Date: 2024/7/30 下午5:36
     */
    public static JSONObject canteenConsume(String orderNo , String cardNo , String instCode , String canteenId) throws Exception {
        Map<String,Object> dataMap = new HashMap<>();
        dataMap.put("orderNo", orderNo);
        dataMap.put("consumeType", 3);
        dataMap.put("cardNo", cardNo);
        dataMap.put("instCode", instCode);
        dataMap.put("canteenId", canteenId);
        return HuiLianTongUnionCardService.request("canteen/canteenConsume", dataMap);
    }

    /**
     * @MethodName queryCanteenOrder
     * @Description:查询食堂消费记录
     * @param cardNo 
     * @return: com.alibaba.fastjson.JSONObject
     * @Author: Sum1Dream
     * @Date: 2024/7/30 下午5:38
     */
    public static JSONObject queryCanteenOrder(String cardNo) throws Exception {
        Map<String,Object> dataMap = new HashMap<>();
        dataMap.put("cardNo", cardNo);
        dataMap.put("page", 1);
        dataMap.put("pageSize", 100000);
        return HuiLianTongUnionCardService.request("canteen/queryCanteenOrder", dataMap);
    }

}
