演练查询bug
This commit is contained in:
parent
c653c98528
commit
297c8cf966
|
@ -3315,13 +3315,12 @@ def ylhandle(req):
|
||||||
elif req.GET.get('a') == 'listsearch':
|
elif req.GET.get('a') == 'listsearch':
|
||||||
userid = req.session['userid']
|
userid = req.session['userid']
|
||||||
companyid = getcompany(userid)
|
companyid = getcompany(userid)
|
||||||
a = Drill.objects.filter(usecomp=Partment.objects.get(
|
a = Drill.objects.filter(usecomp__partid=companyid, deletemark=1)
|
||||||
partid=companyid), deletemark=1)
|
qssj = req.GET.get('qssj', None)
|
||||||
qssj = req.GET.get('qssj')
|
jssj = req.GET.get('jssj', None)
|
||||||
jssj = req.GET.get('jssj')
|
ylbm = req.GET.get('drillpart', None)
|
||||||
ylbm = req.GET.get('drillpart')
|
yljb = req.GET.get('drilllevel', None)
|
||||||
yljb = req.GET.get('drilllevel')
|
ylnr = req.GET.get('drillcontent', None)
|
||||||
ylnr = req.GET.get('drillcontent')
|
|
||||||
if yljb:
|
if yljb:
|
||||||
a = a.filter(drilllevel__dicid=yljb)
|
a = a.filter(drilllevel__dicid=yljb)
|
||||||
if ylnr:
|
if ylnr:
|
||||||
|
@ -3334,7 +3333,7 @@ def ylhandle(req):
|
||||||
a = a.filter(starttime__lte=jssj)
|
a = a.filter(starttime__lte=jssj)
|
||||||
total = a.count()
|
total = a.count()
|
||||||
startnum, endnum = fenye(req)
|
startnum, endnum = fenye(req)
|
||||||
obj = a.order_by('-starttime')[startnum:endnum].values('drillnum', 'drillid', 'state', 'drillplace',
|
a = a.order_by('-starttime')[startnum:endnum].values('drillnum', 'drillid', 'state', 'drillplace',
|
||||||
'starttime', 'drillname', 'drilltype__dickeyname', 'chief__name', 'submituser__name', 'submituser__userid')
|
'starttime', 'drillname', 'drilltype__dickeyname', 'chief__name', 'submituser__name', 'submituser__userid')
|
||||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue