|
|
@@ -307,48 +307,6 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
rowserr.add(row);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- }
|
|
|
- if (iserr) {
|
|
|
- ExcelFactory excelFactory = new ExcelFactory("调价单导入错误信息");
|
|
|
- HashMap<String, String> map = new HashMap<String, String>();
|
|
|
- map.put("itemno", "商品编号");
|
|
|
- map.put("remarks", "备注");
|
|
|
- map.put("price1", "调整价1");
|
|
|
- map.put("price2", "调整价2");
|
|
|
- map.put("price3", "调整价3");
|
|
|
- map.put("price4", "调整价4");
|
|
|
- map.put("price5", "调整价5");
|
|
|
- map.put("msg", "错误信息");
|
|
|
- ArrayList<String> colNameList = new ArrayList<String>();
|
|
|
- HashMap<String, Class> keytypemap = new HashMap<String, Class>();
|
|
|
- colNameList.add("itemno");
|
|
|
- colNameList.add("remarks");
|
|
|
- colNameList.add("price1");
|
|
|
- colNameList.add("price2");
|
|
|
- colNameList.add("price3");
|
|
|
- colNameList.add("price4");
|
|
|
- colNameList.add("price5");
|
|
|
- colNameList.add("msg");
|
|
|
- keytypemap.put("itemno", String.class);
|
|
|
- keytypemap.put("remarks", String.class);
|
|
|
- keytypemap.put("price1", BigDecimal.class);
|
|
|
- keytypemap.put("price2", BigDecimal.class);
|
|
|
- keytypemap.put("price3", BigDecimal.class);
|
|
|
- keytypemap.put("price4", BigDecimal.class);
|
|
|
- keytypemap.put("price5", BigDecimal.class);
|
|
|
- keytypemap.put("msg", String.class);
|
|
|
- rowserr.setFieldList(colNameList);
|
|
|
- rowserr.setFieldTypeMap(keytypemap);
|
|
|
- addSheet(excelFactory, "Sheet1", rowserr, map);
|
|
|
-
|
|
|
- Rows aa = uploadExcelToObs(excelFactory);
|
|
|
- String url = "";
|
|
|
- if (!aa.isEmpty()) {
|
|
|
- url = aa.get(0).getString("url");
|
|
|
- }
|
|
|
- dbConnect.runSqlUpdate("delete from sa_itempriceadjust where sa_itempriceadjustid=" + sa_itempriceadjustid);
|
|
|
- return getSucReturnObject().setData(url).toString();
|
|
|
}
|
|
|
|
|
|
if (!rowssuc.isEmpty()) {
|
|
|
@@ -413,6 +371,48 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
} else {
|
|
|
dbConnect.runSqlUpdate("delete from sa_itempriceadjust where sa_itempriceadjustid=" + sa_itempriceadjustid);
|
|
|
}
|
|
|
+
|
|
|
+ if (iserr) {
|
|
|
+ ExcelFactory excelFactory = new ExcelFactory("调价单导入错误信息");
|
|
|
+ HashMap<String, String> map = new HashMap<String, String>();
|
|
|
+ map.put("itemno", "商品编号");
|
|
|
+ map.put("remarks", "备注");
|
|
|
+ map.put("price1", "调整价1");
|
|
|
+ map.put("price2", "调整价2");
|
|
|
+ map.put("price3", "调整价3");
|
|
|
+ map.put("price4", "调整价4");
|
|
|
+ map.put("price5", "调整价5");
|
|
|
+ map.put("msg", "错误信息");
|
|
|
+ ArrayList<String> colNameList = new ArrayList<String>();
|
|
|
+ HashMap<String, Class> keytypemap = new HashMap<String, Class>();
|
|
|
+ colNameList.add("itemno");
|
|
|
+ colNameList.add("remarks");
|
|
|
+ colNameList.add("price1");
|
|
|
+ colNameList.add("price2");
|
|
|
+ colNameList.add("price3");
|
|
|
+ colNameList.add("price4");
|
|
|
+ colNameList.add("price5");
|
|
|
+ colNameList.add("msg");
|
|
|
+ keytypemap.put("itemno", String.class);
|
|
|
+ keytypemap.put("remarks", String.class);
|
|
|
+ keytypemap.put("price1", BigDecimal.class);
|
|
|
+ keytypemap.put("price2", BigDecimal.class);
|
|
|
+ keytypemap.put("price3", BigDecimal.class);
|
|
|
+ keytypemap.put("price4", BigDecimal.class);
|
|
|
+ keytypemap.put("price5", BigDecimal.class);
|
|
|
+ keytypemap.put("msg", String.class);
|
|
|
+ rowserr.setFieldList(colNameList);
|
|
|
+ rowserr.setFieldTypeMap(keytypemap);
|
|
|
+ addSheet(excelFactory, "Sheet1", rowserr, map);
|
|
|
+
|
|
|
+ Rows aa = uploadExcelToObs(excelFactory);
|
|
|
+ String url = "";
|
|
|
+ if (!aa.isEmpty()) {
|
|
|
+ url = aa.get(0).getString("url");
|
|
|
+ }
|
|
|
+ dbConnect.runSqlUpdate("delete from sa_itempriceadjust where sa_itempriceadjustid=" + sa_itempriceadjustid);
|
|
|
+ return getSucReturnObject().setData(url).toString();
|
|
|
+ }
|
|
|
} catch (Exception e1) {
|
|
|
dbConnect.runSqlUpdate("delete from sa_itempriceadjust where sa_itempriceadjustid=" + sa_itempriceadjustid);
|
|
|
e1.printStackTrace();
|