郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.gkhy.safePlatform.account.controller;
 
import com.gkhy.safePlatform.account.entity.staffSchedule.UserScheduleDetail;
import com.gkhy.safePlatform.account.service.baseService.UserScheduleDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
 
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
 
@RestController
@RequestMapping(value = "/schedule")
public class StaffScheduleController {
 
//    @Autowired
//    private UserScheduleDetailService detailService;
//
////    @RequestMapping(value = "/add",method = RequestMethod.GET)
//    public Object testTime(){
//        UserScheduleDetail detail = new UserScheduleDetail();
//        detail.setUid(2L);
//        detail.setWorkDay(LocalDate.of(2022,7,8));
//        detail.setStartTime(LocalDateTime.of(detail.getWorkDay(), LocalTime.of(8,0,0)));
//        detail.setEndTime(LocalDateTime.of(detail.getWorkDay(), LocalTime.of(18,0,0)));
//        detail.setStatus((byte)1);
//        return detailService.save(detail);
//    }
//
//    @RequestMapping(value = "/get/list",method = RequestMethod.GET)
//    public Object getDetailListByDateZone(String startDayStr,String endDayStr){
//        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//        LocalDate startDay = LocalDate.parse(startDayStr,df);
//        LocalDate endDay = LocalDate.parse(endDayStr,df);
//        return detailService.findListByWorkDateZone(startDay,endDay);
//    }
}