|  |  | 
 |  |  | import com.doumee.core.model.ApiResponse; | 
 |  |  | import com.doumee.core.model.PageWrap; | 
 |  |  | import com.doumee.core.model.PageData; | 
 |  |  | import com.doumee.dao.business.dto.ApplyDetailPageDTO; | 
 |  |  | import com.doumee.dao.business.model.ApplyDetail; | 
 |  |  | import com.doumee.service.business.ApplyDetailService; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author 江蹄蹄 | 
 |  |  |  * @date 2024/01/15 15:07 | 
 |  |  |  * @date 2024/01/16 10:03 | 
 |  |  |  */ | 
 |  |  | @Api(tags = "投保申请明细信息表") | 
 |  |  | @RestController | 
 |  |  | 
 |  |  |     @ApiOperation("分页查询") | 
 |  |  |     @PostMapping("/page") | 
 |  |  |     @RequiresPermissions("business:applydetail:query") | 
 |  |  |     public ApiResponse<PageData<ApplyDetail>> findPage (@RequestBody PageWrap<ApplyDetail> pageWrap) { | 
 |  |  |         return ApiResponse.success(applyDetailService.findPage(pageWrap)); | 
 |  |  |     public ApiResponse<PageData<ApplyDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) { | 
 |  |  |         return ApiResponse.success(applyDetailService.findPageForCompany(pageWrap)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("导出Excel") | 
 |  |  |     @ApiOperation("列表查询") | 
 |  |  |     @PostMapping("/findList") | 
 |  |  |     @RequiresPermissions("business:applydetail:query") | 
 |  |  |     public ApiResponse<List<ApplyDetail>> findList (@RequestBody ApplyDetailPageDTO applyDetailPageDTO) { | 
 |  |  |         return ApiResponse.success(applyDetailService.findListForCompany(applyDetailPageDTO)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("导出在保人员详单Excel") | 
 |  |  |     @PostMapping("/exportExcel") | 
 |  |  |     @RequiresPermissions("business:applydetail:exportExcel") | 
 |  |  |     public void exportExcel (@RequestBody PageWrap<ApplyDetail> pageWrap, HttpServletResponse response) { | 
 |  |  |         ExcelExporter.build(ApplyDetail.class).export(applyDetailService.findPage(pageWrap).getRecords(), "投保申请明细信息表", response); | 
 |  |  |     public void exportExcel (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap, HttpServletResponse response) { | 
 |  |  |         //List<T> data, String fileName,String first,String end, HttpServletResponse response | 
 |  |  |         ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(applyDetailService.findPageForCompany(pageWrap).getRecords(), pageWrap.getModel().getSolutionName()+".xlsx","在保人员名单",null, response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("根据ID查询") | 
 |  |  | 
 |  |  |     public ApiResponse findById(@PathVariable Integer id) { | 
 |  |  |         return ApiResponse.success(applyDetailService.findById(id)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation("查询员工投保记录") | 
 |  |  |     @GetMapping("/getMemberApplyList") | 
 |  |  |     public ApiResponse<List<ApplyDetail>> getMemberApplyList(@RequestParam Integer memberId) { | 
 |  |  |         return ApiResponse.success(applyDetailService.getMemberApplyList(memberId)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |