fix jinzhi interface

This commit is contained in:
anlicheng 2023-12-18 19:18:41 +08:00
parent 924e313c80
commit 3aa1567611

View File

@ -178,7 +178,6 @@ do_post(#event_data{id = Id, location_code = LocationCode, event_type = EventTyp
params = Params = #{<<"event_code">> := EventCode, <<"description">> := Description, <<"datetime">> := Datetime, <<"attachments">> := Attachments0}}, params = Params = #{<<"event_code">> := EventCode, <<"description">> := Description, <<"datetime">> := Datetime, <<"attachments">> := Attachments0}},
#state{pri_key = PriKey, url = Url, logger_pid = LoggerPid}) -> #state{pri_key = PriKey, url = Url, logger_pid = LoggerPid}) ->
% <<"occurrenceTime">> => <<"2023-06-10 12:00:00">>, % <<"occurrenceTime">> => <<"2023-06-10 12:00:00">>,
Attachments = lists:map(fun(#{<<"filename">> := Filename, <<"name">> := Name}) -> Attachments = lists:map(fun(#{<<"filename">> := Filename, <<"name">> := Name}) ->
@ -186,11 +185,9 @@ do_post(#event_data{id = Id, location_code = LocationCode, event_type = EventTyp
#{<<"name">> => Name, <<"url">> => FileUrl} #{<<"name">> => Name, <<"url">> => FileUrl}
end, Attachments0), end, Attachments0),
<<Loc:12/binary, _/binary>> = LocationCode,
DeviceInfo = #{ DeviceInfo = #{
<<"location">> => Loc, <<"location">> => LocationCode,
<<"category">> => EventCode, <<"category">> => EventCode,
<<"device_location">> => LocationCode,
<<"description">> => Description, <<"description">> => Description,
<<"occurrenceTime">> => Datetime, <<"occurrenceTime">> => Datetime,
<<"attachments">> => Attachments <<"attachments">> => Attachments