hotfix : import sku weight date

pull/8040/head
Gauthier LO 2025-02-28 15:51:36 +01:00
parent 82274461ec
commit 8ea47387d7
1 changed files with 11 additions and 2 deletions

View File

@ -243,8 +243,17 @@ public class SkuWeightController extends JeecgController<SkuWeight, ISkuWeightSe
skuWeight.setWeight(weight); skuWeight.setWeight(weight);
break; break;
case 2: case 2:
String cellValue = cell.getStringCellValue(); String date;
Date effectiveDate = formatter.parse(cellValue); if(cell.getCellType().equals(CellType.STRING))
date = cell.getStringCellValue();
else if(cell.getCellType().equals(CellType.NUMERIC))
date = formatter.format(cell.getDateCellValue());
else {
responses.addFailure("Row " + rowIndex + " Date is not a date - Sku : " + erpCode);
hasError = true;
continue;
}
Date effectiveDate = formatter.parse(date);
skuWeight.setEffectiveDate(effectiveDate); skuWeight.setEffectiveDate(effectiveDate);
break; break;
} }