| | |
| | | package com.gkhy.assess.admin.controller.web; |
| | | package com.gkhy.web.controller.bussiness; |
| | | |
| | | 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 com.gkhy.common.annotation.Anonymous; |
| | | import com.gkhy.common.annotation.RepeatSubmit; |
| | | import com.gkhy.common.core.controller.BaseController; |
| | | import com.gkhy.common.core.domain.AjaxResult; |
| | | import com.gkhy.common.core.domain.R; |
| | | import com.gkhy.common.core.page.TableDataInfo; |
| | | import com.gkhy.system.domain.SysExpertInfo; |
| | | import com.gkhy.system.domain.vo.request.SysExpertInfoRoundReq; |
| | | import com.gkhy.system.domain.vo.request.SysExpertSearchReqDto; |
| | | import com.gkhy.system.domain.vo.response.ProjectExpertSectionResp; |
| | | import com.gkhy.system.domain.vo.response.SysExpertSearchRep; |
| | | import com.gkhy.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.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author admin |
| | | */ |
| | | @Api(tags = "专家库-专家信息前端控制器") |
| | | @RestController |
| | | @RequestMapping("/system/expert_info") |
| | | public class ExpertInfoController { |
| | | public class ExpertInfoController extends BaseController { |
| | | @Autowired |
| | | private SysExpertInfoService expertInfoService; |
| | | |
| | | @RequiresPermissions("system:assess:monitor") |
| | | // @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)); |
| | | public TableDataInfo exportInfoList(SysExpertInfo expertInfo) { |
| | | startPage(); |
| | | List<SysExpertInfo> sysExpertInfos = expertInfoService.exportInfoList(expertInfo); |
| | | return getDataTable(sysExpertInfos); |
| | | |
| | | } |
| | | |
| | | @RequiresPermissions("system:assess:monitor") |
| | | // @RequiresPermissions("system:assess:monitor") |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "新增专家信息") |
| | | @PostMapping("/add") |
| | | public CommonResult addExpertInfo(@RequestBody SysExpertInfo expertInfo){ |
| | | return CommonResult.success(expertInfoService.addExpertInfo(expertInfo)); |
| | | @Anonymous |
| | | public AjaxResult addExpertInfo(@RequestBody SysExpertInfo expertInfo) { |
| | | return AjaxResult.success(expertInfoService.addExpertInfo(expertInfo)); |
| | | } |
| | | |
| | | @RequiresPermissions("system:assess:monitor") |
| | | //@RequiresPermissions("system:assess:monitor") |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "修改专家信息") |
| | | @PutMapping("/mod") |
| | | public CommonResult modExpertInfo(@RequestBody SysExpertInfo expertInfo){ |
| | | return CommonResult.success(expertInfoService.modExpertInfo(expertInfo)); |
| | | public AjaxResult modExpertInfo(@RequestBody SysExpertInfo expertInfo) { |
| | | return AjaxResult.success(expertInfoService.modExpertInfo(expertInfo)); |
| | | } |
| | | |
| | | @RequiresPermissions("system:assess:monitor") |
| | | //@RequiresPermissions("system:assess:monitor") |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "删除专家信息") |
| | | @DeleteMapping("/del/{expertId}") |
| | | public CommonResult delExpertInfo(@PathVariable(value = "expertId") Long expertId){ |
| | | return CommonResult.success(expertInfoService.delExpertInfo(expertId)); |
| | | public AjaxResult delExpertInfo(@PathVariable(value = "expertId") Long expertId) { |
| | | return AjaxResult.success(expertInfoService.delExpertInfo(expertId)); |
| | | } |
| | | |
| | | @RequiresPermissions("system:assess:monitor") |
| | | // @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)); |
| | | public AjaxResult delExpertInfo(@PathVariable(value = "expertIds") Long[] expertIds) { |
| | | return AjaxResult.success(expertInfoService.delExpertInfoBatch(expertIds)); |
| | | } |
| | | |
| | | @RequiresPermissions("system:assess:monitor") |
| | | // @RequiresPermissions("system:assess:monitor") |
| | | @ApiOperation(value = "根据id获取专家信息") |
| | | @GetMapping("/detail/{expertId}") |
| | | public CommonResult exportInfoDetail(@PathVariable(value = "expertId") Long expertId){ |
| | | return CommonResult.success(expertInfoService.exportInfoDetail(expertId)); |
| | | public R<SysExpertInfo> exportInfoDetail(@PathVariable(value = "expertId") Long expertId) { |
| | | return R.ok(expertInfoService.exportInfoDetail(expertId)); |
| | | } |
| | | |
| | | |
| | | |
| | | @RepeatSubmit |
| | | @RequiresPermissions("system:assess:monitor") |
| | | @ApiOperation(value = "审批状态修改,审批状态(0暂存,1审核中,2审批通过,3审批驳回,4已作废)") |
| | | //@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)); |
| | | public AjaxResult changeApprove(@RequestBody SysExpertInfo expertInfo) { |
| | | return AjaxResult.success(expertInfoService.changeApprove(expertInfo)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | //@RequiresPermissions("system:assess:monitor") |
| | | @ApiOperation(value = "专家查询审批结果") |
| | | @PostMapping("/queryApprove") |
| | | @Anonymous |
| | | public R<SysExpertSearchRep> queryApprove(@Validated @RequestBody SysExpertSearchReqDto expertInfo) { |
| | | return R.ok(expertInfoService.queryApprove(expertInfo)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | //@RequiresPermissions("system:assess:monitor") |
| | | @ApiOperation(value = "随机获取专家数据") |
| | | @PostMapping("/getExpertRound") |
| | | public R<List<ProjectExpertSectionResp>> getExpertRound(@Validated @RequestBody SysExpertInfoRoundReq expertInfo) { |
| | | return R.ok(expertInfoService.getExpertRound(expertInfo)); |
| | | } |
| | | |
| | | |