@@ -188,9 +188,6 @@ def eqpt_result(request): |
||
| 188 | 188 |
@logit |
| 189 | 189 |
def screen_eqpt_result(request): |
| 190 | 190 |
point_id = request.POST.get('point_id', '')
|
| 191 |
- kw = request.POST.get('kw', '')
|
|
| 192 |
- page = request.POST.get('page', 1)
|
|
| 193 |
- num = request.POST.get('num', 20)
|
|
| 194 | 191 |
|
| 195 | 192 |
try: |
| 196 | 193 |
point = IsolationPointInfo.objects.get(point_id=point_id, status=True) |
@@ -216,8 +213,6 @@ def screen_eqpt_result(request): |
||
| 216 | 213 |
has_upload_temperature_num = len(logs) |
| 217 | 214 |
fever_num = len([1 for temperature in logs.values() if temperature > settings.FEVER_TEMPERATURE]) |
| 218 | 215 |
|
| 219 |
- if kw: |
|
| 220 |
- eqpts = eqpts.filter(Q(name__icontains=kw) | Q(phone__icontains=kw)) |
|
| 221 | 216 |
eqpts = [{**eqpt.screen_data, **{
|
| 222 | 217 |
'has_upload': eqpt.macid in logs, |
| 223 | 218 |
'temperature': logs.get(eqpt.macid, 0), |
@@ -227,7 +222,6 @@ def screen_eqpt_result(request): |
||
| 227 | 222 |
'room': eqpt.get('room'),
|
| 228 | 223 |
'content': eqpt.get('remark'),
|
| 229 | 224 |
} for eqpt in eqpts if eqpt.get('remark')]
|
| 230 |
- eqpts, left = pagination(eqpts, page, num) |
|
| 231 | 225 |
|
| 232 | 226 |
# var name: String = "" |
| 233 | 227 |
# var room: String = "" |
@@ -253,7 +247,6 @@ def screen_eqpt_result(request): |
||
| 253 | 247 |
|
| 254 | 248 |
return response(data={
|
| 255 | 249 |
'eqpts': eqpts, |
| 256 |
- 'left': left, |
|
| 257 | 250 |
'reminds': reminds, |
| 258 | 251 |
'total_active_eqpt_num': total_active_eqpt_num, |
| 259 | 252 |
'has_upload_temperature_num': has_upload_temperature_num, |
@@ -237,7 +237,7 @@ class ThermometerEquipmentInfo(BaseModelMixin): |
||
| 237 | 237 |
def screen_data(self): |
| 238 | 238 |
return {
|
| 239 | 239 |
'remark': self.remark, |
| 240 |
- 'last_submit_at': tc.local_string(utc_dt=self.last_submit_at), |
|
| 240 |
+ 'last_submit_at': tc.local_string(utc_dt=self.last_submit_at, format='%m-%d %H:%M'), |
|
| 241 | 241 |
} |
| 242 | 242 |
|
| 243 | 243 |
|
@@ -1,4 +1,5 @@ |
||
| 1 | 1 |
StatusCode==1.0.0 |
| 2 |
+TimeConvert==1.6.0 |
|
| 2 | 3 |
furl==2.1.2 |
| 3 | 4 |
jsonfield==3.1.0 |
| 4 | 5 |
mysqlclient==2.0.3 |