whycxzp
2021-11-02 7bae5d81e8cf185beebfa33d1b6816a46a9c2e93
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.UserInf;
import com.whyc.pojo.WorksheetMain;
import com.whyc.service.WorksheetMainService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RequestMapping("worksheet")
@RestController
@Api(tags = "工单管理")
public class WorksheetController {
 
    @Autowired
    private WorksheetMainService service;
 
    @PostMapping
    @ApiOperation("添加工单")
    public Response add(@RequestBody WorksheetMain main){
        UserInf userInf = (UserInf) ActionUtil.getUser();
        main.setCreateUser(userInf.getUName());
        return service.add(main);
    }
 
    public Response getPendingWorksheet(){
        UserInf userInf = (UserInf) ActionUtil.getUser();
 
        return null;
    }
 
 
}