Bladeren bron

修改bug

chenr 2 maanden geleden
bovenliggende
commit
ed713397c8

+ 0 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -713,7 +713,6 @@ public class ExcelTabController extends BladeController {
         try {
             String fileUrl = wbsTreeContract.getHtmlUrl();
             InputStream fileInputStream = FileUtils.getInputStreamByUrl(fileUrl);
-
             String htmlString = IoUtil.readToString(fileInputStream);
             htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
             htmlString = htmlString.replaceAll("title", "titlexx");

+ 14 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1553,7 +1553,18 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                 String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
                                 reData.put(key + "__" + tabData[1], strings);
                             } else {
-                                reData.put(key + "__" + tabData[1], tabData[0]);
+                                if(tabData[0].indexOf(",")>0){
+                                    String[] ss = tabData[0].split(",");
+                                    ss[0]=StringUtils.deleteWhitespace(ss[0]);
+                                    ss[1]=StringUtils.deleteWhitespace(ss[1]);
+                                    if(ss[0].equals(ss[1])){
+                                        reData.put(key + "__" + tabData[1],ss);
+                                    }
+                                }
+                               else {
+                                    reData.put(key + "__" + tabData[1], tabData[0]);
+                                }
+
                             }
                         }
                     } else {
@@ -2725,7 +2736,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             e.printStackTrace();
         }
     }
-    
+
     /**
      * 试验 获取填报信息 - 施工关联试验数据
      */
@@ -4639,4 +4650,4 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
     }
 
-}
+}