whycxzp
2021-11-05 4152826d31276137544ecd11548c20a6275002ae
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
package com.whyc.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.pagehelper.PageInfo;
import com.whyc.dto.Response;
import com.whyc.pojo.WorkflowMain;
import com.whyc.service.WorkflowMainService;
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.*;
 
import java.util.List;
 
@RestController
@RequestMapping("workflow")
@Api(tags = "工作流")
public class WorkflowController {
 
    @Autowired
    private WorkflowMainService mainService;
 
    @PostMapping("workflowMainList")
    @ApiOperation(value = "查询各状态工单列表",notes = "待处理:type=0,已处理:type=1,已归档:type=2,已撤销:type=3")
    public Response<PageInfo<WorkflowMain>> getWorkflowMainList(@RequestBody WorkflowMain main,@RequestParam Integer type, @RequestParam Integer pageNum, @RequestParam Integer pageSize){
        Long userId = ActionUtil.getUser().getUId();
        return new Response<PageInfo<WorkflowMain>>().set(1,mainService.getPendingWorkflowList(userId,type,pageNum,pageSize,main));
    }
 
    @GetMapping("basicInfo")
    @ApiOperation(value = "工单基本状态")
    public Response<WorkflowMain> getBasicInfo(@RequestParam Integer mainId){
        return new Response<WorkflowMain>().set(1,mainService.getBaseInfo(mainId));
    }
 
    @GetMapping("workflowInfo")
    @ApiOperation(value = "工单流程信息")
    public Response<WorkflowMain> getWorkflowInfo(@RequestParam Integer mainId){
        //return new Response<WorkflowMain>().set(1,mainService.getWorkflowInfo(mainId));
        return null;
    }
 
    @PutMapping("flow")
    @ApiOperation(value = "更新工单状态")
    public Response updateFlow(){
        return null;
    }
 
}