package com.hzs.sale.util;

import com.hzs.common.core.enums.ESpecialArea;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 商品专区工具类
 * @Author: jiang chao
 * @Time: 2023/10/14 10:37
 * @Classname: WaresSpecialUtil
 * @PackageName: com.hzs.sale.util
 */
public class WaresSpecialUtil {

    /**
     * 获取商品专区
     *
     * @param specialArea 商品专区
     * @return
     */
    public static List<Integer> getWaresSpecial(Integer specialArea) {
        List<Integer> specialAreaList = new ArrayList<>();
        specialAreaList.add(specialArea);
        // 消费专区的商品目前和报单专区的商品保持一致
        if (ESpecialArea.UPGRADE_FORM.getValue() == specialArea) {
            specialAreaList.add(ESpecialArea.REGISTER_AREA_FORM.getValue());
        } else if (ESpecialArea.UPGRADE_CONSUMPTION.getValue() == specialArea) {
            specialAreaList.add(ESpecialArea.REGISTER_AREA_CONSUMPTION.getValue());
        } else if (ESpecialArea.UPGRADE_AREA.getValue() == specialArea) {
            specialAreaList.add(ESpecialArea.REGISTER_AREA_FORM.getValue());
            specialAreaList.add(ESpecialArea.REGISTER_AREA_CONSUMPTION.getValue());
        }
        return specialAreaList;
    }

}
