| | |
| | | applyChagneDetailService.updateById(applyChagneDetail); |
| | | return ApiResponse.success(null); |
| | | } |
| | | // |
| | | // @ApiOperation("分页查询") |
| | | // @PostMapping("/page") |
| | | // @RequiresPermissions("business:applychagnedetail:query") |
| | | // public ApiResponse<PageData<ApplyChagneDetail>> findPage (@RequestBody PageWrap<ApplyChagneDetail> pageWrap) { |
| | | // return ApiResponse.success(applyChagneDetailService.findPage(pageWrap)); |
| | | // } |
| | | |
| | | @ApiOperation("分页查询") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | | public ApiResponse<PageData<ApplyChagneDetail>> findPage (@RequestBody PageWrap<ApplyChagneDetail> pageWrap) { |
| | | return ApiResponse.success(applyChagneDetailService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | /* @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applychagnedetail:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyChagneDetail> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(ApplyChagneDetail.class).export(applyChagneDetailService.findPage(pageWrap).getRecords(), "加减保换厂申请明细信息表", response); |
| | | } |
| | | }*/ |
| | | |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("分页查询") |
| | | /* @ApiOperation("分页查询") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applydetail:query") |
| | | public ApiResponse<PageData<ApplyDetail>> findPage (@RequestBody PageWrap<ApplyDetail> pageWrap) { |
| | |
| | | @RequiresPermissions("business:applydetail:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyDetail> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(ApplyDetail.class).export(applyDetailService.findPage(pageWrap).getRecords(), "投保申请明细信息表", response); |
| | | } |
| | | }*/ |
| | | |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | |
| | | public ApiResponse create(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.create(insuranceApply)); |
| | | } |
| | | @ApiOperation("平台投保审核") |
| | | @PostMapping("/check") |
| | | @RequiresPermissions("business:insuranceapply:check") |
| | | public ApiResponse check(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.check(insuranceApply)); |
| | | } |
| | | @ApiOperation("平台退回投保") |
| | | @PostMapping("/back") |
| | | @RequiresPermissions("business:insuranceapply:back") |
| | | public ApiResponse back(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.back(insuranceApply)); |
| | | } |
| | | @ApiOperation("平台上传投保单") |
| | | @PostMapping("/uploadToubaodan") |
| | | @RequiresPermissions("business:insuranceapply:uploadToubaodan") |
| | | public ApiResponse uploadToubaodan(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.uploadToubaodan(insuranceApply)); |
| | | } |
| | | @ApiOperation("平台上传保险单") |
| | | @PostMapping("/uploadBaoxiandan") |
| | | @RequiresPermissions("business:insuranceapply:uploadBaoxiandan") |
| | | public ApiResponse uploadBaoxiandan(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.uploadBaoxiandan(insuranceApply)); |
| | | } |
| | | @ApiOperation("平台驳回退单申请") |
| | | @PostMapping("/refuseBackApply") |
| | | @RequiresPermissions("business:insuranceapply:refuseBackApply") |
| | | public ApiResponse refuseBackApply(@RequestBody InsuranceApply insuranceApply) { |
| | | return ApiResponse.success(insuranceApplyService.refuseBackApply(insuranceApply)); |
| | | } |
| | | |
| | | @ApiOperation("根据ID删除") |
| | | @GetMapping("/delete/{id}") |
| | |
| | | |
| | | |
| | | public enum ApplyLogType { |
| | | UPLOAD(0, "提交投保申请"), |
| | | PLATFORM_RETURN(1, "平台退回保单"), |
| | | WAIT_SIGNATURE(2, "已上传代签申请表待企业签章"), |
| | | SIGNATURE(3, "已签章待上传保险单"), |
| | | FAIL_RETURN(4, "保单出具失败退回"), |
| | | UPLOAD_INSURANCE(5, "已上传保单"), |
| | | COMPANY_APPLY_RETURN(6, "企业申请退回"), |
| | | COMPANY_APPLY_CLOSE(7, "企业关闭申请"), |
| | | PLATFORM_AGREE(8, "平台同意企业退回申请"), |
| | | PLATFORM_UN_AGREE(9, "平台拒绝企业退回申请"), |
| | | UPLOAD(0, "提交投保","提交意见:${param}"), |
| | | PLATFORM_RETURN(1, "申请退回","提交意见:${param}"), |
| | | WAIT_SIGNATURE(2, "上传投保单","提交意见:${param}"), |
| | | SIGNATURE(3, "企业签章",""), |
| | | FAIL_RETURN(4, "保单出具失败退回","提交意见:${param}"), |
| | | UPLOAD_INSURANCE(5, "保单完成","保险生效起期:${param1}变更为${param2}"), |
| | | COMPANY_APPLY_RETURN(6, "申请退回","提交意见:${param}"), |
| | | COMPANY_APPLY_CLOSE(7, "关闭申请",""), |
| | | PLATFORM_AGREE_BACK(8, "同意退回申请",""), |
| | | PLATFORM_UN_AGREE_BACK(9, "驳回退回申请","提交意见:${param}"), |
| | | COMPANY_EDIT(10, "保单修改","提交意见:${param1}\n${param2}"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private String info; |
| | | private int key; |
| | | |
| | | // 构造方法 |
| | | ApplyLogType(int key, String name) { |
| | | ApplyLogType(int key, String name,String info) { |
| | | this.name = name; |
| | | this.info = info; |
| | | this.key = key; |
| | | } |
| | | |
| | |
| | | for (ApplyLogType c : ApplyLogType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | public static String getInfo(int index) { |
| | | for (ApplyLogType c : ApplyLogType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.info; |
| | | } |
| | | } |
| | | return null; |
| | |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | } |
| | | } |
| | | |
| | | public enum InsuranceApplyStatus { |
| | | UPLOAD(0, "提交投保申请"), |
| | | PLATFORM_RETURN(1, "平台退回保单"), |
| | | WAIT_SIGNATURE(2, "已上传代签申请表待企业签章"), |
| | | SIGNATURE(3, "已签章待上传保险单"), |
| | | FAIL_RETURN(4, "保单出具失败退回"), |
| | | UPLOAD_INSURANCE(5, "已上传保单"), |
| | | COMPANY_APPLY_RETURN(6, "企业申请退回"), |
| | | PLATFORM_AGREE(7, "平台同意退回"), |
| | | CLOSE(8, "订单关闭"), |
| | | UPLOAD(0, "提交投保",""), |
| | | PLATFORM_RETURN(1, "审核不通过","提交意见:${param}"), |
| | | WAIT_SIGNATURE(2, "已上传代签申请表待企业签章",""), |
| | | SIGNATURE(3, "已签章待上传保险单",""), |
| | | FAIL_RETURN(4, "保单出具失败退回",""), |
| | | UPLOAD_INSURANCE(5, "保单完成","保险生效起期:${param}变更为${param1}"), |
| | | COMPANY_APPLY_RETURN(6, "企业申请退回","提交意见:${param}"), |
| | | PLATFORM_AGREE(7, "平台同意退回",""), |
| | | CLOSE(8, "订单关闭",""), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private String info; |
| | | private int key; |
| | | |
| | | // 构造方法 |
| | | InsuranceApplyStatus(int key, String name) { |
| | | InsuranceApplyStatus(int key, String name,String info) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.info = info; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (ApplyLogType c : ApplyLogType.values()) { |
| | | for (InsuranceApplyStatus c : InsuranceApplyStatus.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | public static String getInfo(int index) { |
| | | for (InsuranceApplyStatus c : InsuranceApplyStatus.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.info; |
| | | } |
| | | } |
| | | return null; |
| | |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | } |
| | | } |
| | | |
| | | public static BigDecimal countDetailFee(Solutions solutions,Date startDate, Date endDate){ |
| | |
| | | |
| | | InsuranceApply findDetail(Integer id); |
| | | |
| | | void applyOpt(InsuranceApplyOptDTO insuranceApplyOptDTO); |
| | | void applyOpt(InsuranceApplyOptDTO insuranceApplyOptDTO); |
| | | |
| | | Integer back(InsuranceApply insuranceApply); |
| | | |
| | | Integer uploadToubaodan(InsuranceApply insuranceApply); |
| | | |
| | | Integer uploadBaoxiandan(InsuranceApply insuranceApply); |
| | | |
| | | Integer refuseBackApply(InsuranceApply insuranceApply); |
| | | |
| | | Integer check(InsuranceApply insuranceApply); |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer back(InsuranceApply insuranceApply) { |
| | | if(insuranceApply.getId() == null ||StringUtils.isBlank(insuranceApply.getCheckInfo())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | InsuranceApply model = insuranceApplyMapper.selectById(insuranceApply.getId()); |
| | | |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | InsuranceApply update = new InsuranceApply(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()); |
| | | update.setCheckDate(update.getEditDate()); |
| | | update.setCheckInfo(insuranceApply.getCheckInfo()); |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | return null; |
| | | |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer uploadBaoxiandan(InsuranceApply insuranceApply) { |
| | | return null; |
| | | |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer refuseBackApply(InsuranceApply insuranceApply) { |
| | | return null; |
| | | |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer uploadToubaodan(InsuranceApply insuranceApply) { |
| | | return null; |
| | | |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer check(InsuranceApply insuranceApply) { |
| | | return null; |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer create(InsuranceApply insuranceApply) { |
| | | if (Objects.isNull(insuranceApply) |
| | | || Objects.isNull(insuranceApply.getSolutionId()) |