|  |  |  | 
|---|
|  |  |  | 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.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 UnionApplyServiceImpl unionApplyServiceImpl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("新建") | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | 
|---|
|  |  |  | @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("投保复审") | 
|---|
|  |  |  | @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<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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|