Commit c0b5f226 authored by litaolemo's avatar litaolemo

update

parent 93284bd3
......@@ -282,33 +282,33 @@ for res in sql_res:
if cl_id in device_id_dict:
card_id = res.card_id
if card_id not in card_id_list:continue
session_pv = res.session_pv
card_id_set.update(card_id)
if cl_id in second_demands_tag_dict:
for tag_id in second_demands_tag_dict[cl_id]:
if cl_id in second_demands_id_count:
second_demands_id_count[tag_id].update(card_id)
if tag_id in second_demands_id_count:
second_demands_id_count[tag_id][card_id] = 1
else:
second_demands_id_count[tag_id] = set()
second_demands_id_count[tag_id].update(card_id)
second_demands_id_count[tag_id] = {}
second_demands_id_count[tag_id][card_id] = 1
if tag_id in baoguang_dict:
baoguang_dict[tag_id] += session_pv
else:
baoguang_dict[tag_id] = session_pv
# if tag_id in baoguang_dict:
# baoguang_dict[tag_id] += session_pv
# else:
# baoguang_dict[tag_id] = session_pv
if cl_id in projects_demands_tag_dict:
for tag_id in projects_demands_tag_dict[cl_id]:
if tag_id in projects_demands_id_count:
projects_demands_id_count[tag_id].update(card_id)
projects_demands_id_count[tag_id][card_id] = 1
else:
projects_demands_id_count[tag_id] = set()
projects_demands_id_count[tag_id].update(card_id)
projects_demands_id_count[tag_id] = {}
projects_demands_id_count[tag_id][card_id] = 1
final_projects_list = []
second_demands_list = []
for tag_id in second_demands_id_count:
for tag_id in second_demands_tag_count:
temp_dict = {
"tag_name": tag_id,
"device_count": second_demands_tag_count[tag_id],
......@@ -319,12 +319,12 @@ for tag_id in second_demands_id_count:
print(temp_dict)
print("----------------------------------------------")
for tag_id in projects_demands_id_count:
for tag_id in projects_demands_tag_count:
temp_dict = {
"tag_name": tag_id,
"device_count": projects_demands_tag_count[tag_id],
"tractate_count": tags_v3_count_dict.get(tag_id),
"exporsure_count": len(set(projects_demands_id_count[tag_id])),
"exporsure_count": len(projects_demands_id_count[tag_id]),
# "session_pv_count": len(set(second_demands_id_count[tag_id]))
}
print(temp_dict)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment