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/zshare/verifycard/customform/index.jsx |   31 ++++++-------------------------
 1 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/src/templates/zshare/verifycard/customform/index.jsx b/src/templates/zshare/verifycard/customform/index.jsx
index 2af2b05..f345f99 100644
--- a/src/templates/zshare/verifycard/customform/index.jsx
+++ b/src/templates/zshare/verifycard/customform/index.jsx
@@ -1,7 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { Form, Row, Col, Input, Select, Button, notification, Modal, Tooltip } from 'antd'
-import moment from 'moment'
 
 import Utils from '@/utils/utils.js'
 import Api from '@/api'
@@ -110,12 +109,7 @@
           return
         }
 
-        let param = {
-          func: 's_debug_sql',
-          exec_type: 'y',
-        }
-
-        param.LText = `${this.props.initsql}
+        let sql = `${this.props.initsql}
           /* 鑷畾涔夐獙璇� */
           select @tbid='', @ErrorCode='',@retmsg=''
           select top 1 @tbid='X' from (${values.sql}) a
@@ -129,30 +123,17 @@
         if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
           window.GLOB.funcs.forEach(item => {
             let reg = new RegExp('\\$ex@' + item.func_code + '@ex\\$', 'ig')
-            param.LText = param.LText.replace(reg, `/*$ex@${item.func_code}-begin*/\n${item.key_sql}\n/*@ex$-end*/`)
+            sql = sql.replace(reg, `/*$ex@${item.func_code}-begin*/\n${item.key_sql}\n/*@ex$-end*/`)
           })
         }
         
         // 鏁版嵁鏉冮檺
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
-
-        // 澶栬仈鏁版嵁搴撴浛鎹�
-        if (window.GLOB.externalDatabase !== null) {
-          param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
-        }
-
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-        param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
-
-        console.info(`/* sql 楠岃瘉 */\n${param.LText.replace(/\n\s{10}/ig, '\n')}`)
-
-        param.LText = param.LText.replace(/\n/g, ' ')
-        param.LText = Utils.formatOptions(param.LText)
-        param.secretkey = Utils.encrypt('', param.timestamp)
+        sql = sql.replace(/@\$|\$@/ig, '')
+        sql = sql.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
         
         this.setState({loading: true})
-        Api.genericInterface(param).then(res => {
-          if (res.status) {
+        Api.sDebug(sql).then(res => {
+          if (res.status || res.ErrCode === '-2') {
             this.setState({
               loading: false,
               editItem: null

--
Gitblit v1.8.0