فهرست منبع

公式相关:range

yangyj 2 سال پیش
والد
کامیت
305ae6df55

+ 131 - 6
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/RangeInfo.java

@@ -1,29 +1,37 @@
 package org.springblade.manager.dto;
 
-import io.swagger.annotations.ApiModel;
+import com.alibaba.fastjson.annotation.JSONField;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.StringUtil;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @author yangyj
  * @Date 2022/9/22 17:52
  * @description TODO
  */
-@Data
 public class RangeInfo {
     @ApiModelProperty(
             value = "设计值",
             required = true
     )
     private String design;
+    private List<Double> gDesign;
     @ApiModelProperty(
             value = "频率",
             required = true
     )
-    private Integer size;
+    private String size;
+    @JSONField(serialize = false)
+    private List<Integer> gSize;
     @ApiModelProperty("偏差范围")
     private String dev;
+    private List<String> gDev;
     @ApiModelProperty(
             value = "表单key",
             required = true
@@ -32,10 +40,127 @@ public class RangeInfo {
     @ApiModelProperty("表节点的唯一id")
     private Long pkId;
     @ApiModelProperty("命名有误此字段应为:合格数量,也可以用百分比表示如2%")
-    private String fail;
+    private String pass;
+    private List<Integer> gPass;
     @ApiModelProperty("容量")
-    private Integer capacity;
+    private String capacity;
+    private List<Integer> gCapacity;
     public Boolean verify(){
-        return Func.isNotBlank(design)&&((Func.isNotEmpty(size)&&size>0)||(Func.isNotEmpty(capacity)&&capacity>0))&&Func.isNotBlank(key)&&(Func.isNotEmpty(pkId)||Func.isNotBlank(dev));
+        return Func.isNotBlank(design)&&((Func.isNotBlank(size))||(Func.isNotBlank(capacity)))&&Func.isNotBlank(key)&&(Func.isNotEmpty(pkId)||Func.isNotBlank(dev));
+    }
+
+
+    public String getDesign() {
+        return design;
     }
+
+
+    public void setDesign(String design) {
+        if(Func.isNotBlank(this.design)){
+            this.gDesign= Arrays.stream(this.design.split("[^\\d.]+")).filter(Func::isNumeric).map(Func::toDouble).collect(Collectors.toList());
+        }
+        this.design = design;
+    }
+
+    public List<Double> getDesigns() {
+        return gDesign;
+    }
+
+
+    public String getSize() {
+        return size;
+    }
+
+    public Integer getSizeAt(int i){
+      return  gSize.size()>i?gSize.get(i):gSize.get(gSize.size()-1);
+    }
+
+    public void setSize(String size) {
+        if(Func.isNotBlank(this.size)){
+            this.gSize= Arrays.stream(this.size.split("[^\\d.]+")).filter(Func::isNumeric).map(Func::toInt).collect(Collectors.toList());
+        }
+        this.size = size;
+    }
+
+    public List<Integer> getSizeList() {
+        return gSize;
+    }
+
+
+    public String getDev() {
+        return dev;
+    }
+
+    public String getDevAt(int i){
+        return  gDev.size()>i?gDev.get(i):gDev.get(gDev.size()-1);
+    }
+
+    public Integer getFailAt(int i){
+        return getSizeAt(i)-getPassAt(i);
+    }
+
+    public void setDev(String dev) {
+        if(Func.isNotBlank(this.dev)){
+            this.gDev= Arrays.stream(this.dev.split("/+")).collect(Collectors.toList());
+        }
+        this.dev = dev;
+    }
+
+
+    public List<String> getDevList() {
+        return gDev;
+    }
+
+
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    public Long getPkId() {
+        return pkId;
+    }
+
+    public void setPkId(Long pkId) {
+        this.pkId = pkId;
+    }
+
+    public String getPass() {
+        return pass;
+    }
+
+    public void setPass(String pass) {
+        if(Func.isNotBlank(this.pass)){
+            this.gPass= Arrays.stream(this.pass.split("[^\\d.%]+")).filter(Func::isNumeric).map(Func::toInt).collect(Collectors.toList());
+        }
+        this.pass = pass;
+    }
+    public Integer getPassAt(int i){
+        return gPass.size()>i?gPass.get(i):gPass.get(gPass.size()-1);
+    }
+
+    public List<Integer> getPassList() {
+        return gPass;
+    }
+
+
+
+    public String getCapacity() {
+        return capacity;
+    }
+
+    public void setCapacity(String capacity) {
+        if(Func.isNotBlank(this.capacity)){
+            this.gCapacity= Arrays.stream(this.capacity.split("[^\\d.]+")).filter(Func::isNumeric).map(Func::toInt).collect(Collectors.toList());
+        }
+        this.capacity = capacity;
+    }
+
+
+
+
 }

+ 1 - 2
blade-service/blade-manager/src/main/java/com/mixsmart/utils/CustomFunction.java

@@ -1917,7 +1917,7 @@ public class CustomFunction {
 			int index =0;
 			if(NumberUtil.isNumber(indexObj.toString())){
 				index=StringUtils.handObj2Integer(indexObj)-1;
-			}else if(StringUtils.isEquals("last",indexObj)){
+			}else if(StringUtils.isEquals("last",indexObj)||StringUtils.isEmpty(indexObj)){
 				index=list.size()-1;
 			}
 			if(ListUtils.isNotEmpty(list) ){
@@ -2769,5 +2769,4 @@ public class CustomFunction {
 
 
 
-
 }

+ 47 - 30
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/FormulaController.java

@@ -23,14 +23,11 @@ import org.springblade.manager.dto.*;
 import org.springblade.manager.entity.ElementFormulaMapping;
 import org.springblade.manager.entity.Formula;
 import org.springblade.manager.entity.TextdictInfo;
-import org.springblade.manager.entity.WbsTree;
 import org.springblade.manager.service.IElementFormulaMappingService;
 import org.springblade.manager.service.IExcelTabService;
 import org.springblade.manager.service.ITextdictInfoService;
-import org.springblade.manager.service.IWbsTreeService;
 import org.springblade.manager.service.impl.FormulaServiceImpl;
 import org.springblade.manager.wrapper.FormulaWrapper;
-import org.springframework.beans.BeanUtils;
 import org.springframework.dao.EmptyResultDataAccessException;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.web.bind.annotation.*;
@@ -38,7 +35,7 @@ import springfox.documentation.annotations.ApiIgnore;
 
 import java.io.FileNotFoundException;
 import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
 
 /**
@@ -217,26 +214,7 @@ public class FormulaController {
             String bak=info.getKey().replaceAll("key_\\d+__","");
             info.setKey(info.getKey().replaceAll("__[\\d_]+",""));
             if(Func.isNotEmpty(info.getPkId())&&Func.isBlank(info.getDev())){
-                try{
-                    String dev="";
-                    /*偏差范围优先获取公式里的,其次是元素自带的*/
-                    List<Map<String,Object>> data =  this.jdbcTemplate.queryForList("select c.id,c.e_allow_deviation dev from(select init_table_name from m_wbs_tree_contract where p_key_id="+info.getPkId()+")  a join m_table_info b on a.init_table_name = b.tab_en_name JOIN m_wbs_form_element c on c.f_id=b.id where c.is_deleted=0 and c.e_key='"+info.getKey()+"'");
-                    if(Func.isNotEmpty(data)){
-                        String tmpDev = StringUtils.handleNull(data.get(0).get("dev"));
-                        String tmpId = StringUtils.handleNull(data.get(0).get("id"));
-                        if(Func.isBlank(tmpDev)&&Func.isNotBlank(tmpId)){
-                              List<Map<String,Object>> listMap = this.jdbcTemplate.queryForList("select b.dev from m_element_formula_mapping a join m_formula b on a.formula_id=b.id where LENGTH(b.dev)>0 and a.element_id="+tmpId+" ORDER BY b.scope desc limit 1");
-                              if(Func.isNotEmpty(listMap)){
-                                   dev=StringUtils.handleNull(listMap.get(0).get("dev"));
-                              }
-                        }else{
-                            dev=tmpDev;
-                        }
-                        info.setDev(dev);
-                    }
-                }catch (EmptyResultDataAccessException e){
-                   e.printStackTrace();
-                }
+                info.setDev(getDev(StringUtils.handleNull(info.getPkId())));
             }
             if(Func.isBlank(info.getDev())){
                info.setDev("-3,3");
@@ -247,18 +225,30 @@ public class FormulaController {
             if(Func.isNotEmpty(info.getCapacity())){
                 info.setSize(info.getCapacity());
             }
-            if(Func.isBlank(info.getFail())){
-                info.setFail(info.getSize().toString());
-            }else if(info.getFail().contains(StringPool.PERCENT)){
-                String tmp = info.getFail().replace(StringPool.PERCENT,"");
-                info.setFail(String.valueOf((int)Math.round(Double.parseDouble(tmp)*(double)info.getSize()/100)));
+            if(Func.isBlank(info.getPass())){
+                info.setPass(info.getSize());
             }
             Map<String,String> keymap = this.tabService.getTablbCols(info.getPkId().toString(),null);
             if(!keymap.containsKey(info.getKey())){
                 System.out.println("获取元素定位失败");
                 keymap.put(info.getKey(),bak);
             }
-            List<Object> data = CustomFunction.b445random(info.getSize(),info.getDesign(),info.getDev(),Func.toInt(info.getSize())-Func.toInt(info.getFail()),1);
+            List<Object> data =new ArrayList<>();
+            if(info.getDesigns().size()>0){
+                AtomicInteger i= new AtomicInteger();
+                List<Object> tmpList = info.getDesigns().stream()
+                        .map(e-> CustomFunction.b445random(info.getSizeAt(i.get()),e,info.getDevAt(i.get()),info.getFailAt(i.getAndIncrement()),1))
+                        .flatMap(Collection::stream)
+                        .collect(Collectors.toList());
+                if(Func.isNotEmpty(tmpList)){
+                    data.addAll(tmpList);
+                }
+            }else{
+                List<Object> tmpList = CustomFunction.b445random(info.getSizeList().get(0),info.getDesigns().get(0),info.getDevList().get(0),info.getSizeList().get(0)-info.getPassList().get(0),1);
+                if(Func.isNotEmpty(tmpList)){
+                    data.addAll(tmpList);
+                }
+            }
             String[] dw = keymap.get(info.getKey()).split(StringPool.SEMICOLON);
             Map<String,Object> result = new HashMap<>(dw.length*2);
             if(dw.length==1){
@@ -271,6 +261,9 @@ public class FormulaController {
                         break;
                     }
                 }
+                if(data.size()>dw.length){
+                    result.put("more",data.stream().skip(dw.length).map(StringUtils::handleNull).collect(Collectors.joining(StringPool.SEMICOLON)));
+                }
             }
             /*保存实测值参数*/
             TextdictInfo ti =  this.textdictInfoService.getOne(Wrappers.<TextdictInfo>lambdaQuery().eq(TextdictInfo::getType,8).eq(TextdictInfo::getTabId,info.getPkId()).eq(TextdictInfo::getColKey,info.getKey()));
@@ -290,6 +283,30 @@ public class FormulaController {
 
 
 
+    public String getDev(String pkId){
+        String dev="";
+        try{
+            /*偏差范围优先获取公式里的,其次是元素自带的*/
+            List<Map<String,Object>> data =  this.jdbcTemplate.queryForList("select c.id,c.e_allow_deviation dev from(select init_table_name from m_wbs_tree_contract where p_key_id="+pkId+")  a join m_table_info b on a.init_table_name = b.tab_en_name JOIN m_wbs_form_element c on c.f_id=b.id where c.is_deleted=0 and c.e_key='"+pkId+"'");
+            if(Func.isNotEmpty(data)){
+                String tmpDev = StringUtils.handleNull(data.get(0).get("dev"));
+                String tmpId = StringUtils.handleNull(data.get(0).get("id"));
+                if(Func.isBlank(tmpDev)&&Func.isNotBlank(tmpId)){
+                    List<Map<String,Object>> listMap = this.jdbcTemplate.queryForList("select b.dev from m_element_formula_mapping a join m_formula b on a.formula_id=b.id where LENGTH(b.dev)>0 and a.element_id="+tmpId+" ORDER BY b.scope desc limit 1");
+                    if(Func.isNotEmpty(listMap)){
+                        dev=StringUtils.handleNull(listMap.get(0).get("dev"));
+                    }
+                }else{
+                    dev=tmpDev;
+                }
+
+            }
+        }catch (EmptyResultDataAccessException e){
+            e.printStackTrace();
+        }
+        return dev;
+    }
+
 
 
 

+ 147 - 31
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -429,45 +429,55 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                             List<FormData>  ele = new ArrayList<>();
                             relyList.forEach(rely->{
                                 FormData formData=  this.tec.getFormDataMap().get(rely);
-                                if(formData!=null&&formData.getValues().stream().anyMatch(Func::isNotEmpty)){
+                                if(formData!=null&&formData.getValues().size()>0){
+                                    /*formData.getValues().stream().anyMatch(Func::isNotEmpty)*/
                                     ele.add(formData);
                                 }
                             });
                             if(ele.size()<relyList.size()){
                                 this.tec.getLog().append(fd.getEName()).append(fd.getFormula().getFormula().replaceAll("'", "")).append("不满足执行依赖;");
                             }
-                            LinkedHashMap<String,FormData> fdMap =new LinkedHashMap<>();
-                            ele.forEach(e->{
-                                fdMap.put(e.getCode(),e);
-                            });
-                            CompositeDataAccess cda = new CompositeDataAccess(fdMap);
-                            List<LocalVariable>  local= new ArrayList<>();
-                            while (cda.hasNext()){
-                                LinkedHashMap<String,ElementData> tip= cda.next();
-                                Map<String, Object> variable = new HashMap<>(this.constantMap);
-                                Map<String,Object> E=getMap(variable,"E");
-                                int index= new ArrayList<>(tip.values()).get(0).getIndex();
-                                for(Map.Entry<String,ElementData> se:tip.entrySet()){
-                                    Object value=se.getValue().getValue();
-                                    if(CustomFunction.isNumber(value)){
-                                        E.put(se.getKey(),StringUtils.obj2Double(value));
-                                    }else{
-                                        E.put(se.getKey(),value);
-                                    }
+                            if(fd.getCoordsList().size()>1&&f.split("[/+\\-*]").length>1){
+                                LinkedHashMap<String,FormData> fdMap =new LinkedHashMap<>();
+                                ele.forEach(e->{
+                                    fdMap.put(e.getCode(),e);
+                                });
+                                CompositeDataAccess cda = new CompositeDataAccess(fdMap);
+                                List<LocalVariable>  local= new ArrayList<>();
+                                while (cda.hasNext()){
+                                    LinkedHashMap<String,ElementData> tip= cda.next();
+                                    Map<String, Object> variable = new HashMap<>(this.constantMap);
+                                    Map<String,Object> E=getMap(variable,"E");
+                                    int index= new ArrayList<>(tip.values()).get(0).getIndex();
+                                    for(Map.Entry<String,ElementData> se:tip.entrySet()){
+                                        Object value=se.getValue().getValue();
+                                        if(CustomFunction.isNumber(value)){
+                                            E.put(se.getKey(),StringUtils.obj2Double(value));
+                                        }else{
+                                            E.put(se.getKey(),value);
+                                        }
 
+                                    }
+                                    local.add(new LocalVariable(index,f,variable));
                                 }
-                                local.add(new LocalVariable(index,f,variable));
-                            }
-                            if(local.size()>0){
-                                List<Object> values = slice(local,this.constantMap,f);
-                                if(values.size()>fd.getValues().size()){
-                                    /*当生成的数据超过实际容量的时候,会自动合并到第一个单元格*/
-                                    fd.getValues().get(0).setValue(values.stream().filter(Func::isNotEmpty).map(StringUtils::handleNull).collect(Collectors.joining("、")));
-                                }else{
-                                    for(int n=0;n<values.size();n++){
-                                        fd.getValues().get(n).setValue(values.get(n));
+                                if(local.size()>0){
+                                    List<Object> values = slice(local,this.constantMap,f);
+                                    if(values.size()>fd.getValues().size()){
+                                        /*当生成的数据超过实际容量的时候,会自动合并到第一个单元格*/
+                                        fd.getValues().get(0).setValue(values.stream().filter(Func::isNotEmpty).map(StringUtils::handleNull).collect(Collectors.joining("、")));
+                                    }else{
+                                        for(int n=0;n<values.size();n++){
+                                            fd.getValues().get(n).setValue(values.get(n));
+                                        }
                                     }
                                 }
+                            }else{
+                                Map<String,Object> E = (Map<String, Object>) currentMap.computeIfAbsent("E",(k)-> new HashMap<>());
+                                ele.forEach(e->{
+                                    E.put(e.getCode(),e.getValues().stream().map(ElementData::getValue).collect(Collectors.toList()));
+                                });
+                                Object data =Expression.parse(formula.getFormula()).calculate(currentMap);
+                                write(fd,data);
                             }
                         }else{
                             Object data =Expression.parse(formula.getFormula()).calculate(currentMap);
@@ -653,6 +663,113 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
      * 先把公式脚本需要聚合部分预处理
      * */
     public void  polymerization(FormData fd){
+        Formula formula = fd.getFormula();
+        if(Func.isNotEmpty(formula)){
+            String f=formula.getFormula();
+            try {
+                if(Func.isNotBlank(f)) {
+                    if (f.contains(CustomFunction.CLASS_CALL+"quantity(")) {
+                        /*聚合*/
+                        Matcher m = POLY.matcher(f);
+                        while (m.find()) {
+                            Object data=null;
+                            if(f.contains("quantity(")){
+                                String s = m.group(2).split(",")[0].replaceAll("[E\\[\\]']","");
+                                Map<String,List<Map<String,Object>>> textInfoMap= (Map<String, List<Map<String, Object>>>) this.constantMap.getOrDefault(TEXT_INFO_MAP,new HashMap<>());
+                                List<Map<String,Object>> tableColKeyVal= textInfoMap.get(s);
+                                if(Func.isNotEmpty(tableColKeyVal)){
+                                    data = tableColKeyVal.stream().map(map-> BeanUtil.toBean(JSON.parseObject(map.get("val").toString()),RangeInfo.class)).map(RangeInfo::getPass).findFirst().orElseGet(String::new);
+                                }else{
+                                    /*手动计算*/
+                                    System.out.println("");
+                                }
+                            }else{
+                                Map<String, Object> currentMap = new HashMap<>(this.constantMap);
+                                List<String> relyList = fd.getFormula().getRelyList();
+                                Map<String, Object> E = getMap(currentMap, "E");
+                                for(String k:relyList){
+                                    FormData e=this.formDataMap.get(k);
+                                    if(e==null){
+                                        this.tec.getLog().append(fd.getEName()).append("缺失依赖:").append(k).append(";");
+                                        return;
+                                    }
+                                    E.put(e.getCode(),e.getValues().stream().map(ElementData::getValue).collect(Collectors.toList()));
+                                }
+                                data = Expression.parse(CustomFunction.CLASS_CALL + m.group()).calculate(currentMap);
+                            }
+                            String key ="HA"+HashUtil.identityHashCode(data);
+                            this.constantMap.put(key,data);
+                            f = f.replace(CustomFunction.CLASS_CALL + m.group(), key);
+                        }
+                        fd.getFormula().setFormula(f);
+                    }else if(f.contains(CustomFunction.CLASS_CALL+"proportion(")||f.contains(CustomFunction.CLASS_CALL+"ladder(")||f.contains(CustomFunction.CLASS_CALL+"major(")||f.contains(CustomFunction.CLASS_CALL+"reasonable(")
+                            ||f.contains(CustomFunction.CLASS_CALL+"goodSize(")){
+                        String tf=f.replaceAll("^T\\(com.mixsmart.utils.CustomFunction\\)\\.\\w+\\(","").replaceAll("[)]$","");
+                        List<FormData> target = new ArrayList<>();
+                        String[] tfa=tf.split(",");
+                        for(String code:tfa){
+                            code=code.replace("E['","").replace("']","");
+                            FormData fdt=this.formDataMap.get(code);
+                            if(fdt!=null){
+                                target.add(fdt);
+                            }
+                        }
+                        if(Func.isNotEmpty(target)){
+                            if(StringUtils.isEmpty(formula.getScale())){
+                                formula.setScale(2);
+                            }
+                            Object data=null;
+                            if(f.contains("proportion")){
+                                data= CustomFunction.proportion(target.stream().map(FormData::getValues).filter(Func::isNotEmpty).map(e->e.get(0).getValue()).collect(Collectors.toList()), "优良");
+                            }else if(f.contains("ladder")){
+                                data= CustomFunction.ladder(target.stream().map(FormData::getValues).filter(Func::isNotEmpty).map(e->e.get(0).getValue()).collect(Collectors.toList()));
+                            }else if(f.contains("major")){
+                                data= CustomFunction.major(target.stream().map(FormData::getValues).filter(Func::isNotEmpty).map(e->e.get(0).getValue()).collect(Collectors.toList()));
+                            }else if(f.contains("reasonable")){
+                                data= CustomFunction.reasonable(target.stream().map(FormData::getValues).filter(Func::isNotEmpty).map(e->e.get(0).getValue()).collect(Collectors.toList()));
+                            }else if(f.contains("goodSize")){
+                                data= CustomFunction.goodSize(target.stream().map(FormData::getValues).filter(Func::isNotEmpty).map(e->e.get(0).getValue()).collect(Collectors.toList()),"优良");
+                            }
+                            String key ="HA"+HashUtil.identityHashCode(data);
+                            fd.getFormula().setFormula(key);
+                            this.constantMap.put(key,data);
+                        }else{
+                            fd.getFormula().setFormula(StringPool.EMPTY);
+                        }
+                    }else if(f.contains(CustomFunction.CLASS_CALL+"ifelse(")){
+                        Matcher im =IF.matcher(f);
+                        while (im.find()){
+                            String rep =im.group();
+                            //Map<String, Object> currentMap = new HashMap<>(this.constantMap);
+                            Matcher fm=P.matcher(rep);
+                            while (fm.find()){
+                                FormData kf=  this.formDataMap.get(fm.group().replaceAll("'",""));
+                                if(kf!=null&&!kf.empty()){
+                                    ElementData ed= kf.getValues().get(0);
+                                    if(ed!=null&&Func.isNotEmpty(ed.getValue())){
+                                        rep= rep.replace("E["+fm.group()+"]",ed.getValue().toString());
+                                        rep="'"+rep+"'";
+                                        f=f.replace(im.group(),rep);
+                                    }else{
+                                        f="";
+                                    }
+                                }else{
+                                    f="";
+                                }
+                            }
+                        }
+                        formula.setFormula(f);
+                    }
+                    relyParse(fd.getFormula());
+                    StaticLog.info("聚合处理");
+                }
+            }catch (Exception e){
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public void  polymerizationBak(FormData fd){
         Formula formula = fd.getFormula();
         if(Func.isNotEmpty(formula)){
             String f=formula.getFormula();
@@ -670,7 +787,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                                 Map<String,List<Map<String,Object>>> textInfoMap= (Map<String, List<Map<String, Object>>>) this.constantMap.getOrDefault(TEXT_INFO_MAP,new HashMap<>());
                                 List<Map<String,Object>> tableColKeyVal= textInfoMap.get(s);
                                 if(Func.isNotEmpty(tableColKeyVal)){
-                                    data = tableColKeyVal.stream().map(map-> BeanUtil.toBean(JSON.parseObject(map.get("val").toString()),RangeInfo.class)).map(RangeInfo::getFail).findFirst().orElseGet(String::new);
+                                    data = tableColKeyVal.stream().map(map-> BeanUtil.toBean(JSON.parseObject(map.get("val").toString()),RangeInfo.class)).map(RangeInfo::getPass).findFirst().orElseGet(String::new);
                                 }else{
                                     /*手动计算*/
                                     System.out.println("");
@@ -762,7 +879,6 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
     }
 
 
-
     public void batch(){
         List<Map<String,Object>> list = this.jdbcTemplate.queryForList("select id,formula from m_formula where (formula like '%reasonable%' or formula like '%proportion%' or formula like '%goodSize%')");
         if(ListUtils.isNotEmpty(list)){