remove jinzhi fake_location_code

This commit is contained in:
anlicheng 2025-03-26 11:51:24 +08:00
parent edb106907b
commit 7939f25e57
3 changed files with 3 additions and 38 deletions

View File

@ -189,10 +189,8 @@ format_event(LocationCode, DynamicLocationCode, EventType, #{<<"event_code">> :=
% <<"occurrenceTime">> => <<"2023-06-10 12:00:00">>,
LocationCode1 = fake_location_code(EventType, LocationCode),
DeviceInfo = #{
% <<"location">> => LocationCode,
<<"location">> => LocationCode1,
<<"location">> => LocationCode,
<<"category">> => EventCode,
<<"description">> => Description,
<<"occurrenceTime">> => Datetime,
@ -203,7 +201,7 @@ format_event(LocationCode, DynamicLocationCode, EventType, #{<<"event_code">> :=
ReqData = #{
<<"sign">> => sign(DeviceInfo, PriKey),
<<"sysId">> => ?SYS_ID,
<<"taskId">> => generate_task_id(LocationCode1, EventCode),
<<"taskId">> => generate_task_id(LocationCode, EventCode),
<<"count">> => 1,
<<"deviceInfo">> => DeviceInfo
},
@ -265,10 +263,3 @@ serialize0([{K, V}|T], Target) ->
end,
Item = <<$", K/binary, $", $:, V1/binary>>,
serialize0(T, [Item|Target]).
-spec fake_location_code(EventType :: integer(), LocationCode :: binary()) -> binary().
fake_location_code(EventType, LocationCode) when is_integer(EventType), is_binary(LocationCode) ->
% TODO delete
FakeLocationCodes = application:get_env(iot, fake_location_codes, []),
proplists:get_value(EventType, FakeLocationCodes, LocationCode).

View File

@ -19,19 +19,6 @@
15 => 300
}},
{fake_location_codes, [
%% 鼠类监测
{11, <<"0508103010001050300001">>},
%% 异物占道
{13, <<"0512104030001050400003">>},
%% 垃圾箱(桶)
{14, <<"0507106030001050600003">>},
%% 操作区人员着装不规范
{12, <<"0500000000001022700537">>},
%% 动火离人
{15, <<"0500000000001022700538">>}
]},
{api_url, "http://39.98.184.67:8800"},
{watchdog, [

View File

@ -19,19 +19,6 @@
15 => 300
}},
{fake_location_codes, [
%% 鼠类监测
{11, <<"0508103010001050300001">>},
%% 异物占道
{13, <<"0512104030001050400003">>},
%% 垃圾箱(桶)
{14, <<"0507106030001050600003">>},
%% 操作区人员着装不规范
{12, <<"0500000000001022700537">>},
%% 动火离人
{15, <<"0500000000001022700538">>}
]},
{watchdog, [
{pri_key, "jinzhi_watchdog_pri.key"},
{url, "http://172.30.37.242:8080/hqtaskcenterapp/sys/taskCenter/taskReceive/sendNotice.do"},