|
|
@@ -167,13 +167,13 @@ public class SalaryImportAction extends ExcelImport {
|
|
|
Sheet sheet = workbook.getSheetAt(0);
|
|
|
int rowCount = sheet.getPhysicalNumberOfRows();
|
|
|
|
|
|
- if (rowCount < 4) {
|
|
|
+ if (rowCount < 3) {
|
|
|
errList.add("Excel文件中没有数据");
|
|
|
result = -1;
|
|
|
} else {
|
|
|
- // 获取表头(第2-3行,处理合并列)
|
|
|
- Row headerRow1 = sheet.getRow(1); // 第2行(索引1)
|
|
|
- Row headerRow2 = sheet.getRow(2); // 第3行(索引2)
|
|
|
+ // 获取表头(第1-2行,处理合并列)
|
|
|
+ Row headerRow1 = sheet.getRow(0); // 第1行(索引0)
|
|
|
+ Row headerRow2 = sheet.getRow(1); // 第2行(索引1)
|
|
|
int columnCount = Math.max(
|
|
|
headerRow1 != null ? headerRow1.getPhysicalNumberOfCells() : 0,
|
|
|
headerRow2 != null ? headerRow2.getPhysicalNumberOfCells() : 0
|
|
|
@@ -218,8 +218,8 @@ public class SalaryImportAction extends ExcelImport {
|
|
|
int failCount = 0;
|
|
|
List<SalaryImport> importList = new ArrayList<SalaryImport>();
|
|
|
|
|
|
- // 从第4行开始读取数据(索引为3),因为表头在第2-3行
|
|
|
- for (int i = 3; i < rowCount; i++) {
|
|
|
+ // 从第3行开始读取数据(索引为2),因为表头在第1-2行
|
|
|
+ for (int i = 2; i < rowCount; i++) {
|
|
|
Row row = sheet.getRow(i);
|
|
|
if (row == null) {
|
|
|
continue;
|
|
|
@@ -445,8 +445,9 @@ public class SalaryImportAction extends ExcelImport {
|
|
|
"序号", "部门", "姓名", "岗位", "身份证号",
|
|
|
"月工资", "应出勤天数", "实际出勤天数", "粉尘/噪音补贴",
|
|
|
"月工资*", "应出勤天数*", "实际出勤天数*",
|
|
|
- "轮休天数", "病假天数", "请假天数",
|
|
|
+ "轮休天数", "病假天数", "请假天数", "公司放假天数",
|
|
|
"平时加班小时", "周末加班小时", "节假日加班小时", "夜班天数",
|
|
|
+ "基本工资", "岗位工资", "工作绩效", "安全绩效", "全勤工资",
|
|
|
"夜中班津贴",
|
|
|
"平时加班工资", "周末加班工资", "节假日加班工资", "放假补贴", "病假工资", "部门绩效奖金", "其它",
|
|
|
"体检报销",
|