diff --git a/src/main/java/cn/lihongjie/coal/empMonthAttendance/service/EmpMonthAttendanceService.java b/src/main/java/cn/lihongjie/coal/empMonthAttendance/service/EmpMonthAttendanceService.java index d4ccc214..68c4535f 100644 --- a/src/main/java/cn/lihongjie/coal/empMonthAttendance/service/EmpMonthAttendanceService.java +++ b/src/main/java/cn/lihongjie/coal/empMonthAttendance/service/EmpMonthAttendanceService.java @@ -57,7 +57,7 @@ public class EmpMonthAttendanceService .getSingleResult(); if (cnt > 0) { - throw new BizException(String.format("员工 %s %s月 考勤数据已存在", employeeService.get(request.getEmployee()).getName(), request.getYearMonth().getMonth())); + throw new BizException(String.format("员工 %s %s月 考勤数据已存在", employeeService.get(request.getEmployee()).getName(), request.getYearMonth().getMonthValue())); } this.repository.save(entity); @@ -94,7 +94,7 @@ public class EmpMonthAttendanceService .getSingleResult(); if (cnt > 0) { - throw new BizException(String.format("员工 %s %s月 考勤数据已存在", employeeService.get(request.getEmployee()).getName(), request.getYearMonth().getMonth())); + throw new BizException(String.format("员工 %s %s月 考勤数据已存在", employeeService.get(request.getEmployee()).getName(), request.getYearMonth().getMonthValue())); } this.mapper.updateEntity(entity, request);