Ver código fonte

【商品管理】列表,【导入/商品更新】Excel模板修改

wu 6 meses atrás
pai
commit
d9e9d1f77a

+ 89 - 317
src/custom/restcontroller/webmanage/sale/item/ExportExcel.java

@@ -203,37 +203,35 @@ public class ExportExcel {
 
 
         /*第一行*/
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 30));
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 31, 32));
-//        } else {
-//            sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 27));
-//            sheet.addMergedRegion(new CellRangeAddress(0, 0, 28, 29));
-//        }
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 12));
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, 13, 14));
 
         /*第一行塞值*/
         row = sheet.createRow(0);
 
         cell = row.createCell(0);// ID
         cell.setCellStyle(cellStyle1);
-        cell.setCellValue("货品档案");
+        if (isInsert) {
+            cell.setCellValue("商品档案新增");
+        } else {
+            cell.setCellValue("商品档案更新");
+        }
 
-        cell = row.createCell(33);// ID
+        cell = row.createCell(13);// ID
         cell.setCellStyle(cellStyle1);
 
         /*第二行*/
-        cell = row.createCell(31);// ID
+        cell = row.createCell(13);// ID
         cell.setCellStyle(cellStyle1);
         cell.setCellValue("商品营销分类列表");
-        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 33));
+
+        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 14));
         /*第二行塞值*/
         row = sheet.createRow(1);
         cell = row.createCell(0);// ID
         cell.setCellStyle(cellStyle2);
-        if (isInsert) {
-            cell.setCellValue("注意:①请按照以下示例填写信息;②最多不超过5000行;③导入前,请记得删除示例行!");
-        } else {
-            cell.setCellValue("注意:①请按照以下示例填写信息;②最多不超过5000行;③导入前,请记得删除示例行!④不变更的信息可为空");
-        }
+        cell.setCellValue("注意:①请按照以下示例填写信息;②最多不超过5000行;③导入前,请记得删除示例行;④填写时需注意不可换行、不可有前后空格!");
+
         /*第三行塞值*/
         row = sheet.createRow(2);
 
@@ -251,30 +249,13 @@ public class ExportExcel {
 
         cell = row.createCell(2);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("规格尺寸");
+        cell.setCellValue("规格");
 
         cell = row.createCell(3);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("公称通径");
-
-        cell = row.createCell(4);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("公称压力");
-
-
-        cell = row.createCell(5);
-        cell.setCellStyle(cellStyle3);
         cell.setCellValue("型号");
 
-        cell = row.createCell(6);
-        cell.setCellStyle(cellStyle3);
-        if (isInsert) {
-            cell.setCellValue("商品大类(必填)");
-        } else {
-            cell.setCellValue("商品大类");
-        }
-
-        cell = row.createCell(7);
+        cell = row.createCell(4);
         cell.setCellStyle(cellStyle3);
         if (isInsert) {
             cell.setCellValue("计量单位(必填)");
@@ -282,7 +263,7 @@ public class ExportExcel {
             cell.setCellValue("计量单位");
         }
 
-        cell = row.createCell(8);
+        cell = row.createCell(5);
         cell.setCellStyle(cellStyle3);
         if (isInsert) {
             cell.setCellValue("品名(必填)");
@@ -290,7 +271,7 @@ public class ExportExcel {
             cell.setCellValue("品名");
         }
 
-        cell = row.createCell(9);
+        cell = row.createCell(6);
         cell.setCellStyle(cellStyle3);
         if (isInsert) {
             cell.setCellValue("品号(必填)");
@@ -298,106 +279,46 @@ public class ExportExcel {
             cell.setCellValue("品号");
         }
 
-        cell = row.createCell(10);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("产品标准");
-
-        cell = row.createCell(11);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("产品标准明细");
-
-        cell = row.createCell(12);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("销售起订量");
-
-        cell = row.createCell(13);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("销售增量");
-
-        cell = row.createCell(14);
+        cell = row.createCell(7);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("材质");
+        cell.setCellValue("辅助说明");
 
-        cell = row.createCell(15);
+        cell = row.createCell(8);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("库存充足标准");
+        cell.setCellValue("俗称释义");
 
-        cell = row.createCell(16);
+        cell = row.createCell(9);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("库存缺货标准");
+        cell.setCellValue("备货分类");
 
-        cell = row.createCell(17);
+        cell = row.createCell(10);
         cell.setCellStyle(cellStyle3);
         if (isInsert) {
-            cell.setCellValue("领域(必填)");
-        } else {
-            cell.setCellValue("领域");
+            cell.setCellValue("销售起订量(必填)");
+        }else {
+            cell.setCellValue("销售起订量");
         }
 
-        cell = row.createCell(18);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("销售交期");
-
-        cell = row.createCell(19);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("产线");
-
-        cell = row.createCell(20);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("装置");
-
-        cell = row.createCell(21);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("特殊说明");
-
-        cell = row.createCell(22);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("是否服务物料");
-
-        cell = row.createCell(23);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("压力等级");
-
-        cell = row.createCell(24);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("蝶板驱动");
-
-        cell = row.createCell(25);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("连接形式");
-
-        cell = row.createCell(26);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("阀板材质");
-
-        cell = row.createCell(27);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("阀体材质");
-
-        cell = row.createCell(28);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("执行器类型");
-
-        cell = row.createCell(29);
+        cell = row.createCell(11);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("执行器品牌");
+        if (isInsert) {
+            cell.setCellValue("销售增量(必填)");
+        }else {
+            cell.setCellValue("销售起订量");
+        }
 
-        cell = row.createCell(30);
+        cell = row.createCell(12);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("是否中线蝶阀");
+        cell.setCellValue("备注");
 
-        cell = row.createCell(31);
+        cell = row.createCell(13);
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("品牌");
 
-        cell = row.createCell(32);
+        cell = row.createCell(14);
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("营销类别编码");
 
-        cell = row.createCell(33);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("商品组编号");
-
 
         /*第四行塞值*/
         row = sheet.createRow(3);
@@ -416,127 +337,51 @@ public class ExportExcel {
 
         cell = row.createCell(3);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("DN65");
+        cell.setCellValue("DN65/DN100");
 
         cell = row.createCell(4);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("PN10/PN16");
+        cell.setCellValue("");
 
         cell = row.createCell(5);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("DN65/DN100");
+        cell.setCellValue("测试");
 
         cell = row.createCell(6);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("常规产品");
+        cell.setCellValue("NBNTO-28571530003");
 
         cell = row.createCell(7);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("");
+        cell.setCellValue("辅助说明");
 
         cell = row.createCell(8);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("测试   ");
+        cell.setCellValue("俗称释义");
 
         cell = row.createCell(9);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("NBNTO-28571530003");
+        cell.setCellValue("常规备货");
 
         cell = row.createCell(10);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("国标");
+        cell.setCellValue("1");
 
         cell = row.createCell(11);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("CJ/T167");
+        cell.setCellValue("1");
 
         cell = row.createCell(12);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue(1);
+        cell.setCellValue("备注");
 
         cell = row.createCell(13);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue(1);
+        cell.setCellValue("普瑞顺祥");
 
         cell = row.createCell(14);
         cell.setCellStyle(cellStyle4);
-        cell.setCellValue("材质");
-
-        cell = row.createCell(15);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue(1000);
-
-        cell = row.createCell(16);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue(1);
-
-        cell = row.createCell(17);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("全领域");
-
-        cell = row.createCell(18);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue(1);
-
-        cell = row.createCell(19);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("产线");
-
-        cell = row.createCell(20);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("装置");
-
-        cell = row.createCell(21);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("特殊说明");
-
-        cell = row.createCell(22);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("是");
-
-        cell = row.createCell(23);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("PN16");
-
-        cell = row.createCell(24);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("有销");
-
-        cell = row.createCell(25);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("对夹式");
-
-        cell = row.createCell(26);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("球铁");
-
-        cell = row.createCell(27);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("WCB");
-
-        cell = row.createCell(28);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("把手型");
-
-        cell = row.createCell(29);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("Conex|Bänninger");
-
-        cell = row.createCell(30);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("否");
-
-        cell = row.createCell(31);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("全品牌");
-
-        cell = row.createCell(32);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("ma01/ma02");
-
-        cell = row.createCell(33);
-        cell.setCellStyle(cellStyle4);
-        cell.setCellValue("HY-202503110001/HY-202503110002");
+        cell.setCellValue("001/002");
 
     }
 
@@ -568,33 +413,36 @@ public class ExportExcel {
 
 
         /*第一行*/
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 30));
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 31, 32));
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 33, 34));
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 12));
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, 13, 14));
         /*第一行塞值*/
         row = sheet.createRow(0);
         cell = row.createCell(0);// ID
         cell.setCellStyle(cellStyle1);
