| | |
| | | } |
| | | Row header1 = sheet.createRow(1); |
| | | header1.createCell(0).setCellValue("投保人"); |
| | | header1.createCell(1).setCellValue("报保险人"); |
| | | header1.createCell(1).setCellValue("被保险人"); |
| | | header1.createCell(2).setCellValue(""); |
| | | header1.createCell(3).setCellValue("保险方案"); |
| | | header1.createCell(4).setCellValue("保险生效起期"); |
| | |
| | | RETURN_APPLY_SIGNATURE(4, "发起退回申请(已签章)"), |
| | | PLATFORM_AGREE(5, "平台同意(已退回)"), |
| | | CLOSE(6, "已关闭"), |
| | | PALTFORM_CHECK_PASS(7, "审核通过"), |
| | | COMPANY_SIGN(7, "审核通过"), |
| | | PALTFORM_CHECK_PASS_NO(8, "审核不通过"), |
| | | COMPANY_SIGN(9, "企业签署人员名单 - 委托保"), |
| | | WTB_TOUBAOING(9, "投保中"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"未查询到方案信息"); |
| | | } |
| | | |
| | | if( |
| | | // Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey()) |
| | | // ||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.SIGNATURE.getKey()) |
| | | // || |
| | | Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){ |
| | | //已提交和已完成状态不支持审核不通过 |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){ |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){ |
| | | //已提交和已完成状态不支持审核不通过 |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | }else if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){ |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey()) |
| | | || Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.SIGNATURE.getKey()) ){ |
| | | //已提交和已完成状态不支持审核不通过 |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | ApplyChange update = new ApplyChange(); |
| | |
| | | }else if(applyChangeOptDTO.getOptType().equals(6)){ |
| | | //企业关闭 |
| | | applyLogType = Constants.ApplyLogType.CA_COMPANY_CLOSE; |
| | | if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业端用户无法进行该操作"); |
| | | } |
| | | if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"数据状态错误无法进行该操作!"); |
| | | } |
| | | applyChange.setStatus(Constants.ApplyChangeStatus.CLOSE.getKey()); |
| | | |
| | | //存储待办信息 |
| | | //删除其他待办 |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,applyChange.getId())); |
| | |
| | | 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_INSURANCE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息"); |
| | | } |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | InsuranceApply update = new InsuranceApply(); |
| | | if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){ |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | update.setStatus(Constants.InsuranceApplyStatus.FAIL_RETURN.getKey()); |
| | | }else{ |
| | | if( !(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_MEMBER_LIST_SIGNATURE.getKey()) |
| | | || Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_RETURN.getKey()); |
| | | } |
| | | |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | update.setStatus(Constants.InsuranceApplyStatus.FAIL_RETURN.getKey()); |
| | | update.setCheckDate(update.getEditDate()); |
| | | update.setCheckInfo(insuranceApply.getCheckInfo()); |
| | | update.setCheckUserId(user.getId()); |
| | |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) |
| | | .eq(ApplyChange::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getUnionApplyId,saveUnionChangeDTO.getUnionApplyId()) |
| | | .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS.getKey()) |
| | | .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.COMPANY_SIGN.getKey()) |
| | | .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | .eq(ApplyChange::getType,saveUnionChangeDTO.getBusinessType()) |
| | | .in(ApplyChange::getId,saveUnionChangeDTO.getApplyIds()) |
| | |
| | | .set(ApplyChange::getUnionChangeId,unionChange.getId()) |
| | | .set(ApplyChange::getCheckDate,new Date()) |
| | | .set(ApplyChange::getCheckUserId,user.getId()) |
| | | .set(ApplyChange::getStatus,Constants.ApplyChangeStatus.WTB_TOUBAOING.getKey()) |
| | | .in(ApplyChange::getId,saveUnionChangeDTO.getApplyIds()) |
| | | ); |
| | | |
| | |
| | | .set(ApplyChange::getUnionChangeId,null) |
| | | .set(ApplyChange::getCheckDate,new Date()) |
| | | .set(ApplyChange::getCheckUserId,user.getId()) |
| | | .set(ApplyChange::getStatus,Constants.ApplyChangeStatus.COMPANY_SIGN.getKey()) |
| | | .in(ApplyChange::getUnionChangeId,unionChange.getId()) |
| | | ); |
| | | |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.ApplyChangeOptDTO; |
| | | import com.doumee.dao.business.model.ApplyChange; |
| | | import com.doumee.dao.business.model.InsuranceApply; |
| | | import com.doumee.service.business.ApplyChangeService; |
| | |
| | | public ApiResponse check(@RequestBody ApplyChange model) { |
| | | return ApiResponse.success(applyChangeService.check(model)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "业务处理",notes = "退回申请,关闭等") |
| | | @PostMapping("/applyChangeOpt") |
| | | public ApiResponse applyChangeOpt (@RequestBody ApplyChangeOptDTO applyChangeOptDTO) { |
| | | applyChangeService.changeOpt(applyChangeOptDTO); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | |
| | | } |