|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.InsuranceApplyQueryDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.SaveDispatchUnitDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.InsuranceApply; | 
|---|
|  |  |  | import com.doumee.service.business.InsuranceApplyService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author 江蹄蹄 | 
|---|
|  |  |  | * @date 2024/01/15 11:15 | 
|---|
|  |  |  | * @date 2024/01/16 10:03 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Api(tags = "投保申请信息表") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:create") | 
|---|
|  |  |  | public ApiResponse create(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.create(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("平台投保审核") | 
|---|
|  |  |  | @PostMapping("/check") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:check") | 
|---|
|  |  |  | public ApiResponse check(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.check(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("平台退回投保") | 
|---|
|  |  |  | @PostMapping("/back") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:back") | 
|---|
|  |  |  | public ApiResponse back(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.back(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("平台上传投保单") | 
|---|
|  |  |  | @PostMapping("/uploadToubaodan") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:uploadToubaodan") | 
|---|
|  |  |  | public ApiResponse uploadToubaodan(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.uploadToubaodan(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|
|  |  |  | @GetMapping("/getSignLink/{id}") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:query") | 
|---|
|  |  |  | public ApiResponse<String> getSignLink(@PathVariable Integer id) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.getSignLink(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("平台上传保险单") | 
|---|
|  |  |  | @PostMapping("/uploadBaoxiandan") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:uploadBaoxiandan") | 
|---|
|  |  |  | public ApiResponse uploadBaoxiandan(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.uploadBaoxiandan(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("平台处理退单申请") | 
|---|
|  |  |  | @PostMapping("/dealBackApply") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:dealBackApply") | 
|---|
|  |  |  | public ApiResponse dealBackApply(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.dealBackApply(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("平台修改保险单") | 
|---|
|  |  |  | @PostMapping("/editBaoxiandan") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:editBaoxiandan") | 
|---|
|  |  |  | public ApiResponse editBaoxiandan(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.editBaoxiandan(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID删除") | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("分页查询") | 
|---|
|  |  |  | @PostMapping("/page") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:query") | 
|---|
|  |  |  | public ApiResponse<PageData<InsuranceApply>> findPage (@RequestBody PageWrap<InsuranceApply> pageWrap) { | 
|---|
|  |  |  | public ApiResponse<PageData<InsuranceApply>> findPage (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("导出Excel") | 
|---|
|  |  |  | @PostMapping("/exportExcel") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:exportExcel") | 
|---|
|  |  |  | public void exportExcel (@RequestBody PageWrap<InsuranceApply> pageWrap, HttpServletResponse response) { | 
|---|
|  |  |  | public void exportExcel (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap, HttpServletResponse response) { | 
|---|
|  |  |  | ExcelExporter.build(InsuranceApply.class).export(insuranceApplyService.findPage(pageWrap).getRecords(), "投保申请信息表", response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("导出投保详情单") | 
|---|
|  |  |  | @PostMapping("/exportDetailExcel") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:exportExcel") | 
|---|
|  |  |  | public void exportDetailExcel (@RequestBody  InsuranceApply model, HttpServletResponse response) { | 
|---|
|  |  |  | ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApplyService.findDetailForExport(model),  response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("列表") | 
|---|
|  |  |  | @PostMapping("/findListByDTO") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:query") | 
|---|
|  |  |  | public ApiResponse<List<InsuranceApply>> findListByDTO (@RequestBody InsuranceApplyQueryDTO insuranceApplyQueryDTO) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.findListByDTO(insuranceApplyQueryDTO)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|
|  |  |  | @GetMapping("/{id}") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:query") | 
|---|
|  |  |  | public ApiResponse findById(@PathVariable Integer id) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.findById(id)); | 
|---|
|  |  |  | public ApiResponse<InsuranceApply> findById(@PathVariable Integer id) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.findDetail(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|