From 11b6387d74467f81e33eba8f882bff610f240115 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 18 九月 2023 20:01:09 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx |   40 ++++++++++++++++++++++++++--------------
 1 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
index 0d8cbf7..939f64d 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
@@ -5,7 +5,7 @@
   /**
    * @description 鐢熸垚椤甸潰鏌ヨ璇彞
    */
-  static getDebugSql (verify, scripts, searches, Utils, timestamp) {
+  static getDebugSql (verify, scripts, searches, Utils) {
     let sql = ''
     let _dataresource = verify.dataresource || ''
     let regoptions = this.getRegOptions(searches)
@@ -52,9 +52,9 @@
       _dataresource = '(' + _dataresource + ') tb'
     }
     
-    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
-    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
-    _tailScript = _tailScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
+    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
+    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
+    _tailScript = _tailScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
     _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
     _customScript = _customScript.replace(/@\$|\$@/ig, '')
     _tailScript = _tailScript.replace(/@\$|\$@/ig, '')
@@ -107,14 +107,13 @@
     }
 
     if (_customScript) {
-      sql = `/* sql 楠岃瘉 */
-        ${declare}
+      sql = `${declare}
         ${_customScript}
         ${_dataresource}
         ${_tailScript}
         aaa:
         if @ErrorCode!=''
-          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
+          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
       `
     } else if (_tailScript) {
       sql = `${declare}
@@ -122,16 +121,12 @@
         ${_tailScript}
         aaa:
         if @ErrorCode!=''
-          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ 
+          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00' 
       `
     } else {
-      sql = `/* sql 楠岃瘉 */
-        ${declare}
+      sql = `${declare}
         ${_dataresource}`
     }
-    sql = sql.replace(/\n\s{8}/ig, '\n')
-    console.info(sql)
-    sql = sql.replace(/\n/g, ' ')
 
     return sql
   }
@@ -220,12 +215,29 @@
           value: '0'
         })
         options.push(item)
-      } else if (['datemonth', 'dateweek', 'daterange'].includes(search.type)) {
+      } else if (['datemonth', 'dateweek'].includes(search.type)) {
         options.push(item)
         options.push({
           key: item.key + '1',
           value: '0'
         })
+      } else if (search.type === 'daterange') {
+        let _skey = search.field
+        let _ekey = search.field + '1'
+
+        if (/,/.test(search.field)) {
+          _skey = search.field.split(',')[0]
+          _ekey = search.field.split(',')[1]
+        }
+
+        options.push({
+          key: _skey,
+          value: '0'
+        })
+        options.push({
+          key: _ekey,
+          value: '0'
+        })
       } else if (search.type === 'text' || search.type === 'select') {
         item.key.split(',').forEach(field => {
           let cell = JSON.parse(JSON.stringify(item))

--
Gitblit v1.8.0