|  |  |  | 
|---|
|  |  |  | import com.doumee.service.business.ApproveTemplService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.apache.poi.ss.formula.functions.T; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 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)); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | } | 
|---|