diff --git a/src/main/java/mjkf/xinke/main/model/db/AsphaltDomestic.java b/src/main/java/mjkf/xinke/main/model/db/AsphaltDomestic.java index 640572c..2ef6389 100644 --- a/src/main/java/mjkf/xinke/main/model/db/AsphaltDomestic.java +++ b/src/main/java/mjkf/xinke/main/model/db/AsphaltDomestic.java @@ -60,8 +60,7 @@ public class AsphaltDomestic extends Model { var policy = Row.MissingCellPolicy.CREATE_NULL_AS_BLANK; this.setName(row.getCell(0, policy).getStringCellValue()); this.setPrice(BigDecimal.valueOf(row.getCell(1, policy).getNumericCellValue())); - this.setDate(row.getCell(2, policy).getLocalDateTimeCellValue().toLocalDate()); - this.setFrom(row.getCell(3, policy).getStringCellValue()); + this.setDate(row.getCell(3, policy).getLocalDateTimeCellValue().toLocalDate()); } public AsphaltDomestic update(AsphaltDomestic item) { diff --git a/src/main/java/mjkf/xinke/main/model/db/AsphaltImported.java b/src/main/java/mjkf/xinke/main/model/db/AsphaltImported.java index bd68400..95849f0 100644 --- a/src/main/java/mjkf/xinke/main/model/db/AsphaltImported.java +++ b/src/main/java/mjkf/xinke/main/model/db/AsphaltImported.java @@ -53,9 +53,10 @@ public class AsphaltImported extends Model { public AsphaltImported () {} public AsphaltImported (Row row) { - this.setName(row.getCell(0).getStringCellValue()); - this.setPrice(BigDecimal.valueOf(row.getCell(1).getNumericCellValue())); - this.setDate(row.getCell(2).getLocalDateTimeCellValue().toLocalDate()); + var policy = Row.MissingCellPolicy.CREATE_NULL_AS_BLANK; + this.setName(row.getCell(0, policy).getStringCellValue()); + this.setPrice(BigDecimal.valueOf(row.getCell(1, policy).getNumericCellValue())); + this.setDate(row.getCell(2, policy).getLocalDateTimeCellValue().toLocalDate()); } public AsphaltImported update(AsphaltImported item) {