Merge remote-tracking branch 'origin/1.0.1' into 1.0.1
| | |
| | | sheet.setColumnWidth(i, ((i==3|| i== 4|| i== 5 )?16:8) * 2 * 256); |
| | | } |
| | | sheet.createFreezePane(0, 1); |
| | | sheet.addMergedRegion(new CellRangeAddress(0 ,0,0,6)); |
| | | sheet.addMergedRegion(new CellRangeAddress(0 ,0,0,5)); |
| | | Row title = sheet.createRow(0); |
| | | title.setHeight((short) 2000); |
| | | Cell c = title.createCell(0); |
| | | c.setCellValue(sheetName); |
| | | configFirstCell(sxssfWorkbook,c); |
| | | for (int i = 0; i < 8; i++) { |
| | | for (int i = 0; i < 6; i++) { |
| | | if(i>0){ |
| | | title.createCell(i).setCellValue(""); |
| | | } |
| | |
| | | Row header1 = sheet.createRow(1); |
| | | header1.createCell(0).setCellValue("投保人"); |
| | | header1.createCell(1).setCellValue("报保险人"); |
| | | header1.createCell(2).setCellValue("投保人数"); |
| | | header1.createCell(2).setCellValue(""); |
| | | header1.createCell(3).setCellValue("保险方案"); |
| | | header1.createCell(4).setCellValue("保险生效起期"); |
| | | header1.createCell(5).setCellValue("保险生效止期"); |
| | |
| | | header5.createCell(1).setCellValue(StringUtils.defaultString(addModel.getMemberName(),"")); |
| | | header5.createCell(2).setCellValue(Constants.equalsInteger(addModel.getSex(),0)?"男":(Constants.equalsInteger(addModel.getSex(),1)?"女":"-")); |
| | | header5.createCell(3).setCellValue(StringUtils.defaultString(addModel.getIdcardNo(),"")); |
| | | header5.createCell(6).setCellValue(StringUtils.defaultString(addModel.getDuName(),"")); |
| | | header5.createCell(7).setCellValue(StringUtils.defaultString(addModel.getWorkTypeName(),"")); |
| | | header5.createCell(4).setCellValue(StringUtils.defaultString(addModel.getDuName(),"")); |
| | | header5.createCell(5).setCellValue(StringUtils.defaultString(addModel.getWorkTypeName(),"")); |
| | | for (int i = 0; i < 6; i++) { |
| | | configDataCell(sxssfWorkbook,header5.getCell(i)); |
| | | } |
| | |
| | | configInfoCell(sxssfWorkbook,header6.getCell(i),HorizontalAlignment.LEFT); |
| | | } |
| | | header6.setHeight((short) 2000); |
| | | sheet.addMergedRegion(new CellRangeAddress(rowIndex ,rowIndex,0,7)); |
| | | sheet.addMergedRegion(new CellRangeAddress(rowIndex ,rowIndex,0,5)); |
| | | Row header7= sheet.createRow(rowIndex+1); |
| | | header7.setHeight((short) 3000); |
| | | header7.createCell(0).setCellValue("投保企业签章 : \n \n \n" +"日期: 年 月 日 "); |
| | |
| | | } |
| | | configInfoCell(sxssfWorkbook,header7.getCell(i),HorizontalAlignment.RIGHT); |
| | | } |
| | | sheet.addMergedRegion(new CellRangeAddress(rowIndex+1 ,rowIndex+1,0,7)); |
| | | sheet.addMergedRegion(new CellRangeAddress(rowIndex+1 ,rowIndex+1,0,5)); |
| | | |
| | | //临时缓冲区 |
| | | ByteArrayOutputStream out = new ByteArrayOutputStream(); |
| | |
| | | int birthYear = Integer.parseInt(idCard.substring(6, 10)); |
| | | int birthMonth = Integer.parseInt(idCard.substring(10, 12)); |
| | | int birthDay = Integer.parseInt(idCard.substring(12, 14)); |
| | | try{ |
| | | LocalDate birthDate = LocalDate.of(birthYear, birthMonth, birthDay); |
| | | LocalDate currentDate = LocalDate.now(); |
| | | long age = ChronoUnit.YEARS.between(birthDate, currentDate); |
| | | return age; |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"身份证号码错误:"+idCard); |
| | | } |
| | | |
| | | LocalDate birthDate = LocalDate.of(birthYear, birthMonth, birthDay); |
| | | LocalDate currentDate = LocalDate.now(); |
| | | long age = ChronoUnit.YEARS.between(birthDate, currentDate); |
| | | return age; |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | COMPANY_TBD_SIGNED_PDF(22, "合并单-投保单-商户提交(企业签署)PDF", "合并单-投保单-商户提交(企业签署)PDF"), |
| | | WTB_CA_DONE_PDF(23, "委托加减保/换厂业务 - 合并单最终保单", "委托加减保/换厂业务 - 合并单最终保单"), |
| | | WTB_CONFIRMATION_LATTER(24, "委托保 - 投保方案确认书", "委托保 - 投保方案确认书"), |
| | | WTB_CA_TBD_PDF(25, "委托加减保/换厂业务 -投保单(企业签署后PDF)", "委托加减保/换厂业务 -投保单(企业签署后PDF)"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | |
| | | |
| | | |
| | | /** |
| | | * 委托保合并单 |
| | | * 委托保 投保单合并单日志 |
| | | */ |
| | | IA_HBD_UPLOAD(32, "提交申请","",3), |
| | | IA_HBD_UPLOAD_TBD(33, "上传投保单","",3), |
| | | IA_HBD_SIGNATURE_TBD(34, "签署投保单","",3), |
| | | IA_HBD_UPLOAD_INSURANCE(35, "上传保险单","保险生效起期:${param1}变更为${param2}",3), |
| | | IA_HBD_SIGNATURE_TBD(34, "商户签章","",3), |
| | | IA_HBD_UPLOAD_INSURANCE(35, "投保完成","保险生效起期:${param1}变更为${param2}",3), |
| | | IA_HBD_CLOSE(36, "退回申请","原因:${param}",3), |
| | | |
| | | |
| | | |
| | | /** |
| | | * 委托保 加减保/换厂 合并单 |
| | | */ |
| | | CA_HBD_UPLOAD(37, "提交申请","",4), |
| | | CA_HBD_SIGNATURE_TBD(38, "商户签章","",4), |
| | | CA_HBD_UPLOAD_INSURANCE(39, "投保完成","",4), |
| | | CA_HBD_CLOSE(40, "退回申请","原因:${param}",4), |
| | | |
| | | |
| | | |
| | | |
| | |
| | | this.afterContent=after; |
| | | } |
| | | |
| | | public ApplyLog(UnionChange apply,String title,String content,Integer objId,Integer objType, String before,String after){ |
| | | this.title =title; |
| | | this.content=content; |
| | | this.applyId = apply.getId(); |
| | | this.createDate =apply.getEditDate(); |
| | | this.creator =apply.getEditor(); |
| | | this.status = apply.getStatus(); |
| | | this.objId=objId; |
| | | this.objType = objType; |
| | | this.beforeContent=before; |
| | | this.afterContent=after; |
| | | } |
| | | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键", example = "1") |
| | |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.CloseDTO; |
| | | import com.doumee.dao.business.dto.SaveUnionChangeDTO; |
| | | import com.doumee.dao.business.dto.SmsCheckDTO; |
| | | import com.doumee.dao.business.dto.UnionChangeBXDDTO; |
| | |
| | | |
| | | /** |
| | | * 关闭 合并单(加减保/换厂单) |
| | | * @param id |
| | | * @param closeDTO |
| | | */ |
| | | void cancelMerge(Integer id); |
| | | void cancelMerge(CloseDTO closeDTO); |
| | | |
| | | |
| | | /** |
| | |
| | | private NoticesMapper noticesMapper; |
| | | @Autowired |
| | | private UnionApplyJoinMapper unionApplyJoinMapper; |
| | | @Autowired |
| | | private UnionChangeJoinMapper unionChangeJoinMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | |
| | | update.setId(model.getId()); |
| | | unionApplyJoinMapper.updateById(update); |
| | | |
| | | //存储待办信息 |
| | | // Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | // //删除其他待办 |
| | | // noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | // .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | // .eq(Notices::getObjId,model.getId())); |
| | | // Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),model.getSolutionsName(),model.getCompanyId(),Constants.NoticeType.TWO); |
| | | // noticesMapper.insert(notices); |
| | | |
| | | Multifile f = new Multifile(); |
| | | f.setIsdeleted(Constants.ZERO); |
| | | f.setCreator(model.getCreator()); |
| | |
| | | f.setInfo("商户签署投保单"); |
| | | f.setName("商户签署投保单.pdf"); |
| | | multifileMapper.insert(f); |
| | | // Constants.ApplyLogType applyLogType = Constants.ApplyLogType.SIGNATURE; |
| | | // ApplyLog log = new ApplyLog(update,applyLogType.getName(), null,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | // applyLogMapper.insert(log); |
| | | // |
| | | // startSendEmail(f, model.getCompanyName(),model.getSolutionsName(),model.getSolutionEmail()); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.IA_HBD_SIGNATURE_TBD; |
| | | ApplyLog log = new ApplyLog(model,applyLogType.getName(), null |
| | | ,model.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(model)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | return f; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商户合并单(加减保/换厂) 商户签署投保申请单 |
| | | * @param model |
| | | * @param fileurl |
| | | * @param fullUrl |
| | | * @return |
| | | */ |
| | | public Multifile uploadUnionChangeSignedFileDo(UnionChange model,String fileurl,String fullUrl) { |
| | | UnionChange update = new UnionChange(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(model.getCreator()); |
| | | update.setStatus(Constants.UnionChangeStatus.UPLOAD_INSURANCE_POLICY.getKey()); |
| | | update.setId(model.getId()); |
| | | unionChangeJoinMapper.updateById(update); |
| | | |
| | | Multifile f = new Multifile(); |
| | | f.setIsdeleted(Constants.ZERO); |
| | | f.setCreator(model.getCreator()); |
| | | f.setObjId(update.getId()); |
| | | f.setCreateDate(update.getEditDate()); |
| | | f.setObjType(Constants.MultiFile.WTB_CA_TBD_PDF.getKey()); |
| | | f.setType(Constants.TWO); |
| | | f.setFileurl(fileurl); |
| | | f.setFileurlFull(fullUrl); |
| | | f.setInfo("委托加减保/换厂业务 -投保单"); |
| | | f.setName("委托加减保/换厂业务 -投保单.pdf"); |
| | | multifileMapper.insert(f); |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_SIGNATURE_TBD; |
| | | ApplyLog log = new ApplyLog(model,applyLogType.getName(), null |
| | | ,model.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(model)); |
| | | applyLogMapper.insert(log); |
| | |
| | | continue; |
| | | } |
| | | uploadUnionApplySignedFileDo(model,fileUrl,path+fileUrl); |
| | | // return; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | *合并加减保换厂 签署业务 |
| | | */ |
| | | List<UnionChange> unionChangeList = unionChangeJoinMapper.selectJoinList(UnionChange.class, |
| | | new MPJLambdaWrapper<UnionChange>() |
| | | .selectAll(UnionChange.class) |
| | | .eq(UnionChange::getStatus,Constants.UnionChangeStatus.MERGE.getKey()) |
| | | .isNotNull(UnionChange::getSignApplyNo)); |
| | | if(unionChangeList !=null && unionChangeList.size()>0 ){ |
| | | for(UnionChange model : unionChangeList){ |
| | | String status = signService.linkFileStatus(model.getSignApplyNo()); |
| | | if(!StringUtils.equals(status,"3")){ |
| | | continue; |
| | | } |
| | | String link = signService.linkFile(model.getSignApplyNo()); |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | continue; |
| | | } |
| | | uploadUnionChangeSignedFileDo(model,fileUrl,path+fileUrl); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | uploadUnionApplySignedFileDo(unionApply,fileUrl,path+fileUrl); |
| | | } |
| | | |
| | | |
| | | /** |
| | | *合并加减保换厂 签署业务 |
| | | */ |
| | | UnionChange unionChange = unionChangeJoinMapper.selectOne( |
| | | new MPJLambdaWrapper<UnionChange>() |
| | | .selectAll(UnionChange.class) |
| | | .eq(UnionChange::getSignApplyNo,data.getApplyNo()) |
| | | .last(" limit 1 ")); |
| | | if(unionChange != null &&Constants.equalsInteger(unionChange.getStatus(),Constants.UnionChangeStatus.MERGE.getKey())){ |
| | | String link = signService.linkFile(model.getSignApplyNo()); |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | return; |
| | | } |
| | | uploadUnionChangeSignedFileDo(unionChange,fileUrl,path+fileUrl); |
| | | } |
| | | |
| | | |
| | | }else if(Constants.equalsInteger(data.getSignStatus(), Constants.TWO )){ |
| | | //如果已拒签,清除合同,下次签章重新生成新合同 |
| | | insuranceApplyMapper.update(null,new UpdateWrapper<InsuranceApply>().lambda() |
| | |
| | | applyChangeMapper.update(null,new UpdateWrapper<ApplyChange>().lambda() |
| | | .set(ApplyChange::getSignMemberListNo,null) |
| | | .eq(ApplyChange::getSignMemberListNo,data.getApplyNo())); |
| | | unionChangeJoinMapper.update(null,new UpdateWrapper<UnionChange>().lambda() |
| | | .set(UnionChange::getSignApplyNo,null) |
| | | .eq(UnionChange::getSignApplyNo,data.getApplyNo())); |
| | | } |
| | | } |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业端用户无法进行该操作"); |
| | | } |
| | | MPJLambdaWrapper<ApplyDetail> lambdaWrapper = new MPJLambdaWrapper<ApplyDetail>(); |
| | | lambdaWrapper.selectAll(Member.class) |
| | | lambdaWrapper.select(ApplyDetail::getId) |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId) |
| | | .and(i->i.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()).or().eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_DONE.getKey())) |
| | | .eq(InsuranceApply::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .apply(" now() betwwen t.START_TIME and t.END_TIME "); |
| | | .apply(" now() between t.START_TIME and t.END_TIME "); |
| | | |
| | | Integer count = applyDetailJoinMapper.selectJoinCount(lambdaWrapper); |
| | | return count; |
| | |
| | | .leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId) |
| | | .leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId) |
| | | .isNull(ApplyDetail::getFromId) |
| | | .eq(ApplyDetail::getId,model.getId()) |
| | | .eq(ApplyDetail::getApplyId,model.getId()) |
| | | ); |
| | | model.setApplyDetailList(applyDetailList); |
| | | return model; |
| | |
| | | UnionApply unionApply = new UnionApply(); |
| | | unionApply.setCreateDate(new Date()); |
| | | unionApply.setCreator(user.getId()); |
| | | unionApply.setEditor(user.getId()); |
| | | unionApply.setEditDate(new Date()); |
| | | unionApply.setCompanyId(user.getCompanyId()); |
| | | unionApply.setStartTime(saveUnionApplyDTO.getStartDate()); |
| | | unionApply.setEndTime(saveUnionApplyDTO.getEndDate()); |
| | |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!"); |
| | | } |
| | | if(Objects.isNull(closeDTO)||Objects.isNull(closeDTO.getId())){ |
| | | if(Objects.isNull(closeDTO) |
| | | ||Objects.isNull(closeDTO.getId()) |
| | | ||StringUtils.isBlank(closeDTO.getReason())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | UnionApply unionApply = unionApplyMapper.selectById(closeDTO.getId()); |
| | |
| | | //合并单状态处于待投保 |
| | | if(unionApply.getStatus().equals(Constants.UnionApplyStatus.UPLOAD_INSURANCE_POLICY.getKey()) |
| | | || unionApply.getStatus().equals(Constants.UnionApplyStatus.WAIT_SIGNATURE.getKey())){ |
| | | //TODO 删除企业投保单的 签署数据 |
| | | |
| | | multifileMapper.delete(new QueryWrapper<Multifile>() |
| | | .lambda() |
| | | .apply(" multifile.id in ( select i.id from insurance_apply i where i.UNION_APPLY_ID = "+unionApply.getId()+" ) ") |
| | | .eq(Multifile::getObjType,Constants.MultiFile.COMPANY_TBD_SIGNED.getKey())); |
| | | } |
| | | insuranceApplyJoinMapper.update(null,new UpdateWrapper<InsuranceApply>().lambda() |
| | | .set(InsuranceApply::getUnionApplyId,null) |
| | | .set(InsuranceApply::getCheckDate,new Date()) |
| | | .set(unionApply.getStatus().equals(Constants.UnionApplyStatus.UPLOAD_INSURANCE_POLICY.getKey()) |
| | | || unionApply.getStatus().equals(Constants.UnionApplyStatus.WAIT_SIGNATURE.getKey()), |
| | | InsuranceApply::getUnionApplyTbdStatus,Constants.ZERO) |
| | | .set(unionApply.getStatus().equals(Constants.UnionApplyStatus.UPLOAD_INSURANCE_POLICY.getKey()) |
| | | || unionApply.getStatus().equals(Constants.UnionApplyStatus.WAIT_SIGNATURE.getKey()), |
| | | InsuranceApply::getApplyTbdNo,null) |
| | | .set(InsuranceApply::getCheckUserId,user.getId()) |
| | | .set(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_BUSINESS_CHECK_PASS.getKey()) |
| | | .eq(InsuranceApply::getUnionApplyId,unionApply.getId())); |
| | | .eq(InsuranceApply::getUnionApplyId,unionApply.getId()) |
| | | ); |
| | | |
| | | applyDetailJoinMapper.update(null,new UpdateWrapper<ApplyDetail>().lambda() |
| | | .set(ApplyDetail::getUnionApplyId,null) |
| | |
| | | info = info.replace("${param}", closeDTO.getReason()); |
| | | ApplyLog log = new ApplyLog(unionApply,applyLogType.getName(), info |
| | | ,unionApply.getId(),applyLogType.getKey(),null, null); |
| | | applyLogMapper.insert(log); |
| | | |
| | | applyLogMapper.insert(log); |
| | | } |
| | | |
| | |
| | | .set(UnionApply::getCurrentFee,sumCurrFee) |
| | | .eq(UnionApply::getId,unionApply.getId()) |
| | | ); |
| | | //合并单 总保单 |
| | | //合并单 文件 |
| | | if(StringUtils.isNotBlank(unionApplyBXDDTO.getFileUrl())){ |
| | | Multifile multifile = new Multifile(); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.SaveUnionApplyDTO; |
| | | import com.doumee.dao.business.dto.SaveUnionChangeDTO; |
| | | import com.doumee.dao.business.dto.SmsCheckDTO; |
| | | import com.doumee.dao.business.dto.UnionChangeBXDDTO; |
| | | import com.doumee.dao.business.dto.*; |
| | | import com.doumee.dao.business.join.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.CountCyclePriceVO; |
| | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Autowired |
| | | private ApplyLogMapper applyLogMapper; |
| | | @Override |
| | | public Integer create(UnionChange unionChange) { |
| | | unionChangeMapper.insert(unionChange); |
| | |
| | | applyChagneDetailJoinMapper.update(null,new UpdateWrapper<ApplyChagneDetail>().lambda() |
| | | .set(ApplyChagneDetail::getUnionChangeId,unionChange.getId()) |
| | | .in(ApplyChagneDetail::getApplyId,saveUnionChangeDTO.getApplyIds())); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD; |
| | | ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), null |
| | | ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | return unionChange.getId(); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 取消保单合并 |
| | | * @param id |
| | | * @param closeDTO |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void cancelMerge(Integer id){ |
| | | public void cancelMerge(CloseDTO closeDTO){ |
| | | if(Objects.isNull(closeDTO) |
| | | ||Objects.isNull(closeDTO.getId()) |
| | | ||StringUtils.isBlank(closeDTO.getReason())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!"); |
| | | } |
| | | UnionChange unionChange = unionChangeMapper.selectById(id); |
| | | UnionChange unionChange = unionChangeMapper.selectById(closeDTO.getId()); |
| | | if(Objects.isNull(unionChange)||!Constants.equalsInteger(unionChange.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | |
| | | .set(UnionChange::getStatus,Constants.UnionApplyStatus.CLOSE.getKey()) |
| | | .eq(UnionChange::getId,unionChange.getId()) |
| | | ); |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD; |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", closeDTO.getReason()); |
| | | ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), info |
| | | ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | .set(UnionChange::getEditor,user.getId()) |
| | | .eq(UnionChange::getId,unionChangeBXDDTO.getId()) |
| | | ); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD_INSURANCE; |
| | | ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), null |
| | | ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange)); |
| | | applyLogMapper.insert(log); |
| | | } |
| | | |
| | | |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.CloseDTO; |
| | | import com.doumee.dao.business.dto.SaveUnionChangeDTO; |
| | | import com.doumee.dao.business.dto.SmsCheckDTO; |
| | | import com.doumee.dao.business.dto.UnionChangeBXDDTO; |
| | |
| | | |
| | | |
| | | @ApiOperation("关闭合并单") |
| | | @GetMapping("/close") |
| | | @PostMapping("/close") |
| | | @RequiresPermissions("business:unionchange:close") |
| | | public ApiResponse close(@RequestParam Integer id) { |
| | | unionChangeService.cancelMerge(id); |
| | | public ApiResponse close(@RequestBody CloseDTO closeDTO) { |
| | | unionChangeService.cancelMerge(closeDTO); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |