考勤,日历排班结果列表导出接口逻辑优化

zm_dev
sy 10 months ago
parent 4631b03cb6
commit de9e941ab9

@ -51,7 +51,7 @@ public class ExcelExportImportServiceImpl extends Service implements ExcelExport
paramMap.put("pageSize", total);
}
paramMap.put("pageindex", "1");
log.info("查询条件:{}",paramMap);
Map<String, Object> scheduleResult = getWorkRulesService(user).getDepartSchedule(paramMap);
List<WeaTableColumn> columns = buildScheduleColumns((List<Map<String, Object>>) scheduleResult.get("columns"));
List<Map<String, Object>> records = buildScheduleRecords((List<Map<String, Object>>) scheduleResult.get("datas"));
@ -173,7 +173,7 @@ public class ExcelExportImportServiceImpl extends Service implements ExcelExport
}
singleCheck.put(key, Optional.ofNullable(map.get(key)).orElse("").toString());
}
log.info(i + 3 + "-singleCheck[{}]", singleCheck);
log.info(i + 3 + "-singleCheck{}", singleCheck);
isError = singleScheduleLineCheck(singleCheck, title, monthDays, toImportScheduleInfos, employeeInfoList, shiftMapWithMc, excelComments, i + 3, formModeId, empIds);
if (isError) {
errorCount += 1;

@ -42,7 +42,7 @@ public class ExcelController {
Map<String,Object> paramMap = ParamUtil.request2Map(request);
XSSFWorkbook workbook = getExcelService(user).exportSchedule(paramMap);
String time = LocalDate.now().toString();
String fileName = "日排班列表" + time;
String fileName = "日排班列表" + time;
try {
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
} catch (UnsupportedEncodingException e) {

@ -144,7 +144,6 @@ public class ExcelUtil {
}
for (int rowIndex = 0; rowIndex <= rowList.size(); rowIndex++) {
List<Object> infoList = rowList.get(rowIndex);
XSSFRow row = sheet.createRow(rowIndex);
float height = 18;
float finalHeight = 18;
@ -155,6 +154,7 @@ public class ExcelUtil {
cell.setCellType(CellType.STRING);
cell.setCellValue(title);
} else {
List<Object> infoList = rowList.get(rowIndex - 1);
for (int cellIndex = 0; cellIndex < infoList.size(); cellIndex++) {
XSSFCell cell = row.createCell(cellIndex);
if (rowIndex == 1) {

Loading…
Cancel
Save