king
2022-11-21 f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89
src/utils/utils-datamanage.js
@@ -64,9 +64,17 @@
          param.rduri = setting.interface
        }
      } else {
        if (setting.sysInterface === 'true' && window.GLOB.mainSystemApi) {
        if (setting.sysInterface === 'true') {
          if (window.GLOB.mainSystemApi) {
          param.rduri = window.GLOB.mainSystemApi
        } else if (setting.sysInterface !== 'true') {
          }
        } else if (setting.sysInterface === 'external') {
          if (window.GLOB.systemType === 'production') {
            param.$token = setting.exProInterface || ''
          } else {
            param.$token = setting.exInterface || ''
          }
        } else {
          if (window.GLOB.systemType === 'production' && setting.proInterface) {
            param.rduri = setting.proInterface
          } else {
@@ -206,12 +214,12 @@
    let DateCount = ''
    if (_dataresource && setting.laypage && orderBy && !id) {
      LText = ` select top ${pageSize} ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows `
      DateCount = `select count(1) as total from ${_dataresource} ${_search}`
      LText = `/*system_query*/select top ${pageSize} ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows `
      DateCount = `/*system_query*/select count(1) as total from ${_dataresource} ${_search}`
    } else if (_dataresource && orderBy) {
      LText = ` select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
      LText = `/*system_query*/select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
    } else if (_dataresource) {
      LText = ` select ${arrFields} from ${_dataresource} ${_search}  `
      LText = `/*system_query*/select ${arrFields} from ${_dataresource} ${_search}  `
    }
    if (_customScript) {
@@ -393,7 +401,7 @@
      })
    }
    let LText = ` select ${statFields.map(col => `isnull(sum(${col.field}),0) as ${col.field}`).join(',')} from ${_dataresource} ${_search} `
    let LText = ` /*system_query*/select ${statFields.map(col => `isnull(sum(${col.field}),0) as ${col.field}`).join(',')} from ${_dataresource} ${_search} `
    if (_customScript) {
      LText = `${LText}
@@ -859,6 +867,9 @@
    BID: BID
  }
  if (config.MenuName) {
    param.menuname = config.MenuName
  }
  // if (transaction) {
  //   param.func = 'sPC_Get_structured_data_try'
  // }