heheng
2024-11-20 44819a81b566a504554780afd4dd64fee0be7bb5
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
package com.gkhy.assess.admin.controller.web;
 
import com.gkhy.assess.common.annotation.RepeatSubmit;
import com.gkhy.assess.common.api.CommonResult;
import com.gkhy.assess.system.domain.SysAgency;
import com.gkhy.assess.system.domain.SysExpertClassify;
import com.gkhy.assess.system.domain.SysExpertInfo;
import com.gkhy.assess.system.domain.SysUser;
import com.gkhy.assess.system.service.SysExpertInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@Api(tags = "专家库-专家信息前端控制器")
@RestController
@RequestMapping("/system/expert_info")
public class ExpertInfoController {
    @Autowired
    private SysExpertInfoService expertInfoService;
 
    @RequiresPermissions("system:assess:monitor")
    @ApiOperation(value = "专家列表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10,最大50")
    })
    @GetMapping("/list")
    public CommonResult exportInfoList(SysExpertInfo expertInfo){
        return CommonResult.success(expertInfoService.exportInfoList(expertInfo));
    }
 
    @RequiresPermissions("system:assess:monitor")
    @RepeatSubmit
    @ApiOperation(value = "新增专家信息")
    @PostMapping("/add")
    public CommonResult addExpertInfo(@RequestBody SysExpertInfo expertInfo){
        return CommonResult.success(expertInfoService.addExpertInfo(expertInfo));
    }
 
    @RequiresPermissions("system:assess:monitor")
    @RepeatSubmit
    @ApiOperation(value = "修改专家信息")
    @PutMapping("/mod")
    public CommonResult modExpertInfo(@RequestBody SysExpertInfo expertInfo){
        return CommonResult.success(expertInfoService.modExpertInfo(expertInfo));
    }
 
    @RequiresPermissions("system:assess:monitor")
    @RepeatSubmit
    @ApiOperation(value = "删除专家信息")
    @DeleteMapping("/del/{expertId}")
    public CommonResult delExpertInfo(@PathVariable(value = "expertId") Long expertId){
        return CommonResult.success(expertInfoService.delExpertInfo(expertId));
    }
 
    @RequiresPermissions("system:assess:monitor")
    @RepeatSubmit
    @ApiOperation(value = "批量删除专家信息")
    @DeleteMapping("/del/batch/{expertIds}")
    public CommonResult delExpertInfo(@PathVariable(value = "expertIds") Long[] expertIds){
        return CommonResult.success(expertInfoService.delExpertInfoBatch(expertIds));
    }
 
    @RequiresPermissions("system:assess:monitor")
    @ApiOperation(value = "根据id获取专家信息")
    @GetMapping("/detail/{expertId}")
    public CommonResult exportInfoDetail(@PathVariable(value = "expertId") Long expertId){
        return CommonResult.success(expertInfoService.exportInfoDetail(expertId));
    }
 
 
 
    @RepeatSubmit
    @RequiresPermissions("system:assess:monitor")
    @ApiOperation(value = "审批状态修改,审批状态(0暂存,1审核中,2审批通过,3审批驳回,4已作废)")
    @PostMapping("/changeApprove")
    public CommonResult changeApprove(@RequestBody SysExpertInfo expertInfo)
    {
        return CommonResult.success(expertInfoService.changeApprove(expertInfo));
    }
 
 
}