提交 249d8cb5 authored 作者: gongwenjie's avatar gongwenjie

考勤

上级 c6b09091
...@@ -192,6 +192,24 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic ...@@ -192,6 +192,24 @@ public class ApprovalInformationServiceImpl implements ApprovalInformationServic
* 计算调休时长 * 计算调休时长
*/ */
private Long computeTime(Date startTime,Date endTime){ private Long computeTime(Date startTime,Date endTime){
Config config = configDao.findAll().get(0);
String workTime = config.getWorkTime();//上班时间
String afterWorkTime = config.getAfterWorkTime();//下班时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
String format = sdf2.format(startTime);
try {
Date parse = sdf2.parse(format);
List<Day> days = dayDao.findAllByStatusAndDateBetween("0", parse, endTime);
long hours = 0;
if(days!=null){
for (Day day : days) {
}
}
} catch (ParseException e) {
e.printStackTrace();
}
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// Config config = configDao.findAll().get(0); // Config config = configDao.findAll().get(0);
// SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd "+config.getWorkTime()); // SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd "+config.getWorkTime());
......
...@@ -56,7 +56,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -56,7 +56,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
httpSecurity httpSecurity
.cors().and() .cors().and()
.authorizeRequests() .authorizeRequests()
.antMatchers("/test/**").permitAll() .antMatchers("/pas/user/judgeParent/**").permitAll()
.antMatchers("/pas/user/addGuanLian").permitAll() .antMatchers("/pas/user/addGuanLian").permitAll()
.antMatchers(HttpMethod.GET,"/pas/user").permitAll() .antMatchers(HttpMethod.GET,"/pas/user").permitAll()
.antMatchers("/pas/user/encryPas").permitAll() .antMatchers("/pas/user/encryPas").permitAll()
......
...@@ -137,7 +137,7 @@ public class UserController { ...@@ -137,7 +137,7 @@ public class UserController {
return ok("重置密码失败"); return ok("重置密码失败");
} }
@ApiOperation(value = "查询该用户是否是某用户的上级") @ApiOperation(value = "查询该用户是否是某用户的上级,并且拥有修改任务权限")
@GetMapping("/judgeParent/{id}/{userId}") @GetMapping("/judgeParent/{id}/{userId}")
public ResponseEntity judgeParent(@PathVariable String id,@PathVariable String userId) { public ResponseEntity judgeParent(@PathVariable String id,@PathVariable String userId) {
boolean flag = iUserService.judgeParent(id,userId); boolean flag = iUserService.judgeParent(id,userId);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论