|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.ApplyPowerDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.CountCyclePriceDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.InsuranceApplyQueryDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.dto.SaveDispatchUnitDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.InsuranceApply; | 
|---|
|  |  |  | import com.doumee.dao.business.vo.ApplyPowerVO; | 
|---|
|  |  |  | import com.doumee.dao.business.vo.CountCyclePriceVO; | 
|---|
|  |  |  | import com.doumee.service.business.InsuranceApplyOnService; | 
|---|
|  |  |  | import com.doumee.service.business.InsuranceApplyService; | 
|---|
|  |  |  | import com.doumee.service.business.impl.UnionApplyServiceImpl; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private InsuranceApplyService insuranceApplyService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private InsuranceApplyOnService insuranceApplyOnService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private UnionApplyServiceImpl unionApplyServiceImpl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("新建") | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/check") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:check") | 
|---|
|  |  |  | public ApiResponse check(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.check(insuranceApply)); | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.check(insuranceApply,unionApplyServiceImpl)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("平台退回投保") | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("投保复审") | 
|---|
|  |  |  | @PostMapping("/reexamineCheck") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:check") | 
|---|
|  |  |  | public ApiResponse reexamineCheck(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.reexamineCheck(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("平台退回申请") | 
|---|
|  |  |  | @PostMapping("/back") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:back") | 
|---|
|  |  |  | public ApiResponse back(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.back(insuranceApply)); | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyOnService.back(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("平台上传投保单") | 
|---|
|  |  |  | @PostMapping("/uploadToubaodan") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:uploadToubaodan") | 
|---|
|  |  |  | public ApiResponse uploadToubaodan(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.uploadToubaodan(insuranceApply)); | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyOnService.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)); | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyOnService.uploadBaoxiandan(insuranceApply)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("平台处理退单申请") | 
|---|
|  |  |  | @PostMapping("/dealBackApply") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:dealBackApply") | 
|---|
|  |  |  | public ApiResponse dealBackApply(@RequestBody InsuranceApply insuranceApply) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.dealBackApply(insuranceApply)); | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyOnService.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("/exportDetailExcel") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:exportExcel") | 
|---|
|  |  |  | public void exportExcel (@RequestBody  InsuranceApply model, HttpServletResponse response) { | 
|---|
|  |  |  | 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)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("获取保单止期与初始金额") | 
|---|
|  |  |  | @PostMapping("/getCountCyclePriceVO") | 
|---|
|  |  |  | public ApiResponse<CountCyclePriceVO> getCountCyclePriceVO (@RequestBody CountCyclePriceDTO countCyclePriceDTO) { | 
|---|
|  |  |  | return ApiResponse.success("操作成功",insuranceApplyService.getCountCyclePriceVO(countCyclePriceDTO)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("查询保单是否可进行加减保") | 
|---|
|  |  |  | @PostMapping("/getApplyPower") | 
|---|
|  |  |  | @RequiresPermissions("business:insuranceapply:query") | 
|---|
|  |  |  | public ApiResponse<ApplyPowerVO> getApplyPower(@RequestBody ApplyPowerDTO applyPowerDTO) { | 
|---|
|  |  |  | return ApiResponse.success(insuranceApplyService.getApplyPower(applyPowerDTO)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("测试发送邮件") | 
|---|
|  |  |  | @PostMapping("/testSendEmail") | 
|---|
|  |  |  | public ApiResponse testSendEmail() { | 
|---|
|  |  |  | insuranceApplyService.testSendEmail(); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|