package com.engine.salary.formlua.entity.parameter;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.engine.salary.util.SalaryI18nUtil;
import org.apache.commons.compress.utils.Lists;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.LinkedList;
import java.util.List;



public class ExcelFuncs {
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	final static private String ALLFORM="all";
	final static private String CURRENTDATA="current_data";
	static String normalStr="{\"key\":\"\",\"fieldId\":\"\",\"componentKey\":\"\",\"term\":\"\",\"formId\":\"\",\"content\":\"\",\"fieldType\":\"\"}";
	static public JSONObject normalJson= JSON.parseObject(normalStr);
	static private String[] nullParamDatas=new String[]{};
	static private String[] paramDatas=new String[]{};
	static private String[] allParamDatas=new String[]{"{}","[]"};
	static private String[] moduleList=new String[]{"biaoge","workflow"};
	private FuncDescUtil funcDescUtil;
	public List<ExcelFunc> getCompList(){
		//比较操作符
		List<ExcelFunc> compList=new LinkedList<>();
		ExcelFunc excelFunc=null;
		String [] paramArray=new String[]{};
		excelFunc=new ExcelFunc(">",SalaryI18nUtil.getI18nLabel(12132,"大于"), "","",paramArray,paramDatas,"Boolean",CURRENTDATA);
		compList.add(excelFunc);

		excelFunc=new ExcelFunc(">=",SalaryI18nUtil.getI18nLabel(27694,"大于等于"), "","",paramArray,paramDatas,"Boolean",CURRENTDATA);
		compList.add(excelFunc);

		excelFunc=new ExcelFunc("<",SalaryI18nUtil.getI18nLabel(20009,"小于"), "","",paramArray,paramDatas,"Boolean",CURRENTDATA);
		compList.add(excelFunc);

		excelFunc=new ExcelFunc("<=",SalaryI18nUtil.getI18nLabel(15251,"小于等于"), "","",paramArray,paramDatas,"Boolean",CURRENTDATA);
		compList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("=",SalaryI18nUtil.getI18nLabel(15112,"等于"), "","",paramArray,paramDatas,"Boolean",CURRENTDATA);
		compList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("!=", SalaryI18nUtil.getI18nLabel(14897,"不等于"), "","",paramArray,paramDatas,"Boolean",CURRENTDATA);
		compList.add(excelFunc);

		return compList;
	}

