Skip to content

Commit

Permalink
Merge pull request #4093 from mikhailprivalov/fixReporAppointed
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
urchinpro authored Jul 11, 2024
2 parents 484e7bf + 1733149 commit 9c003e8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions statistic/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,12 @@ def statistic_xls(request):
"hn": d.history_num,
"d": {},
}
cards[c.pk]["d"][d.pk] = {
"r": [],
"dn": str(dateformat.format(d.data_sozdaniya.date(), settings.DATE_FORMAT)),
}
cards[c.pk]["d"][d.pk] = {"r": [], "dn": str(dateformat.format(d.data_sozdaniya.date(), settings.DATE_FORMAT)), "tubes": []}

tubes = TubesRegistration.objects.filter(issledovaniya__napravleniye=d).distinct()
direction_tube = [tube.number for tube in tubes]
cards[c.pk]["d"][d.pk]["tubes"] = ','.join(map(str, [t for t in direction_tube]))

for i in Issledovaniya.objects.filter(napravleniye=d):
cards[c.pk]["d"][d.pk]["r"].append(
{
Expand All @@ -384,6 +386,7 @@ def statistic_xls(request):
("Карта", 6000),
("Направление", 4000),
("Дата", 4000),
("Номер Емкости", 7000),
("Назначение", 7000),
]

Expand Down Expand Up @@ -412,6 +415,7 @@ def statistic_xls(request):
s2 = True
row.append(str(dk))
row.append(c["d"][dk]["dn"])
row.append(c["d"][dk]["tubes"])
else:
row.append("")
row.append("")
Expand Down

0 comments on commit 9c003e8

Please sign in to comment.