| | |
| | | arrfield = arrfield.join(',') |
| | | |
| | | if (item.orderBy) { |
| | | sql = 'select distinct ' + arrfield + ',' + item.orderBy + ' as orderfield from ' + _datasource + ' order by orderfield ' + item.orderType |
| | | sql = `select ${arrfield} from (select distinct ${arrfield},${item.orderBy} as orderfield from ${_datasource} ) a order by orderfield ${item.orderType}` |
| | | } else { |
| | | sql = 'select distinct ' + arrfield + ' from ' + _datasource |
| | | } |
| | |
| | | |
| | | val = val.replace(/(^\s*$)|\t*|\v*/ig, '') |
| | | |
| | | if (!val && col.required === 'true') { // 必填校验 |
| | | if (!val && col.required === 'true') { // 必填校验 |
| | | errors.push(_position + dict['main.excel.content.emptyerror']) |
| | | } else if (val.length > col.limit) { // 长度校验 |
| | | } else if (col.limit && val.length > col.limit) { // 长度校验 |
| | | errors.push(_position + dict['main.excel.content.maxlimit']) |
| | | } else { // 关键字校验 |
| | | } else { // 关键字校验 |
| | | keys.forEach(key => { |
| | | let _patten = new RegExp('(^' + key + '\\s+)|(\\s+' + key + '\\s+)', 'ig') |
| | | if (_patten.test(val)) { |
| | |
| | | |
| | | aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg` |
| | | |
| | | // if (window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') { |
| | | if (window.GLOB.systemType !== 'production') { |
| | | if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) { |
| | | let fsql = ` |
| | | ${_sql} |
| | | ${_sqlInsert} |
| | |
| | | let values = [] |
| | | |
| | | formdata.forEach(item => { |
| | | if (item.writein === false) return |
| | | |
| | | keys.push(item.key.toLowerCase()) |
| | | values.push('@' + item.key) |
| | | }) |
| | |
| | | let _arr = [] |
| | | |
| | | formdata.forEach(item => { |
| | | if (item.writein === false) return |
| | | |
| | | _arr.push(item.key.toLowerCase()) |
| | | _form.push(item.key + '=@' + item.key) |
| | | }) |
| | |
| | | _sql += ` |
| | | aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg` |
| | | |
| | | // if (window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') { |
| | | if (window.GLOB.systemType !== 'production') { |
| | | if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) { |
| | | _sql = _sql.replace(/\n\s{8}/ig, '\n') |
| | | console.log(_sql) |
| | | } |