|  |  | 
 |  |  | import com.doumee.core.model.PageData; | 
 |  |  | import com.doumee.core.model.PageWrap; | 
 |  |  | import com.doumee.dao.business.dto.*; | 
 |  |  | import com.doumee.dao.business.model.InsuranceApply; | 
 |  |  | import com.doumee.dao.business.model.UnionApply; | 
 |  |  | import com.doumee.service.business.InsuranceApplyService; | 
 |  |  | import com.doumee.service.business.UnionApplyService; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private UnionApplyService unionApplyService; | 
 |  |  |     @Autowired | 
 |  |  |     private InsuranceApplyService insuranceApplyService; | 
 |  |  |  | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("新建") | 
 |  |  | 
 |  |  |     public void exportExcel (@RequestBody PageWrap<UnionApply> pageWrap, HttpServletResponse response) { | 
 |  |  |         ExcelExporter.build(UnionApply.class).export(unionApplyService.findPage(pageWrap).getRecords(), "合并投保单信息表", response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("导出投保详情单") | 
 |  |  |     @PostMapping("/exportDetailExcel") | 
 |  |  |     @RequiresPermissions("business:unionapply:exportExcel") | 
 |  |  |     public void exportDetailExcel (@RequestBody UnionApply model, HttpServletResponse response) { | 
 |  |  |         ExcelExporter.build(UnionApply.class).exportUnionApplyDetail(unionApplyService.findDetailForExport(model),  response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("根据ID查询") | 
 |  |  |     @GetMapping("/{id}") | 
 |  |  | 
 |  |  |         return ApiResponse.success(unionApplyService.merge(saveUnionApplyDTO)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("关闭合并单") | 
 |  |  |     @PostMapping("/close") | 
 |  |  |     @RequiresPermissions("business:unionapply:close") | 
 |  |  |     @ApiOperation("退回合并单") | 
 |  |  |     @PostMapping("/cancel") | 
 |  |  |     @RequiresPermissions("business:unionapply:cancel") | 
 |  |  |     public ApiResponse close(@RequestBody CloseDTO closeDTO) { | 
 |  |  |         unionApplyService.cancelMerge(closeDTO); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("上传投保单") | 
 |  |  |     @PostMapping("/uploadToubaodan") | 
 |  |  |     @RequiresPermissions("business:unionapply:create") | 
 |  |  |     @RequiresPermissions("business:unionapply:uploadToubaodan") | 
 |  |  |     public ApiResponse uploadToubaodan(@RequestBody UploadMultifileDTO uploadMultifileDTO) { | 
 |  |  |         unionApplyService.uploadToubaodan(uploadMultifileDTO); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  | 
 |  |  |     @PostMapping("/getSignLink") | 
 |  |  |     @RequiresPermissions("business:unionapply:query") | 
 |  |  |     public ApiResponse getSignLink(@RequestBody SmsCheckDTO smsCheckDTO) { | 
 |  |  |         unionApplyService.getSignLink(smsCheckDTO); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |         return ApiResponse.success( unionApplyService.getSignLink(smsCheckDTO)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation("上传保险单") | 
 |  |  |     @PostMapping("/uploadBXD") | 
 |  |  |     @RequiresPermissions("business:unionchange:query") | 
 |  |  |     @RequiresPermissions("business:unionapply:uploadBXD") | 
 |  |  |     public ApiResponse uploadBXD(@RequestBody UnionApplyBXDDTO unionApplyBXDDTO) { | 
 |  |  |         unionApplyService.uploadBXD(unionApplyBXDDTO); | 
 |  |  |         insuranceApplyService.updateApplyCurrentFee(null,unionApplyBXDDTO.getId()); | 
 |  |  |         unionApplyService.updateUnionApplyCurrentFee(unionApplyBXDDTO.getId()); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation("测试合并单实际金额") | 
 |  |  |     @GetMapping("/testFee") | 
 |  |  |     public ApiResponse testFee(Integer id) { | 
 |  |  |         unionApplyService.updateUnionApplyCurrentFee(id); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |