| | |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | 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.dao.business.vo.dataBoard.DataListVO; |
| | | import com.doumee.dao.business.vo.dataBoard.InsuranceApplyDataVO; |
| | | import com.doumee.dao.business.vo.dataBoard.InsuranceApplyReportDataVO; |
| | | 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 org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | |
| | | @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); |
| | | } |
| | | |
| | | @ApiOperation("投保分析报表数据") |
| | | @GetMapping("/getInsuranceApplyReportDataVO") |
| | | public ApiResponse<InsuranceApplyReportDataVO> getInsuranceApplyReportDataVO() { |
| | | return ApiResponse.success(insuranceApplyOnService.getInsuranceApplyReportDataVO()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("投保分析数据") |
| | | @GetMapping("/getInsuranceApplyDataVO") |
| | | public ApiResponse<InsuranceApplyDataVO> getInsuranceApplyDataVO() { |
| | | return ApiResponse.success(insuranceApplyOnService.getInsuranceApplyDataVO()); |
| | | } |
| | | |
| | | @ApiOperation("每月加减保人数") |
| | | @GetMapping("/getAddReduceData") |
| | | public ApiResponse<List<DataListVO>> getAddReduceData() { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | return ApiResponse.success(insuranceApplyOnService.getAddReduceData(loginUserInfo)); |
| | | } |
| | | @ApiOperation("已投保单数据") |
| | | @GetMapping("/getInsuranceNum") |
| | | public ApiResponse<InsuranceApplyDataVO> getInsuranceNum() { |
| | | return ApiResponse.success(insuranceApplyOnService.getInsuranceNum()); |
| | | } |
| | | |
| | | @ApiOperation("每月赔付金额") |
| | | @GetMapping("/getSettleClaimsMoney") |
| | | public ApiResponse<List<DataListVO>> getSettleClaimsMoney() { |
| | | return ApiResponse.success(insuranceApplyOnService.getSettleClaimsMoney()); |
| | | } |
| | | |
| | | |
| | | |
| | | } |