|
|
|
@ -31,7 +31,7 @@ from django.views.decorators.csrf import csrf_exempt
|
|
|
|
|
from django.views.generic import TemplateView
|
|
|
|
|
from duibiao import calsim
|
|
|
|
|
from groups import models as g_models
|
|
|
|
|
|
|
|
|
|
from mysite.settings_dev import APPID_MP, APPSECRET_MP
|
|
|
|
|
from . import forms
|
|
|
|
|
from .daoru import (cal_area_risk_level, cal_riskact_level, drequipments,
|
|
|
|
|
drquestions, drrisks, drtodotroubles, drusers, makeqr, drsafelist,
|
|
|
|
@ -1058,7 +1058,7 @@ def addyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {
|
|
|
|
|
'value': a.yhdj.dickeyname + '待复查:'
|
|
|
|
@ -1104,7 +1104,7 @@ def addyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
|
|
|
|
|
'first': {
|
|
|
|
@ -1155,7 +1155,7 @@ def addyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
|
|
|
|
|
'first': {
|
|
|
|
@ -1199,7 +1199,7 @@ def addyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
|
|
|
|
|
'first': {
|
|
|
|
@ -1236,7 +1236,7 @@ def addyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
|
|
|
|
|
'first': {
|
|
|
|
@ -1308,7 +1308,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '待整改:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -1393,7 +1393,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '待整改:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -1431,7 +1431,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '未被采纳:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -1456,7 +1456,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '被退回需重新上报:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -1482,7 +1482,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '待评估:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -1526,7 +1526,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '待整改:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -1568,7 +1568,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '待整改:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -1593,7 +1593,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '待整改:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -1616,7 +1616,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
|
|
|
|
|
'first': {
|
|
|
|
@ -1652,7 +1652,7 @@ def accessyh(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': 'oPGqkweX75QtLmgehUN-ipR4hcyc',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/trouble/accesstrouble?troubleid="+str(a.troubleid)},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {'value': a.yhdj.dickeyname + '待整改:'},
|
|
|
|
|
'keyword1': {'value': a.yhms},
|
|
|
|
@ -3816,7 +3816,7 @@ def mplogin(req):
|
|
|
|
|
code = req.POST.get('code')
|
|
|
|
|
except:
|
|
|
|
|
code = json.loads(res)['code']
|
|
|
|
|
info = requests.get('https://api.weixin.qq.com/sns/jscode2session?appid=wx5c39b569f01c27db&secret=68762892f8df2b4a0b1940c5250a8dc0&js_code=' +
|
|
|
|
|
info = requests.get('https://api.weixin.qq.com/sns/jscode2session?appid='+APPID_MP+'&secret='+APPSECRET_MP+'&js_code=' +
|
|
|
|
|
code+'&grant_type=authorization_code').content.decode('utf-8')
|
|
|
|
|
info = json.loads(info)
|
|
|
|
|
mpopenid = info['openid']
|
|
|
|
@ -5183,7 +5183,7 @@ def apinotice(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': '',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db"},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {
|
|
|
|
|
'value': '公司通知:'
|
|
|
|
@ -5478,7 +5478,7 @@ def apioperation(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': '',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db"},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {
|
|
|
|
|
'value': obj.zylx.dickeyname + '作业通知:'
|
|
|
|
@ -6356,7 +6356,7 @@ def apiexamtest(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': '',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/examtest/index"},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/examtest/index"},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {
|
|
|
|
|
'value': '小程序考试通知:'
|
|
|
|
@ -6454,7 +6454,7 @@ def apiexamtest(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': '',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db", "path": "pages/examtest/index"},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP, "path": "pages/examtest/index"},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {
|
|
|
|
|
'value': '小程序考试通知:'
|
|
|
|
@ -8615,7 +8615,7 @@ def checkprojects(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': '',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db"},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {
|
|
|
|
|
'value': '处罚通知:'
|
|
|
|
@ -8702,7 +8702,7 @@ def checkprojects(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': '',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db"},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {
|
|
|
|
|
'value': '检查任务通知:'
|
|
|
|
@ -8763,7 +8763,7 @@ def checkprojects(req):
|
|
|
|
|
postdict = {
|
|
|
|
|
'touser': '',
|
|
|
|
|
'template_id': 'lOuwSE67vZC3ZVFYPZvz2eb7JdFxqx7ysMFkXrYmYh0',
|
|
|
|
|
"miniprogram": {"appid": "wx5c39b569f01c27db"},
|
|
|
|
|
"miniprogram": {"appid": APPID_MP},
|
|
|
|
|
'data': {
|
|
|
|
|
'first': {
|
|
|
|
|
'value': '检查任务通知:'
|
|
|
|
|