package com.gingersoft.gsa.cloud.base.common.bean;

import com.gingersoft.gsa.cloud.base.utils.MoneyUtil;
import com.gingersoft.gsa.cloud.database.bean.ExpandInfo;

import java.util.List;

/**
 * 作者：ELEGANT_BIN
 * 版本：1.6.0
 * 创建日期：2020-05-11
 * 修订历史：2020-05-11
 * 描述：餐廳擴展信息工具類
 */
public class RestaurantExpandInfoUtils {


    /**
     * 保存常用信息
     * @param expandInfoList
     */
    public static  void setCommonExpandInfo(List<ExpandInfo> expandInfoList){
        for (ExpandInfo expandInfo : expandInfoList) {
            if (expandInfo.getSettingName().equals("Rounding")) {
                MoneyUtil.rounding = expandInfo.getValueInt();
            }
            if (expandInfo.getSettingName().equals("RoundingDecimal")) {
                MoneyUtil.RoundingDecimal = expandInfo.getValueInt();
            }
            if (expandInfo.getSettingName().equals("ItemDecimals")) {
                MoneyUtil.ItemDecimals = expandInfo.getValueInt();
            }
        }
    }




}
