Browse Source

公式相关

yangyj 3 years ago
parent
commit
ef87ac7f75

+ 22 - 22
blade-service/blade-manager/src/main/java/com/mixsmart/utils/Captcha.java

@@ -16,7 +16,7 @@ import java.util.Random;
  * @since JDK版本大于等于1.6 2016年1月25日
  */
 public class Captcha {
-	private ByteArrayInputStream image;// 图像
+	/*private ByteArrayInputStream image;// 图像
 	private String str;// 验证码
 	private int imageW;
 	private int imageH;
@@ -24,28 +24,28 @@ public class Captcha {
 	private Random random = new Random();
 	private BufferedImage buffImage;
 	// 验证码序列。
-	/*
+	*//*
 	 * private static final char[] randomSequence = new char[] { 'A', 'B', 'C',
 	 * 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
 	 * 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0','1', '2', '3', '4', '5',
 	 * '6', '7','8', '9' };
-	 */
+	 *//*
 	private static final char[] randomSequence = new char[] { 'A', 'B', 'C',
 			'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S',
 			'T', 'U', 'V', 'W', 'X', 'Y', '3', '4', '5', '6', '7', '8', '9' };
 
-	/*
+	*//*
 	 * private static final char[] randomSequence = new char[] {'0','1', '2',
 	 * '3', '4', '5', '6', '7','8', '9' };
-	 */
+	 *//*
 
-	/**
+	*//**
 	 * 带参数的构造函数
 	 * 
 	 * @param imageW 图像宽度
 	 * @param imageH 图像高度
 	 * @param fontSize 字体大小
-	 */
+	 *//*
 	public Captcha(int imageW, int imageH, int fontSize) {
 		this.imageW = imageW;
 		this.imageH = imageH;
@@ -53,25 +53,25 @@ public class Captcha {
 		init();// 初始化属性
 	}
 
-	/**
+	*//**
 	 * 获取获取图像对象
 	 * @return 返回图像对象
-	 */
+	 *//*
 	public ByteArrayInputStream getImage() {
 		return this.image;
 	}
 
-	/**
+	*//**
 	 * 获取随机生成的验证码的字符串或字母
 	 * @return 返回验证码字母或数字
-	 */
+	 *//*
 	public String getString() {
 		return this.str;
 	}
 
-	/**
+	*//**
 	 * 初始化
-	 */
+	 *//*
 	private void init() {
 		// 在内存中创建图象
 		buffImage = new BufferedImage(imageW, imageH, BufferedImage.TYPE_INT_RGB);
@@ -88,7 +88,7 @@ public class Captcha {
 		// 随机产生155条干扰线,使图象中的认证码不易被其它程序探测到
 
 		// g.setColor(getRandColor(160,200));
-		/*
+		*//*
 		 * g.setColor(Color.BLUE); g.setStroke(new BasicStroke(2,
 		 * BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND)); int[] xPoints = new
 		 * int[2]; int[] yPoints = new int[2];
@@ -96,7 +96,7 @@ public class Captcha {
 		 * for (int i=0;i<2;i++ ){ int x = random.nextInt(imageW); int y =
 		 * random.nextInt(imageH); xPoints[i] = x; yPoints[i] = y; }
 		 * g.drawPolygon(xPoints, yPoints, xPoints.length);
-		 */
+		 *//*
 
 		FontMetrics fm = g.getFontMetrics();
 		int starX = (imageW - fm.stringWidth("A B C D")) / 2;
@@ -136,12 +136,12 @@ public class Captcha {
 		this.image = input;
 	}
 
-	/**
+	*//**
 	 * 随机获取Y坐标
 	 * 
 	 * @param strH
 	 * @return Y坐标值
-	 */
+	 *//*
 	private int randY(int strH) {
 		int y = 0;
 		int count = 0;
@@ -160,7 +160,7 @@ public class Captcha {
 		return y;
 	}
 
-	/**
+	*//**
 	 * 
 	 * 获取扭曲后的x轴位置
 	 *
@@ -170,7 +170,7 @@ public class Captcha {
 	 * @param xPosition x位置
 	 * @param yPosition y位置
 	 * @return 返回x轴位置
-	 */
+	 *//*
 	private int getXPosition4Twist(double dPhase, double dMultValue,
 			int height, int xPosition, int yPosition) {
 		double PI = 3.1415926535897932384626433832799; // 此值越大,扭曲程度越大
@@ -179,11 +179,11 @@ public class Captcha {
 		return xPosition + (int) (dy * dMultValue);
 	}
 
-	/**
+	*//**
 	 * 正弦曲线Wave扭曲图片
 	 * 
 	 * @return BufferedImage 
-	 */
+	 *//*
 	private BufferedImage twistImage() {
 		double dMultValue = 8;// random.nextInt(7) + 8;// 波形的幅度倍数,越大扭曲的程序越高,一般为3
 		double dPhase = random.nextInt(6);// 波形的起始相位,取值区间(0-2*PI)
@@ -226,5 +226,5 @@ public class Captcha {
 
 	public BufferedImage getBuffImage() {
 		return buffImage;
-	}
+	}*/
 }

+ 77 - 417
blade-service/blade-manager/src/main/java/com/mixsmart/utils/CustomFunction.java

@@ -8,6 +8,9 @@ import org.springblade.core.tool.utils.Func;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
 import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -219,32 +222,6 @@ public class CustomFunction {
 		return result;
 	}
 
-     /*FUNC.groupByStake(桩号,宽幅,数据,模式)*/
-	public  static Object  groupByStake(Object stake,Object line,Object data ,Object mode){
-		if(stake instanceof List){
-			List<Object> _stake =(List<Object>) removeByReg(stake,"ZD\\d*");
-			List<Object> datas = (List<Object>) data;
-			List<Object> result = new ArrayList<>();
-            int max =(int) Math.ceil((double)datas.size()/Double.parseDouble(line.toString()));
-            for(int i=0;i<max&&i<_stake.size();i++){
-            	String s = handleNull(_stake.get(i));
-            	if(StringUtils.isEquals(1,mode)){
-					if(Pattern.matches(".+V$",s)){
-						int ln=StringUtils.handleObj2Integer(line);
-						result.addAll((List<Object>)subList(datas,i*ln+1,(i+1)*ln));
-					}
-				}else{
-					if(!Pattern.matches(".+V$",s)){
-						int ln=StringUtils.handleObj2Integer(line);
-						result.addAll((List<Object>)subList(datas,i*ln+1,(i+1)*ln));
-					}
-				}
-
-			}
-            return result;
-		}
-		return null;
-	}
 
 	/**
 	 * 
@@ -495,39 +472,7 @@ public class CustomFunction {
 		return 0;
 	}
 	
-	/**
-	 * 根据桩号类型生成桩号
-	 * @param
-	 * @return
-	 * @author:rock
-	 * @time:2020年4月30日 下午6:09:26
-	 */
-	public static String createStationOld(Object stationType) {
-		if(StringUtils.isEmpty(stationType)) {
-			return null;
-		}
-		String value = "K";
-		String st = String.valueOf(stationType);
-		if(st.contains(value)) {
-			return st;
-		}
-		int len = st.length();
-		if(st.contains(".")) {
-			len = st.indexOf(".");
-		}
-		if(len > 3) {
-			value = value + st.substring(0, len - 3) + "+" + st.substring(len - 3);
-		} else if(len == 3) {
-			value = value + "0+" + st;
-		} else if(len < 3){
-			if(len == 1) {
-				value = value + "0+00" + st;
-			} else if(len == 2){
-				value = value + "0+0" + st;
-			}
-		}
-		return value;
-	}
+
 
 	/**
 	 * @Description  根据桩号类型生成桩号
@@ -729,39 +674,7 @@ public class CustomFunction {
 
 
 
-	/**
-	 * 求列表内数据的平均值
-	 * @param scaleObj 平均值保留小数位数,0时为整数
-	 * @param list
-	 * @return
-	 * @author:rock
-	 * @time:2020年5月8日 下午4:20:10
-	 */
-	public static Object avg(Integer scaleObj, List<Object> list) {
-		Object result = null;
-		if(ListUtils.isNotEmpty(list)){
-			int size = list.size();
-			if(list != null && size > 0) {
-				int scale = objectChangeInt(scaleObj);
-				double sum = 0;
-				for (Object data : list) {
-					if(StringUtils.isNumber(data)) {
-						sum += Double.parseDouble(data.toString());
-					} else {
-						//非数字类型则忽略,且总数大小要减一
-						size--;
-					}
-				}
-				if(scale == 0) {
-					//整数处理
-					result = (int)(sum / size);
-				} else if(scale > 0) {
-					result = new BigDecimal(sum).divide(new BigDecimal(size), scale, ROUND_HALF_UP);
-				}
-			}
-		}
-		return result;
-	}
+
 	public static boolean isNumber(Object value) {
 		if(Func.isEmpty(value)){
 			return  false;
@@ -778,68 +691,49 @@ public class CustomFunction {
 		return !isNumber(value);
 	}
 
-	public static Object avg( List<Object> list) {
-		 if(list!=null){
-			 if(list.stream().noneMatch(CustomFunction::isNotNumber)){
-				   OptionalDouble opd =  list.stream().map(String::valueOf).mapToDouble(Double::parseDouble).average();
-			       return  opd.orElse(0);
-			 }
-		 }
-	     return null;
-	}
+
 
 	
-	/**
-	 * 列表求和
-	 * @param scaleObj
-	 * @param list
-	 * @return
-	 * @author:rock
-	 * @time:2020年5月18日 下午2:26:26
-	 */
-	public static Object sum(Object scaleObj, List<Object> list) {
-		Object result = null;
-		if(list != null && list.size() > 0) {
-			int scale = objectChangeInt(scaleObj);
-			double sum = 0;
-			for (Object data : list) {
-				if(StringUtils.isNumber(data)) {
-					sum += Double.parseDouble(data.toString());
-				}
-			}
-			if(scale == 0) {
-				//整数
-				result = (int)sum;
-			} else if(scale > 0) {
-				//浮点数
-				BigDecimal big = new BigDecimal(sum);
-				result = big.setScale(scale, ROUND_HALF_UP);
-			}
+
+	public static Object sum(List<Object> list) {
+		   if(ListUtils.isNotEmpty(list)){
+		   	   return    list.stream().filter(StringUtils::isNumber).map(StringUtils::handleNull).mapToDouble(Double::parseDouble).sum();
+		   }
+           return "";
+	}
+	public static Object avg(List<Object> list) {
+		if(ListUtils.isNotEmpty(list)){
+			return    list.stream().filter(StringUtils::isNumber).map(StringUtils::handleNull).mapToDouble(Double::parseDouble).average();
 		}
-		return result;
+		return "";
 	}
-	
-	/**
-	 * 桩长实际值=桩长设计值+范围值(0~0.1m)的随机数
-	 * @param designValue
-	 * @param range
-	 * @param scale
-	 * @return
-	 * @author:rock
-	 * @time:2020年5月19日 下午3:57:26
-	 */
-	public static Object pileLengthValue(Object designValue, Object range, Object scale) {
-		if(StringUtils.isNumber(designValue) && StringUtils.isNotEmpty(range)) {
-			int sc = objectChangeInt(scale);
-			Object randomValue = getRangeRandomValue(0, range, sc);
-			if(StringUtils.isNumber(randomValue)) {
-				BigDecimal big = new BigDecimal(designValue.toString()).add(new BigDecimal(randomValue.toString()));
-				designValue = big.setScale(sc, ROUND_HALF_UP);
-			}
+
+	public static Object max(List<Object> list) {
+		if(ListUtils.isNotEmpty(list)){
+			return    list.stream().filter(StringUtils::isNumber).map(StringUtils::handleNull).mapToDouble(Double::parseDouble).max();
 		}
-		return designValue;
+		return "";
 	}
-	
+
+	public static Object min(List<Object> list) {
+		if(ListUtils.isNotEmpty(list)){
+			return    list.stream().filter(StringUtils::isNumber).map(StringUtils::handleNull).mapToDouble(Double::parseDouble).min();
+		}
+		return "";
+	}
+
+	public static Object count(List<Object> list) {
+		if(ListUtils.isNotEmpty(list)){
+			return   list.stream().filter(StringUtils::isNumber).map(StringUtils::handleNull).mapToDouble(Double::parseDouble).count();
+		}
+		return "";
+	}
+
+
+
+
+
+
 	/**
 	 * 判断value是否存在range范围内
 	 * @param value
@@ -1504,8 +1398,6 @@ public class CustomFunction {
 
 
 
-
-
 	public static Object k2d(Object k){
 		Matcher mt = RegexUtils.matcher("[A-Z]*(\\d*)\\+([\\d|\\.]*)",k.toString());
 		if(mt.find()){
@@ -1521,91 +1413,14 @@ public class CustomFunction {
 	 * @Author yangyj
 	 * @Date 2020.12.10 15:10
 	 **/
-	public static Object sqrt(Object a,Object scale) {
-		if(StringUtils.isNumber(a)&&StringUtils.isNumber(scale)){
-			Double d = Math.sqrt(Double.parseDouble(a.toString()));
-			BigDecimal r = new BigDecimal(d);
-			return  r.setScale((int)Double.parseDouble(scale.toString()), ROUND_HALF_UP);
-		}
-		return 0;
-	}
-	/**
-	 * @Description   开方
-	 * @Param [a:被开方数 结果取整]
-	 * @return java.lang.Object
-	 * @Author yangyj
-	 * @Date 2020.12.10 15:10
-	 **/
 	public static Object sqrt(Object a) {
 		if(StringUtils.isNumber(a)){
-			return sqrt(a,0);
-		}
-		return 0;
-	}
-
-	/**
-	 * @Description   两者最大值
-	 * @Param [a:被开方数, scale:结果的小数位]
-	 * @return java.lang.Object
-	 * @Author yangyj
-	 * @Date 2020.12.10 15:10
-	 **/
-	public static Object max(Object a,Object b,Object scale) {
-		if(StringUtils.isNumber(a)&&StringUtils.isNumber(b)&&StringUtils.isNumber(scale)){
-			Double d = Math.max(Double.parseDouble(a.toString()),Double.parseDouble(b.toString()));
-			BigDecimal r = new BigDecimal(d);
-			return  r.setScale((int)Double.parseDouble(scale.toString()), ROUND_HALF_UP);
+			return  Math.sqrt(Double.parseDouble(a.toString()));
 		}
-		return 0;
+		return "";
 	}
 
-	/**
-	 * @Description   两者最大值
-	 * @Param [a:被开方数, scale:结果取整]
-	 * @return java.lang.Object
-	 * @Author yangyj
-	 * @Date 2020.12.10 15:10
-	 **/
-	public static Object max(Object a,Object b) {
-		a=parse(a);
-		b=parse(b);
-		if(StringUtils.isNumber(a)&&StringUtils.isNumber(b)){
-			return  max(a,b,0);
-		}
-		return 0;
-	}
 
-    /**
-     * @Description   两者最小值
-     * @Param [a:被开方数, scale:结果的小数位]
-     * @return java.lang.Object
-     * @Author yangyj
-     * @Date 2020.12.10 15:10
-     **/
-    public static Object min(Object a,Object b,Object scale) {
-        if(StringUtils.isNumber(a)&&StringUtils.isNumber(b)&&StringUtils.isNumber(scale)){
-            double d = Math.min(Double.parseDouble(a.toString()),Double.parseDouble(b.toString()));
-            BigDecimal r = new BigDecimal(d);
-            return  r.setScale((int)Double.parseDouble(scale.toString()), ROUND_HALF_UP);
-        }
-        return 0;
-    }
-
-    /**
-     * @Description   两者最小值
-     * @Param [a:被开方数, scale:结果取整]
-     * @return java.lang.Object
-     * @Author yangyj
-     * @Date 2020.12.10 15:10
-     **/
-    public static Object min(Object a,Object b) {
-    	a=parse(a);
-    	b=parse(b);
-        if(StringUtils.isNumber(a)&&StringUtils.isNumber(b)){
-            return  min(a,b,0);
-        }
-        return 0;
-    }
 
 	/**
 	 * @Description   平方
@@ -1614,13 +1429,11 @@ public class CustomFunction {
 	 * @Author yangyj
 	 * @Date 2020.12.10 15:10
 	 **/
-	public static Object pow(Object a,Object b,Object scale) {
-		if(StringUtils.isNumber(a)&&StringUtils.isNumber(b)&&StringUtils.isNumber(scale)){
-			double d = Math.pow(Double.parseDouble(a.toString()),Double.parseDouble(b.toString()));
-			BigDecimal r = new BigDecimal(d);
-			return  r.setScale((int)Double.parseDouble(scale.toString()), ROUND_HALF_UP);
+	public static Object pow(Object a,Object b) {
+		if(StringUtils.isNumber(a)&&StringUtils.isNumber(b)){
+		     return  Math.pow(Double.parseDouble(a.toString()),Double.parseDouble(b.toString()));
 		}
-		return 0;
+		return "";
 	}
 
 
@@ -1637,19 +1450,7 @@ public class CustomFunction {
 	}
 
 
-	/**
-	 * @Description   平方
-	 * @Param [a:底數, scale:结果取整]
-	 * @return java.lang.Object
-	 * @Author yangyj
-	 * @Date 2020.12.10 15:10
-	 **/
-	public static Object pow(Object a,Object b) {
-		if(StringUtils.isNumber(a)&&StringUtils.isNumber(b)){
-			return  pow(a,b,0);
-		}
-		return 0;
-	}
+
 	/**
 	 * @Description   EL表达式解析
 	 * @return java.lang.Object
@@ -2494,9 +2295,10 @@ public class CustomFunction {
 	 * @Author yangyj
 	 * @Date 2021.01.29 14:04
 	 **/
-	public static Object ifContains(Object o1 ,Object o2){
-		if(StringUtils.isNotEmpty(o1)&&StringUtils.isNotEmpty(o2)){
-			return o1.toString().contains(o2.toString());
+	public static Object contains(Object o1 ,Object o2){
+		if(o1!=null&&StringUtils.isNotEmpty(o2)){
+			List<Object> datas = obj2List(o1);
+			return datas.stream().map(StringUtils::handleNull).anyMatch(e->e.contains(o2.toString()));
 		}
 		return false;
 	}
@@ -2507,76 +2309,8 @@ public class CustomFunction {
 	 * @Author yangyj
 	 * @Date 2021.08.23 16:51
 	 **/
-	public static Object isEq(Object o1 ,Object o2){
-		if(StringUtils.isNotEmpty(o1)||StringUtils.isNotEmpty(o2)){
-		      return  StringUtils.isEquals(o1,o2);
-		}
-		return false;
-	}
-		/**
-         * @yangyj
-         * 单极点区间范围判断
-         * @param value 数据
-         * @param o1    比较对象1
-         * @param o2    比较对象2
-         * @param type  <=&&<
-         * @return
-         */
-	public static  Object isVisible(Object value,Object o1 ,Object o2,Object type){
-		if(o1!=null&&o2!=null){
-			double fi =Double.parseDouble(o1.toString())-Double.parseDouble(o2.toString());
-			if(type.equals("<=")){
-				if(fi<=0){
-					return value;
-				}
-			}else{
-				if(fi<0){
-					return value;
-				}
-			}
-		}
-		//如果不存在判断条件对象的值
-		if((o1==null||o2==null)&&type.equals("<=")){
-            return value;
-        }
-        return "";
-	}
-
-	/**@yangyj
-	 * 双极点区间范围判断
-	 * @param value
-	 * @param o1
-	 * @param o2
-	 * @param o3
-	 * @return
-	 */
-	public static  Object isVisibleD(Object value,Object o1 ,Object o2,Object o3){
-		Object r1=isVisible(value,o1,o2,"<");
-		Object r2=isVisible(value,o2,o3,"<=");
-		if(r1!=""&&r2!=""){
-			return  value;
-		}
-		return "";
-	}
-
-
-		/**@yangyj
-         *获取列表最小值
-         * @return
-         */
-	public static  Object getListMin(Object object){
-		if(object instanceof  ArrayList){
-			ArrayList<Object> arrayList = (ArrayList<Object>) object;
-			if(ListUtils.isNotEmpty(arrayList)){
-				arrayList.sort(((o1, o2) -> {
-					Integer io1= Integer.valueOf(o1.toString());
-					Integer io2 = Integer.valueOf(o2.toString());
-					return io1.compareTo(io2);
-				}));
-				return arrayList.get(0);
-			}
-		}
-		return "";
+	public static Object eq(Object o1 ,Object o2){
+		return  StringUtils.isEquals(o1,o2);
 	}
 
 
@@ -2621,26 +2355,6 @@ public class CustomFunction {
 		}
 		return "";
 	}
-	/**
-	 * @Description   指定表字段 数据
-	 * @Param [table, field]
-	 * @return java.lang.Object
-	 * @Author yangyj
-	 * @Date 2022.10.11 11:28
-	 **/
-	public static Object getTaleRow(Object table,Object field){
-		if(table!=null&&field!=null){
-			List<Object>  datas = new ArrayList<Object>();
-			ArrayList<HashMap<String,Object>> list=objToArray(table);
-			if(ListUtils.isNotEmpty(list)){
-				for(HashMap<String, Object> ob:list){
-					datas.add(ob.get(field));
-				}
-			}
-			return datas;
-		}
-      return null;
-	}
 
 
 
@@ -2667,65 +2381,32 @@ public class CustomFunction {
 	 * @Author yangyj
 	 * @Date 2021.08.09 14:37
 	 **/
-	public static  Object getListnum(Object o,Integer type){
+	public static  Object listAt(Object o,Integer index){
 		if(o == null){
 			return "";
 		}
 		if(o instanceof List){
-			List<Object> list = (List<Object>) o;
-			if(ListUtils.isNotEmpty(list) || list.size() > type){
-				return list.get(type);
+			List<Object> list = obj2ListNe(o);
+			if(ListUtils.isNotEmpty(list) ){
+			    if(index>0){
+			    	if(list.size()>index){
+			    		return list.get(index);
+					}
+				}else{
+			       return list.get(list.size()+index);
+				}
 			}
 		}else{
 			return o.toString();
 		}
 		return "";
 	}
-	/**
-	 * @Description 根据参数,取包含有对应参数的list
-	 * @Param [list],o是list,str是包含的字符串,type=1包含,2未包含
-	 * @return java.lang.Object
-	 * @Author yangyj
-	 * @Date 2021.08.09 14:37
-	 **/
-	public static  Object getListtype(Object o,Object objstr,Integer type){
-		if(o == null || type == null){
-			return "";
-		}
-		String str = "";
-		if(objstr != null ){
-			str =objstr.toString();
-		}
-		List<Object> result = new ArrayList<>();
-		if(o instanceof List){
-			List<Object> list = (List<Object>) o;
-			if(ListUtils.isNotEmpty(list)){
-				for(Object obj : list){
-					if(obj == null){
-						continue;
-					}
-					if(type == 2){
-						if(!obj.toString().contains(str)){
-							result.add(obj);
-						}
-					}else{
-						if(obj.toString().contains(str)){
-							result.add(obj);
-						}
-					}
 
-				}
-				return result;
-			}
-		}else{
-			if(type == 2 && !o.toString().contains(str)){
-				return o.toString();
-			}else if(type == 1 && o.toString().contains(str)){
-				return o.toString();
-			}
-		}
-		return "";
+	public static List<Object> obj2ListNe(Object obj){
+		List<Object> list = obj2List(obj);
+		return  list.parallelStream().filter(StringUtils::isNotEmpty).collect(Collectors.toList());
 	}
+
 	/**
 	 * @Description 过滤掉List中的空对象
 	 * @Param [o]
@@ -2908,6 +2589,7 @@ public class CustomFunction {
 		}
 		return "";
 	}
+
 	public static  Object repeat(Object data){
 		List<Object> result = new ArrayList<>();
 		if(data!=null){
@@ -3474,32 +3156,6 @@ public class CustomFunction {
 
 
 
-	public static Object  doForTableList(Object ot,Object type){
-		if(ot!=null){
-			//记录表46:构造深度平均值
-			if(type.toString().equals("0")){
-				List<Object>  datas = new ArrayList<Object>();
-				if(ot instanceof  HashMap){
-					HashMap mp = (HashMap) ot;
-					if(mp.size()>0){
-						datas.add(mp.get("TdGZSD"));
-					}
-				}else if(ot instanceof  ArrayList){
-					ArrayList<HashMap<String,Object>> list = (ArrayList<HashMap<String, Object>>) ot;
-					if(ListUtils.isNotEmpty(list)){
-						for(HashMap<String, Object> ob:list){
-							datas.add(ob.get("TdGZSD"));
-						}
-					}
-				}
-				return  avg(1,datas);
-			}
-
-		}
-
-		return  null;
-	}
-
 
 
 
@@ -3668,9 +3324,13 @@ public class CustomFunction {
 	}
 
 
+/*
+	public static void main(String[] args)  {
+		   List<Object> list  = new ArrayList<>(Arrays.asList(1,2,2,4,5,6,7,8,9,0));
+		   System.out.println(join(list));
+		   System.out.println(join(list,";"));
+	}
 
-//	public static void main(String[] args)  {
-//		System.out.println(Expression.parse("15<=2").calculate().toString());
-//	}
+ */
 
 }

+ 32 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/FormulaTurnPoint.java

@@ -0,0 +1,32 @@
+package org.springblade.manager.formula.impl;
+
+import com.mixsmart.utils.StringUtils;
+import lombok.Data;
+import org.springblade.manager.dto.FormData;
+import org.springblade.manager.formula.FormulaStrategy;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author yangyj
+ * @Date 2022/8/10 16:16
+ * @description TODO
+ */
+@Component
+@Data
+public class FormulaTurnPoint implements FormulaStrategy {
+    private FormData cur;
+    @Override
+    public void execute(List<FormData> fds, Map<String, Object> constantMap) {
+
+    }
+
+    @Override
+    public boolean accept(FormData fd) {
+        this.cur=fd;
+        String f= fd.getFormula().getFormula();
+        return StringUtils.isNotEmpty(f)&&f.startsWith("TURN<");
+    }
+}