فهرست منبع

Merge branch 'master' of http://39.108.216.210:3000/zhuwei/bladex

huangtf 8 ماه پیش
والد
کامیت
7583c6b353

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

@@ -538,7 +538,9 @@ public class CustomFunction {
     public static Object proportion(List<Object> data, String cp) {
         if (Func.isNotEmpty(data) && Func.isNotBlank(cp)) {
             data = data.stream().filter(Func::isNotEmpty).map(e -> e.toString().replaceAll("\\s+", "")).filter(s->!RegexUtil.match("/+",s)).collect(Collectors.toList());
-            return StringUtils.number2String(100 * ((double) data.stream().filter(e -> StringUtils.isEquals(e, cp)).count()) / (double) data.size(), 1);
+            if(data.size()>0) {
+                return StringUtils.number2String(100 * ((double) data.stream().filter(e -> StringUtils.isEquals(e, cp)).count()) / (double) data.size(), 1);
+            }
         }
         return "";
     }

+ 2 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/SubTable.java

@@ -25,8 +25,8 @@ public class SubTable {
     public static final String DESIGN = "设计值";
     public static final String DATA = "检验结果";
     public static final Integer[] STEP = new Integer[]{15, 15, 1};
-    public static final List<String> KEYS = Arrays.asList(ITEM, DESIGN, DATA);
-    /**每页最大行数*/
+    public static final List<String> KEYS = Arrays.asList( ITEM, DESIGN, DATA);
+    /**每行的长度*/
     public static final Integer ROW_SIZE = 15;
     /**表单数据*/
     private LinkedHashMap<String, Item> group = new LinkedHashMap<>();

+ 9 - 6
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -345,11 +345,14 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                                         }
                                     }
                                     int scale = StringUtils.getScale(values);
-                                    FormulaUtils.write(t.getValue(), values.stream().filter(StringUtils::isNotEmpty).map(u -> {
-                                              if(StringUtils.isNumber(u)){
-                                                  return  StringUtils.number2String(u, scale);
-                                              }  return u;
-                                            }
+                                    FormulaUtils.write(t.getValue(), values.stream().map(u -> {
+                                        if(StringUtils.isEmpty(u)){
+                                            return "/";
+                                        } else if(StringUtils.isNumber(u)){
+                                            return  StringUtils.number2String(u, scale);
+                                        }
+                                        return u;
+                                    }
                                     ).collect(Collectors.toList()), true);
 //                                   if(t.getValue().getEName().contains("±")){
 //                                       /*存在偏差范围则获取的是偏差值:实测-设计*/
@@ -1493,7 +1496,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
 
     /**加页增容*/
    public void copy(FormData fd,TableElementConverter tec){
-       if(fd.getAddPages()>30){
+       if(fd.getAddPages()>100){
            /*最大页数30*/
            StaticLog.error("{}超过最大30页限制",fd.getTableChName()+fd.getEName());
            return;

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/ContractInventoryFormController.java

@@ -175,7 +175,7 @@ public class ContractInventoryFormController extends BladeController {
 	@ApiOperationSupport(order = 8)
 	@ApiOperation(value = "获取导入模板", notes = "返回导入模板URL")
 	public R<String> getImportTemplate() {
-		return R.data("https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20231201/853cebb7e9c89c982dd15f842fed42a3.xls");
+		return R.data("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240401/b5d3d7780a343641c0cc414dee7991f8.xls");
 	}