蔡德晨 5 years ago
parent
commit
ab43cf6539
1 changed files with 22 additions and 1 deletions
  1. 22 1
      src/main/java/com/jeeplus/common/utils/sg/ExcelUtil.java

+ 22 - 1
src/main/java/com/jeeplus/common/utils/sg/ExcelUtil.java

@@ -29,6 +29,25 @@ public class ExcelUtil {
     }
 
 
+
+
+//    public static double getDouble(ImportExcel importExcel,String st,int column1,int column2){
+//        int lastRow = importExcel.getLastDataRowNum();
+//        double d = 0.00;
+//        for(int i=0;i<lastRow;i++){
+//            String type = importExcel.getValue(i+1,column1);
+//            if(type.equals("")){
+//                continue;
+//            }
+//            if(type.contains(st)){
+//                d = importExcel.getDouble(i+1,column2);
+//                break;
+//            }
+//        }
+//        return d;
+//    }
+
+
     /**
      * 根据字段读取数据
      * @param importExcel 文件对象
@@ -69,7 +88,7 @@ public class ExcelUtil {
                 for(int j=0;j<len;j++) {
                     d[j] = importExcel.getDouble(i + 1, column2[j]);
                 }
-                continue;
+                break;
             }
         }
         return d;
@@ -109,6 +128,8 @@ public class ExcelUtil {
 
 
 
+
+
     /**
      * 读取税金
      */