fix taskId

This commit is contained in:
anlicheng 2024-09-12 16:21:01 +08:00
parent 6c9f8549d0
commit 5112bf1d3d

View File

@ -185,9 +185,11 @@ format_event(LocationCode, DynamicLocationCode, EventType, #{<<"event_code">> :=
end, Attachments0),
% <<"occurrenceTime">> => <<"2023-06-10 12:00:00">>,
LocationCode1 = fake_location_code(EventCode, LocationCode),
DeviceInfo = #{
% <<"location">> => LocationCode,
<<"location">> => fake_location_code(EventCode, LocationCode),
<<"location">> => LocationCode1,
<<"category">> => EventCode,
<<"description">> => Description,
<<"occurrenceTime">> => Datetime,
@ -197,7 +199,7 @@ format_event(LocationCode, DynamicLocationCode, EventType, #{<<"event_code">> :=
ReqData = #{
<<"sign">> => sign(DeviceInfo, PriKey),
<<"sysId">> => ?SYS_ID,
<<"taskId">> => generate_task_id(DynamicLocationCode, EventCode),
<<"taskId">> => generate_task_id(LocationCode1, EventCode),
<<"count">> => 1,
<<"deviceInfo">> => DeviceInfo
},