|
|
@@ -1113,22 +1113,27 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
}
|
|
|
aProduct.setReserveByExcel(reserveValue);
|
|
|
|
|
|
- Cell productCell = row.getCell(UploadConstant.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("");
|
|
|
- aProduct.setProductDateByExcel(readWorkBookCell(row.getCell(ModifyConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
|
|
|
- rowNum, ModifyConstant.PRODUCE_DATE));
|
|
|
- }
|
|
|
- } else {
|
|
|
- Object produceValue = readWorkBookCell(row.getCell(UploadConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
|
|
|
- rowNum, UploadConstant.PRODUCE_DATE);
|
|
|
- aProduct.setProductDateByExcel(produceValue);
|
|
|
- }
|
|
|
+ Object costPrice = readWorkBookCell(row.getCell(UploadConstant.COST_PRICE), Cell.CELL_TYPE_STRING,
|
|
|
+ rowNum, UploadConstant.COST_PRICE);
|
|
|
+ aProduct.setCostPriceByExcel(costPrice);
|
|
|
+
|
|
|
+ // 生产日期暂时做了隐藏
|
|
|
+// Cell productCell = row.getCell(UploadConstant.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("");
|
|
|
+// aProduct.setProductDateByExcel(readWorkBookCell(row.getCell(ModifyConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
|
|
|
+// rowNum, ModifyConstant.PRODUCE_DATE));
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// Object produceValue = readWorkBookCell(row.getCell(UploadConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
|
|
|
+// rowNum, UploadConstant.PRODUCE_DATE);
|
|
|
+// aProduct.setProductDateByExcel(produceValue);
|
|
|
+// }
|
|
|
|
|
|
Object packageMethodValue = readWorkBookCell(row.getCell(UploadConstant.PACKAGE_METHOD), Cell.CELL_TYPE_STRING,
|
|
|
rowNum, UploadConstant.PACKAGE_METHOD);
|
|
|
@@ -1151,13 +1156,13 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
rowNum, UploadConstant.BUY_MIN_QTY);
|
|
|
aProduct.setMinBuyQtyByExcel(buyQtyValue);
|
|
|
|
|
|
- Object tagValue = readWorkBookCell(row.getCell(UploadConstant.CUSTOM_LABEL), Cell.CELL_TYPE_STRING,
|
|
|
- rowNum, UploadConstant.CUSTOM_LABEL);
|
|
|
- aProduct.setTagByExcel(tagValue);
|
|
|
- // 自定义标签不为null,则检查是否重复
|
|
|
- if (aProduct.getCode() != null && aProduct.getBrandNameEn() != null && aProduct.getTag() != null) {
|
|
|
- resetTag(aProduct);
|
|
|
- }
|
|
|
+// Object tagValue = readWorkBookCell(row.getCell(UploadConstant.CUSTOM_LABEL), Cell.CELL_TYPE_STRING,
|
|
|
+// rowNum, UploadConstant.CUSTOM_LABEL);
|
|
|
+// aProduct.setTagByExcel(tagValue);
|
|
|
+// // 自定义标签不为null,则检查是否重复
|
|
|
+// if (aProduct.getCode() != null && aProduct.getBrandNameEn() != null && aProduct.getTag() != null) {
|
|
|
+// resetTag(aProduct);
|
|
|
+// }
|
|
|
|
|
|
// 如果是pcb模块,解析尺寸、颜色、铜厚、厚度
|
|
|
if (isPcb) {
|
|
|
@@ -1284,7 +1289,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
* @param price
|
|
|
* @return
|
|
|
*/
|
|
|
- private boolean validatePrice(Double price) {
|
|
|
+ public static boolean validatePrice(Double price) {
|
|
|
if (price == null) {
|
|
|
return false;
|
|
|
}
|