xjc 5 年之前
父節點
當前提交
7617c19410
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 5 2
      src/manage/controls.py
  2. 1 1
      templates/index.html

+ 5 - 2
src/manage/controls.py

@@ -1076,6 +1076,7 @@ def update_signup_state(request):
         raise ce.TipException(u"非法操作!")
 
     #审核通过发送支付通知
+    vals["update_time"] = datetime.datetime.now()
     rst = cm.SignupOrders.objects.filter(id__in=ids).update(**vals)
     if int(vals.get("order_status")) == 1:
         from utils.aliyun_sms import send_audit_notice
@@ -1129,6 +1130,7 @@ def update_signup_state(request):
             addText(img,class_hour_tpl,unicode("已完成学时:{}".format(total_classhour),"utf-8"),class_hour_file,(80,280),20)
             url = "https://www.scxjc.club/upload" + class_hour_file.replace(root_target,"")
             so.classhour_cert_url = url
+            so.update_time = datetime.datetime.now()
             so.save()
     #考试完成记录复审和换证时间
     if str(vals.get("order_status")) == "7":
@@ -1139,12 +1141,13 @@ def update_signup_state(request):
             subject_item0 = subject_item.split("|")[0]
             #特种作业复审3年,换证6年
             if u"特种作业" in subject_item0:
-                so.update_time = now + datetime.timedelta(days=3*365)
+                #so.update_time = now + datetime.timedelta(days=3*365)
                 so.change_time = now + datetime.timedelta(days=6*365)
             #换证3年每年复审
             else:
-                so.update_time = now + datetime.timedelta(days=365)
+                #so.update_time = now + datetime.timedelta(days=365)
                 so.change_time = now + datetime.timedelta(days=3*365)
+            so.update_time = datetime.datetime.now()
             so.save()
 
     return rst

File diff suppressed because it is too large
+ 1 - 1
templates/index.html