人员安排导出优化

This commit is contained in:
马三炮 2026-01-19 09:56:38 +08:00
parent a9202ba081
commit 57a9e18a29
1 changed files with 3 additions and 2 deletions

View File

@ -132,7 +132,6 @@ public class MonthlyPlanController extends BaseController {
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, MonthlyPlanVo monthlyPlanVo) { public void export(HttpServletResponse response, MonthlyPlanVo monthlyPlanVo) {
List<ExportMonthPlanPersonVo> list = monthlyPlanService.exportMonthlyPlanPerson(monthlyPlanVo);
// 动态解析年月添加兜底逻辑 // 动态解析年月添加兜底逻辑
int year = LocalDate.now().getYear(); int year = LocalDate.now().getYear();
int month = LocalDate.now().getMonthValue(); int month = LocalDate.now().getMonthValue();
@ -142,8 +141,10 @@ public class MonthlyPlanController extends BaseController {
String[] yearMonthArr = monthlyPlan.split("-"); String[] yearMonthArr = monthlyPlan.split("-");
year = Integer.parseInt(yearMonthArr[0]); year = Integer.parseInt(yearMonthArr[0]);
month = Integer.parseInt(yearMonthArr[1]); month = Integer.parseInt(yearMonthArr[1]);
}else {
monthlyPlanVo.setMonthlyPlan(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM")));
} }
List<ExportMonthPlanPersonVo> list = monthlyPlanService.exportMonthlyPlanPerson(monthlyPlanVo);
// 动态拼接sheet名称 // 动态拼接sheet名称
String sheetName = month + "月运检人员安排"; String sheetName = month + "月运检人员安排";