From cd5079f2dbe12eb03fcef2e1898e4f013848d895 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 28 九月 2023 12:34:30 +0800
Subject: [PATCH] 2023-09-28

---
 src/templates/zshare/verifycard/customscript/index.jsx |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx
index 465c68d..42c568b 100644
--- a/src/templates/zshare/verifycard/customscript/index.jsx
+++ b/src/templates/zshare/verifycard/customscript/index.jsx
@@ -108,6 +108,25 @@
             duration: 5
           })
           return
+        } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
+          let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
+          let errors = []
+          list.forEach(str => {
+            str = str.replace(/^\s/, '')
+            let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
+            if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
+              errors.push(str)
+            }
+          })
+
+          if (errors.length > 0) {
+            notification.warning({
+              top: 92,
+              message: '涓嶅彲浣跨敤鍚屼竴涓〃瀛楁杩涜鍏宠仈锛�' + errors.join('銆�'),
+              duration: 5
+            })
+            return
+          }
         }
 
         let error = Utils.verifySql(values.sql, 'customscript')
@@ -273,7 +292,7 @@
         insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
         select @ID@,@works_flow_code@,@works_flow_detail_id@,@userid@,@start_type@,@userid@,@UserName,@FullName,@time_id@`
       } else {
-        value = `update s_my_works_flow set status=@status@,statusname=@statusname@,modifydate=getdate(),modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
+        value = `update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
         where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
         insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid)
         select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@

--
Gitblit v1.8.0