fix: 修复沥青数据解析异常的问题
This commit is contained in:
@@ -60,8 +60,7 @@ public class AsphaltDomestic extends Model<AsphaltDomestic> {
|
|||||||
var policy = Row.MissingCellPolicy.CREATE_NULL_AS_BLANK;
|
var policy = Row.MissingCellPolicy.CREATE_NULL_AS_BLANK;
|
||||||
this.setName(row.getCell(0, policy).getStringCellValue());
|
this.setName(row.getCell(0, policy).getStringCellValue());
|
||||||
this.setPrice(BigDecimal.valueOf(row.getCell(1, policy).getNumericCellValue()));
|
this.setPrice(BigDecimal.valueOf(row.getCell(1, policy).getNumericCellValue()));
|
||||||
this.setDate(row.getCell(2, policy).getLocalDateTimeCellValue().toLocalDate());
|
this.setDate(row.getCell(3, policy).getLocalDateTimeCellValue().toLocalDate());
|
||||||
this.setFrom(row.getCell(3, policy).getStringCellValue());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AsphaltDomestic update(AsphaltDomestic item) {
|
public AsphaltDomestic update(AsphaltDomestic item) {
|
||||||
|
@@ -53,9 +53,10 @@ public class AsphaltImported extends Model<AsphaltImported> {
|
|||||||
public AsphaltImported () {}
|
public AsphaltImported () {}
|
||||||
|
|
||||||
public AsphaltImported (Row row) {
|
public AsphaltImported (Row row) {
|
||||||
this.setName(row.getCell(0).getStringCellValue());
|
var policy = Row.MissingCellPolicy.CREATE_NULL_AS_BLANK;
|
||||||
this.setPrice(BigDecimal.valueOf(row.getCell(1).getNumericCellValue()));
|
this.setName(row.getCell(0, policy).getStringCellValue());
|
||||||
this.setDate(row.getCell(2).getLocalDateTimeCellValue().toLocalDate());
|
this.setPrice(BigDecimal.valueOf(row.getCell(1, policy).getNumericCellValue()));
|
||||||
|
this.setDate(row.getCell(2, policy).getLocalDateTimeCellValue().toLocalDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public AsphaltImported update(AsphaltImported item) {
|
public AsphaltImported update(AsphaltImported item) {
|
||||||
|
Reference in New Issue
Block a user