Răsfoiți Sursa

Merge branch 'lihb' of http://219.151.181.73:3000/zhuwei/bladex into test-merge

LHB 2 luni în urmă
părinte
comite
6160c4f432

+ 11 - 9
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -597,7 +597,7 @@ public class ExcelTabController extends BladeController {
 
                     for (WbsFormElement elementInfo : elementList) {
                         String ysName = elementInfo.getEName();
-                        if (titleName.equals(ysName)) {
+                         if (titleName.equals(ysName)) {
                             lastName = elementInfo.getEName();
                             attrInfo = elementInfo.getEKey() + "__" + i + "_" + j;
 
@@ -609,7 +609,8 @@ public class ExcelTabController extends BladeController {
                             is_true = true;
                             break;
                         } else {
-                            if (MathUtil.sim(titleName, ysName) > maxScore) {
+                             List<String> list = Arrays.asList(titleName.split("_"));
+                             if (list.contains(ysName)) {
                                 attrInfo = elementInfo.getEKey() + "__" + i + "_" + j;
 
                                 filedType = WbsElementUtil.getInitTableFiledType(elementInfo.getEType());
@@ -619,6 +620,7 @@ public class ExcelTabController extends BladeController {
                                 lastName = ysName;
                                 maxScore = MathUtil.sim(titleName, ysName);
                                 is_true = true;
+                                break;
                             }
                         }
                     }
@@ -1245,10 +1247,10 @@ public class ExcelTabController extends BladeController {
                                         if (x1 - xx2 <= 1 && y1 == yy2) {
                                             inputText = name;
                                         } else {
-                                            inputText += name + "_";
+                                            inputText += name + "_" +name;
                                         }
                                     } else {
-                                        inputText += name + "_";
+                                        inputText += "_" +name;
                                     }
                                 } else {
                                     if (x1 - xx2 <= 1 && y1 == yy2) {
@@ -1267,14 +1269,14 @@ public class ExcelTabController extends BladeController {
                                 int yy1 = Integer.parseInt(top.get(k).get("y1"));
                                 int yy2 = Integer.parseInt(top.get(k).get("y2"));
                                 if (!StringUtil.isNumeric(name) && name.length() <= 20) {
-                                    inputText += name + "_";
+                                    inputText += "_" + name;
                                 }
                             }
                         }
-
-                        if (inputText != null && inputText != "" && inputText.indexOf("_") >= 0) {
-                            inputText = inputText.substring(0, inputText.lastIndexOf("_"));
-                        }
+                        //这段代码含义未知
+//                        if (inputText != null && inputText != "" && inputText.indexOf("_") >= 0) {
+//                            inputText = inputText.substring(0, inputText.lastIndexOf("_"));
+//                        }
 
                         // 质检表特殊处理匹配