Parcourir la source

商品调价单导入

郭齐峰 il y a 3 ans
Parent
commit
f1637e5a90

+ 5 - 13
src/custom/restcontroller/webmanage/sale/itempriceadjust/ExportExcel.java

@@ -111,7 +111,6 @@ public class ExportExcel {
         sheet.setColumnWidth((short) 4, (short) 8500);
         sheet.setColumnWidth((short) 5, (short) 8500);
         sheet.setColumnWidth((short) 6, (short) 8500);
-        sheet.setColumnWidth((short) 7, (short) 8500);
 
 
     }
@@ -131,7 +130,6 @@ public class ExportExcel {
         sheet.setColumnWidth((short) 5, (short) 8500);
         sheet.setColumnWidth((short) 6, (short) 8500);
         sheet.setColumnWidth((short) 7, (short) 8500);
-        sheet.setColumnWidth((short) 8, (short) 8500);
 
     }
 
@@ -167,7 +165,7 @@ public class ExportExcel {
         cellStyle2.setWrapText(true);
 
         /*第一行*/
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 7));
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 6));
 
         /*第一行塞值*/
         row = sheet.createRow(0);
@@ -175,7 +173,7 @@ public class ExportExcel {
         cell.setCellStyle(cellStyle4);
         cell.setCellValue("商品调价单导入");
         /*第二行*/
-        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 7));
+        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 6));
         /*第二行塞值*/
         row = sheet.createRow(1);
         cell = row.createCell(0);// ID
@@ -192,9 +190,6 @@ public class ExportExcel {
         cell.setCellStyle(cellStyle2);
         cell.setCellValue("备注(非必填)");
 
-        cell = row.createCell(2);
-        cell.setCellStyle(cellStyle2);
-        cell.setCellValue("牌价(必填,价格不变时填0)");
 
         cell = row.createCell(3);
         cell.setCellStyle(cellStyle2);
@@ -230,9 +225,6 @@ public class ExportExcel {
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("备注");
 
-        cell = row.createCell(2);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("100");
 
         cell = row.createCell(3);
         cell.setCellStyle(cellStyle3);
@@ -283,7 +275,7 @@ public class ExportExcel {
 
 
         /*第一行*/
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 8));
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 7));
 
         /*第一行塞值*/
         row = sheet.createRow(0);
@@ -291,7 +283,7 @@ public class ExportExcel {
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("商品调价单导入");
         /*第二行*/
-        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 8));
+        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 7));
         /*第二行塞值*/
         row = sheet.createRow(1);
         cell = row.createCell(0);// ID
@@ -330,7 +322,7 @@ public class ExportExcel {
 
 
         cell = row.createCell(7);
-        cell.setCellStyle(cellStyle2);
+        cell.setCellStyle(cellStyle1);
         cell.setCellValue("错误信息");
 
     }

+ 1 - 5
src/custom/restcontroller/webmanage/sale/itempriceadjust/ItempriceadjustItemprice.java

@@ -263,7 +263,6 @@ public class ItempriceadjustItemprice extends Controller {
             ArrayList<String> sqllist = new ArrayList<>();
             keys.add("itemno");
             keys.add("remarks");
-            keys.add("marketprice");
             keys.add("price1");
             keys.add("price2");
             keys.add("price3");
@@ -313,7 +312,6 @@ public class ItempriceadjustItemprice extends Controller {
                 HashMap<String, String> map = new HashMap<String, String>();
                 map.put("itemno", "商品编号");
                 map.put("remarks", "备注");
-                map.put("marketprice", "牌价");
                 map.put("price1", "调整价1");
                 map.put("price2", "调整价2");
                 map.put("price3", "调整价3");
@@ -324,7 +322,6 @@ public class ItempriceadjustItemprice extends Controller {
                 HashMap<String, Class> keytypemap = new HashMap<String, Class>();
                 colNameList.add("itemno");
                 colNameList.add("remarks");
-                colNameList.add("marketprice");
                 colNameList.add("price1");
                 colNameList.add("price2");
                 colNameList.add("price3");
@@ -333,7 +330,6 @@ public class ItempriceadjustItemprice extends Controller {
                 colNameList.add("msg");
                 keytypemap.put("itemno", String.class);
                 keytypemap.put("remarks", String.class);
-                keytypemap.put("marketprice", BigDecimal.class);
                 keytypemap.put("price1", BigDecimal.class);
                 keytypemap.put("price2", BigDecimal.class);
                 keytypemap.put("price3", BigDecimal.class);
@@ -372,7 +368,7 @@ public class ItempriceadjustItemprice extends Controller {
                     sqlFactoryupload.addParameter("billno", billno);
                     sqlFactoryupload.addParameter("itemno", row.getString("itemno"));
                     sqlFactoryupload.addParameter("oldmarketprice", row.getBigDecimal("oldmarketprice"));
-                    sqlFactoryupload.addParameter("marketprice", row.getBigDecimal("marketprice"));
+                    sqlFactoryupload.addParameter("marketprice", row.getBigDecimal("oldmarketprice"));
                     sqllist.add(sqlFactoryupload.getSQL());
 
                     RowsMap pricegrade = new RowsMap();