zxl
2025-12-24 419fab9d84e6b2fbeb6d32b7d7253a6cd195200d
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
package com.ycl.controller;
 
import com.ycl.common.group.Update;
import com.ycl.common.group.Add;
import com.ycl.domain.form.ProjectInfoForm;
import com.ycl.domain.query.AuditHistoryQuery;
import com.ycl.domain.query.ProjectInfoQuery;
import com.ycl.domain.query.WaitTodoQuery;
import com.ycl.service.AuditHistoryService;
import com.ycl.service.IndexHomeService;
import com.ycl.system.domain.base.AbsQuery;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import lombok.RequiredArgsConstructor;
import java.util.List;
import java.util.Map;
import javax.validation.constraints.NotEmpty;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.ycl.service.WorkStationScheduleService;
import com.ycl.common.base.Result;
import com.ycl.domain.form.WorkStationScheduleForm;
import com.ycl.domain.query.WorkStationScheduleQuery;
import org.springframework.web.bind.annotation.*;
 
/**
 *  前端控制器
 *
 * @author zxl
 * @since 2025-12-05
 */
@Validated
@RequiredArgsConstructor
@Api(value = "", tags = "日程管理")
@RestController
@RequestMapping("/work-station-schedule")
public class WorkStationScheduleController {
 
    private final WorkStationScheduleService workStationScheduleService;
 
    private final IndexHomeService indexHomeService;
 
    private final AuditHistoryService auditHistoryService;
    @GetMapping("/auditHistoryPage")
    public Result page(AuditHistoryQuery query){
        return auditHistoryService.page(query);
    }
 
 
    @PostMapping
    @ApiOperation(value = "添加", notes = "添加")
    public Result add(@RequestBody @Validated(Add.class) WorkStationScheduleForm form) {
        return workStationScheduleService.add(form);
    }
 
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    public Result update(@RequestBody @Validated(Update.class) WorkStationScheduleForm form) {
        return workStationScheduleService.update(form);
    }
 
    @DeleteMapping("/{id}")
    @ApiOperation(value = "ID删除", notes = "ID删除")
    public Result removeById(@PathVariable("id") String id) {
        return workStationScheduleService.removeById(id);
    }
 
    @DeleteMapping("/batch")
    @ApiOperation(value = "批量删除", notes = "批量删除")
    public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) {
        return workStationScheduleService.remove(ids);
    }
 
    @GetMapping("/listByDate")
    @ApiOperation(value = "分页", notes = "分页")
    public Result getListByDate(WorkStationScheduleQuery query) {
        return workStationScheduleService.listByDate(query);
    }
 
    @GetMapping("/{id}")
    @ApiOperation(value = "详情", notes = "详情")
    public Result detail(@PathVariable("id") Integer id) {
        return workStationScheduleService.detail(id);
    }
 
    @GetMapping("/list")
    @ApiOperation(value = "列表", notes = "列表")
    public Result list() {
        return workStationScheduleService.all();
    }
 
    /**
     *
     * 统计个人成就
     * @return
     */
    @GetMapping("/countAchievements")
    public Result countAchievements(){
        return workStationScheduleService.countAchievements();
    }
 
    /**
     * 获得个人项目列表
     * @return
     */
    @GetMapping("/getProjectList")
    public Result projectList(){
        return indexHomeService.getProjectList();
    }
 
    @GetMapping("/getWaitTaskList")
    public Result getWaitTaskList(WaitTodoQuery query){
        return indexHomeService.getWaitTaskList(query);
    }
    @GetMapping("/countTodayTask")
    Result countTodayTask(){
        return workStationScheduleService.countTodayTask();
    }
 
 
//    Result
 
}