Browse Source

促销方案导入不成功修复

hu 1 year ago
parent
commit
4ea5bf60d2

+ 13 - 1
src/custom/restcontroller/webmanage/sale/promotion/promotionItems.java

@@ -13,6 +13,7 @@ import common.annotation.CACHEING_CLEAN;
 import common.data.*;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.DataFormat;
 import org.apache.poi.xssf.usermodel.*;
 import restcontroller.R;
@@ -413,10 +414,21 @@ public class promotionItems extends Controller {
             keys.add("price4");
             keys.add("price5");
             keys.add("signaturecode");
+            HashMap<String, CellType> cellMap = new HashMap<>();
+            cellMap.put("itemno", CellType.STRING);
+            cellMap.put("orderminqty", CellType.STRING);
+            cellMap.put("orderaddqty", CellType.STRING);
+            cellMap.put("groupqty", CellType.STRING);
+            cellMap.put("price1", CellType.STRING);
+            cellMap.put("price2", CellType.STRING);
+            cellMap.put("price3", CellType.STRING);
+            cellMap.put("price4", CellType.STRING);
+            cellMap.put("price5", CellType.STRING);
+            cellMap.put("signaturecode", CellType.STRING);
 
             int i = 0;
             int a = 0;
-            Rows rows = e.getSheetRows(0, keys, 3);
+            Rows rows = e.getSheetRows(0, keys,cellMap, 3);
 
             boolean iserr = false;
             Rows rowserr = new Rows();