监管指挥平台暂时不推送 20 - 23106 垃圾桶加盖

This commit is contained in:
anlicheng 2025-04-21 09:53:14 +08:00
parent 0b42353ac0
commit 534decb43b

View File

@ -2,7 +2,7 @@
%%% @author anlicheng
%%% @copyright (C) 2024, <COMPANY>
%%% @doc
%%%
%%%
%%% @end
%%% Created : 23. 7 2024 14:51
%%%-------------------------------------------------------------------
@ -45,7 +45,15 @@ get_pid() ->
-spec forward(LocationCode :: binary(), DynamicLocationCode :: binary(), EventType :: integer(), Params :: map()) -> no_return().
forward(LocationCode, DynamicLocationCode, EventType, Params) when is_binary(LocationCode), is_binary(DynamicLocationCode), is_integer(EventType), is_map(Params) ->
gen_server:cast(?MODULE, {forward, LocationCode, DynamicLocationCode, EventType, Params}).
%%
IgnoreEventTypes = [20],
case lists:member(EventType, IgnoreEventTypes) of
true ->
lager:notice("[iot_jinzhi_endpoint] the event type: ~p, params: ~p, ignore", [EventType, Params]),
ok;
false ->
gen_server:cast(?MODULE, {forward, LocationCode, DynamicLocationCode, EventType, Params})
end.
%% @doc Spawns the server and registers the local name (unique)
-spec(start_link() ->
@ -194,7 +202,7 @@ format_event(LocationCode, DynamicLocationCode, EventType, #{<<"event_code">> :=
<<"category">> => EventCode,
<<"description">> => Description,
<<"occurrenceTime">> => Datetime,
%%
%%
<<"attachments">> => lists:sublist(Attachments, 1, 1)
},