Browse Source

Merge remote-tracking branch 'origin/release-201827-wangcz' into release-201827-wangcz

wangcz 7 years ago
parent
commit
ab60159ee6

+ 20 - 20
src/main/java/com/uas/platform/b2c/prod/commodity/constant/ModifyConstant.java

@@ -18,17 +18,17 @@ public class ModifyConstant {
     /**
      * 导入最大行数
      */
-    public static final int EXCEL_MAX_ROW = 2000;
+    public static final int EXCEL_MAX_ROW = 2002;
 
     /**
      * The constant TOTAL_ROW.
      */
-    public static final int TOTAL_COLUMN = 22;
+    public static final int TOTAL_COLUMN = 21;
 
     /**
      * The constant MAX_TOTAL_COLUMN.
      */
-    public static final int MAX_TOTAL_COLUMN = 23;
+    public static final int MAX_TOTAL_COLUMN = 22;
 
     /**
      * 产品编码
@@ -38,17 +38,17 @@ public class ModifyConstant {
     /**
      * The constant PRODUCT_KIND.
      */
-    public static final int PRODUCT_KIND = 1;
+    public static final int PRODUCT_KIND = 2;
 
     /**
      * The constant PRODUCT_CODE.
      */
-    public static final int PRODUCT_CODE = 2;
+    public static final int PRODUCT_CODE = 3;
 
     /**
      * The constant PRODUCT_BRAND.
      */
-    public static final int PRODUCT_BRAND = 3;
+    public static final int PRODUCT_BRAND = 1;
 
     /**
      * The constant PRODUCT_BRAND.
@@ -63,67 +63,67 @@ public class ModifyConstant {
     /**
      * The constant PACKAGE_METHOD.
      */
-    public static final int PACKAGE_METHOD = 6;
+    public static final int PACKAGE_METHOD = 5;
 
     /**
      * The constant MIN_DELIVERY.
      */
-    public static final int MIN_DELIVERY = 7;
+    public static final int MIN_DELIVERY = 6;
 
     /**
      * The constant MAX_DELIVERY.
      */
-    public static final int MAX_DELIVERY = 8;
+    public static final int MAX_DELIVERY = 7;
 
     /**
      * The constant BREAK_UP.
      */
-    public static final int BREAK_UP = 9;
+    public static final int BREAK_UP = 8;
 
     /**
      * The constant PACKAGE_NUMBER.
      */
-    public static final int PACKAGE_NUMBER = 10;
+    public static final int PACKAGE_NUMBER = 9;
 
     /**
      * 最小起订量
      */
-    public static final int BUY_MIN_QTY = 11;
+    public static final int BUY_MIN_QTY = 10;
 
     /**
      * 分段价格开始
      */
-    public static final int PRICE_FIRST = 12;
+    public static final int PRICE_FIRST = 11;
 
     /**
      * 第二个分段
      */
-    public static final int QTY_SECOND_START = 13;
+    public static final int QTY_SECOND_START = 12;
 
     /**
      * 第二个分段
      */
-    public static final int PRICE_SECOND = 14;
+    public static final int PRICE_SECOND = 13;
 
     /**
      * 第三个分段
      */
-    public static final int QTY_THIRD_START = 15;
+    public static final int QTY_THIRD_START = 14;
 
     /**
      * 第三个分段
      */
-    public static final int PRICE_THIRD = 16;
+    public static final int PRICE_THIRD = 15;
 
     /**
      * The constant SALE_METHOD.
      */
-    public static final int SALE_METHOD = 17;
+    public static final int SALE_METHOD = 16;
 
     /**
      * The constant RESERVE_NUMBER.
      */
-    public static final int RESERVE_NUMBER = 18;
+    public static final int RESERVE_NUMBER = 17;
 
     /**
      * The constant CUSTOM_LABEL.
@@ -133,7 +133,7 @@ public class ModifyConstant {
     /**
      * The constant SALE_STATUS.
      */
-    public static final int SALE_STATUS = 20;
+    public static final int SALE_STATUS = 19;
 
     /**
      * The constant MATCH_STATUS.

+ 25 - 25
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -622,21 +622,21 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				rowNum, ModifyConstant.PRODUCT_SPEC);
 		aProduct.setSpec(StringUtilB2C.getStr(specValue));
 
-		Cell productCell = row.getCell(ModifyConstant.PRODUCE_DATE);
-		if (productCell != null && productCell.getCellType() == 0) {
-			if (HSSFDateUtil.isCellDateFormatted(productCell)) {
-				SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-				String productStr = sdf.format(productCell.getDateCellValue());
-				aProduct.setProductDateByExcel(productStr);
-			} else {
-				aProduct.setProductDateByExcel(readWorkBookCell(row.getCell(ModifyConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
-						rowNum, ModifyConstant.PRODUCE_DATE));
-			}
-		} else {
-			Object produceValue = readWorkBookCell(row.getCell(ModifyConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
-					rowNum, ModifyConstant.PRODUCE_DATE);
-			aProduct.setProductDateByExcel(produceValue);
-		}
+//		Cell productCell = row.getCell(ModifyConstant.PRODUCE_DATE);
+//		if (productCell != null && productCell.getCellType() == 0) {
+//			if (HSSFDateUtil.isCellDateFormatted(productCell)) {
+//				SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+//				String productStr = sdf.format(productCell.getDateCellValue());
+//				aProduct.setProductDateByExcel(productStr);
+//			} else {
+//				aProduct.setProductDateByExcel(readWorkBookCell(row.getCell(ModifyConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
+//						rowNum, ModifyConstant.PRODUCE_DATE));
+//			}
+//		} else {
+//			Object produceValue = readWorkBookCell(row.getCell(ModifyConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
+//					rowNum, ModifyConstant.PRODUCE_DATE);
+//			aProduct.setProductDateByExcel(produceValue);
+//		}
 
 		Object packageMethodValue = readWorkBookCell(row.getCell(ModifyConstant.PACKAGE_METHOD), Cell.CELL_TYPE_STRING,
 				rowNum, ModifyConstant.PACKAGE_METHOD);
@@ -683,15 +683,15 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
             aProduct.setStatusByExcel(statusValue);
         }
 
-		Object tagValue = readWorkBookCell(row.getCell(ModifyConstant.CUSTOM_LABEL), Cell.CELL_TYPE_STRING,
-				rowNum, ModifyConstant.CUSTOM_LABEL);
-        if (!StringUtils.isEmpty(tagValue)) {
-            aProduct.setTagByExcel(tagValue.toString().trim());
-        }
-		// 自定义标签不为null,则检查是否重复
-		if (aProduct.getCode() != null && aProduct.getBrandNameEn() != null && aProduct.getTag() != null) {
-			resetTag(aProduct);
-		}
+//		Object tagValue = readWorkBookCell(row.getCell(ModifyConstant.CUSTOM_LABEL), Cell.CELL_TYPE_STRING,
+//				rowNum, ModifyConstant.CUSTOM_LABEL);
+//        if (!StringUtils.isEmpty(tagValue)) {
+//            aProduct.setTagByExcel(tagValue.toString().trim());
+//        }
+//		// 自定义标签不为null,则检查是否重复
+//		if (aProduct.getCode() != null && aProduct.getBrandNameEn() != null && aProduct.getTag() != null) {
+//			resetTag(aProduct);
+//		}
 	}
 
 	/**
@@ -934,7 +934,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			aProduct.setUsdTaxRate(0d);
 		} else {
 			aProduct.setCurrency("RMB");
-			aProduct.setRmbTaxRate(0.17d);
+			aProduct.setRmbTaxRate(0.16d);
 		}
 	}
 

BIN
src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls