lxw
2023-04-24 e2b4ed00f1a0012236e737a608ecfb2abbfc2eb4
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.dto.WorkflowPropertyDTO;
import com.whyc.pojo.WorkflowProperty;
import com.whyc.service.WorkflowPropertyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.web.bind.annotation.*;
import sun.net.ApplicationProxy;
 
import java.util.List;
 
@RestController
@RequestMapping("workflowProperty")
@Api(tags = "工作流属性")
public class WorkflowPropertyController {
 
    @Autowired
    private WorkflowPropertyService service;
 
    @PostMapping
    @ApiOperation(value = "新增")
    public Response add(@RequestBody WorkflowPropertyDTO propertyDTO){
        service.add(propertyDTO);
        return new Response().setII(1,"新增成功");
    }
 
    @PutMapping
    @ApiOperation(value = "修改")
    public Response update(@RequestBody WorkflowPropertyDTO propertyDTO){
        service.update(propertyDTO);
        return new Response().setII(1,"修改成功");
    }
 
    @DeleteMapping
    @ApiOperation(value = "删除")
    public Response delete(@RequestParam Integer type,@RequestParam Integer linkType){
        service.delete(type,linkType);
        return new Response().setII(1,"删除成功");
    }
 
    @GetMapping("propertyList")
    @ApiOperation(value = "查询工单流属性列表")
    public Response<List<WorkflowPropertyDTO>> getPropertyList(){
        List<WorkflowPropertyDTO> propertyList = service.getPropertyList();
        return new Response().set(1,propertyList);
    }
 
    @GetMapping("linkInfo")
    @ApiOperation(value = "查询节点信息")
    public Response<List<WorkflowProperty>> getLinkInfo(@RequestParam Integer type){
        List<WorkflowProperty> propertyList = service.getLinkInfo(type);
        return new Response<List<WorkflowProperty>>().set(1,propertyList);
    }
 
    @GetMapping("roleInfo")
    @ApiOperation(value = "查询角色信息")
    public Response<List<WorkflowProperty>> getRoleInfo(@RequestParam Integer type,@RequestParam Integer linkId){
        List<WorkflowProperty> propertyList = service.getRoleInfo(type,linkId);
        return new Response<List<WorkflowProperty>>().set(1,propertyList);
    }
 
 
 
 
 
}