From f9ad0e89f703db0bd2194944eeabbfb92a1d9ad7 Mon Sep 17 00:00:00 2001 From: han0 Date: Mon, 3 Jun 2024 17:32:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B2=A5=E9=9D=92?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=A7=A3=E6=9E=90=E5=BC=82=E5=B8=B8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/mjkf/xinke/main/model/db/AsphaltDomestic.java | 3 +-- .../java/mjkf/xinke/main/model/db/AsphaltImported.java | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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) {