-        cell.setCellValue("货品档案");
+        if (isInsert) {
+            cell.setCellValue("商品档案新增");
+        } else {
+            cell.setCellValue("商品档案更新");
+        }
         /*第二行*/
-        cell = row.createCell(31);// ID
+        cell = row.createCell(13);// ID
         cell.setCellStyle(cellStyle1);
         cell.setCellValue("商品营销分类列表");
-        cell = row.createCell(33);// ID
+        cell = row.createCell(14);// ID
+        cell.setCellStyle(cellStyle1);
+        cell = row.createCell(15);// ID
         cell.setCellStyle(cellStyle1);
-        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 34));
+
+        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 15));
         /*第二行塞值*/
         row = sheet.createRow(1);
         cell = row.createCell(0);// ID
         cell.setCellStyle(cellStyle2);
-        if (isInsert) {
-            cell.setCellValue("注意:①请按照以下示例填写信息;②最多不超过5000行;③导入前,请记得删除示例行!");
-        } else {
-            cell.setCellValue("注意:①请按照以下示例填写信息;②最多不超过5000行;③导入前,请记得删除示例行!④不变更的信息可为空");
-        }
+        cell.setCellValue("注意:①请按照以下示例填写信息;②最多不超过5000行;③导入前,请记得删除示例行;④填写时需注意不可换行、不可有前后空格!");
 
         /*第三行塞值*/
         row = sheet.createRow(2);
+
         cell = row.createCell(0);
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("产品编码(必填)");
@@ -606,32 +454,16 @@ public class ExportExcel {
         } else {
             cell.setCellValue("产品名称");
         }
+
         cell = row.createCell(2);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("规格尺寸");
+        cell.setCellValue("规格");
 
         cell = row.createCell(3);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("公称通径");
-
-        cell = row.createCell(4);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("公称压力");
-
-
-        cell = row.createCell(5);
-        cell.setCellStyle(cellStyle3);
         cell.setCellValue("型号");
 
