inspectitem wechatmsg

This commit is contained in:
caoqianming 2020-08-20 22:07:09 +08:00
parent 89476bc3ed
commit e65e5f2fe6
2 changed files with 26 additions and 23 deletions

View File

@ -22,6 +22,7 @@
<th>
检查内容
</th>
<th>检查类型</th>
</tr>
</thead>
<tbody id="itemsbodydetail">

View File

@ -6831,14 +6831,16 @@ def apiinspectitem(req):
obj.checked = True if 'checked' in i else False
if 'state' in i:
obj.state = i['state']
if i['state'] == '异常待处理':
obj.todouser = getpgr2(userid, User.objects.get(userid=userid).ubelongpart)
obj.checkitem = EquipmentCheckItem.objects.get(pk=i['id'])
obj.inspect = Inspect.objects.get(pk=data['inspect'])
if 'desc' in i:
obj.desc = i['desc']
if 'img' in i:
obj.img = i['img']
obj.todouser = getpgr2(userid, User.objects.get(userid=userid).ubelongpart)
obj.save()
if obj.state == '异常待处理':
postdict = {
'touser': obj.todouser.openid,
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
@ -6851,7 +6853,7 @@ def apiinspectitem(req):
'value': obj.desc
},
'keyword2': {
'value': obj.inspect.creattime
'value': obj.inspect.creattime.strftime("%Y-%m-%d %H:%M")
},
'keyword3': {
'value': ''