|
@@ -271,6 +271,7 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
keys.add("price3");
|
|
|
keys.add("price4");
|
|
|
keys.add("price5");
|
|
|
+ keys.add("price6");
|
|
|
|
|
|
HashMap<String, CellType> cellMap = new HashMap<>();
|
|
|
cellMap.put("itemno", CellType.STRING);
|
|
@@ -280,6 +281,7 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
cellMap.put("price3", CellType.STRING);
|
|
|
cellMap.put("price4", CellType.STRING);
|
|
|
cellMap.put("price5", CellType.STRING);
|
|
|
+ cellMap.put("price6", CellType.STRING);
|
|
|
Rows rows = e.getSheetRows(0, keys, cellMap, 3);
|
|
|
|
|
|
ArrayList<String> itemnoList = rows.toArrayList("itemno", false);
|
|
@@ -356,6 +358,17 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
rowserr.add(row);
|
|
|
continue;
|
|
|
}
|
|
|
+ if(StringUtils.isBlank("price6")){
|
|
|
+ row.put("price6",0);
|
|
|
+ }else{
|
|
|
+ if(!isNumeric(row.getString("price6"))){
|
|
|
+ iserr = true;
|
|
|
+ row.put("msg", "亲民价不为数字格式,请检查");
|
|
|
+ rowserr.add(row);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
rowssuc.add(row);
|
|
|
|
|
|
}
|
|
@@ -387,7 +400,7 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
Rows itemPriceRows = itemPriceRowsMap.get(row.getString("itemid"));
|
|
|
pricegrade = itemPriceRows.toRowsMap("pricegrade");
|
|
|
}
|
|
|
- for (int i = 1; i <= 5; i++) {
|
|
|
+ for (int i = 1; i <= 6; i++) {
|
|
|
// if (pricegrade.containsKey(String.valueOf(i)) || !row.getString("price" + i).equals("0")) {
|
|
|
sqlFactoryupload = new SQLFactory(this, "商品调价单商品价格明细新增");
|
|
|
long sa_itempriceadjust_itempriceid = createTableID("sa_itempriceadjust_itemprice");
|
|
@@ -429,6 +442,7 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
map.put("price3", "调整价3");
|
|
|
map.put("price4", "调整价4");
|
|
|
map.put("price5", "调整价5");
|
|
|
+ map.put("price6", "亲民价");
|
|
|
map.put("msg", "错误信息");
|
|
|
ArrayList<String> colNameList = new ArrayList<String>();
|
|
|
HashMap<String, Class> keytypemap = new HashMap<String, Class>();
|
|
@@ -439,6 +453,7 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
colNameList.add("price3");
|
|
|
colNameList.add("price4");
|
|
|
colNameList.add("price5");
|
|
|
+ colNameList.add("price6");
|
|
|
colNameList.add("msg");
|
|
|
keytypemap.put("itemno", String.class);
|
|
|
keytypemap.put("remarks", String.class);
|
|
@@ -447,6 +462,7 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
keytypemap.put("price3", BigDecimal.class);
|
|
|
keytypemap.put("price4", BigDecimal.class);
|
|
|
keytypemap.put("price5", BigDecimal.class);
|
|
|
+ keytypemap.put("price6", BigDecimal.class);
|
|
|
keytypemap.put("msg", String.class);
|
|
|
rowserr.setFieldList(colNameList);
|
|
|
rowserr.setFieldTypeMap(keytypemap);
|
|
@@ -490,6 +506,7 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
sheet.setDefaultColumnStyle(4, style);
|
|
|
sheet.setDefaultColumnStyle(5, style);
|
|
|
sheet.setDefaultColumnStyle(6, style);
|
|
|
+ sheet.setDefaultColumnStyle(7, style);
|
|
|
|
|
|
ExportExcel.setBatchDetailSheetColumn1(sheet);// 设置工作薄列宽
|
|
|
XSSFCellStyle titleCellStyle1 = ExportExcel.createTitleCellStyle1(xssfFWorkbook);
|