完善错误信息

This commit is contained in:
2024-08-03 16:09:53 +08:00
parent b4a153afe3
commit a67b9af49d

View File

@@ -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);