| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | 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.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; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | |
| | | @Autowired |
| | | private InsuranceApplyService insuranceApplyService; |
| | | |
| | | @Autowired |
| | | private InsuranceApplyOnService insuranceApplyOnService; |
| | | |
| | | @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("商户退回投保") |
| | | |
| | | @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("/findListByDTO") |
| | |
| | | @PostMapping("/closeWtbForShop") |
| | | @RequiresPermissions("business:insuranceapply:back") |
| | | public ApiResponse closeWtbForShop(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.closeWtbForShop(insuranceApply)); |
| | | return ApiResponse.success(insuranceApplyOnService.closeWtbForShop(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查询") |
| | |
| | | @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") |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<PageData<InsuranceApply>> findPage (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap) { |
| | | return ApiResponse.success(insuranceApplyService.findPage(pageWrap)); |
| | | PageData<InsuranceApply> pageData = insuranceApplyService.findPage(pageWrap); |
| | | return ApiResponse.success(pageData); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | |
| | | @PostMapping("/exportDetailExcel") |
| | | @RequiresPermissions("business:insuranceapply:exportExcel") |
| | | public void exportDetailExcel (@RequestBody InsuranceApply model, HttpServletResponse response) { |
| | | ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApplyService.findDetailForExport(model), response); |
| | | InsuranceApply insuranceApply = insuranceApplyService.findDetailForExport(model); |
| | | ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApply, response); |
| | | } |
| | | |
| | | @ApiOperation("根据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)); |
| | | } |
| | | } |