From f555192e7042c6c0020785f17cbc15c8bbbb1e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 24 May 2022 11:24:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacollection/dto/AddUpDeductionDTO.java | 16 ++++++++-------- .../salary/util/excel/ExcelParseHelper.java | 7 ++++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java index f25273c98..31ebcddbf 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java @@ -87,53 +87,53 @@ public class AddUpDeductionDTO { * 入职日期 */ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - @ExcelProperty(index = 6) + @ExcelProperty(index = 6, msg = "第7列,入职日期解析错误,标准格式应为yyyy-MM-dd,例如:2022-01-01") @SalaryTableColumn(text = "入职日期", width = "10%", column = "hiredate") private String hiredate; /** * 累计子女教育 */ - @ExcelProperty(index = 7) + @ExcelProperty(index = 7, msg = "第8列,累计子女教育解析错误,请输入数字") @SalaryTableColumn(text = "累计子女教育", width = "10%", column = "addUpChildEducation") private BigDecimal addUpChildEducation; /** * 累计继续教育 */ - @ExcelProperty(index = 8) + @ExcelProperty(index = 8, msg = "第9列,累计继续教育教育解析错误,请输入数字") @SalaryTableColumn(text = "累计继续教育", width = "10%", column = "addUpContinuingEducation") private BigDecimal addUpContinuingEducation; /** * 累计住房贷款利息 */ - @ExcelProperty(index = 9) + @ExcelProperty(index = 9, msg = "第10列,累计住房贷款利息解析错误,请输入数字") @SalaryTableColumn(text = "累计住房贷款利息", width = "10%", column = "addUpHousingLoanInterest") private BigDecimal addUpHousingLoanInterest; /** * 累计住房租金 */ - @ExcelProperty(index = 10) + @ExcelProperty(index = 10, msg = "第11列,累计住房租金解析错误,请输入数字") @SalaryTableColumn(text = "累计住房租金", width = "10%", column = "addUpHousingRent") private BigDecimal addUpHousingRent; /** * 累计赡养老人 */ - @ExcelProperty(index = 11) + @ExcelProperty(index = 11, msg = "第12列,累计赡养老人解析错误,请输入数字") @SalaryTableColumn(text = "累计赡养老人", width = "10%", column = "addUpSupportElderly") private BigDecimal addUpSupportElderly; /** * 累计大病医疗 */ - @ExcelProperty(index = 12) + @ExcelProperty(index = 12, msg = "第13列,累计大病医疗解析错误,请输入数字") @SalaryTableColumn(text = "累计大病医疗", width = "10%", column = "addUpIllnessMedical") private BigDecimal addUpIllnessMedical; - @ExcelProperty(index = 13) + @ExcelProperty(index = 13, msg = "第14列,累计婴幼儿照护解析错误,请输入数字") @SalaryTableColumn(text = "累计婴幼儿照护", width = "10%", column = "addUpInfantCare") private BigDecimal addUpInfantCare; diff --git a/src/com/engine/salary/util/excel/ExcelParseHelper.java b/src/com/engine/salary/util/excel/ExcelParseHelper.java index f4d8db4d7..6f7fafb01 100644 --- a/src/com/engine/salary/util/excel/ExcelParseHelper.java +++ b/src/com/engine/salary/util/excel/ExcelParseHelper.java @@ -124,9 +124,10 @@ public class ExcelParseHelper { /** * 将sheet数据转为map + * * @param file * @param sheetIndex sheet下标 - * @param rowIndex 从哪行开始解析 + * @param rowIndex 从哪行开始解析 * @return */ public static List> parse2Map(InputStream file, int sheetIndex, int rowIndex) { @@ -149,9 +150,9 @@ public class ExcelParseHelper { } - /** * 将sheet数据转为map + * * @param rowIndex 从哪行开始解析 * @return */ @@ -175,6 +176,7 @@ public class ExcelParseHelper { /** * 将sheet数据转为List + * * @param rowIndex 从哪行开始解析 * @return */ @@ -194,7 +196,6 @@ public class ExcelParseHelper { } - /** * 为对象的每一个属性赋值 *