Constants.java 2.83 KB
package com.xkl.config;

import com.xkl.domain.XklAmpReportCategoryEntity;
import com.xkl.domain.XklAmpReportMetaItemsEntity;
import com.xkl.domain.XklAmpReportMetaScoreStandardEntity;
import com.xkl.model.CityModel;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * 常量
 */
public interface Constants {

    /**
     * 存储当前登录用户id的字段名
     */
    String CURRENT_USER_ID = "CURRENT_USER_ID";

    /**
     * token有效期(小时)
     */
    int TOKEN_EXPIRES_HOUR = 72;

    /**
     * qrcode有效期(小时)
     */
    int QRCODE_EXPIRES_HOUR = 24;

    /**
     * 存放Authorization的header字段
     */
    String AUTHORIZATION = "authorization";

    /**
     * 单项打分标准
     */
    Map<Integer, XklAmpReportMetaScoreStandardEntity> scoreMap = new HashMap<>();

    /**
     * 大项综合加权标准
     */
    Map<Integer, XklAmpReportCategoryEntity> weightedScoreMap = new HashMap<>();
    //不包含测试项目
    Map<Integer, XklAmpReportMetaItemsEntity> itemMetaMap = new HashMap<Integer, XklAmpReportMetaItemsEntity>();
    //测试项目type=1
    Set<Integer> testItemSet = new HashSet<>();
    Integer testItemType = 1;
    /**
     * 报告详情特殊处理:item_id=91,114,115。这里在原始报告中为“----”,为了好计算得分,改成了-999-999999,需要改回去
     */
    Set<Integer> itemIdSpSet = new HashSet<Integer>(){{
        add(91);
        add(114);
        add(115);
    }};
    String itemRangeSpString = "----";
    /**
     * 分年龄段平均得分
     */

    Map<String,Double> aveScoreMap = new HashMap<>();
    /**
     * 身份证前六位-省市区
     */
    Map<String,CityModel> cityMap = new HashMap<>();
    int ID_TYPE_COUNTRY = 2;
    int ID_TYPE_PROVINCE = 3;
    int ID_TYPE_CITY = 4;
    int ID_TYPE_COUNTY = 5;

    /**
     * admin-token前缀
     */
    String ADMIN_TOKEN_PREFIX = "ADMINTOKENPREFIX";

    /**
     * 操作员操作类型,0 新用户注册;1 体检; 2 老用户引导; 3 问诊;
     */
    public static final int OP_NEWUSER_REGISTER = 0;
    public static final int OP_HELTH_EXAM = 1;
    public static final int OP_OLDUSER_GUIDE = 2;
    public static final int OP_NEWUSER_DIAGNOSE = 3;

    public static final int MALE = 0;
    public static final int FEMALE = 1;

    public static final int NORMAL = 0;
    public static final int LOWER = 1;
    public static final int HIGHER = 2;

    public static final int STATUS_OK = 1;
    public static final boolean STATUS_OK2 = true;

    public static final double SMALL_DOUBLE = 0.001;

    public static final String WEB_LOGIN_URL = "http://s.yanyunfeng.com/xikailu/new/account/auth?method=qr.login&url=";
    public static final String LOCAL_QRVERIFY_URL = "https://www.hanhezy.com:8090/qrcode/getUsrInfoWithQr?encryptQr=";

}