|  |  |  | 
|---|
|  |  |  | for (ApplyDetail applyDetail:applyDetailList) { | 
|---|
|  |  |  | //查询人员信息是否存在相同的方案下是否存在 冲突数据 | 
|---|
|  |  |  | InsuranceApplyServiceImpl.checkStaticMemberSolution(solutions.getBaseId(), | 
|---|
|  |  |  | applyDetail.getIdcardNo(),applyDetail.getMemberName(),unionApply.getStartTime(),unionApply.getEndTime(), | 
|---|
|  |  |  | applyDetail.getMemberId(),applyDetail.getIdcardNo(),applyDetail.getMemberName(),unionApply.getStartTime(),unionApply.getEndTime(), | 
|---|
|  |  |  | applyDetailJoinMapper); | 
|---|
|  |  |  | fee =fee.add( | 
|---|
|  |  |  | Constants.reduceFee(solutions,solutions.getPrice(),applyDetail.getStartTime(),applyDetail.getEndTime(),saveUnionApplyDTO.getStartDate(),saveUnionApplyDTO.getEndDate()) | 
|---|
|  |  |  | 
|---|
|  |  |  | String notifyUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SIGN_DONE_NOTIFY_URL).getCode(); | 
|---|
|  |  |  | notifyUrl = notifyUrl.replace("${type}","0").replace("${id}", unionApply.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String applyNo = signService.applySign(company.getName(),url,company.getName(),company.getCode(),company.getEmail(),null,company.getSignId(),notifyUrl); | 
|---|
|  |  |  | String applyNo = signService.applySignDoByParam(company.getName(),url,company.getName(),company.getCode(),company.getEmail(),null,company.getSignId(),notifyUrl,new Float(0.7)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(StringUtils.isBlank(applyNo) ){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,获取在线签章地址失败,请稍后重试!"); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //查询人员信息是否存在相同的方案下是否存在 冲突数据 | 
|---|
|  |  |  | InsuranceApplyServiceImpl.checkStaticMemberSolution(solutions.getBaseId(), | 
|---|
|  |  |  | applyDetail.getIdcardNo(),applyDetail.getMemberName(),unionApply.getStartTime(),unionApply.getEndTime(), | 
|---|
|  |  |  | applyDetail.getMemberId(),applyDetail.getIdcardNo(),applyDetail.getMemberName(),unionApply.getStartTime(),unionApply.getEndTime(), | 
|---|
|  |  |  | applyDetailJoinMapper); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | applyDetail.setPrice(price); | 
|---|
|  |  |  | applyDetail.setFee(price.multiply(new BigDecimal(maxDays)).add(serverCost)); | 
|---|
|  |  |  | applyDetail.setStartTime(unionApplyBXDDTO.getStartTime()); | 
|---|
|  |  |  | applyDetail.setEndTime(unionApplyBXDDTO.getEndTime()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | MemberInsurance memberInsurance = new MemberInsurance(applyDetail,user.getId()); | 
|---|
|  |  |  | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | memberInsuranceJoinMapper.insertBatchSomeColumn(memberInsuranceList); | 
|---|
|  |  |  | memberInsuranceJoinMapper.insert(memberInsuranceList); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | BigDecimal detailFee = Constants.reduceFee(solutions,solutions.getPrice().add(serverCost),insuranceApply.getStartTime(),insuranceApply.getFinalEndTime(), | 
|---|
|  |  |  | unionApplyBXDDTO.getStartTime(),unionApplyBXDDTO.getEndTime()); | 
|---|
|  |  |  | 
|---|
|  |  |  | ,unionApply.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionApply)); | 
|---|
|  |  |  | applyLogMapper.insert(log); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|