inspectitem wechatmsg
This commit is contained in:
parent
89476bc3ed
commit
e65e5f2fe6
|
@ -22,6 +22,7 @@
|
|||
<th>
|
||||
检查内容
|
||||
</th>
|
||||
<th>检查类型</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="itemsbodydetail">
|
||||
|
|
|
@ -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': ''
|
||||
|
|
Loading…
Reference in New Issue