diff --git a/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl b/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl index 7398611..d9c3b1d 100644 --- a/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl +++ b/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl @@ -2,7 +2,7 @@ %%% @author anlicheng %%% @copyright (C) 2024, %%% @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) },