operation check complete2

This commit is contained in:
caoqianming 2019-12-02 21:43:10 +08:00
parent 0848977438
commit 18190d1100
1 changed files with 40 additions and 41 deletions

View File

@ -4430,7 +4430,10 @@ def apioperation(req):
x=User.objects.get(userid=i) x=User.objects.get(userid=i)
if int(userid)==int(i):#申请人包含作业人直接确认 if int(userid)==int(i):#申请人包含作业人直接确认
Operzyry.objects.create(oper=obj,operzyry=x,checked=1) Operzyry.objects.create(oper=obj,operzyry=x,checked=1)
if Operzyry.objects.filter(oper=obj,checked=0).exists(): else:
Operzyry.objects.create(oper=obj,operzyry=x)
b.append(x.openid)
if b:
pass pass
else:#工作人员全部确认 else:#工作人员全部确认
obj.zyzt['zyzt'] = '审批中' obj.zyzt['zyzt'] = '审批中'
@ -4470,10 +4473,6 @@ def apioperation(req):
tolist = list(User.objects.filter(userid__in=sprs).values_list('openid',flat=True)) tolist = list(User.objects.filter(userid__in=sprs).values_list('openid',flat=True))
send_wechatmsgs.delay(postdict,tolist) send_wechatmsgs.delay(postdict,tolist)
return JsonResponse({"code":1}) return JsonResponse({"code":1})
else:
Operzyry.objects.create(oper=obj,operzyry=x)
b.append(x.openid)
postdict={ postdict={
'touser':'', 'touser':'',
'template_id':'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0', 'template_id':'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',