diff --git a/doc/个人安全绩效等功能.txt b/doc/个人安全绩效等功能.txt index d451bd29..30b147f5 100644 --- a/doc/个人安全绩效等功能.txt +++ b/doc/个人安全绩效等功能.txt @@ -1,3 +1,3 @@ 1.事故隐患界面增加无图片导出excel(支持一次性导出1000条) -2.增加应急预案的上传 +2.增加应急预案 3.安全绩效下的个人安全绩效统计数字可点击链接查看 \ No newline at end of file diff --git a/doc/惠东需求.xlsx b/doc/惠东需求.xlsx index 0cef7528..7c09669b 100644 Binary files a/doc/惠东需求.xlsx and b/doc/惠东需求.xlsx differ diff --git a/safesite/export.py b/safesite/export.py index 9784f896..fe294ec4 100644 --- a/safesite/export.py +++ b/safesite/export.py @@ -269,9 +269,9 @@ def exportxlsx(a,objs,pic=1): res = HttpResponse() res.write('数量超过1000,请查询后导出!') return res - if pic==1 and yhobjs.count()>100: + if pic==1 and yhobjs.count()>500: res = HttpResponse() - res.write('数量超过100,请查询后导出!') + res.write('数量超过500,请查询后导出!') return res vl = yhobjs.values('yhnum','fxr__name','yhms','yhzt','fxsj','tbsj','yhlb__dickeyname','yhpg__dickeyname','yhdd','fxbm__partname','yhdj__dickeyname','yhpg__dickeyname', 'jclx__dickeyname','yhlx__dicname','yyfx','zgcs','yhtp','zghtp','zgms','zgbm__partname','zgr__name','zgqx','shr__name','fcr__name') diff --git a/safesite/views.py b/safesite/views.py index 1f1beb74..520c61c8 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -4856,10 +4856,20 @@ def apisuggest(req): companyid = getcompany(userid) a = Suggest.objects.filter( usecomp=Partment.objects.get(partid=companyid)) + if req.GET.get('jyr', None): + a = a.filter(jyr__userid=req.GET.get('jyr')) + if req.GET.get('clr', None): + a = a.filter(clr__userid=req.GET.get('clr')) if req.GET.get('qssj'): - a = a.filter(jyrq__gte=req.GET.get('qssj')) + a = a.filter(submittime__gte=req.GET.get('qssj')) if req.GET.get('jssj'): - a = a.filter(jyrq__lte=req.GET.get('jssj')) + a = a.filter(submittime__lte=req.GET.get('jssj')) + if req.GET.get('jyrname', None): + a = a.filter(jyr__name__contains=req.GET.get('jyrname')) + if req.GET.get('jybm'): + parts = Partment.objects.filter(partlink__contains=','+req.GET.get( + 'jybm')+',') | Partment.objects.filter(partid=req.GET.get('jybm')) + a = a.filter(jybm__in=parts) res = exportxlsx('jy', a) return res elif a == 'exportword':