|  |  |  | 
|---|
|  |  |  | import com.doumee.config.annotation.CloudRequiredPermission; | 
|---|
|  |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
|---|
|  |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageData; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.model.ApproveTempl; | 
|---|
|  |  |  | import com.doumee.service.business.ApproveTemplService; | 
|---|
|  |  |  | 
|---|
|  |  |  | ExcelExporter.build(ApproveTempl.class).export(approveTemplService.findPage(pageWrap).getRecords(), "审批模版信息表", response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|
|  |  |  | @GetMapping("/{id}") | 
|---|
|  |  |  | @ApiOperation("根据Type查询") | 
|---|
|  |  |  | @GetMapping("/{type}") | 
|---|
|  |  |  | @CloudRequiredPermission("business:approvetempl:query") | 
|---|
|  |  |  | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | return ApiResponse.success(approveTemplService.findById(id)); | 
|---|
|  |  |  | public ApiResponse<ApproveTempl> findByType(@PathVariable Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | ApproveTempl templ =new ApproveTempl(); | 
|---|
|  |  |  | templ.setIsdeleted(Constants.ZERO); | 
|---|
|  |  |  | templ.setType(type); | 
|---|
|  |  |  | return ApiResponse.success(approveTemplService.findOne(templ)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("根据reasonId查询") | 
|---|
|  |  |  | @GetMapping("/findById/{id}") | 
|---|
|  |  |  | @CloudRequiredPermission("business:approvetempl:query") | 
|---|
|  |  |  | public ApiResponse<ApproveTempl> findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | ApproveTempl templ =new ApproveTempl(); | 
|---|
|  |  |  | templ.setIsdeleted(Constants.ZERO); | 
|---|
|  |  |  | templ.setId(id); | 
|---|
|  |  |  | return ApiResponse.success(approveTemplService.findOne(templ)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    @ApiOperation("根据ID查询") | 
|---|
|  |  |  | //    @GetMapping("/{id}") | 
|---|
|  |  |  | //    @CloudRequiredPermission("business:approvetempl:query") | 
|---|
|  |  |  | //    public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | //        return ApiResponse.success(approveTemplService.findById(id)); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | } | 
|---|