From c95918fb0fffb61b1117fbf4cd429e291b9594d0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 17 九月 2021 01:02:34 +0800
Subject: [PATCH] 2021-09-17

---
 src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx |   42 +++++++++++++++++++++++++++++-------------
 1 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
index 3a5c827..2f6e6e5 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -41,15 +41,10 @@
     columns = columns.filter(item => item.import !== 'false')
     let fields = columns.map(item => item.Column)
 
-    if (!fields.includes('ID')) {
-      fields.unshift('ID')
-    }
-    if (!fields.includes('BID')) {
-      fields.unshift('BID')
-    }
+    fields.push('jskey')
 
     let _sql = `Declare @${btn.sheet} table (${columns.map(item => item.Column + ' ' + item.type).join(',')},jskey nvarchar(50) )
-      Declare @UserName nvarchar(50),@FullName nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512)
+      Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@departmentcode nvarchar(50),@organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512)
       Select @ErrorCode='', @retmsg=''
     `
     
@@ -147,6 +142,25 @@
           }
         })
 
+        if (!values.uuid) {
+          if (values.position === 'init') {
+            _initCustomScript += `
+            /* 鍒濆鍖栬剼鏈� */
+            ${values.sql}
+            `
+          } else if (values.position === 'front') {
+            _prevCustomScript += `
+            /* 榛樿sql鍓嶈剼鏈� */
+            ${values.sql}
+            `
+          } else {
+            _backCustomScript += `
+            /* 榛樿sql鍚庤剼鏈� */
+            ${values.sql}
+            `
+          }
+        }
+
         let param = {
           func: 's_debug_sql',
           exec_type: 'y',
@@ -210,8 +224,10 @@
         fields = fields + ','
       }
 
-      let database = btn.sheet.match(/(.*)\.(.*)\./ig) || ''
-      let sheet = btn.sheet.replace(/(.*)\.(.*)\./ig, '')
+      let database = btn.sheet.match(/(.*)\.(.*)\.|@db@/ig) || ''
+      let sheet = btn.sheet.replace(/(.*)\.(.*)\.|@db@/ig, '')
+
+      database = database ? (database[0] || '') : ''
 
       _value = `Insert into ${database}${sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid@,@username,@fullname,@BID@ From @${sheet}`
     } else {
@@ -259,14 +275,14 @@
               {btn.sheet}
             </Form.Item>
           </Col> : null}
-          <Col span={16}>
-            <Form.Item label={'鎶ラ敊瀛楁'} style={{margin: 0}}>
-              ErrorCode, retmsg
+          <Col span={10}>
+            <Form.Item label={'鎶ラ敊瀛楁'} style={{margin: 0, whiteSpace: 'nowrap'}}>
+              ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT锛�, retmsg
             </Form.Item>
           </Col>
           {usefulfields ? <Col span={24} className="sqlfield">
             <Form.Item label={'鍙敤瀛楁'}>
-              {usefulfields}, jskey
+            BID, ID, LoginUID, SessionUid, UserID, Appkey, UserName, FullName, RoleID, departmentcode, organization, login_city, {usefulfields}
             </Form.Item>
           </Col> : null}
           <Col span={8} style={{whiteSpace: 'nowrap'}}>

--
Gitblit v1.8.0