Преглед изворни кода

业绩目标导入增加格式转换

hu пре 2 година
родитељ
комит
efc6634b61

+ 7 - 2
src/custom/restcontroller/webmanage/sale/salestarget/enterprisetarget.java

@@ -11,6 +11,7 @@ import common.annotation.CACHEING_CLEAN;
 import common.annotation.cm;
 import common.data.*;
 import org.apache.commons.lang.StringUtils;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.xssf.usermodel.*;
 import restcontroller.R;
 import restcontroller.sale.promotion.promotion;
@@ -416,20 +417,24 @@ public class enterprisetarget extends Controller {
 
             ArrayList<String> keys = new ArrayList<>();
             ArrayList<String> sqllist = new ArrayList<>();
-
+            HashMap<String, CellType> cellMap = new HashMap<>();
             keys.add("name");
             String keyl = "y1l";
             keys.add(keyl);
             for (int i = 1; i < 5; i++) {
                 keyl = "s" + i + "l";
                 keys.add(keyl);
+                cellMap.put(keyl, CellType.STRING);
             }
 
             for (int i = 1; i < 13; i++) {
                 keyl = "m" + i + "l";
                 keys.add(keyl);
+                cellMap.put(keyl, CellType.STRING);
             }
-            Rows rows = e.getSheetRows(0, keys, 2);
+
+            cellMap.put("name", CellType.STRING);
+            Rows rows = e.getSheetRows(0, keys,cellMap, 2);
             ArrayList<String> agentnumList = new ArrayList<>();
             for (Row row : rows) {
                 agentnumList.add(row.getString("name"));