com.dahuatech.icc.pmms.constant.PmmsConstant Maven / Gradle / Ivy
package com.dahuatech.icc.pmms.constant;
import com.dahuatech.hutool.core.util.StrUtil;
import com.dahuatech.hutool.log.Log;
import com.dahuatech.hutool.log.LogFactory;
import com.dahuatech.icc.oauth.profile.IccProfile;
/**
* program:java-sdk
*
* Author: 355079
* Date:2022-08-17 10:37
* Description: 动环管理子系统
*/
public class PmmsConstant {
/** 模块名称 */
public static final String SYSTEM_NAME = "evo-pmms";
/** 分页实时查询数据 */
public static final String REAL_DATA="/evo-apigw/evo-pmms/real/data";
/** 设备状态查询 */
public static final String DEVICE_STATISTICS_STATUS="/evo-apigw/evo-pmms/deviceStatistics/status";
/** 历史数据查询 */
public static final String HISTORY_DATA_LIST ="/evo-apigw/evo-pmms/history/dataList";
/** 根据通道查询点位 */
public static final String DATA_LIST_BY_CHANNEL="/evo-apigw/evo-pmms/signal/dataList";
/** 根据设备子类查询点位 */
public static final String DATA_LIST_BY_DEV_CHILD_TYPE="/evo-apigw/evo-pmms/signal/dataList";
private static final Log logger = LogFactory.get();
/** 非必填 */
public static String version = "1.0.0/";
private static boolean initVersionFromBrm = Boolean.FALSE;
public static String url(String url) {
// 加载远程版本信息
initVersion();
return String.format(IccProfile.URL_SCHEME + url, version);
}
public static String url(String url, Object rest) {
// 加载远程版本信息
initVersion();
return StrUtil.format(String.format(IccProfile.URL_SCHEME + url, version), rest);
}
private static void initVersion() {
if (!initVersionFromBrm && IccProfile.systemVersionMap.containsKey(SYSTEM_NAME)) {
version = IccProfile.systemVersionMap.get(SYSTEM_NAME);
initVersionFromBrm = true;
}
}
}