mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-12-02 12:18:30 +08:00
fix:factory
This commit is contained in:
parent
41426392e2
commit
0322c5f403
@ -42,9 +42,9 @@
|
||||
"description": "自定义",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -85,6 +85,12 @@
|
||||
"type": "string",
|
||||
"description": "查询日期"
|
||||
},
|
||||
{
|
||||
"name": "depart",
|
||||
"in": "query",
|
||||
"type": "string",
|
||||
"description": "查询部门"
|
||||
},
|
||||
{
|
||||
"name": "workshop",
|
||||
"in": "query",
|
||||
@ -305,7 +311,6 @@
|
||||
"description": "factory"
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -112,9 +112,9 @@ handle_product_condition(_Channel, ProductId, DeviceId, DevAddr, _Type, #{<<"pro
|
||||
|
||||
handle_product_condition(_Channel, ProductId, DeviceId, DevAddr, _Type, #{<<"product_condition">> := 3, <<"product_id">> := Product_id, <<"product_pnumber">> := Pnumber} = Payload) ->
|
||||
dgiot_task:save_td_no_match(ProductId, DevAddr, Payload#{<<"product_id">> => dgiot_utils:to_list(Product_id)}, #{}),
|
||||
handle_storehouse(3, Pnumber, DeviceId),
|
||||
handle_storehouse(3, Pnumber, DeviceId);
|
||||
%% handle_dingdan(DeviceId),
|
||||
dgiot_jienuo_meter:test(Payload, DeviceId);
|
||||
%% dgiot_jienuo_meter:test(Payload, DeviceId);
|
||||
|
||||
handle_product_condition(_, _, _, _, _, _) ->
|
||||
|
||||
|
@ -29,7 +29,6 @@ get_work_sheet(ProductId, Type, Channel, DeviceId, Where, Limit, Skip, New) ->
|
||||
{Total, Res} = filter_data(Limit, Skip, HistoryData),
|
||||
MergeData = merge_data(ParseData, Res, DeviceId, ThingMap),
|
||||
NamedData = dgiot_factory_utils:turn_name(MergeData, ThingMap),
|
||||
io:format("~s ~p NamedData= ~p ~n",[?FILE,?LINE,NamedData]),
|
||||
{ok, {Total, NamedData}};
|
||||
_ ->
|
||||
error
|
||||
|
@ -123,7 +123,6 @@ do_request(get_worker_shift, #{<<"depart">> := Depart, <<"date">> := Data, <<"wo
|
||||
{error, Msg}
|
||||
end;
|
||||
_ ->
|
||||
|
||||
case dgiot_factory_shift:get_shift(Data, Workshop) of
|
||||
{ok, Res} ->
|
||||
{Total, Result} = dgiot_factory_getdata:filter_data(Limit, Skip, Res),
|
||||
|
@ -68,7 +68,7 @@ get_workshop(Tree, Acc,Department) ->
|
||||
_ ->
|
||||
lists:foldl(
|
||||
fun(X, ACC) ->
|
||||
case maps:get(<<"alias">>, X, <<"">>) of
|
||||
case maps:get(<<"depname">>, X, <<"">>) of
|
||||
Department ->
|
||||
Child = maps:get(<<"children">>, X, []),
|
||||
lists:foldl(
|
||||
|
Loading…
Reference in New Issue
Block a user