inspectitem wechatmsg
This commit is contained in:
parent
89476bc3ed
commit
e65e5f2fe6
|
@ -22,6 +22,7 @@
|
||||||
<th>
|
<th>
|
||||||
检查内容
|
检查内容
|
||||||
</th>
|
</th>
|
||||||
|
<th>检查类型</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="itemsbodydetail">
|
<tbody id="itemsbodydetail">
|
||||||
|
|
|
@ -6831,14 +6831,16 @@ def apiinspectitem(req):
|
||||||
obj.checked = True if 'checked' in i else False
|
obj.checked = True if 'checked' in i else False
|
||||||
if 'state' in i:
|
if 'state' in i:
|
||||||
obj.state = i['state']
|
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.checkitem = EquipmentCheckItem.objects.get(pk=i['id'])
|
||||||
obj.inspect = Inspect.objects.get(pk=data['inspect'])
|
obj.inspect = Inspect.objects.get(pk=data['inspect'])
|
||||||
if 'desc' in i:
|
if 'desc' in i:
|
||||||
obj.desc = i['desc']
|
obj.desc = i['desc']
|
||||||
if 'img' in i:
|
if 'img' in i:
|
||||||
obj.img = i['img']
|
obj.img = i['img']
|
||||||
obj.todouser = getpgr2(userid, User.objects.get(userid=userid).ubelongpart)
|
|
||||||
obj.save()
|
obj.save()
|
||||||
|
if obj.state == '异常待处理':
|
||||||
postdict = {
|
postdict = {
|
||||||
'touser': obj.todouser.openid,
|
'touser': obj.todouser.openid,
|
||||||
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
||||||
|
@ -6851,7 +6853,7 @@ def apiinspectitem(req):
|
||||||
'value': obj.desc
|
'value': obj.desc
|
||||||
},
|
},
|
||||||
'keyword2': {
|
'keyword2': {
|
||||||
'value': obj.inspect.creattime
|
'value': obj.inspect.creattime.strftime("%Y-%m-%d %H:%M")
|
||||||
},
|
},
|
||||||
'keyword3': {
|
'keyword3': {
|
||||||
'value': ''
|
'value': ''
|
||||||
|
|
Loading…
Reference in New Issue