package com.xinyartech.erp.core.constant;

import java.math.BigDecimal;

/**
* 全局常量类
*/
public class GlobalConstant {

/**
* 定时任务默认用户
*/
public static final long USER_DEFAULT = -1L;

/**
* 批量插入默认单次提交数据量
*/
public static final int BATCH_INSERT_DEFAULT = 500;

/**
* 类别层级限制
*/
public static final int CATEGORY_LIMIT = 5;

/**
* 金额 *10000
*/
public static final BigDecimal CALCULATED_QUANTITY_BD = new BigDecimal(10000);

/**
* 保留位数
*/
public static final int SCALE = 4;

/**
* 成分拆分金额保留位数
*/
public static final int COMPONENT_SCALE = 2;

/**
* 计算数量 *10000
*/
public static final int CALCULATED_QUANTITY = 10000;

/**
* redis token 存活时间 暂定10天
*/
public static final Long EXPIRETIME = 864000L;

/**
* 计算数量 *10000
*/
public static final Long CALCULATED_QUANTITY_LONG = 10000L;

/**
* 初始容量大小
*/
public static final int INITIALCAPACITY = 30;
/**
* UTF-8编码
*/
public static final String UTF8 = "UTF-8";
/**
* true/启动/正常/激活等
*/
public static final Byte TRUE = 1;
/**
* false/不启动/删除/禁用等
*/
public static final Byte FALSE = 0;
/**
* 用户默认密码
*/
public static final String USER_DEFAULT_PSW = "123456";
/**
* 数字字段为空并且不展示时,设置-1
*/
public static final int EMPTY_NUMBER_SHOW_DEFAULT = -1;

public static final String STATE = "2";

/**
* 是否是系统设置
*/
public static class System {
/**
* 不是系统设置
*/
public static final Integer FALSE = 0;
/**
* 是系统设置
*/
public static final Integer True = 1;
}

/**
* 审核状态
*/
public static class Audit {
/**
* 未审核
*/
public static final Byte FALSE = 0;
/**
* 已审核
*/
public static final Byte TRUE = 1;
}
public static class ProductType {

/**
* 组合商品
*/
public static final Byte COMBINATION = 2;
}

public static class Zero {
public static final long LONG = 0L;
public static final int INT = 0;
public static final String STRING = "0";
}

public static class One{
public static final long LONG = 1L;
public static final int INT = 1;
public static final String STRING = "1";
}

public static class Normal {
/**
* true/启动/正常/激活等
*/
public static final Byte TRUE = 0;
/**
* false/不启动/删除/禁用等
*/
public static final Byte FALSE = 1;
/**
* ready/新品申请单备用状态
*/
public static final Byte READY = 2;
}

/**
* http请求方式
*
* @author Lynch
*/
public static class Method {
public static final String GET = "GET";
public static final String POST = "POST";
public static final String PUT = "PUT";
public static final String DELETE = "DELETE";
}

/**
* 请求头
*
* @author Lynch
*/
public static class Header {
/**
* 请求头Authorization
*/
public static final String AUTHORIZATION = "Authorization";
/**
* 请求头sign
*/
public static final String SIGN = "sign";
/**
* 请求头timestamp
*/
public static final String TIMESTAMP = "timestamp";
}


/**
* 分店名称字典
*
* @author Lynch
*/
public static class BranchName {
/**
* 字典编号
*/
public static final String TYPE_CODE = "BRANCH_NAME";
/**
* 字典key-总店
*/
public static final String KEY_HEAD_BRANCH = "HEAD_BRANCH";
}

/**
* 超级用户字典
*
* @author Lynch
*/
public static class SuperUser {
/**
* 字典编号
*/
public static final String TYPE_CODE = "SUPER_USER";
/**
* 字典key-超级用户
*/
public static final String KEY_SUPER_USER = "SUPER_USER";
}

/**
* 二维码类型
*/
public static class BarCode {
/**
* 主条形码
*/
public static final Byte MAIN = 1;
/**
* 辅助条形码
*/
public static final Byte AUXILIARY = 2;
}

/**
* 是否总店
*/
public static class IsHeadBranch {
/**
* 不是(分店)
*/
public static final Byte FALSE = 0;
/**
* 是(总店)
*/
public static final Byte TRUE = 1;
}

/**
* 数据权限是否受限制: -1 无法识别; 0 不受限制; 1:受限制
*/
public static class ISLIMIT {
/**
* 无法识别
**/
public static final Integer UNKNOW = -1;
/**
* 不受限制
**/
public static final Integer UNLIMIT = 0;
/**
* 受限制
**/
public static final Integer LIMITED = 1;
}

/**
* 时间类型
*/
public static class DateType {
/**
* 年
**/
public static final Byte YEAR = 1;
/**
* 月
**/
public static final Byte MONTH = 2;
}

public static final String UPDATE = "update";

public static final String INSERT = "insert";

public static final String DELETE = "delete";

/**
* 盘点批量处理数量
*/
public static final Integer BATCH_HANDLER = 50000;

/**
* 系统历史数据类型
*/
public static class sysHistoryType{
/** 系统日志 **/
public static final String SYS_LOG = "sysLog";
/** 收银日志 **/
public static final String CASH_LOG = "cashLog";
/** pos流水 **/
public static final String POS_FLOW = "posFlow";
/** 业务单据 **/
public static final String BUSINESS_BILL = "businessBill";
/** 账款数据 **/
public static final String ACCOUNT_BILL = "accountBill";
}

/**
* 操作日志-操作类型
*/
public static class operateType{
public static final String SAVE = "新增";
public static final String DELETE = "删除";
public static final String UPDATE = "修改";
public static final String LOGIN = "登录";
public static final String SAVE_OR_UPDATE = "新增或修改";
public static final String IMPORT = "导入";
public static final String EXPORT = "导出";
}

/**
* 操作日志-模块名
*/
public static class moduleName{
public static final String DA = "档案";
public static final String CG = "采购";
public static final String CX = "促销";
public static final String LS = "零售";
public static final String HY = "会员";
public static final String YX = "营销";
public static final String KG = "库管";
public static final String PS = "配送";
public static final String JS = "结算";
public static final String BB = "报表";
public static final String XT = "系统";
}

/** 同步积分、储值、零钱主题 **/
public static final String TOPIC_VIP_ALL = "topic.vip.all";

public static final String TOPIC_SALES = "topic.sales";
}