-        cell = row.createCell(6);
-        cell.setCellStyle(cellStyle3);
-        if (isInsert) {
-            cell.setCellValue("商品大类(必填)");
-        } else {
-            cell.setCellValue("商品大类");
-        }
-
-        cell = row.createCell(7);
+        cell = row.createCell(4);
         cell.setCellStyle(cellStyle3);
         if (isInsert) {
             cell.setCellValue("计量单位(必填)");
@@ -639,7 +471,7 @@ public class ExportExcel {
             cell.setCellValue("计量单位");
         }
 
-        cell = row.createCell(8);
+        cell = row.createCell(5);
         cell.setCellStyle(cellStyle3);
         if (isInsert) {
             cell.setCellValue("品名(必填)");
@@ -647,7 +479,7 @@ public class ExportExcel {
             cell.setCellValue("品名");
         }
 
-        cell = row.createCell(9);
+        cell = row.createCell(6);
         cell.setCellStyle(cellStyle3);
         if (isInsert) {
             cell.setCellValue("品号(必填)");
@@ -655,107 +487,47 @@ public class ExportExcel {
             cell.setCellValue("品号");
         }
 
-        cell = row.createCell(10);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("产品标准");
-
-        cell = row.createCell(11);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("产品标准明细");
-
-        cell = row.createCell(12);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("销售起订量");
-
-        cell = row.createCell(13);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("销售增量");
-
-        cell = row.createCell(14);
+        cell = row.createCell(7);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("材质");
+        cell.setCellValue("辅助说明");
 
-        cell = row.createCell(15);
+        cell = row.createCell(8);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("库存充足标准");
+        cell.setCellValue("俗称释义");
 
-        cell = row.createCell(16);
+        cell = row.createCell(9);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("库存缺货标准");
+        cell.setCellValue("备货分类");
 
-        cell = row.createCell(17);
+        cell = row.createCell(10);
         cell.setCellStyle(cellStyle3);
         if (isInsert) {
-            cell.setCellValue("领域(必填)");
-        } else {
-            cell.setCellValue("领域");
+            cell.setCellValue("销售起订量(必填)");
+        }else {
+            cell.setCellValue("销售起订量");
         }
 
-        cell = row.createCell(18);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("销售交期");
-
-        cell = row.createCell(19);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("产线");
-
-        cell = row.createCell(20);
+        cell = row.createCell(11);
         cell.setCellStyle(cellStyle3);
-        cell.setCellValue("装置");
+        if (isInsert) {
+            cell.setCellValue("销售增量(必填)");
+        }else {
+            cell.setCellValue("销售起订量");
+        }
 
-        cell = row.createCell(21);
+        cell = row.createCell(12);
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("特殊说明");
 
-        cell = row.createCell(22);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("是否服务物料");
-
-        cell = row.createCell(23);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("压力等级");
-
-        cell = row.createCell(24);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("蝶板驱动");
-
-        cell = row.createCell(25);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("连接形式");
-
-        cell = row.createCell(26);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("阀板材质");
-
-        cell = row.createCell(27);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("阀体材质");
-
-        cell = row.createCell(28);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("执行器类型");
-
-        cell = row.createCell(29);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("执行器品牌");
-
-        cell = row.createCell(30);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("是否中线蝶阀");
-
-        cell = row.createCell(31);
+        cell = row.createCell(13);
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("品牌");
 
-        cell = row.createCell(32);
+        cell = row.createCell(14);
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("营销类别编码");
 
-        cell = row.createCell(33);
-        cell.setCellStyle(cellStyle3);
-        cell.setCellValue("商品组编号");
-
-        cell = row.createCell(34);
+        cell = row.createCell(15);
         cell.setCellStyle(cellStyle3);
         cell.setCellValue("错误信息");
     }

+ 94 - 559
src/custom/restcontroller/webmanage/sale/item/Item.java

@@ -662,22 +662,6 @@ public class Item extends Controller {
         XSSFSheet sheet = excelFactory.getXssfWorkbook().createSheet("Sheet1");
         XSSFWorkbook xssfFWorkbook = excelFactory.getXssfWorkbook();
 
-        CellStyle style = xssfFWorkbook.createCellStyle();
-        DataFormat format = xssfFWorkbook.createDataFormat();
-        style.setDataFormat(format.getFormat("@"));
-        // 对单独某一列进行样式赋值,第一个参数为列数,第二个参数为样式
-        for (int i = 0; i <= 32; i++) {
-            if (siteid.equals("HY")) {
-                if (i == 9 || i == 10 || i == 14 || i == 16 || i == 13) {
-                    continue;
-                }
-            } else {
-                if (i == 9 || i == 10 || i == 13 || i == 15 || i == 12) {
-                    continue;
-                }
-            }
-            sheet.setDefaultColumnStyle(i, style);
-        }
         // 设置工作薄列宽
         ExportExcel.setBatchDetailSheetColumn1(sheet);// 设置工作薄列宽
         XSSFCellStyle titleCellStyle1 = ExportExcel.createTitleCellStyle1(xssfFWorkbook);
@@ -711,37 +695,18 @@ public class Item extends Controller {
             keys.add("itemno");
             keys.add("itemname");
             keys.add("spec");
-            keys.add("caliber");
-            keys.add("nominalpressure");
             keys.add("model");
-            keys.add("categories");
             keys.add("unitname");
             keys.add("erpitemname");
             keys.add("erpitemno");
-            keys.add("standards");
-            keys.add("standardsmx");
+            keys.add("assistance");
+            keys.add("explains");
+            keys.add("goodstype");
             keys.add("orderminqty");
             keys.add("orderaddqty");
-            keys.add("material");
-            keys.add("stockstatus1");
-            keys.add("stockstatus2");
-            keys.add("tradefield");
-            keys.add("delivery");
-            keys.add("prodline");
-            keys.add("device");
             keys.add("specalnote");
-            keys.add("isservice");
-            keys.add("pressure");
-            keys.add("butterflyplatedrive");
-            keys.add("connection");
-            keys.add("valveplatematerial");
-            keys.add("bodymaterial");
-            keys.add("actuatortype");
-            keys.add("actuatorbrand");
-            keys.add("isbutterfly");
             keys.add("brandname");
             keys.add("itemclassnum");
-            keys.add("groupnum");
 
             HashMap<String, CellType> cellmap = new HashMap<>();
             for (String key : keys) {
@@ -760,135 +725,38 @@ public class Item extends Controller {
 
             if (!rowssuc.isEmpty()) {
                 for (Row row : rowssuc) {
-                    String orderminqty = row.getString("orderminqty");
-                    String orderaddqty = row.getString("orderaddqty");
-                    String delivery = row.getString("delivery");
-                    String stockstatus2 = row.getString("stockstatus2");
-                    String stockstatus1 = row.getString("stockstatus1");
                     Long itemid = createTableID("plm_item");
-                    SQLFactory sqlFactory = new SQLFactory(this, "货品档案新增");
-                    sqlFactory.addParameter("siteid", siteid);
-                    sqlFactory.addParameter("itemid", itemid);
-                    sqlFactory.addParameter("username", username);
-                    sqlFactory.addParameter("userid", userid);
-                    sqlFactory.addParameter("itemno", row.getString("itemno").trim());
-                    sqlFactory.addParameter("unitid", row.getLong("unitid"));
-                    sqlFactory.addParameter("isauxunit", 0);
-                    sqlFactory.addParameter("unitgroupid", "null");
-                    sqlFactory.addParameter("itemname", row.getString("itemname"));
-                    sqlFactory.addParameter("isonsale", 0);
-                    sqlFactory.addParameter("model", row.getString("model"));
-                    sqlFactory.addParameter("spec", row.getString("spec"));
-                    // 订单起订量
-                    sqlFactory.addParameter("orderminqty", StringUtils.isEmpty(orderminqty) ? "null" : orderminqty);
-                    // 订单增量
-                    sqlFactory.addParameter("orderaddqty", StringUtils.isEmpty(orderaddqty) ? "null" : orderaddqty);
-                    // 订单起订量控制单位(0:主单位;1:辅助单位)
-                    sqlFactory.addParameter("orderminqty_auxunit", 0);
-                    // 订单增量控制单位(0:主单位;1:辅助单位)
-                    sqlFactory.addParameter("orderaddqty_auxunit", 0);
-                    // 说明
-                    sqlFactory.addParameter("remarks", "null");
-                    // 商品条形码
-                    sqlFactory.addParameter("barcode", "null");
-                    // 是否单品管理
-                    sqlFactory.addParameter("skucontrol", 0);
-                    // 是否批次管理
-                    sqlFactory.addParameter("batchcontrol", 0);
-                    // 毛重(g)
-                    sqlFactory.addParameter("grossweight", "null");
-                    // 净重(g)
-                    sqlFactory.addParameter("weight", "null");
-                    // 高度(mm)
-                    sqlFactory.addParameter("height", "null");
-                    // 宽度(mm)
-                    sqlFactory.addParameter("width", "null");
-                    // 长度(mm)
-                    sqlFactory.addParameter("length", "null");
-                    // 交期
-                    sqlFactory.addParameter("delivery", StringUtils.isEmpty(delivery) ? "null" : delivery);
-                    // 牌价
-                    sqlFactory.addParameter("marketprice", 0);
-                    // 是否工具
-                    sqlFactory.addParameter("istool", 0);
-                    // 产品标准
-                    sqlFactory.addParameter("standards", row.getString("standards"));
-                    // 产品标准明细
-                    sqlFactory.addParameter("standardsmx", row.getString("standardsmx"));
-                    // 库存缺货标准
-                    sqlFactory.addParameter("stockstatus2", StringUtils.isEmpty(stockstatus2) ? "null" : stockstatus2);
-                    // 库存充足标准
-                    sqlFactory.addParameter("stockstatus1", StringUtils.isEmpty(stockstatus1) ? "null" : stockstatus1);
-                    // 保修期(年)
-                    sqlFactory.addParameter("warrantyday", "null");
-                    // 是否营销物料
-                    sqlFactory.addParameter("iswuliao", 0);
-                    // 是否服务物料
-                    sqlFactory.addParameter("isservice", row.getString("isservice"));
-                    sqlFactory.addParameter("packqty", "1");
-                    sqlFactory.addParameter("explains", "");
-                    sqlFactory.addParameter("goodstype", "");
-                    sqlFactory.addParameter("assistance", "");
-                    sqlList.add(sqlFactory.getSQL());
+                    InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "plm_item");
+                    insertSQL.setSiteid(siteid);
+                    insertSQL.setUniqueid(itemid);
+                    insertSQL.setValue("itemno",row.getString("itemno").trim());
+                    insertSQL.setValue("itemname",row.getString("itemname").trim());
+                    insertSQL.setValue("spec",row.getString("spec").trim());
+                    insertSQL.setValue("model",row.getString("model").trim());
+                    insertSQL.setValue("unitid",row.getLong("unitid"));
+                    insertSQL.setValue("assistance",row.getString("assistance"));
+                    insertSQL.setValue("explains",row.getString("explains"));
+                    insertSQL.setValue("goodstype",row.getString("goodstype"));
+                    insertSQL.setValue("orderminqty",row.getString("orderminqty"));
+                    insertSQL.setValue("orderaddqty",row.getString("orderaddqty"));
+                    insertSQL.setValue("status","新建");
+                    sqlList.add(insertSQL.getSQL());
                     // 货品档案扩展属性字段表
-
-                    sqlFactory = new SQLFactory(this, "货品档案-扩展新增");
                     Long plm_itemextendid = createTableID("plm_itemextend");
-                    sqlFactory.addParameter("siteid", siteid);
-                    sqlFactory.addParameter("userid", userid);
-                    sqlFactory.addParameter("username", username);
-                    sqlFactory.addParameter("plm_itemextendid", plm_itemextendid);
-                    sqlFactory.addParameter("itemid", itemid);
-                    sqlFactory.addParameter("material", row.getString("material"));
-                    sqlFactory.addParameter("pressure", row.getString("pressure"));
-
-                    sqlFactory.addParameter("butterflyplatedrive", row.getString("butterflyplatedrive"));
-                    sqlFactory.addParameter("connection", row.getString("connection"));
-                    sqlFactory.addParameter("valveplatematerial", row.getString("valveplatematerial"));
-                    sqlFactory.addParameter("bodymaterial", row.getString("bodymaterial"));
-                    sqlFactory.addParameter("actuatortype", row.getString("actuatortype"));
-                    sqlFactory.addParameter("actuatorbrand", row.getString("actuatorbrand"));
-                    sqlFactory.addParameter("isbutterfly", row.getString("isbutterfly"));
-                    sqlFactory.addParameter("erpitemno", row.getString("erpitemno"));
-                    sqlFactory.addParameter("erpitemname", row.getString("erpitemname"));
-                    sqlFactory.addParameter("specalnote", row.getString("specalnote"));
-                    sqlFactory.addParameter("prodline", row.getString("prodline"));
-                    sqlFactory.addParameter("device", row.getString("device"));
-                    sqlFactory.addParameter("actuatordrivetype", "null");
-                    sqlFactory.addParameter("categories", row.getString("categories"));
-                    if (siteid.equals("HY")) {
-                        sqlFactory.addParameter("caliber", row.getString("caliber"));
-                        JSONArray jsonArray = new JSONArray();
-                        jsonArray.add(row.getString("nominalpressure"));
-                        Object value = row.get("nominalpressure");
-                        String[] nominalpressure = value.toString().split("/");
-                        if (value.toString().contains("\n")) {
-                            nominalpressure = value.toString().split("\n");
-                        }
-
-                        JSONArray nominalpressureJsonArray = JSONArray.parseArray(JSON.toJSONString(nominalpressure));
-                        sqlFactory.addParameter("nominalpressure", nominalpressureJsonArray.toJSONString());
-                    } else {
-                        sqlFactory.addParameter("caliber", "null");
-                        sqlFactory.addParameter("nominalpressure", "[]");
-                    }
-
-                    sqlList.add(sqlFactory.getSQL());
-
-                    Long plm_item_tradefieldid = createTableID("plm_item_tradefield");
-                    sqlFactory = new SQLFactory(this, "新增领域");
-                    sqlFactory.addParameter("siteid", siteid);
-                    sqlFactory.addParameter("plm_item_tradefieldid", plm_item_tradefieldid);
-                    sqlFactory.addParameter("tradefield", row.getString("tradefield"));
-                    sqlFactory.addParameter("userid", userid);
-                    sqlFactory.addParameter("itemid", itemid);
-                    sqlList.add(sqlFactory.getSQL());
+                    insertSQL = SQLFactory.createInsertSQL(this, "plm_itemextend");
+                    insertSQL.setSiteid(siteid);
+                    insertSQL.setUniqueid(plm_itemextendid);
+                    insertSQL.setValue("itemid",itemid);
+                    insertSQL.setValue("erpitemno", row.getString("erpitemno"));
+                    insertSQL.setValue("erpitemname", row.getString("erpitemname"));
+                    insertSQL.setValue("specalnote",row.getString("specalnote"));
+                    sqlList.add(insertSQL.getSQL());
 
                     JSONArray itemclassids = row.getJSONArray("itemclassid");
                     if (itemclassids.size() > 0) {
                         for (Object id : itemclassids) {
                             Long sa_itemsaleclassid = createTableID("sa_itemsaleclass");
-                            sqlFactory = new SQLFactory(this, "新增营销类别");
+                            SQLFactory  sqlFactory = new SQLFactory(this, "新增营销类别");
                             sqlFactory.addParameter("siteid", siteid);
                             sqlFactory.addParameter("sa_itemsaleclassid", sa_itemsaleclassid);
                             sqlFactory.addParameter("itemclassid", id);
@@ -898,49 +766,14 @@ public class Item extends Controller {
                             sqlList.add(DataContrlLog.createLog(this, "sa_itemsaleclass", sa_itemsaleclassid, "新增", "货品档案导入").getSQL());
                         }
                     }
-                    JSONArray sa_itemgroupids = row.getJSONArray("sa_itemgroupids");
-                    if (sa_itemgroupids.size() > 0) {
-                        sqlList.add("DELETE FROM sa_itemgroupmx WHERE siteid='" + siteid + "' AND itemid=" + itemid);
-                    }
-                    for (Object obj : sa_itemgroupids) {
-                        long sa_itemgroupid = Long.parseLong(obj.toString());
-                        Long sa_itemgroupmxid = createTableID("sa_itemgroupmx");
-                        InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sa_itemgroupmx");
-                        insertSQL.setSiteid(siteid);
-                        insertSQL.setUniqueid(sa_itemgroupmxid);
-                        insertSQL.setValue("sa_itemgroupid", sa_itemgroupid);
-                        insertSQL.setValue("itemid", itemid);
-                        insertSQL.setValue("itemno", row.getString("itemno"));
-                        insertSQL.setWhere(" not exists (select * from sa_itemgroupmx where  itemid='" + itemid + "' and  sa_itemgroupid=" + sa_itemgroupid + " and siteid='" + siteid + "')");
-                        sqlList.add(insertSQL.getSQL());
-                        sqlList.add(DataContrlLog.createLog(this, "sa_itemgroup", sa_itemgroupid, "新增", "货品档案导入").getSQL());
-                    }
 
                     sqlList.add(DataContrlLog.createLog(this, "plm_item", itemid, "新增", "货品档案导入").getSQL());
                     sqlList.add(DataContrlLog.createLog(this, "plm_itemextend", plm_itemextendid, "新增", "货品档案导入").getSQL());
-                    sqlList.add(DataContrlLog.createLog(this, "plm_item_tradefield", plm_item_tradefieldid, "新增", "货品档案导入").getSQL());
                 }
             }
 
             if (!sqlList.isEmpty()) {
                 dbConnect.runSqlUpdate(sqlList);
-                ArrayList<String> sqlList2 = new ArrayList<>();
-                for (Row row : rowssuc) {
-                    JSONArray sa_itemgroupids = row.getJSONArray("sa_itemgroupids");
-                    for (Object obj : sa_itemgroupids) {
-                        long sa_itemgroupid = Long.parseLong(obj.toString());
-                        Rows mxrows = dbConnect.runSqlQuery("SELECT itemid,itemno FROM sa_itemgroupmx WHERE sa_itemgroupid=" + sa_itemgroupid + " ORDER BY sa_itemgroupmxid LIMIT 1");
-                        if (mxrows.isNotEmpty()) {
-                            UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sa_itemgroup");
-                            updateSQL.setUniqueid(sa_itemgroupid);
-                            updateSQL.setSiteid(siteid);
-                            updateSQL.setValue("itemid", mxrows.getRow(0).getLong("itemid"));
-                            updateSQL.setValue("itemno", mxrows.getRow(0).getString("itemno"));
-                            sqlList2.add(updateSQL.getSQL());
-                        }
-                    }
-                }
-                dbConnect.runSqlUpdate(sqlList2);
             }
             if (iserr) {
                 String url = errImport(rowserr, true);
@@ -967,23 +800,6 @@ public class Item extends Controller {
         font.setBold(true);
         xssfCellStyle1.setFont(font);
 
-        CellStyle style = xssfFWorkbook.createCellStyle();
-        DataFormat format = xssfFWorkbook.createDataFormat();
-        style.setDataFormat(format.getFormat("@"));
-        // 对单独某一列进行样式赋值,第一个参数为列数,第二个参数为样式
-        for (int i = 0; i <= 34; i++) {
-            if (siteid.equals("HY")) {
-                if (i == 9 || i == 10 || i == 14 || i == 16 || i == 13) {
-                    continue;
-                }
-            } else {
-                if (i == 9 || i == 10 || i == 13 || i == 15 || i == 12) {
-                    continue;
-                }
-            }
-            sheet.setDefaultColumnStyle(i, style);
-        }
-
         ExportExcel.setBatchDetailSheetColumn2(sheet);// 设置工作薄列宽
         XSSFCellStyle titleCellStyle1 = ExportExcel.createTitleCellStyle1(xssfFWorkbook);
         XSSFCellStyle titleCellStyle2 = ExportExcel.createTitleCellStyle2(xssfFWorkbook);
@@ -996,17 +812,17 @@ public class Item extends Controller {
             for (int i1 = 0; i1 < keylist.size(); i1++) {
                 Class fieldclazztype = datarows.getFieldMeta(keylist.get(i1)).getFieldtype();
                 if (fieldclazztype == Integer.class) {
-                    datarow.createCell(i1).setCellValue(row.getInteger((String) keylist.get(i1)));
+                    datarow.createCell(i1).setCellValue(row.getInteger(keylist.get(i1)));
                 } else if (fieldclazztype == Long.class) {
-                    datarow.createCell(i1).setCellValue(row.getLong((String) keylist.get(i1)));
+                    datarow.createCell(i1).setCellValue(row.getLong(keylist.get(i1)));
                 } else if (fieldclazztype == Float.class) {
-                    datarow.createCell(i1).setCellValue(row.getFloat((String) keylist.get(i1)));
+                    datarow.createCell(i1).setCellValue(row.getFloat(keylist.get(i1)));
                 } else if (fieldclazztype == Double.class) {
-                    datarow.createCell(i1).setCellValue(row.getDouble((String) keylist.get(i1)));
+                    datarow.createCell(i1).setCellValue(row.getDouble(keylist.get(i1)));
                 } else {
-                    datarow.createCell(i1).setCellValue(row.getString((String) keylist.get(i1)));
+                    datarow.createCell(i1).setCellValue(row.getString(keylist.get(i1)));
                 }
-                if (i1 == 34) {
+                if (i1 == 15) {
                     datarow.getCell(i1).setCellStyle(xssfCellStyle1);
                 }
             }
@@ -1493,44 +1309,23 @@ public class Item extends Controller {
             keys.add("itemno");
             keys.add("itemname");
             keys.add("spec");
-            keys.add("caliber");
-            keys.add("nominalpressure");
             keys.add("model");
-            keys.add("categories");
             keys.add("unitname");
             keys.add("erpitemname");
             keys.add("erpitemno");
-            keys.add("standards");
-            keys.add("standardsmx");
+            keys.add("assistance");
+            keys.add("explains");
+            keys.add("goodstype");
             keys.add("orderminqty");
             keys.add("orderaddqty");
-            keys.add("material");
-            keys.add("stockstatus1");
-            keys.add("stockstatus2");
-            keys.add("tradefield");
-            keys.add("delivery");
-            keys.add("prodline");
-            keys.add("device");
             keys.add("specalnote");
-            keys.add("isservice");
-            keys.add("pressure");
-            keys.add("butterflyplatedrive");
-            keys.add("connection");
-            keys.add("valveplatematerial");
-            keys.add("bodymaterial");
-            keys.add("actuatortype");
-            keys.add("actuatorbrand");
-            keys.add("isbutterfly");
             keys.add("brandname");
             keys.add("itemclassnum");
-            keys.add("groupnum");
 
             HashMap<String, CellType> cellmap = new HashMap<>();
-            cellmap.put("itemno", CellType.STRING);
-            cellmap.put("spec", CellType.STRING);
-            cellmap.put("model", CellType.STRING);
-            cellmap.put("erpitemno", CellType.STRING);
-            cellmap.put("itemclassnum", CellType.STRING);
+            for (String key : keys) {
+                cellmap.put(key, CellType.STRING);
+            }
 
 
             Rows rows = e.getSheetRows(0, keys, cellmap, 3);
@@ -1540,63 +1335,21 @@ public class Item extends Controller {
             Rows rowserr = new Rows();
             Rows rowssuc = new Rows();
             Boolean iserr = verify(rows, rowserr, rowssuc, false);
-//            System.out.println(rowssuc.toString());
             if (!rowssuc.isEmpty()) {
-
                 RowsMap plm_item = getTableColumns("plm_item");
-                RowsMap plm_item_tradefield = getTableColumns("plm_item_tradefield");
-                RowsMap sa_itemsaleclass = getTableColumns("sa_itemsaleclass");
                 RowsMap plm_itemextend = getTableColumns("plm_itemextend");
                 for (Row row : rowssuc) {
-
                     StringBuilder item_key = new StringBuilder();
-                    StringBuilder item_tradefield_key = new StringBuilder();
-                    StringBuilder item_tradefield_value = new StringBuilder();
-                    StringBuilder itemclass_key = new StringBuilder();
-                    StringBuilder itemclass_value = new StringBuilder();
                     StringBuilder itemextend_key = new StringBuilder();
                     for (String key : row.keySet()) {
                         Object value = row.get(key);
-                        if (key.equals("nominalpressure") && StringUtils.isEmpty(value.toString())) {
-                            value = "";
-                        }
                         if (StringUtils.isNotEmpty(value.toString()) && !key.equals("itemid") && !key.equals("itemno")) {
-                            String[] nominalpressure;
-                            if (key.equals("nominalpressure")) {
-                                nominalpressure = value.toString().split("/");
-                                if (value.toString().contains("\n")) {
-                                    nominalpressure = value.toString().split("\n");
-                                }
-
-                                JSONArray nominalpressureJsonArray = JSONArray.parseArray(JSON.toJSONString(nominalpressure));
-                                value = nominalpressureJsonArray.toJSONString();
-                            }
                             if (plm_item.containsKey(key)) {
                                 if (item_key.length() > 0) {
                                     item_key.append(",");
                                 }
                                 item_key.append(key).append("='").append(value).append("'");
-                            } else if (plm_item_tradefield.containsKey(key)) {
-                                if (item_tradefield_key.length() > 0) {
-                                    item_tradefield_key.append(",");
-                                }
-                                if (item_tradefield_value.length() > 0) {
-                                    item_tradefield_value.append(",");
-                                }
-                                item_tradefield_key.append(key);
-                                item_tradefield_value.append("'").append(value).append("'");
-                            }
-//                            else if (sa_itemsaleclass.containsKey(key)) {
-//                                if (itemclass_key.length() > 0) {
-//                                    itemclass_key.append(",");
-//                                }
-//                                if (itemclass_value.length() > 0) {
-//                                    itemclass_value.append(",");
-//                                }
-//                                itemclass_key.append(key);
-//                                itemclass_value.append("'").append(value).append("'");
-//                            }
-                            else if (plm_itemextend.containsKey(key)) {
+                            }else if (plm_itemextend.containsKey(key)) {
                                 if (itemextend_key.length() > 0) {
                                     itemextend_key.append(",");
                                 }
@@ -1609,14 +1362,6 @@ public class Item extends Controller {
                         item_key.append(",changeuserid=").append(userid).append(",changeby='").append(username).append("',changedate=CURRENT_TIME");
                         sqlList.add("update plm_item set " + item_key + " where siteid='" + siteid + "' and itemid=" + itemid);
                     }
-                    if (item_tradefield_key.length() > 0) {
-                        sqlList.add("delete from plm_item_tradefield where siteid='" + siteid + "' and itemid=" + itemid);
-
-                        long plm_item_tradefieldid = createTableID("plm_item_tradefield");
-                        item_tradefield_key.append(",plm_item_tradefieldid,itemid,changeuserid,siteid");
-                        item_tradefield_value.append(",").append(plm_item_tradefieldid).append(",").append(itemid).append(",").append(userid).append(",'").append(siteid).append("'");
-                        sqlList.add("insert into plm_item_tradefield (" + item_tradefield_key + ") values(" + item_tradefield_value + ")");
-                    }
                     if (row.getJSONArray("itemclassid").size() > 0) {
                         JSONArray itemclassids = row.getJSONArray("itemclassid");
                         sqlList.add("delete from sa_itemsaleclass where siteid='" + siteid + "' and itemid=" + itemid);
@@ -1630,28 +1375,8 @@ public class Item extends Controller {
                         }
 
                     }
-                    JSONArray sa_itemgroupids = row.getJSONArray("sa_itemgroupids");
-                    if (sa_itemgroupids.size() > 0) {
-                        sqlList.add("DELETE FROM sa_itemgroupmx WHERE siteid='" + siteid + "' AND itemid=" + itemid);
-                    }
-                    for (Object obj : sa_itemgroupids) {
-                        long sa_itemgroupid = Long.parseLong(obj.toString());
-                        Long sa_itemgroupmxid = createTableID("sa_itemgroupmx");
-                        InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sa_itemgroupmx");
-                        insertSQL.setSiteid(siteid);
-                        insertSQL.setUniqueid(sa_itemgroupmxid);
-                        insertSQL.setValue("sa_itemgroupid", sa_itemgroupid);
-                        insertSQL.setValue("itemid", itemid);
-                        insertSQL.setValue("itemno", row.getString("itemno"));
-                        insertSQL.setWhere(" not exists (select * from sa_itemgroupmx where  itemid='" + itemid + "' and  sa_itemgroupid=" + sa_itemgroupid + " and siteid='" + siteid + "')");
-                        sqlList.add(insertSQL.getSQL());
-                        sqlList.add(DataContrlLog.createLog(this, "sa_itemgroup", sa_itemgroupid, "新增", "货品档案导入").getSQL());
-                    }
                     if (itemextend_key.length() > 0) {
                         itemextend_key.append(",changeuserid=").append(userid).append(",changeby='").append(username).append("',changedate=CURRENT_TIME");
-                        if (StringUtils.isEmpty(row.get("nominalpressure").toString())) {
-                            itemextend_key.append(",nominalpressure=null");
-                        }
                         sqlList.add("update plm_itemextend set " + itemextend_key + " where siteid='" + siteid + "' and itemid=" + itemid);
                     }
                     sqlList.add(DataContrlLog.createLog(this, "plm_item", itemid, "编辑", "编辑导入修改").getSQL());
@@ -1660,23 +1385,6 @@ public class Item extends Controller {
 
             if (!sqlList.isEmpty()) {
                 dbConnect.runSqlUpdate(sqlList);
-                ArrayList<String> sqlList2 = new ArrayList<>();
-                for (Row row : rowssuc) {
-                    JSONArray sa_itemgroupids = row.getJSONArray("sa_itemgroupids");
-                    for (Object obj : sa_itemgroupids) {
-                        long sa_itemgroupid = Long.parseLong(obj.toString());
-                        Rows mxrows = dbConnect.runSqlQuery("SELECT itemid,itemno FROM sa_itemgroupmx WHERE sa_itemgroupid=" + sa_itemgroupid + " ORDER BY sa_itemgroupmxid LIMIT 1");
-                        if (mxrows.isNotEmpty()) {
-                            UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sa_itemgroup");
-                            updateSQL.setUniqueid(sa_itemgroupid);
-                            updateSQL.setSiteid(siteid);
-                            updateSQL.setValue("itemid", mxrows.getRow(0).getLong("itemid"));
-                            updateSQL.setValue("itemno", mxrows.getRow(0).getString("itemno"));
-                            sqlList2.add(updateSQL.getSQL());
-                        }
-                    }
-                }
-                dbConnect.runSqlUpdate(sqlList2);
                 System.err.println("货品导入更新结束");
             }
             if (iserr) {
@@ -1696,23 +1404,12 @@ public class Item extends Controller {
     public Boolean verify(Rows rows, Rows rowserr, Rows rowssuc, Boolean isInsert) throws YosException {
         RowsMap itemnoRowsMap = dbConnect.runSqlQuery("select itemid,itemno from plm_item t1  where isshow=1 and siteid='" + siteid + "'").toRowsMap("itemno");
         RowsMap unitnameRowsMap = dbConnect.runSqlQuery("select unitid,unitname from plm_unit where siteid='" + siteid + "'").toRowsMap("unitname");
-        RowsMap typeRowsMap = dbConnect.runSqlQuery("select t1.typename,t2.value from sys_optiontype t1 left join sys_optiontypemx t2 on t1.optiontypeid=t2.optiontypeid and t2.siteid='" + siteid + "' where t1.typename in ('categories','tradefield','itemstandards','pressurelevel','itemmaterial','butterflyplatedrive','valveplatematerial','bodymaterial','actuatortype','actuatorbrand','connectionmode') and t2.isused=1").toRowsMap("typename");
-        RowsMap groupnumMap = dbConnect.runSqlQuery("SELECT groupnum,sa_itemgroupid from sa_itemgroup WHERE siteid='" + siteid + "' ").toRowsMap("groupnum");
         RowsMap imitemnoRowsMap = rows.toRowsMap("itemno");
         Rows itemcalss = dbConnect.runSqlQuery("select t1.sa_brandid,t1.brandname,t2.itemclassid,t2.itemclassnum from sa_brand t1 inner join plm_itemclass t2 on t1.siteid=t2.siteid and t1.sa_brandid=t2.sa_brandid where t1.siteid='" + siteid + "'");
         RowsMap itemclassRowsMap = itemcalss.toRowsMap("brandname");
-
-        ArrayList<String> tradefield = typeRowsMap.get("tradefield").toArrayList("value");
-        ArrayList<String> itemstandards = typeRowsMap.get("itemstandards").toArrayList("value");
-        ArrayList<String> pressurelevel = typeRowsMap.get("pressurelevel").toArrayList("value");
-        ArrayList<String> itemmaterial = typeRowsMap.get("itemmaterial").toArrayList("value");
-        ArrayList<String> butterflyplatedrive = typeRowsMap.get("butterflyplatedrive").toArrayList("value");
-        ArrayList<String> valveplatematerial = typeRowsMap.get("valveplatematerial").toArrayList("value");
-        ArrayList<String> bodymaterial = typeRowsMap.get("bodymaterial").toArrayList("value");
-        ArrayList<String> actuatortype = typeRowsMap.get("actuatortype").toArrayList("value");
-        ArrayList<String> actuatorbrand = typeRowsMap.get("actuatorbrand").toArrayList("value");
-        ArrayList<String> connectionmode = typeRowsMap.get("connectionmode").toArrayList("value");
-        ArrayList<String> categories = typeRowsMap.get("categories").toArrayList("value");
+        RowsMap goodstypeRowsMap=dbConnect.runSqlQuery("SELECT t1.* from sys_optiontypemx t1 " +
+                "inner join sys_optiontype t2 ON t2.optiontypeid=t1.optiontypeid " +
+                "WHERE t2.typename='goodstype'").toRowsMap("value");
 
         for (Row row : rows) {
             Boolean iserr = false;
@@ -1721,18 +1418,40 @@ public class Item extends Controller {
             String itemclassnum = row.getString("itemclassnum");
             String itemno = row.getString("itemno");
             String unitname = row.getString("unitname");
+            String goodstype = row.getString("goodstype");
+            if (StringUtils.isEmpty(row.getString("orderminqty"))) {
+                iserr = true;
+                errmsg.append("该商品销售起订量为空;");
+            }
+            if (StringUtils.isEmpty(row.getString("orderaddqty"))) {
+                iserr = true;
+                errmsg.append("该商品销售增量为空;");
+            }
+            // 在数据格式验证部分
             try {
-                if (StringUtils.isNotEmpty(row.getString("orderminqty"))) row.getBigDecimal("orderminqty");
-                if (StringUtils.isNotEmpty(row.getString("orderaddqty"))) row.getBigDecimal("orderaddqty");
-                if (StringUtils.isNotEmpty(row.getString("stockstatus1"))) row.getBigDecimal("stockstatus1");
-                if (StringUtils.isNotEmpty(row.getString("stockstatus2"))) row.getBigDecimal("stockstatus2");
-                if (StringUtils.isNotEmpty(row.getString("delivery"))) row.getBigDecimal("delivery");
-            } catch (Exception e1) {
+                if (StringUtils.isNotEmpty(row.getString("orderminqty"))) {
+                    BigDecimal orderMinQty = row.getBigDecimal("orderminqty");
+                    if (orderMinQty.compareTo(BigDecimal.ZERO) == 0) {
+                        iserr = true;
+                        errmsg.append("该商品销售起订量为0;");
+                    }
+                }
+            } catch (Exception e) {
+                iserr = true;
+                errmsg.append("销售起订量格式错误;");
+            }
+            // 在数据格式验证部分
+            try {
+                if (StringUtils.isNotEmpty(row.getString("orderaddqty"))) {
+                    BigDecimal orderAddQty = row.getBigDecimal("orderaddqty");
+                    if (orderAddQty.compareTo(BigDecimal.ZERO) == 0) {
+                        iserr = true;
+                        errmsg.append("该商品销售增量为0;");
+                    }
+                }
+            } catch (Exception e) {
                 iserr = true;
-                errmsg.append("销售起订量/销售增量/库存充足标准/库存缺货标准/销售交期填写格式错误;");
-//                row.put("msg", "错误信息:销售起订量/销售增量/库存充足标准/库存缺货标准/销售交期填写格式错误");
-//                rowserr.add(row);
-//                continue;
+                errmsg.append("该商品销售增量格式错误;");
             }
             if (isInsert) {
                 if (StringUtils.isEmpty(itemno)
@@ -1740,154 +1459,45 @@ public class Item extends Controller {
                         || StringUtils.isEmpty(unitname)
                         || StringUtils.isEmpty(row.getString("erpitemname"))
                         || StringUtils.isEmpty(row.getString("erpitemno"))
-                        || StringUtils.isEmpty(row.getString("tradefield"))) {
+                        ) {
                     iserr = true;
-                    errmsg.append("产品编号/产品名称/商品大类/计量单位/品号/品号/领域,不能为空;");
-//                    row.put("msg", "错误信息:产品编号/产品名称/商品大类/计量单位/品号/品号/领域,不能为空");
-//                    rowserr.add(row);
-//                    continue;
-                }
-                if (StringUtils.isEmpty(row.getString("categories"))) {
-                    iserr = true;
-                    errmsg.append("产品编号/产品名称/商品大类/计量单位/品号/品号/领域,不能为空;");
-//                    row.put("msg", "错误信息:产品编号/产品名称/商品大类/计量单位/品号/品号/领域,不能为空");
-//                    rowserr.add(row);
-//                    continue;
+                    errmsg.append("产品编号/产品名称/计量单位/品号/品号,不能为空;");
                 }
+
                 if (itemnoRowsMap.containsKey(itemno)) {
                     iserr = true;
                     errmsg.append("商品已存在;");
-//                    row.put("msg", "错误信息:商品已存在");
-//                    rowserr.add(row);
-//                    continue;
                 }
-                row.put("isservice", row.getString("isservice").equals("是") ? 1 : 0);
-                row.put("isbutterfly", row.getString("isbutterfly").equals("是") ? 1 : 0);
             } else {
                 if (!itemnoRowsMap.containsKey(itemno)) {
                     iserr = true;
                     errmsg.append("商品不存在;");
-//                    row.put("msg", "错误信息:商品不存在");
-//                    rowserr.add(row);
-//                    continue;
                 } else {
-                    if (StringUtils.isNotEmpty(row.getString("isservice"))) {
-                        row.put("isservice", row.getString("isservice").equals("是") ? 1 : 0);
-                    }
-                    if (StringUtils.isNotEmpty(row.getString("isbutterfly"))) {
-                        row.put("isbutterfly", row.getString("isbutterfly").equals("是") ? 1 : 0);
-                    }
                     row.put("itemid", itemnoRowsMap.get(itemno).get(0).getLong("itemid"));
                 }
             }
             if (StringUtils.isEmpty("itemno")) {
                 iserr = true;
                 errmsg.append("产品编号不能为空;");
-//                row.put("msg", "错误信息:产品编号不能为空");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (siteid.equals("HY") || siteid.equals("TZ")) {
-                if (StringUtils.isNotEmpty(row.getString("categories")) && !categories.contains(row.getString("categories"))) {
-                    iserr = true;
-                    errmsg.append("商品大类不存在;");
-//                    row.put("msg", "错误信息:商品大类不存在");
-//                    rowserr.add(row);
-//                    continue;
-                }
             }
 
             if ((StringUtils.isEmpty(brandname) && StringUtils.isNotEmpty(itemclassnum)) || (StringUtils.isNotEmpty(brandname) && StringUtils.isEmpty(itemclassnum))) {
                 iserr = true;
                 errmsg.append("不能单独填写品牌和营销类别;");
-//                row.put("msg", "错误信息:不能单独填写品牌和营销类别");
-//                rowserr.add(row);
-//                continue;
             }
             if (imitemnoRowsMap.containsKey(itemno) && imitemnoRowsMap.get(itemno).size() > 1) {
                 iserr = true;
                 errmsg.append("本次导入商品中存在重复的商品编号;");
-//                row.put("msg", "错误信息:本次导入商品中存在重复的商品编号");
-//                rowserr.add(row);
-//                continue;
             }
 
             if (StringUtils.isNotEmpty(unitname) && !unitnameRowsMap.containsKey(unitname)) {
                 iserr = true;
                 errmsg.append("计量单位不存在;");
-//                row.put("msg", "错误信息:计量单位不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("tradefield")) && !tradefield.contains(row.getString("tradefield"))) {
-                iserr = true;
-                errmsg.append("领域不存在;");
-//                row.put("msg", "错误信息:领域不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("standards")) && !itemstandards.contains(row.getString("standards"))) {
-                iserr = true;
-                errmsg.append("产品标准不存在;");
-//                row.put("msg", "错误信息:产品标准不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("pressure")) && !pressurelevel.contains(row.getString("pressure"))) {
-                iserr = true;
-                errmsg.append("压力等级不存在;");
-//                row.put("msg", "错误信息:压力等级不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("material")) && !itemmaterial.contains(row.getString("material"))) {
-                iserr = true;
-                errmsg.append("材质不存在;");
-//                row.put("msg", "错误信息:材质不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("butterflyplatedrive")) && !butterflyplatedrive.contains(row.getString("butterflyplatedrive"))) {
-                iserr = true;
-                errmsg.append("蝶板驱动不存在;");
-//                row.put("msg", "错误信息:蝶板驱动不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("valveplatematerial")) && !valveplatematerial.contains(row.getString("valveplatematerial"))) {
-                iserr = true;
-                errmsg.append("阀板材质不存在;");
-//                row.put("msg", "错误信息:阀板材质不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("bodymaterial")) && !bodymaterial.contains(row.getString("bodymaterial"))) {
-                iserr = true;
-                errmsg.append("阀体材质不存在;");
-//                row.put("msg", "错误信息:阀体材质不存在");
-//                rowserr.add(row);
-//                continue;
             }
-            if (StringUtils.isNotEmpty(row.getString("actuatortype")) && !actuatortype.contains(row.getString("actuatortype"))) {
-                iserr = true;
-                errmsg.append("执行器类型不存在;");
-//                row.put("msg", "错误信息:执行器类型不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("actuatorbrand")) && !actuatorbrand.contains(row.getString("actuatorbrand"))) {
-                iserr = true;
-                errmsg.append("执行器品牌不存在;");
-//                row.put("msg", "错误信息:执行器品牌不存在");
-//                rowserr.add(row);
-//                continue;
-            }
-            if (StringUtils.isNotEmpty(row.getString("connection")) && !connectionmode.contains(row.getString("connection"))) {
+
+            if (StringUtils.isNotEmpty(goodstype) && !goodstypeRowsMap.containsKey(goodstype)) {
                 iserr = true;
-                errmsg.append("连接形式不存在;");
-//                row.put("msg", "错误信息:连接形式不存在");
-//                rowserr.add(row);
-//                continue;
+                errmsg.append("该商品备货分类不存在;");
             }
             if (StringUtils.isNotEmpty(brandname) && StringUtils.isNotEmpty(itemclassnum)) {
                 String[] itemclassnums = itemclassnum.split("/");
@@ -1898,26 +1508,6 @@ public class Item extends Controller {
                     }
                 }
             }
-            String groupnum = row.getString("groupnum");
-            if (StringUtils.isNotEmpty(groupnum)) {
-                String[] groupnums = groupnum.split("/");
-                for (String str : groupnums) {
-                    if (!groupnumMap.containsKey(str)) {
-                        iserr = true;
-                        errmsg.append("该商品组不存在;");
-                    }
-                }
-            }
-            if (StringUtils.isNotEmpty(groupnum)) {
-                String[] groupnums = groupnum.split("/");
-                ArrayList<Long> ids = new ArrayList<>();
-                for (String str : groupnums) {
-                    if (groupnumMap.containsKey(str)) {
-                        ids.add(groupnumMap.get(str).get(0).getLong("sa_itemgroupid"));
-                    }
-                }
-                row.put("sa_itemgroupids", ids);
-            }
             if (iserr) {
                 row.put("msg", errmsg);
                 rowserr.add(row);
@@ -1951,78 +1541,39 @@ public class Item extends Controller {
         map.put("itemno", "产品编码");
         map.put("itemname", "产品名称");
         map.put("spec", "型号");
-        map.put("caliber", "公称通径");
-        map.put("nominalpressure", "公称压力");
-        map.put("model", "规格尺寸");
-        map.put("categories", "商品大类");
+        map.put("model", "规格");
         map.put("unitname", "计量单位");
         map.put("erpitemname", "品名");
         map.put("erpitemno", "品号");
-        map.put("standards", "产品标准");
-        map.put("standards", "产品标准明细");
+        map.put("assistance", "辅助说明");
+        map.put("explains", "俗称释义");
+        map.put("goodstype", "备货分类");
         map.put("orderminqty", "销售增量");
         map.put("orderaddqty", "销售起订量");
-        map.put("material", "材质");
-        map.put("stockstatus1", "库存充足标准");
-        map.put("stockstatus2", "库存缺货标准");
-        map.put("tradefield", "领域");
-        map.put("delivery", "销售交期");
-        map.put("prodline", "产线");
-        map.put("device", "装置");
-        map.put("specalnote", "特殊说明");
-        map.put("isservice", "是否服务物料");
-        map.put("pressure", "压力等级");
-        map.put("butterflyplatedrive", "蝶板驱动");
-        map.put("connection", "连接形式");
-        map.put("valveplatematerial", "阀板材质");
-        map.put("bodymaterial", "阀体材质");
-        map.put("actuatortype", "执行器类型");
-        map.put("actuatorbrand", "执行器品牌");
-        map.put("isbutterfly", "是否中线蝶阀");
+        map.put("specalnote", "备注");
         map.put("brandname", "品牌");
         map.put("itemclassnum", "营销类别编码");
-        map.put("groupnum", "商品组编号");
         map.put("msg", "错误信息");
+
         ArrayList<String> colNameList = new ArrayList<String>();
         HashMap<String, Class> keytypemap = new HashMap<String, Class>();
         colNameList.add("itemno");
         colNameList.add("itemname");
         colNameList.add("spec");
-        colNameList.add("caliber");
-        keytypemap.put("caliber", String.class);
-        colNameList.add("nominalpressure");
-        keytypemap.put("nominalpressure", String.class);
         colNameList.add("model");
-        colNameList.add("categories");
-        keytypemap.put("categories", String.class);
         colNameList.add("unitname");
         colNameList.add("erpitemname");
         colNameList.add("erpitemno");
-        colNameList.add("standards");
-        colNameList.add("standardsmx");
+        colNameList.add("assistance");
+        colNameList.add("explains");
+        colNameList.add("goodstype");
         colNameList.add("orderminqty");
         colNameList.add("orderaddqty");
-        colNameList.add("material");
-        colNameList.add("stockstatus1");
-        colNameList.add("stockstatus2");
-        colNameList.add("tradefield");
-        colNameList.add("delivery");
-        colNameList.add("prodline");
-        colNameList.add("device");
         colNameList.add("specalnote");
-        colNameList.add("isservice");
-        colNameList.add("pressure");
-        colNameList.add("butterflyplatedrive");
-        colNameList.add("connection");
-        colNameList.add("valveplatematerial");
-        colNameList.add("bodymaterial");
-        colNameList.add("actuatortype");
-        colNameList.add("actuatorbrand");
-        colNameList.add("isbutterfly");
         colNameList.add("brandname");
         colNameList.add("itemclassnum");
-        colNameList.add("groupnum");
         colNameList.add("msg");
+
         keytypemap.put("itemno", String.class);
         keytypemap.put("itemname", String.class);
         keytypemap.put("spec", String.class);
@@ -2030,30 +1581,14 @@ public class Item extends Controller {
         keytypemap.put("unitname", String.class);
         keytypemap.put("erpitemname", String.class);
         keytypemap.put("erpitemno", String.class);
-        keytypemap.put("standards", String.class);
-        keytypemap.put("standardsmx", String.class);
+        keytypemap.put("assistance", String.class);
+        keytypemap.put("explains", String.class);
+        keytypemap.put("goodstype", String.class);
         keytypemap.put("orderminqty", String.class);
         keytypemap.put("orderaddqty", String.class);
-        keytypemap.put("material", String.class);
-        keytypemap.put("stockstatus1", String.class);
-        keytypemap.put("stockstatus2", String.class);
-        keytypemap.put("tradefield", String.class);
-        keytypemap.put("delivery", String.class);
-        keytypemap.put("prodline", String.class);
-        keytypemap.put("device", String.class);
         keytypemap.put("specalnote", String.class);
-        keytypemap.put("isservice", String.class);
-        keytypemap.put("pressure", String.class);
-        keytypemap.put("butterflyplatedrive", String.class);
-        keytypemap.put("connection", String.class);
-        keytypemap.put("valveplatematerial", String.class);
-        keytypemap.put("bodymaterial", String.class);
-        keytypemap.put("actuatortype", String.class);
-        keytypemap.put("actuatorbrand", String.class);
-        keytypemap.put("isbutterfly", String.class);
         keytypemap.put("brandname", String.class);
         keytypemap.put("itemclassnum", String.class);
-        keytypemap.put("groupnum", String.class);
         keytypemap.put("msg", String.class);
         rowserr.setFieldList(colNameList);
         rowserr.setFieldTypeMap(keytypemap);