|
|
@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.system;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
@@ -14,6 +15,7 @@ import com.ruoyi.system.domain.selectUserClockInput;
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
@@ -323,7 +325,10 @@ public class SysUserController extends BaseController
|
|
|
* 修改考勤对应多打卡
|
|
|
*/
|
|
|
@PostMapping("/updateUserClockDetails")
|
|
|
- public AjaxResult updateUserClockDetails(@RequestBody UserClockDetailsInput in) {
|
|
|
+ public AjaxResult updateUserClockDetails(@RequestBody @Validated UserClockDetailsInput in, BindingResult res) {
|
|
|
+ if (res.hasErrors()) {
|
|
|
+ return AjaxResult.error(Objects.requireNonNull(res.getFieldError()).getDefaultMessage());
|
|
|
+ }
|
|
|
userService.updateUserClockDetails(in);
|
|
|
return AjaxResult.success();
|
|
|
}
|