	/**
	 * 日期函数的列表
	 * @return
	 */
	public List<ExcelFunc> getDateList(){
		//日期函数
		List<ExcelFunc> dateList=new LinkedList<>();
		ExcelFunc excelFunc=null;
		String [] paramArray=new String[]{};
		excelFunc=new ExcelFunc("TODAY",SalaryI18nUtil.getI18nLabel(94924,"当前日期"), funcDescUtil.get("TODAY"),"TODAY()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("NOW",SalaryI18nUtil.getI18nLabel(94925,"当前日期时间"), funcDescUtil.get("NOW"),"NOW()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("DATEADD",SalaryI18nUtil.getI18nLabel(94926,"对日期加减年、月、日"), funcDescUtil.get("DATEADD"),"DATEADD(日期, 数值, ['单位'])",nullParamDatas,paramArray,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("DATEDIFF",SalaryI18nUtil.getI18nLabel(94927,"返回两个日期的差值"), funcDescUtil.get("DATEDIFF"),"DATEDIFF(日期1, 日期2, ['单位'])",nullParamDatas,paramArray,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("DATEFORMAT",SalaryI18nUtil.getI18nLabel(94928,"返回指定格式的日期"), funcDescUtil.get("DATEFORMAT"),"DATEFORMAT(日期, '可选格式')",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("YEAR",SalaryI18nUtil.getI18nLabel(94929,"返回日期中的年"), funcDescUtil.get("YEAR"),"YEAR(日期)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{"String"};
		excelFunc=new ExcelFunc("MONTH",SalaryI18nUtil.getI18nLabel(94930,"返回日期中的月"), funcDescUtil.get("MONTH"),"MONTH(日期)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("DAY",SalaryI18nUtil.getI18nLabel(94931,"返回日期中的日"), funcDescUtil.get("DAY"),"DAY(日期)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("HOUR",SalaryI18nUtil.getI18nLabel(94932,"返回日期中的小时"), funcDescUtil.get("HOUR"),"HOUR(日期)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("MINUTE",SalaryI18nUtil.getI18nLabel(94933,"返回日期中的分钟"), funcDescUtil.get("MINUTE"),"MINUTE(日期)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("SECOND",SalaryI18nUtil.getI18nLabel(94934,"返回日期中的秒"), funcDescUtil.get("SECOND"),"SECOND(日期)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("WEEKNUM",SalaryI18nUtil.getI18nLabel(94936,"返回日期为第几周"), funcDescUtil.get("WEEKNUM"),"WEEKNUM(日期)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("WEEKDAY",SalaryI18nUtil.getI18nLabel(94937,"返回日期为星期几"), funcDescUtil.get("WEEKDAY"),"WEEKDAY(日期)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("NETWORKDAYSPI",SalaryI18nUtil.getI18nLabel(94938,"返回指定日期之间包含的工作日天数（仅限的过去时间）"), funcDescUtil.get("NETWORKDAYSPI"),"NETWORKDAYSPI(日期1, 日期2, 成员)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("EOMONTH",SalaryI18nUtil.getI18nLabel(94939,"返回某月最后一天日期"), funcDescUtil.get("EOMONTH"),"EOMONTH(日期，指定日期之前或之后的月数)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("CURRYEAR",SalaryI18nUtil.getI18nLabel(101059,"返回当前年份"), funcDescUtil.get("CURRYEAR"),"CURRYEAR()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("CURRMONTH",SalaryI18nUtil.getI18nLabel(101060,"返回当前月份"), funcDescUtil.get("CURRMONTH"),"CURRMONTH()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("CURRDAY",SalaryI18nUtil.getI18nLabel(101061,"返回当前第几日（当月）"), funcDescUtil.get("CURRDAY"),"CURRDAY()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("CURRWEEK",SalaryI18nUtil.getI18nLabel(101062,"返回当前是周几"), funcDescUtil.get("CURRWEEK"),"CURRWEEK()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("CURRHOUR",SalaryI18nUtil.getI18nLabel(101063,"返回当前小时"), funcDescUtil.get("CURRHOUR"),"CURRHOUR()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("CURRMINUTE",SalaryI18nUtil.getI18nLabel(101064,"返回当前分"), funcDescUtil.get("CURRMINUTE"),"CURRMINUTE()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("CURRSECOND",SalaryI18nUtil.getI18nLabel(101065,"返回当前秒"), funcDescUtil.get("CURRSECOND"),"CURRSECOND()",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);
		paramArray=new String[]{};
		excelFunc=new ExcelFunc("MAXDATE",SalaryI18nUtil.getI18nLabel(100803,"返回一组日期中的最大值"), funcDescUtil.get("MAXDATE"),"MAXDATE(日期1，日期2，……)",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("MINDATE",SalaryI18nUtil.getI18nLabel(100805,"返回一组日期中的最小值"), funcDescUtil.get("MINDATE"),"MINDATE(日期1，日期2，……)",paramArray,nullParamDatas,"String",CURRENTDATA);
		dateList.add(excelFunc);
		return dateList;
	}

	/**
	 * 逻辑函数的列表
	 * @return
	 */
	public List<ExcelFunc> getLogicList(){
		//逻辑函数
		List<ExcelFunc> logicList=new LinkedList<>();
		ExcelFunc excelFunc=null;
		String [] paramArray=new String[]{};
		excelFunc=new ExcelFunc("IF",SalaryI18nUtil.getI18nLabel(94940,"如果条件为真，则...否则..."), funcDescUtil.get("IF"),"IF(条件, 表达式1, 表达式2)",paramArray,nullParamDatas,"Object",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("AND",SalaryI18nUtil.getI18nLabel(51100,"且"), funcDescUtil.get("AND"),"AND(条件1, 条件2, [条件3, …])",paramArray,nullParamDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("OR",SalaryI18nUtil.getI18nLabel(35824,"或"), funcDescUtil.get("OR"),"OR(条件1, 条件2, [条件3, …])",paramArray,nullParamDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("NOT",SalaryI18nUtil.getI18nLabel(94942,"反转真假结果"), funcDescUtil.get("NOT"),"NOT(逻辑结果)",paramArray,nullParamDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("IN",SalaryI18nUtil.getI18nLabel(94943,"变量是否包含在一组结果中"), funcDescUtil.get("IN"),"IN(变量, [变量1, 变量2, …])",paramArray,allParamDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("LIKE",SalaryI18nUtil.getI18nLabel(94944,"文本是否包含任意一个关键字"), funcDescUtil.get("LIKE"),"LIKE(文本, [文本1, 文本2, …])",paramArray,allParamDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("ISEMPTY",SalaryI18nUtil.getI18nLabel(94945,"是否为空"), funcDescUtil.get("ISEMPTY"),"ISEMPTY(变量)",paramArray,paramDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("TRUE",SalaryI18nUtil.getI18nLabel(94946,"返回真"), funcDescUtil.get("TRUE"),"TRUE()",paramArray,nullParamDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("FALSE",SalaryI18nUtil.getI18nLabel(94947,"返回假"), funcDescUtil.get("FALSE"),"FALSE()",paramArray,nullParamDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("IFS",SalaryI18nUtil.getI18nLabel(94948,"多条件"), funcDescUtil.get("IFS"),"IFS({条件1},{结果1},{条件2},{结果2}...{默认结果})",paramArray,nullParamDatas,"Object",CURRENTDATA);
		logicList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("FIND",SalaryI18nUtil.getI18nLabel(31835,"查找"), funcDescUtil.get("FIND"),"FIND([{查找值1},{查找值2}...{查找值N}],[{查找目标1},{查找目标2}...{查找目标N}])",paramArray,nullParamDatas,"Boolean",CURRENTDATA);
		logicList.add(excelFunc);
		return logicList;
	}

	/**
	 * 字符函数的列表
	 * @return
	 */
	public List<ExcelFunc> getStringList(){
		//字符函数
		List<ExcelFunc> stringList=new LinkedList<>();
		ExcelFunc excelFunc=null;
		String [] paramArray=new String[]{};
		excelFunc=new ExcelFunc("CONCAT",SalaryI18nUtil.getI18nLabel(94949,"链接多个文本"), funcDescUtil.get("CONCAT"),"CONCAT(文本1, 文本2, [文本3, …])",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("TEXT",SalaryI18nUtil.getI18nLabel(94950,"将变量转为文本"), funcDescUtil.get("TEXT"),"TEXT(变量)",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("VALUE",SalaryI18nUtil.getI18nLabel(94951,"将文本转为数字"), funcDescUtil.get("VALUE"),"VALUE(文本)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("LEN",SalaryI18nUtil.getI18nLabel(94952,"返回文本长度"), funcDescUtil.get("LEN"),"LEN(文本)",paramArray,nullParamDatas,"Number",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("SEARCH",SalaryI18nUtil.getI18nLabel(94953,"在文本中查找关键字"), funcDescUtil.get("SEARCH"),"SEARCH(关键字, 文本, [搜索开始位置])",paramArray,nullParamDatas,"Number",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("REPLACE",SalaryI18nUtil.getI18nLabel(94954,"替换文本中的字"), funcDescUtil.get("REPLACE"),"REPLACE(原文本, 替换开始位置, 替换字符数, 新文本)",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("REPT",SalaryI18nUtil.getI18nLabel(94955,"将文本重复指定次数"), funcDescUtil.get("REPT"),"REPT(文本, 重复次数)",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("PAD",SalaryI18nUtil.getI18nLabel(94956,"将文本填充至指定长度"), funcDescUtil.get("PAD"),"PAD(原文本, 长度, 填充用的文本, ['填充位置'])",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("TRIM",SalaryI18nUtil.getI18nLabel(94957,"清除前后空格"), funcDescUtil.get("TRIM"),"TRIM(文本)",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("LEFT",SalaryI18nUtil.getI18nLabel(94958,"返回文本左侧开始的文字"), funcDescUtil.get("LEFT"),"LEFT(文本, 截取字符数)",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("RIGHT",SalaryI18nUtil.getI18nLabel(94959,"返回文本右侧开始的文字"), funcDescUtil.get("RIGHT"),"RIGHT(文本, 截取字符数)",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("MID",SalaryI18nUtil.getI18nLabel(94960,"返回文本指定位置开始的文字"), funcDescUtil.get("MID"),"MID(文本, 指定位置, 截取字符数)",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("SCORE",SalaryI18nUtil.getI18nLabel(94961,"获取选项型控件分数"), funcDescUtil.get("SCORE"),"SCORE({选项型控件})",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("IDCARD",SalaryI18nUtil.getI18nLabel(94962,"身份证函数"), funcDescUtil.get("IDCARD"),"IDCARD({身份证号码}, {查找类型})",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);



		paramArray=new String[]{};
		excelFunc=new ExcelFunc("ISSTRING",SalaryI18nUtil.getI18nLabel(0,"是否是字符串"), funcDescUtil.get("ISSTRING"),"ISSTRING({任意控件})",paramArray,nullParamDatas,"String",CURRENTDATA);
		stringList.add(excelFunc);

//		paramArray=new String[]{};
//		excelFunc=new ExcelFunc("SUBSTRING",SalaryI18nUtil.getI18nLabel(97524,"字符截取函数"), funcDescUtil.get("SUBSTRING"),"SUBSTRING({源字符}, {截取开始位置},{截取结束位置})",paramArray,nullParamDatas,"String",CURRENTDATA);
//		stringList.add(excelFunc);
//		paramArray=new String[]{};
//		excelFunc=new ExcelFunc("SUBSTITUE",SalaryI18nUtil.getI18nLabel(97525,"字符查找替换函数"), funcDescUtil.get("SUBSTITUE"),"SUBSTITUE({源字符}, {被替换字符},{新字符})",paramArray,nullParamDatas,"String",CURRENTDATA);
//		stringList.add(excelFunc);
//		paramArray=new String[]{};
//		excelFunc=new ExcelFunc("LOWER",SalaryI18nUtil.getI18nLabel(97526,"字符转小写函数"), funcDescUtil.get("LOWER"),"LOWER({源字符})",paramArray,nullParamDatas,"String",CURRENTDATA);
//		stringList.add(excelFunc);
//		paramArray=new String[]{};
//		excelFunc=new ExcelFunc("UPPER",SalaryI18nUtil.getI18nLabel(97527,"字符转大写函数"), funcDescUtil.get("UPPER"),"UPPER({源字符})",paramArray,nullParamDatas,"String",CURRENTDATA);
//		stringList.add(excelFunc);
//		paramArray=new String[]{};
//		excelFunc=new ExcelFunc("EXACT",SalaryI18nUtil.getI18nLabel(97528,"字符比较函数"), funcDescUtil.get("EXACT"),"EXACT({字符1}, {字符2})",paramArray,nullParamDatas,"String",CURRENTDATA);
//		stringList.add(excelFunc);
		return stringList;
	}

	/**
	 * 数学函数的列表
	 * @return
	 */
	public List<ExcelFunc> getMathList(){
		List<ExcelFunc> mathList=new LinkedList<>();
		ExcelFunc excelFunc=null;
		String [] paramArray=new String[]{};
		excelFunc=new ExcelFunc("ROUNDUP",SalaryI18nUtil.getI18nLabel(94963,"向上舍入"), funcDescUtil.get("ROUNDUP"),"ROUNDUP(数值, [小数位精确度])",paramArray,nullParamDatas,"Number",CURRENTDATA);
		mathList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("ROUND",SalaryI18nUtil.getI18nLabel(17392,"四舍五入"), funcDescUtil.get("ROUND"),"ROUND(数值, [小数位精确度])",paramArray,nullParamDatas,"Number",CURRENTDATA);
		mathList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("ROUNDDOWN",SalaryI18nUtil.getI18nLabel(94964,"向下舍入"), funcDescUtil.get("ROUNDDOWN"),"ROUNDDOWN(数值, [小数位精确度])",paramArray,nullParamDatas,"Number",CURRENTDATA);
		mathList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("AGGREGATION",SalaryI18nUtil.getI18nLabel(94965,"聚合运算"), funcDescUtil.get("AGGREGATION"),"AGGREGATION({数字}...,{聚合运算类型})",paramArray,nullParamDatas,"Number",CURRENTDATA);
		mathList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("MOD",SalaryI18nUtil.getI18nLabel(94966,"求余"), funcDescUtil.get("MOD"),"ROUNDDOWN({数字},{数字})",paramArray,nullParamDatas,"Number",CURRENTDATA);
		mathList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("TRUNC",SalaryI18nUtil.getI18nLabel(94967,"数字格式化"), funcDescUtil.get("TRUNC"),"ROUNDDOWN({数字},{精度})",paramArray,nullParamDatas,"Number",CURRENTDATA);
		mathList.add(excelFunc);


		paramArray=new String[]{};
		excelFunc=new ExcelFunc("ISINT",SalaryI18nUtil.getI18nLabel(0,"字符内容是否是整数"), funcDescUtil.get("ISINT"),"ISINT({字符})",paramArray,nullParamDatas,"String",CURRENTDATA);
		mathList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("ISNUMBER",SalaryI18nUtil.getI18nLabel(0,"字符内容是否是数字"), funcDescUtil.get("ISNUMBER"),"ISNUMBER({字符})",paramArray,nullParamDatas,"String",CURRENTDATA);
		mathList.add(excelFunc);

		return mathList;

	}

	/**
	 * 查找函数的列表
	 * @return
	 */
	public List<ExcelFunc> getFindList(){
		List<ExcelFunc> findList=new LinkedList<>();
		ExcelFunc excelFunc=null;
		String [] paramArray=new String[]{};
		excelFunc=new ExcelFunc("CHOOSE",SalaryI18nUtil.getI18nLabel(94968,"返回索引范围内指定的值"), funcDescUtil.get("CHOOSE"),"CHOOSE(数据源，[条件])",paramArray,nullParamDatas,"Array",CURRENTDATA);
		findList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("VLOOKUPS",SalaryI18nUtil.getI18nLabel(94969,"按列查找，返回所需值"), funcDescUtil.get("VLOOKUPS"),"VLOOKUPS（表，[条件]，[返回参数]）",paramArray,nullParamDatas,"Array",CURRENTDATA);
		findList.add(excelFunc);

		paramArray=new String[]{};
		excelFunc=new ExcelFunc("MATCH",SalaryI18nUtil.getI18nLabel(94970,"返回指定数值在指定数组区域中的位置"), funcDescUtil.get("MATCH"),"MATCH（值，[数组])",paramArray,nullParamDatas,"Number",CURRENTDATA);
		findList.add(excelFunc);
		return findList;
	}

	/**
	 * 聚合函数 COUNT(表格, [统计条件])
	 * @return
	 */
	public List<ExcelFunc> getAggList(){
		List<ExcelFunc> aggList=new LinkedList<>();
		ExcelFunc excelFunc=null;

		String [] paramArray=new String[]{"Form","Number","Boolean"};
		excelFunc=new ExcelFunc("COUNT", SalaryI18nUtil.getI18nLabel(16654,"计数"), funcDescUtil.get("COUNT"),"COUNT(表格)",paramArray,paramDatas,"Number",ALLFORM);
		aggList.add(excelFunc);

		paramArray=new String[]{"Number","Number","Boolean"};
		excelFunc=new ExcelFunc("SUM",SalaryI18nUtil.getI18nLabel(95012,"求和") , funcDescUtil.get("SUM"),"SUM(数字字段)",paramArray,paramDatas,"Number",ALLFORM);
		aggList.add(excelFunc);

		paramArray=new String[]{"Number","Number","Boolean"};
		excelFunc=new ExcelFunc("AVG",SalaryI18nUtil.getI18nLabel(19550,"平均值"), funcDescUtil.get("AVG"),"AVG(数字字段)",paramArray,paramDatas,"Number",ALLFORM);
		aggList.add(excelFunc);

		paramArray=new String[]{"Number","Number","Boolean"};
		excelFunc=new ExcelFunc("MIN",SalaryI18nUtil.getI18nLabel(12318,"最小值"), funcDescUtil.get("MIN"),"MIN(表格)",paramArray,paramDatas,"Number",ALLFORM);
		aggList.add(excelFunc);

		paramArray=new String[]{"Number","Number","Boolean"};
		excelFunc=new ExcelFunc("MAX",SalaryI18nUtil.getI18nLabel(66750,"最大值"), funcDescUtil.get("MAX"),"MAX(表格)",paramArray,paramDatas,"Number",ALLFORM);
		aggList.add(excelFunc);
		return aggList;
	}

	/**
	 * 财务类函数列表
	 * @return
	 */
	public Object getFinanceList(){
		ExcelFunc excelFunc = null;
		List<ExcelFunc> funcs = Lists.newArrayList();
		excelFunc = new ExcelFunc("GETMONEY",SalaryI18nUtil.getI18nLabel(0,"获取锁给定数字的金额大写"), funcDescUtil.get("GETMONEY"),"GETMONEY({数字})",null,nullParamDatas,"",CURRENTDATA);
		funcs.add(excelFunc);

		return funcs;
	}
	/**
	 * 数据库函数列表
	 * @return
	 */
	public Object getDataBaseList() {
		ExcelFunc excelFunc = null;
		List<ExcelFunc> funcs = Lists.newArrayList();

//		excelFunc = new ExcelFunc("GETHRMLOGINID",SalaryI18nUtil.getI18nLabel(100807,"返回指定人员系统账号"), funcDescUtil.get("GETHRMLOGINID"),"GETHRMLOGINID({表单.人员})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETHRMWORKCODE",SalaryI18nUtil.getI18nLabel(100809,"返回指定人员编号"), funcDescUtil.get("GETHRMWORKCODE"),"GETHRMWORKCODE({表单.人员})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETHRMMANAGER",SalaryI18nUtil.getI18nLabel(100811,"返回指定人员直接上级"), funcDescUtil.get("GETHRMMANAGER"),"GETHRMMANAGER({表单.人员})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETHRMALLMANAGER",SalaryI18nUtil.getI18nLabel(100813,"返回指定人员所有上级"), funcDescUtil.get("GETHRMALLMANAGER"),"GETHRMALLMANAGER({表单.人员})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETHRMDEPARTMENT",SalaryI18nUtil.getI18nLabel(100815,"返回指定人员部门"), funcDescUtil.get("GETHRMDEPARTMENT"),"GETHRMDEPARTMENT({表单.人员})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETHRMSUBCOMPANY",SalaryI18nUtil.getI18nLabel(100817,"返回指定人员分部"), funcDescUtil.get("GETHRMSUBCOMPANY"),"GETHRMSUBCOMPANY({表单.人员})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETDEPARTMENTNAME",SalaryI18nUtil.getI18nLabel(100819,"返回指定部门名称"), funcDescUtil.get("GETDEPARTMENTNAME"),"GETDEPARTMENTNAME({表单.部门})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETDEPARTMENTCODE",SalaryI18nUtil.getI18nLabel(100821,"返回指定部门编号"), funcDescUtil.get("GETDEPARTMENTCODE"),"GETDEPARTMENTCODE({表单.部门})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETSUPERDEPARTMENT",SalaryI18nUtil.getI18nLabel(100823,"返回指定部门直接上级部门"), funcDescUtil.get("GETSUPERDEPARTMENT"),"GETSUPERDEPARTMENT({表单.部门})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETALLSUPERDEPARTMENT",SalaryI18nUtil.getI18nLabel(100825,"返回指定部门所有上级部门"), funcDescUtil.get("GETALLSUPERDEPARTMENT"),"GETALLSUPERDEPARTMENT({表单.部门})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETSUBCOMPANYNAME",SalaryI18nUtil.getI18nLabel(100827,"返回指定分部名称"), funcDescUtil.get("GETSUBCOMPANYNAME"),"GETSUBCOMPANYNAME({表单.分部})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETSUBCOMPANYCODE",SalaryI18nUtil.getI18nLabel(100829,"返回指定分部编号"), funcDescUtil.get("GETSUBCOMPANYCODE"),"GETSUBCOMPANYCODE({表单.分部})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETSUPERSUBCOMPANY",SalaryI18nUtil.getI18nLabel(100831,"返回指定分部直接上级分部"), funcDescUtil.get("GETSUPERSUBCOMPANY"),"GETSUPERSUBCOMPANY({表单.分部})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);
//
//		excelFunc = new ExcelFunc("GETALLSUPERSUBCOMPANY",SalaryI18nUtil.getI18nLabel(100833,"返回指定分部所有上级分部"), funcDescUtil.get("GETALLSUPERSUBCOMPANY"),"GETALLSUPERSUBCOMPANY({表单.分部})",null,nullParamDatas,"",CURRENTDATA);
//		funcs.add(excelFunc);

		excelFunc = new ExcelFunc("GETHRMNAME",SalaryI18nUtil.getI18nLabel(100833,"获取人员名称"), funcDescUtil.get("GETHRMNAME"),"GETHRMNAME({人员})",null,nullParamDatas,"",CURRENTDATA);
		funcs.add(excelFunc);

		excelFunc = new ExcelFunc("GETHRMMOBILE",SalaryI18nUtil.getI18nLabel(100833,"获取人员手机号码"), funcDescUtil.get("GETHRMMOBILE"),"GETHRMMOBILE({人员})",null,nullParamDatas,"",CURRENTDATA);
		funcs.add(excelFunc);

		return funcs;
	}
}
