|
|
@@ -613,9 +613,20 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
}
|
|
|
aProduct.setReserveByExcel(reserveValue);
|
|
|
|
|
|
- Object produceValue = readWorkBookCell(row.getCell(UploadConstant.PRODUCE_DATE), Cell.CELL_TYPE_STRING,
|
|
|
- rowNum, UploadConstant.PRODUCE_DATE);
|
|
|
- aProduct.setProductDateByExcel(produceValue);
|
|
|
+ Cell productCell = row.getCell(UploadConstant.PRODUCE_DATE);
|
|
|
+ if (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("");
|
|
|
+ }
|
|
|
+ } 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);
|