remove jinzhi fake_location_code
This commit is contained in:
parent
edb106907b
commit
7939f25e57
@ -189,10 +189,8 @@ format_event(LocationCode, DynamicLocationCode, EventType, #{<<"event_code">> :=
|
|||||||
|
|
||||||
% <<"occurrenceTime">> => <<"2023-06-10 12:00:00">>,
|
% <<"occurrenceTime">> => <<"2023-06-10 12:00:00">>,
|
||||||
|
|
||||||
LocationCode1 = fake_location_code(EventType, LocationCode),
|
|
||||||
DeviceInfo = #{
|
DeviceInfo = #{
|
||||||
% <<"location">> => LocationCode,
|
<<"location">> => LocationCode,
|
||||||
<<"location">> => LocationCode1,
|
|
||||||
<<"category">> => EventCode,
|
<<"category">> => EventCode,
|
||||||
<<"description">> => Description,
|
<<"description">> => Description,
|
||||||
<<"occurrenceTime">> => Datetime,
|
<<"occurrenceTime">> => Datetime,
|
||||||
@ -203,7 +201,7 @@ format_event(LocationCode, DynamicLocationCode, EventType, #{<<"event_code">> :=
|
|||||||
ReqData = #{
|
ReqData = #{
|
||||||
<<"sign">> => sign(DeviceInfo, PriKey),
|
<<"sign">> => sign(DeviceInfo, PriKey),
|
||||||
<<"sysId">> => ?SYS_ID,
|
<<"sysId">> => ?SYS_ID,
|
||||||
<<"taskId">> => generate_task_id(LocationCode1, EventCode),
|
<<"taskId">> => generate_task_id(LocationCode, EventCode),
|
||||||
<<"count">> => 1,
|
<<"count">> => 1,
|
||||||
<<"deviceInfo">> => DeviceInfo
|
<<"deviceInfo">> => DeviceInfo
|
||||||
},
|
},
|
||||||
@ -265,10 +263,3 @@ serialize0([{K, V}|T], Target) ->
|
|||||||
end,
|
end,
|
||||||
Item = <<$", K/binary, $", $:, V1/binary>>,
|
Item = <<$", K/binary, $", $:, V1/binary>>,
|
||||||
serialize0(T, [Item|Target]).
|
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).
|
|
||||||
@ -19,19 +19,6 @@
|
|||||||
15 => 300
|
15 => 300
|
||||||
}},
|
}},
|
||||||
|
|
||||||
{fake_location_codes, [
|
|
||||||
%% 鼠类监测
|
|
||||||
{11, <<"0508103010001050300001">>},
|
|
||||||
%% 异物占道
|
|
||||||
{13, <<"0512104030001050400003">>},
|
|
||||||
%% 垃圾箱(桶)
|
|
||||||
{14, <<"0507106030001050600003">>},
|
|
||||||
%% 操作区人员着装不规范
|
|
||||||
{12, <<"0500000000001022700537">>},
|
|
||||||
%% 动火离人
|
|
||||||
{15, <<"0500000000001022700538">>}
|
|
||||||
]},
|
|
||||||
|
|
||||||
{api_url, "http://39.98.184.67:8800"},
|
{api_url, "http://39.98.184.67:8800"},
|
||||||
|
|
||||||
{watchdog, [
|
{watchdog, [
|
||||||
|
|||||||
@ -19,19 +19,6 @@
|
|||||||
15 => 300
|
15 => 300
|
||||||
}},
|
}},
|
||||||
|
|
||||||
{fake_location_codes, [
|
|
||||||
%% 鼠类监测
|
|
||||||
{11, <<"0508103010001050300001">>},
|
|
||||||
%% 异物占道
|
|
||||||
{13, <<"0512104030001050400003">>},
|
|
||||||
%% 垃圾箱(桶)
|
|
||||||
{14, <<"0507106030001050600003">>},
|
|
||||||
%% 操作区人员着装不规范
|
|
||||||
{12, <<"0500000000001022700537">>},
|
|
||||||
%% 动火离人
|
|
||||||
{15, <<"0500000000001022700538">>}
|
|
||||||
]},
|
|
||||||
|
|
||||||
{watchdog, [
|
{watchdog, [
|
||||||
{pri_key, "jinzhi_watchdog_pri.key"},
|
{pri_key, "jinzhi_watchdog_pri.key"},
|
||||||
{url, "http://172.30.37.242:8080/hqtaskcenterapp/sys/taskCenter/taskReceive/sendNotice.do"},
|
{url, "http://172.30.37.242:8080/hqtaskcenterapp/sys/taskCenter/taskReceive/sendNotice.do"},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user