wql整合到system模块中
This commit is contained in:
@@ -20,6 +20,20 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<!--WQL-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.hynnet</groupId>
|
||||||
|
<artifactId>jxl</artifactId>
|
||||||
|
<version>2.6.12.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-beanutils</groupId>
|
||||||
|
<artifactId>commons-beanutils-core</artifactId>
|
||||||
|
<version>1.8.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.aspectj</groupId>
|
<groupId>org.aspectj</groupId>
|
||||||
<artifactId>aspectjweaver</artifactId>
|
<artifactId>aspectjweaver</artifactId>
|
||||||
@@ -57,12 +71,6 @@
|
|||||||
<version>2.5.14</version>
|
<version>2.5.14</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.nl</groupId>
|
|
||||||
<artifactId>nladmin-wql</artifactId>
|
|
||||||
<version>2.7</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.oracle.database.jdbc</groupId>
|
<groupId>com.oracle.database.jdbc</groupId>
|
||||||
<artifactId>ojdbc5</artifactId>
|
<artifactId>ojdbc5</artifactId>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
|
|||||||
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
|
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
|
||||||
import com.alicp.jetcache.anno.config.EnableMethodCache;
|
import com.alicp.jetcache.anno.config.EnableMethodCache;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
package org.nl.config.thread;
|
package org.nl.config.thread;
|
||||||
|
|
||||||
|
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
|
||||||
import java.util.concurrent.ArrayBlockingQueue;
|
import java.util.concurrent.ArrayBlockingQueue;
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import net.dreamlu.mica.ip2region.core.IpInfo;
|
|||||||
import nl.basjes.parse.useragent.UserAgent;
|
import nl.basjes.parse.useragent.UserAgent;
|
||||||
import nl.basjes.parse.useragent.UserAgentAnalyzer;
|
import nl.basjes.parse.useragent.UserAgentAnalyzer;
|
||||||
import org.nl.modules.common.config.ElAdminProperties;
|
import org.nl.modules.common.config.ElAdminProperties;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.logicflow.service.StageImageService;
|
import org.nl.modules.logicflow.service.StageImageService;
|
||||||
import org.nl.modules.logicflow.service.dto.StageImageDto;
|
import org.nl.modules.logicflow.service.dto.StageImageDto;
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.logicflow.service.StageService;
|
import org.nl.modules.logicflow.service.StageService;
|
||||||
import org.nl.modules.logicflow.service.dto.StageDto;
|
import org.nl.modules.logicflow.service.dto.StageDto;
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import org.nl.modules.quartz.domain.QuartzJob;
|
|||||||
import org.nl.modules.quartz.domain.QuartzLog;
|
import org.nl.modules.quartz.domain.QuartzLog;
|
||||||
import org.nl.modules.quartz.repository.QuartzLogRepository;
|
import org.nl.modules.quartz.repository.QuartzLogRepository;
|
||||||
import org.nl.modules.quartz.service.QuartzJobService;
|
import org.nl.modules.quartz.service.QuartzJobService;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.quartz.JobExecutionContext;
|
import org.quartz.JobExecutionContext;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.scheduling.quartz.QuartzJobBean;
|
import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ package org.nl.modules.quartz.utils;
|
|||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.springframework.util.ReflectionUtils;
|
import org.springframework.util.ReflectionUtils;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.system.service.CodeDetailService;
|
import org.nl.modules.system.service.CodeDetailService;
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ import org.nl.modules.system.service.DeptService;
|
|||||||
import org.nl.modules.system.service.dto.DeptDto;
|
import org.nl.modules.system.service.dto.DeptDto;
|
||||||
import org.nl.modules.system.service.dto.DeptQueryCriteria;
|
import org.nl.modules.system.service.dto.DeptQueryCriteria;
|
||||||
import org.nl.modules.system.service.mapstruct.DeptMapper;
|
import org.nl.modules.system.service.mapstruct.DeptMapper;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.system.service.GenCodeService;
|
import org.nl.modules.system.service.GenCodeService;
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.system.service.GridFieldService;
|
import org.nl.modules.system.service.GridFieldService;
|
||||||
import org.nl.modules.system.service.dto.GridFieldDto;
|
import org.nl.modules.system.service.dto.GridFieldDto;
|
||||||
import org.nl.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.system.service.GridService;
|
import org.nl.modules.system.service.GridService;
|
||||||
import org.nl.modules.system.service.dto.GridDto;
|
import org.nl.modules.system.service.dto.GridDto;
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import org.nl.modules.common.utils.FileUtil;
|
|||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.system.service.ParamService;
|
import org.nl.modules.system.service.ParamService;
|
||||||
import org.nl.modules.system.service.dto.ParamDto;
|
import org.nl.modules.system.service.dto.ParamDto;
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import org.nl.modules.system.service.dto.RoleSmallDto;
|
|||||||
import org.nl.modules.system.service.dto.UserDto;
|
import org.nl.modules.system.service.dto.UserDto;
|
||||||
import org.nl.modules.system.service.mapstruct.RoleMapper;
|
import org.nl.modules.system.service.mapstruct.RoleMapper;
|
||||||
import org.nl.modules.system.service.mapstruct.RoleSmallMapper;
|
import org.nl.modules.system.service.mapstruct.RoleSmallMapper;
|
||||||
import org.nl.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
|
|||||||
Binary file not shown.
@@ -1,14 +1,14 @@
|
|||||||
package org.nl.wql;
|
package org.nl.modules.wql;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
|
import org.nl.modules.wql.core.engine.object.WO;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
|
||||||
import org.nl.wql.core.engine.object.WO;
|
|
||||||
|
|
||||||
public class WQL {
|
public class WQL {
|
||||||
/**
|
/**
|
||||||
* 根据WQL的文件名获取WQL的运行对象
|
* 根据WQL的文件名获取WQL的运行对象
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql;
|
package org.nl.modules.wql;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -6,12 +6,12 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import jxl.Sheet;
|
import jxl.Sheet;
|
||||||
import jxl.Workbook;
|
import jxl.Workbook;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.core.bean.*;
|
import org.nl.modules.wql.core.bean.*;
|
||||||
import org.nl.wql.core.db.DBConnBean;
|
import org.nl.modules.wql.core.db.DBConnBean;
|
||||||
import org.nl.wql.core.engine.WQLEngine;
|
import org.nl.modules.wql.core.engine.WQLEngine;
|
||||||
import org.nl.wql.core.engine.object.WO;
|
import org.nl.modules.wql.core.engine.object.WO;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
@@ -10,12 +10,12 @@
|
|||||||
* 文件版本:v1.0
|
* 文件版本:v1.0
|
||||||
*
|
*
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
package org.nl.wql.core;
|
package org.nl.modules.wql.core;
|
||||||
|
|
||||||
|
import org.nl.modules.wql.core.bean.DataTypeBean;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.nl.wql.core.bean.DataTypeBean;
|
|
||||||
|
|
||||||
|
|
||||||
public class DataType {
|
public class DataType {
|
||||||
public static String ORACLE = "ORACLE";
|
public static String ORACLE = "ORACLE";
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package org.nl.wql.core;
|
package org.nl.modules.wql.core;
|
||||||
|
|
||||||
|
import org.nl.modules.wql.core.engine.Syntax;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.nl.wql.core.engine.Syntax;
|
|
||||||
|
|
||||||
|
|
||||||
public class ERROR {
|
public class ERROR {
|
||||||
public static HashMap<String,String> ERR = new HashMap<String, String>();
|
public static HashMap<String,String> ERR = new HashMap<String, String>();
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.bean;//package org.nl.module.wql.core.bean;
|
package org.nl.modules.wql.core.bean;//package org.nl.module.wql.core.bean;
|
||||||
//
|
//
|
||||||
//import java.sql.Connection;
|
//import java.sql.Connection;
|
||||||
//
|
//
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
import org.nl.wql.core.DataType;
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
|
||||||
|
|
||||||
public class DataTypeBean {
|
public class DataTypeBean {
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
* 文件版本:v1.0
|
* 文件版本:v1.0
|
||||||
*
|
*
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
public class ErrorBean {
|
public class ErrorBean {
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL参数
|
* SQL参数
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
* 文件版本:v1.0
|
* 文件版本:v1.0
|
||||||
*
|
*
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -20,7 +20,7 @@ import org.apache.commons.beanutils.BasicDynaBean;
|
|||||||
import org.apache.commons.beanutils.BasicDynaClass;
|
import org.apache.commons.beanutils.BasicDynaClass;
|
||||||
import org.apache.commons.beanutils.DynaProperty;
|
import org.apache.commons.beanutils.DynaProperty;
|
||||||
import org.apache.commons.beanutils.RowSetDynaClass;
|
import org.apache.commons.beanutils.RowSetDynaClass;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import java.beans.IntrospectionException;
|
import java.beans.IntrospectionException;
|
||||||
import java.beans.PropertyDescriptor;
|
import java.beans.PropertyDescriptor;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
/**
|
/**
|
||||||
* excel中读取的表的说明
|
* excel中读取的表的说明
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.apache.commons.beanutils.BasicDynaBean;
|
import org.apache.commons.beanutils.BasicDynaBean;
|
||||||
import org.apache.commons.beanutils.DynaProperty;
|
import org.apache.commons.beanutils.DynaProperty;
|
||||||
import org.nl.wql.exception.WDKException;
|
import org.nl.modules.wql.exception.WDKException;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
|
import org.nl.modules.wql.core.engine.object.WO;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class WQLJava {
|
||||||
|
abstract public HashMap process(WO wo, HashMap inMap);
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.wql.WQLCore;
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -53,7 +53,7 @@ public class WQLModule implements Serializable,Cloneable{
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static HashMap<String,WQLModule> getWQLModuleMap(){
|
public static HashMap<String, WQLModule> getWQLModuleMap(){
|
||||||
return WQLCore.moduleMap;
|
return WQLCore.moduleMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.beanutils.BasicDynaBean;
|
import org.apache.commons.beanutils.BasicDynaBean;
|
||||||
import org.nl.wql.WQLCore;
|
import org.nl.modules.wql.WQLCore;
|
||||||
import org.nl.wql.core.content.BaseContext;
|
import org.nl.modules.wql.core.content.BaseContext;
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
import org.nl.wql.core.engine.object.WO;
|
import org.nl.modules.wql.core.engine.object.WO;
|
||||||
import org.nl.wql.exception.WDKException;
|
import org.nl.modules.wql.exception.WDKException;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.bean;//package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;//package org.nl.wql.core.bean;
|
||||||
//
|
//
|
||||||
//public class WQLObjectField {
|
//public class WQLObjectField {
|
||||||
// private String cnname; //字段中文名称
|
// private String cnname; //字段中文名称
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
|
import org.apache.commons.beanutils.DynaBean;
|
||||||
|
import org.apache.commons.beanutils.RowSetDynaClass;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
import org.apache.commons.beanutils.DynaBean;
|
|
||||||
import org.apache.commons.beanutils.RowSetDynaClass;
|
|
||||||
|
|
||||||
public class WQLRowSetDynaClass extends RowSetDynaClass {
|
public class WQLRowSetDynaClass extends RowSetDynaClass {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.bean;
|
package org.nl.modules.wql.core.bean;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.content;
|
package org.nl.modules.wql.core.content;
|
||||||
|
|
||||||
public abstract class BaseContext {
|
public abstract class BaseContext {
|
||||||
public static final String CONTEXTNAME_HTTP = "http";
|
public static final String CONTEXTNAME_HTTP = "http";
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package org.nl.wql.core.content;
|
package org.nl.modules.wql.core.content;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
public class HttpContext extends BaseContext {
|
public class HttpContext extends BaseContext {
|
||||||
private HashMap<String, Object> parameters = new HashMap();
|
private HashMap<String, Object> parameters = new HashMap();
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.content;
|
package org.nl.modules.wql.core.content;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.db;
|
package org.nl.modules.wql.core.db;
|
||||||
|
|
||||||
public class DBConnBean {
|
public class DBConnBean {
|
||||||
private String drivers;
|
private String drivers;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.nl.wql.core.db;
|
package org.nl.modules.wql.core.db;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.WQLCore;
|
import org.nl.modules.wql.WQLCore;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.springframework.jdbc.datasource.DataSourceUtils;
|
import org.springframework.jdbc.datasource.DataSourceUtils;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
package org.nl.wql.core.db;
|
package org.nl.modules.wql.core.db;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
|
||||||
|
import javax.transaction.UserTransaction;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.Driver;
|
import java.sql.Driver;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
@@ -7,12 +11,6 @@ import java.sql.SQLException;
|
|||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import javax.transaction.UserTransaction;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DBPool {
|
public class DBPool {
|
||||||
private static DBPool instance; //唯一实例
|
private static DBPool instance; //唯一实例
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package org.nl.modules.wql.core.db;
|
||||||
|
|
||||||
|
public class DBPoolJBoss {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.nl.wql.core.db;
|
package org.nl.modules.wql.core.db;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.WQLCore;
|
import org.nl.modules.wql.WQLCore;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.springframework.jdbc.datasource.DataSourceUtils;
|
import org.springframework.jdbc.datasource.DataSourceUtils;
|
||||||
|
|
||||||
import javax.naming.Context;
|
import javax.naming.Context;
|
||||||
@@ -9,22 +9,20 @@
|
|||||||
* 1、2014-06-24 10:50:08 yumeng 创建v1.0
|
* 1、2014-06-24 10:50:08 yumeng 创建v1.0
|
||||||
*
|
*
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
package org.nl.wql.core.db;
|
package org.nl.modules.wql.core.db;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import java.sql.SQLException;
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
|
||||||
import javax.naming.Context;
|
import javax.naming.Context;
|
||||||
import javax.naming.InitialContext;
|
import javax.naming.InitialContext;
|
||||||
import javax.transaction.UserTransaction;
|
import javax.transaction.UserTransaction;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.SQLException;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DBPoolTomcat {
|
public class DBPoolTomcat {
|
||||||
private static DBPoolTomcat instance; // 唯一实例
|
private static DBPoolTomcat instance; // 唯一实例
|
||||||
private static boolean Useful; //联结池是否可用
|
private static boolean Useful; //联结池是否可用
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,17 +1,15 @@
|
|||||||
package org.nl.wql.core.db;
|
package org.nl.modules.wql.core.db;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import java.sql.SQLException;
|
import org.nl.modules.wql.WQLCore;
|
||||||
import java.util.Hashtable;
|
|
||||||
|
|
||||||
import javax.naming.Context;
|
import javax.naming.Context;
|
||||||
import javax.naming.InitialContext;
|
import javax.naming.InitialContext;
|
||||||
import javax.naming.NamingException;
|
import javax.naming.NamingException;
|
||||||
import javax.transaction.UserTransaction;
|
import javax.transaction.UserTransaction;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.SQLException;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import java.util.Hashtable;
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
package org.nl.wql.core.db;
|
package org.nl.modules.wql.core.db;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import java.sql.SQLException;
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
|
||||||
import javax.naming.InitialContext;
|
import javax.naming.InitialContext;
|
||||||
import javax.naming.NamingException;
|
import javax.naming.NamingException;
|
||||||
import javax.transaction.UserTransaction;
|
import javax.transaction.UserTransaction;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.SQLException;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DBPoolWebsphere {
|
public class DBPoolWebsphere {
|
||||||
@@ -10,21 +10,20 @@
|
|||||||
* 文件版本:v1.0
|
* 文件版本:v1.0
|
||||||
*
|
*
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
package org.nl.wql.core.engine;
|
package org.nl.modules.wql.core.engine;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.core.engine.object.WO;
|
||||||
|
import org.nl.modules.wql.core.engine.syntax.IWQL;
|
||||||
|
import org.nl.modules.wql.core.engine.syntax.wqlAssign;
|
||||||
|
import org.nl.modules.wql.core.engine.syntax.wqlDUMP;
|
||||||
|
import org.nl.modules.wql.core.engine.syntax.wqlERROR;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.core.engine.object.WO;
|
|
||||||
import org.nl.wql.core.engine.syntax.IWQL;
|
|
||||||
import org.nl.wql.core.engine.syntax.wqlAssign;
|
|
||||||
import org.nl.wql.core.engine.syntax.wqlDUMP;
|
|
||||||
import org.nl.wql.core.engine.syntax.wqlERROR;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 语法解析核心类
|
* 语法解析核心类
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
@@ -103,7 +102,7 @@ public class Syntax {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////考虑运算符的对象化
|
/////////////////////考虑运算符的对象化
|
||||||
public boolean exec(WO wo,ArrayList list){
|
public boolean exec(WO wo, ArrayList list){
|
||||||
boolean isSuccess = false;
|
boolean isSuccess = false;
|
||||||
this.wo = wo;
|
this.wo = wo;
|
||||||
String cmd = ""; //当前命令域,如果遇到endxxx,则该命令域置空
|
String cmd = ""; //当前命令域,如果遇到endxxx,则该命令域置空
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package org.nl.wql.core.engine;
|
package org.nl.modules.wql.core.engine;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.wql.WQLCore;
|
import org.nl.modules.wql.WQLCore;
|
||||||
import org.nl.wql.core.DataType;
|
import org.nl.modules.wql.core.DataType;
|
||||||
import org.nl.wql.core.bean.*;
|
import org.nl.modules.wql.core.bean.*;
|
||||||
import org.nl.wql.core.db.DBConnBean;
|
import org.nl.modules.wql.core.db.DBConnBean;
|
||||||
import org.nl.wql.core.engine.object.WO;
|
import org.nl.modules.wql.core.engine.object.WO;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -1,24 +1,4 @@
|
|||||||
package org.nl.wql.core.engine;
|
package org.nl.modules.wql.core.engine;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.BigInteger;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Hashtable;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -27,15 +7,25 @@ import org.apache.commons.beanutils.PropertyUtils;
|
|||||||
import org.apache.commons.beanutils.RowSetDynaClass;
|
import org.apache.commons.beanutils.RowSetDynaClass;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
import org.nl.modules.wql.util.Calculate;
|
||||||
|
import org.nl.modules.wql.util.MethodFactory;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
|
|
||||||
import org.nl.wql.WQLCore;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import org.nl.wql.core.DataType;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
import org.nl.wql.util.Calculate;
|
import java.io.File;
|
||||||
import org.nl.wql.util.MethodFactory;
|
import java.lang.reflect.Field;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class WQLFun {
|
public class WQLFun {
|
||||||
@@ -10,25 +10,25 @@
|
|||||||
* 文件版本:v1.0
|
* 文件版本:v1.0
|
||||||
*
|
*
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
package org.nl.wql.core.engine.object;
|
package org.nl.modules.wql.core.engine.object;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.WQLCore;
|
import org.nl.modules.wql.WQLCore;
|
||||||
import org.nl.wql.core.DataType;
|
import org.nl.modules.wql.core.DataType;
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
import org.nl.wql.core.bean.XLSTableRow;
|
import org.nl.modules.wql.core.bean.XLSTableRow;
|
||||||
import org.nl.wql.core.content.BaseContext;
|
import org.nl.modules.wql.core.content.BaseContext;
|
||||||
import org.nl.wql.core.content.HttpContext;
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
import org.nl.wql.core.db.DBConnBean;
|
import org.nl.modules.wql.core.db.DBConnBean;
|
||||||
import org.nl.wql.core.db.DBConnection;
|
import org.nl.modules.wql.core.db.DBConnection;
|
||||||
import org.nl.wql.core.engine.Syntax;
|
import org.nl.modules.wql.core.engine.Syntax;
|
||||||
import org.nl.wql.exception.WDKException;
|
import org.nl.modules.wql.exception.WDKException;
|
||||||
import org.nl.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -58,13 +58,13 @@ public class WO implements Serializable, Cloneable {
|
|||||||
DBConnBean dbb = new DBConnBean();
|
DBConnBean dbb = new DBConnBean();
|
||||||
dbb.setDrivers("");
|
dbb.setDrivers("");
|
||||||
|
|
||||||
if (StrUtil.containsAnyIgnoreCase(rawJdbcUrl,DataType.MYSQL)){
|
if (StrUtil.containsAnyIgnoreCase(rawJdbcUrl, DataType.MYSQL)){
|
||||||
dbb.setDbtype("mysql");
|
dbb.setDbtype("mysql");
|
||||||
}
|
}
|
||||||
if (StrUtil.containsAnyIgnoreCase(rawJdbcUrl,DataType.ORACLE)){
|
if (StrUtil.containsAnyIgnoreCase(rawJdbcUrl, DataType.ORACLE)){
|
||||||
dbb.setDbtype("oracle");
|
dbb.setDbtype("oracle");
|
||||||
}
|
}
|
||||||
if (StrUtil.containsAnyIgnoreCase(rawJdbcUrl,DataType.MSSQL) || StrUtil.containsAnyIgnoreCase(rawJdbcUrl,"sqlserver")){
|
if (StrUtil.containsAnyIgnoreCase(rawJdbcUrl, DataType.MSSQL) || StrUtil.containsAnyIgnoreCase(rawJdbcUrl,"sqlserver")){
|
||||||
dbb.setDbtype("mssql");
|
dbb.setDbtype("mssql");
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(dbb.getDbtype()))this.dbtype=dbb.getDbtype();
|
if (StrUtil.isNotEmpty(dbb.getDbtype()))this.dbtype=dbb.getDbtype();
|
||||||
@@ -10,36 +10,26 @@
|
|||||||
* 文件版本:v1.0
|
* 文件版本:v1.0
|
||||||
*
|
*
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
package org.nl.wql.core.engine.object;
|
package org.nl.modules.wql.core.engine.object;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.sql.CallableStatement;
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.beanutils.BasicDynaBean;
|
import org.apache.commons.beanutils.BasicDynaBean;
|
||||||
import org.apache.commons.beanutils.DynaProperty;
|
import org.apache.commons.beanutils.DynaProperty;
|
||||||
import org.apache.commons.beanutils.RowSetDynaClass;
|
import org.apache.commons.beanutils.RowSetDynaClass;
|
||||||
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
import org.nl.modules.wql.core.bean.ParameterBean;
|
||||||
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLRowSetDynaClass;
|
||||||
|
import org.nl.modules.wql.core.engine.Syntax;
|
||||||
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import org.nl.wql.core.DataType;
|
import java.sql.*;
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
import java.util.*;
|
||||||
import org.nl.wql.core.bean.ParameterBean;
|
import java.util.regex.Matcher;
|
||||||
import org.nl.wql.core.bean.ResultBean;
|
import java.util.regex.Pattern;
|
||||||
import org.nl.wql.core.bean.WQLRowSetDynaClass;
|
|
||||||
import org.nl.wql.core.engine.Syntax;
|
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
|
||||||
import org.nl.wql.util.WqlUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于WP对象的设计说明:
|
* 关于WP对象的设计说明:
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
|
import org.nl.modules.wql.core.engine.object.WO;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
|
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
|
||||||
import org.nl.wql.core.engine.object.WO;
|
|
||||||
import org.nl.wql.util.WqlUtil;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class IWQL {
|
public abstract class IWQL {
|
||||||
protected WO wo;
|
protected WO wo;
|
||||||
protected String cmdLine;
|
protected String cmdLine;
|
||||||
@@ -54,7 +53,7 @@ public abstract class IWQL {
|
|||||||
* @param cmdLine 指令参数
|
* @param cmdLine 指令参数
|
||||||
* @param wqllist 所有指令的内容,字符串或指令对象
|
* @param wqllist 所有指令的内容,字符串或指令对象
|
||||||
*/
|
*/
|
||||||
public void setWQL(WO wo,String cmdLine,ArrayList wqllist){
|
public void setWQL(WO wo, String cmdLine, ArrayList wqllist){
|
||||||
this.wo = wo;
|
this.wo = wo;
|
||||||
this.cmdLine = cmdLine;
|
this.cmdLine = cmdLine;
|
||||||
this.list = wqllist;
|
this.list = wqllist;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.core.engine.Syntax;
|
import org.nl.modules.wql.core.engine.Syntax;
|
||||||
import org.nl.wql.util.WQLCalculator;
|
import org.nl.modules.wql.util.WQLCalculator;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLJava;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
import org.nl.wql.core.bean.WQLJava;
|
|
||||||
import org.nl.wql.util.WqlUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于calljava的说明
|
* 关于calljava的说明
|
||||||
* 1、被调用的java文件必须放在wql_root的java文件夹中
|
* 1、被调用的java文件必须放在wql_root的java文件夹中
|
||||||
@@ -20,7 +19,7 @@ import org.nl.wql.util.WqlUtil;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlCALLJAVA extends IWQL{
|
public class wqlCALLJAVA extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList wqllist;
|
// private ArrayList wqllist;
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -6,13 +12,6 @@ import java.sql.Types;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.core.DataType;
|
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
|
||||||
import org.nl.wql.util.WqlUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于CALLPROC的语法说明
|
* 关于CALLPROC的语法说明
|
||||||
* 1、存储过程的输入输出参数均为varchar类型,如需其他类型请在各自存储过程中转换
|
* 1、存储过程的输入输出参数均为varchar类型,如需其他类型请在各自存储过程中转换
|
||||||
@@ -21,7 +20,7 @@ import org.nl.wql.util.WqlUtil;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlCALLPROC extends IWQL{
|
public class wqlCALLPROC extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList wqllist;
|
// private ArrayList wqllist;
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.core.engine.object.WO;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQL;
|
|
||||||
import org.nl.wql.core.engine.object.WO;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于CALLWQL的语法说明
|
* 关于CALLWQL的语法说明
|
||||||
* 1、
|
* 1、
|
||||||
@@ -16,7 +15,7 @@ import org.nl.wql.core.engine.object.WO;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlCALLWQL extends IWQL{
|
public class wqlCALLWQL extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList wqllist;
|
// private ArrayList wqllist;
|
||||||
@@ -1,4 +1,11 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
import org.nl.modules.wql.core.bean.ParameterBean;
|
||||||
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -7,16 +14,8 @@ import java.util.Iterator;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
import org.nl.wql.core.DataType;
|
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
|
||||||
import org.nl.wql.core.bean.ParameterBean;
|
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlDELETE extends IWQL{
|
public class wqlDELETE extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList wqllist;
|
// private ArrayList wqllist;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于DUMP的语法说明
|
* 关于DUMP的语法说明
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.core.ERROR;
|
import org.nl.modules.wql.core.ERROR;
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于ERROR的语法说明
|
* 关于ERROR的语法说明
|
||||||
@@ -16,7 +16,7 @@ import org.nl.wql.core.bean.ErrorBean;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlERROR extends IWQL{
|
public class wqlERROR extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList list;
|
// private ArrayList list;
|
||||||
@@ -1,4 +1,11 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
import org.nl.modules.wql.core.bean.ParameterBean;
|
||||||
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -6,16 +13,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
import org.nl.wql.core.DataType;
|
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
|
||||||
import org.nl.wql.core.bean.ParameterBean;
|
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlEXECSQL extends IWQL{
|
public class wqlEXECSQL extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList wqllist;
|
// private ArrayList wqllist;
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
import java.util.Stack;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
|
import java.util.Stack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于IF的语法说明
|
* 关于IF的语法说明
|
||||||
@@ -20,12 +19,12 @@ import org.nl.wql.util.WqlUtil;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlIF extends IWQL{
|
public class wqlIF extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList list;
|
// private ArrayList list;
|
||||||
|
|
||||||
|
|
||||||
//当前IF的状态
|
//当前IF的状态
|
||||||
boolean isok = false;
|
boolean isok = false;
|
||||||
//嵌套栈
|
//嵌套栈
|
||||||
@@ -36,10 +35,10 @@ public class wqlIF extends IWQL{
|
|||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
isok = false;
|
isok = false;
|
||||||
stack = new Stack();
|
stack = new Stack();
|
||||||
|
|
||||||
String cmdstr = cmdLine.substring(3,this.cmdLine.length());
|
String cmdstr = cmdLine.substring(3,this.cmdLine.length());
|
||||||
String[] arr = cmdstr.split(" ");
|
String[] arr = cmdstr.split(" ");
|
||||||
|
|
||||||
//1、进行参数替换和判断
|
//1、进行参数替换和判断
|
||||||
String param1 = "";
|
String param1 = "";
|
||||||
String param2 = ""; //比较符
|
String param2 = ""; //比较符
|
||||||
@@ -71,21 +70,21 @@ public class wqlIF extends IWQL{
|
|||||||
//进行比较
|
//进行比较
|
||||||
boolean istrue = WQLFun.APPCompare(param1, param2, param3);
|
boolean istrue = WQLFun.APPCompare(param1, param2, param3);
|
||||||
stack.push(istrue);
|
stack.push(istrue);
|
||||||
|
|
||||||
param1 = "";
|
param1 = "";
|
||||||
param2 = "";
|
param2 = "";
|
||||||
param3 = "";
|
param3 = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//2、最后进行完整的判断
|
//2、最后进行完整的判断
|
||||||
this.isok = process();
|
this.isok = process();
|
||||||
|
|
||||||
log.debug("【IF运算】:IF "+cmdstr+",判断结果:"+this.isok);
|
log.debug("【IF运算】:IF "+cmdstr+",判断结果:"+this.isok);
|
||||||
|
|
||||||
boolean isSuccess = false;
|
boolean isSuccess = false;
|
||||||
|
|
||||||
//3、从第二行开始往下走,判断else、elseif和endif
|
//3、从第二行开始往下走,判断else、elseif和endif
|
||||||
String cmdarea = "IF";
|
String cmdarea = "IF";
|
||||||
for(int i=0;i<this.list.size();i++){
|
for(int i=0;i<this.list.size();i++){
|
||||||
@@ -1,4 +1,11 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
import org.nl.modules.wql.core.bean.ParameterBean;
|
||||||
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -8,16 +15,8 @@ import java.util.Iterator;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
import org.nl.wql.core.DataType;
|
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
|
||||||
import org.nl.wql.core.bean.ParameterBean;
|
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlINSERT extends IWQL{
|
public class wqlINSERT extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList<String> wqllist;
|
// private ArrayList<String> wqllist;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于LOOP的语法说明
|
* 关于LOOP的语法说明
|
||||||
@@ -21,22 +21,22 @@ import org.nl.wql.util.WqlUtil;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlLOOP extends IWQL{
|
public class wqlLOOP extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList list;
|
// private ArrayList list;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean exec(int nLoop) {
|
public boolean exec(int nLoop) {
|
||||||
//loop不支持双重循环,nLoop参数无效,使用0即可
|
//loop不支持双重循环,nLoop参数无效,使用0即可
|
||||||
nLoop = 0;
|
nLoop = 0;
|
||||||
|
|
||||||
String[] arr = this.cmdLine.split(" ");
|
String[] arr = this.cmdLine.split(" ");
|
||||||
if(arr.length==1){
|
if(arr.length==1){
|
||||||
log.error("LOOP语法错误:"+this.cmdLine);
|
log.error("LOOP语法错误:"+this.cmdLine);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
String str = (String) wo.wp.getIOParam(arr[1], nLoop);
|
String str = (String) wo.wp.getIOParam(arr[1], nLoop);
|
||||||
int nNum = 0;
|
int nNum = 0;
|
||||||
try {
|
try {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ import java.util.Iterator;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlPAGEQUERY extends IWQL{
|
public class wqlPAGEQUERY extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList list;
|
// private ArrayList list;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ import java.util.Iterator;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlQUERY extends IWQL{
|
public class wqlQUERY extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList list;
|
// private ArrayList list;
|
||||||
@@ -1,4 +1,12 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
import org.nl.modules.wql.core.bean.ParameterBean;
|
||||||
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -10,15 +18,6 @@ import java.util.Stack;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
import org.nl.wql.core.DataType;
|
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
|
||||||
import org.nl.wql.core.bean.ParameterBean;
|
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
|
||||||
import org.nl.wql.util.WqlUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于SELECT语法的说明
|
* 关于SELECT语法的说明
|
||||||
* 1、SELECT、FROM、WHERE、INNER、JOIN、OUTER、OPTION等数据库关键字必须新起一行
|
* 1、SELECT、FROM、WHERE、INNER、JOIN、OUTER、OPTION等数据库关键字必须新起一行
|
||||||
@@ -1,4 +1,12 @@
|
|||||||
package org.nl.wql.core.engine.syntax;
|
package org.nl.modules.wql.core.engine.syntax;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQLCore;
|
||||||
|
import org.nl.modules.wql.core.DataType;
|
||||||
|
import org.nl.modules.wql.core.bean.ErrorBean;
|
||||||
|
import org.nl.modules.wql.core.bean.ParameterBean;
|
||||||
|
import org.nl.modules.wql.core.db.DBConnection;
|
||||||
|
import org.nl.modules.wql.core.engine.WQLFun;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -8,15 +16,6 @@ import java.util.Iterator;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wql.WQLCore;
|
|
||||||
import org.nl.wql.core.DataType;
|
|
||||||
import org.nl.wql.core.bean.ErrorBean;
|
|
||||||
import org.nl.wql.core.bean.ParameterBean;
|
|
||||||
import org.nl.wql.core.db.DBConnection;
|
|
||||||
import org.nl.wql.core.engine.WQLFun;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于UPDATE的说明:
|
* 关于UPDATE的说明:
|
||||||
*
|
*
|
||||||
@@ -24,7 +23,7 @@ import org.nl.wql.core.engine.WQLFun;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class wqlUPDATE extends IWQL{
|
public class wqlUPDATE extends IWQL {
|
||||||
// private WO wo;
|
// private WO wo;
|
||||||
// private String cmdLine;
|
// private String cmdLine;
|
||||||
// private ArrayList wqllist;
|
// private ArrayList wqllist;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.exception;
|
package org.nl.modules.wql.exception;
|
||||||
|
|
||||||
public class WDKException extends RuntimeException {
|
public class WDKException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 9059634125483898385L;
|
private static final long serialVersionUID = 9059634125483898385L;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.util;
|
package org.nl.modules.wql.util;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.nl.wql.util;
|
package org.nl.modules.wql.util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author: liaojinlong
|
* @author: liaojinlong
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.util;
|
package org.nl.modules.wql.util;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.nl.wql.util;
|
package org.nl.modules.wql.util;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.DisposableBean;
|
|||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.ApplicationContextAware;
|
import org.springframework.context.ApplicationContextAware;
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package org.nl.wql.util;
|
package org.nl.modules.wql.util;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
|
||||||
public class WQLCalculator {
|
public class WQLCalculator {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String str = "10*(22+232)/3";
|
String str = "10*(22+232)/3";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.util;
|
package org.nl.modules.wql.util;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -12,7 +12,7 @@ public class WQLFilterGroup {
|
|||||||
private List<WQLFilterGroup> groups;
|
private List<WQLFilterGroup> groups;
|
||||||
private String op;
|
private String op;
|
||||||
private List<WQLFilterRule> roles;
|
private List<WQLFilterRule> roles;
|
||||||
|
|
||||||
public List<WQLFilterGroup> getGroups() {
|
public List<WQLFilterGroup> getGroups() {
|
||||||
return groups;
|
return groups;
|
||||||
}
|
}
|
||||||
@@ -31,20 +31,20 @@ public class WQLFilterGroup {
|
|||||||
public void setRoles(List<WQLFilterRule> roles) {
|
public void setRoles(List<WQLFilterRule> roles) {
|
||||||
this.roles = roles;
|
this.roles = roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WQLFilterGroup(){
|
public WQLFilterGroup(){
|
||||||
this.groups = new ArrayList<WQLFilterGroup>();
|
this.groups = new ArrayList<WQLFilterGroup>();
|
||||||
this.roles = new ArrayList<WQLFilterRule>();
|
this.roles = new ArrayList<WQLFilterRule>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static WQLFilterGroup fromObject(JSONObject obj){
|
public static WQLFilterGroup fromObject(JSONObject obj){
|
||||||
WQLFilterGroup filterGroup = new WQLFilterGroup();
|
WQLFilterGroup filterGroup = new WQLFilterGroup();
|
||||||
|
|
||||||
if(obj.containsKey("op")){
|
if(obj.containsKey("op")){
|
||||||
filterGroup.setOp(obj.getString("op"));
|
filterGroup.setOp(obj.getString("op"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(obj.containsKey("rules")){
|
if(obj.containsKey("rules")){
|
||||||
JSONArray jrules = obj.getJSONArray("rules");
|
JSONArray jrules = obj.getJSONArray("rules");
|
||||||
List<WQLFilterRule> roles = new ArrayList<WQLFilterRule>();
|
List<WQLFilterRule> roles = new ArrayList<WQLFilterRule>();
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.nl.wql.util;
|
package org.nl.modules.wql.util;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package org.nl.wql.util;
|
package org.nl.modules.wql.util;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wql.core.content.HttpContext;
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
@@ -5,7 +5,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.modules.quartz.domain.QuartzJob;
|
import org.nl.modules.quartz.domain.QuartzJob;
|
||||||
import org.nl.modules.quartz.repository.QuartzJobRepository;
|
import org.nl.modules.quartz.repository.QuartzJobRepository;
|
||||||
import org.nl.modules.quartz.utils.QuartzManage;
|
import org.nl.modules.quartz.utils.QuartzManage;
|
||||||
import org.nl.wql.WQLCore;
|
import org.nl.modules.wql.WQLCore;
|
||||||
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationArguments;
|
||||||
import org.springframework.boot.ApplicationRunner;
|
import org.springframework.boot.ApplicationRunner;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<artifactId>nladmin</artifactId>
|
|
||||||
<groupId>org.nl</groupId>
|
|
||||||
<version>2.6</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>nladmin-wql</artifactId>
|
|
||||||
<version>2.7</version>
|
|
||||||
<name>WQL模块</name>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<!--<dependency>
|
|
||||||
<groupId>net.sf.json-lib</groupId>
|
|
||||||
<artifactId>json-lib</artifactId>
|
|
||||||
<version>2.4</version>
|
|
||||||
<classifier>jdk15</classifier>
|
|
||||||
</dependency>-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hynnet</groupId>
|
|
||||||
<artifactId>jxl</artifactId>
|
|
||||||
<version>2.6.12.1</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>org.nl</groupId>-->
|
|
||||||
<!-- <artifactId>nladmin-logging</artifactId>-->
|
|
||||||
<!-- <version>2.6</version>-->
|
|
||||||
<!-- <scope>compile</scope>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>org.nl</groupId>-->
|
|
||||||
<!-- <artifactId>nladmin-system</artifactId>-->
|
|
||||||
<!-- <version>2.6</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-beanutils</groupId>
|
|
||||||
<artifactId>commons-beanutils-core</artifactId>
|
|
||||||
<version>1.8.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<distributionManagement>
|
|
||||||
<!--正式版本-->
|
|
||||||
<repository>
|
|
||||||
<!-- nexus服务器中用户名:在settings.xml中<server>的id-->
|
|
||||||
<id>nexus</id>
|
|
||||||
<!-- 这个名称自己定义 -->
|
|
||||||
<name>nexus</name>
|
|
||||||
<url>http://121.40.234.130:8081/repository/maven-releases/</url>
|
|
||||||
</repository>
|
|
||||||
<!--快照
|
|
||||||
<snapshotRepository>
|
|
||||||
<id>nexus-snapshots</id>
|
|
||||||
<name>Snapshots repository</name>
|
|
||||||
<url>http://192.168.1.105/repository/yang/</url>
|
|
||||||
</snapshotRepository>-->
|
|
||||||
</distributionManagement>
|
|
||||||
</project>
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
package org.nl.wql.core.bean;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.nl.wql.core.engine.object.WO;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class WQLJava {
|
|
||||||
abstract public HashMap process(WO wo,HashMap inMap);
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package org.nl.wql.core.db;
|
|
||||||
|
|
||||||
public class DBPoolJBoss {
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user