vince
2024-01-16 236cf59aae727d304487676413c4337f73b16e67
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.fzzy.gateway.hx2023;
 
import com.alibaba.fastjson2.util.UUIDUtils;
import com.fzzy.api.utils.MyMD5Util;
import org.apache.commons.lang.math.RandomUtils;
 
import java.util.UUID;
 
/**
 * 常量
 */
public class ScConstant {
 
    public static String API_URL_AUTH = "${auth}/authorize/login";
 
 
    public static String MESSAGE_TYPE_REPORT_PROPERTY = "REPORT_PROPERTY";
 
    public static String MESSAGE_TYPE_INVOKE_FUNCTION = "INVOKE_FUNCTION";
 
 
 
    /**
     * 粮情采指令
     */
    public static String FUNCTION_getTAndRHInfo = "getTAndRHInfo";
 
 
    public static String getMessageId() {
        return System.currentTimeMillis() + RandomUtils.nextInt(1000) + "";
    }
 
    public static String getUUID() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }
 
 
 
 
    //API_SOURCE-心跳
    public static String API_SOURCE_TARGET_EQUIPMENT_HEARTBEAT = "TARGET_EQUIPMENT_HEARTBEAT";
    //API_SOURCE-网关设备状态消息的
    public static String API_SOURCE_TARGET_EQUIPMENT_STATUS = "TARGET_EQUIPMENT_STATUS";
 
    /**
     * 下发指令回复报文topic
     */
    public static String TOPIC_REPORT = "/${productId}/${deviceId}/properties/report";
    /**
     * 下发指令回复报文topic
     */
    public static String TOPIC_REPORT_GRAIN = "TOPIC_ZLJ_GRAIN_TEMPERATURE";
    /**
     * 设备相关信息恢复报文-topic
     */
    public static String TOPIC_MESSAGE_REPORT = "/device/${productId}/${deviceId}/message/property/report";
 
 
    /**
     * 网关设备状态消息消息 topic:TOPIC_EQUIPMENT_HEARTBEAT_{库点编码}
     */
    public static String TOPIC_EQUIPMENT_HEARTBEAT = "TOPIC_EQUIPMENT_HEARTBEAT_{kqdm}";
 
 
    /**
     * kafak 粮情数据推送到云端
     */
    public static String TOPIC_ZLJ_GRAIN_TEMPERATURE = "TOPIC_ZLJ_GRAIN_TEMPERATURE";
 
    /**
     * 网关设备状态消息消息 topic:TOPIC_EQUIPMENT_STATUS_{库点编码}
     */
    public static String TOPIC_EQUIPMENT_STATUS = "TOPIC_EQUIPMENT_STATUS_{kqdm}";
}