|
@@ -158,7 +158,6 @@ func (t *TempAlarmNode) evaluateConditions(message *protocol.Message) bool {
|
|
|
data := make(map[string]interface{})
|
|
|
var ok bool
|
|
|
j := gjson.New(message.Data)
|
|
|
- fmt.Printf("Data------------------:%s\r\n", j.MustToJsonString())
|
|
|
status := j.Get("status")
|
|
|
if data, ok = status.(map[string]interface{}); !ok {
|
|
|
return false
|
|
@@ -203,8 +202,9 @@ func (t *TempAlarmNode) evaluateConditions(message *protocol.Message) bool {
|
|
|
if err != nil {
|
|
|
server.Log.Errorf("device offline error. deviceid: %v, error: %v", reply.AlarmParams.DeviceCode, err)
|
|
|
}
|
|
|
- fmt.Printf("reply------------------:%s\r\n", gjson.New(reply).MustToJsonString())
|
|
|
+
|
|
|
if reply.AlarmParams.FirstReportTime == 0 {
|
|
|
+ fmt.Printf("请求rpc接口保存数据------------------\r\n")
|
|
|
setArgs := rpcs.ArgsAlarmInfo{
|
|
|
DeviceCode: deviceId,
|
|
|
FirstReportTime: time.Now().Unix(),
|