Merge remote-tracking branch 'origin/2.0.1' into 2.0.1
| | |
| | | @TableField(exist = false) |
| | | private String applyCode; |
| | | |
| | | @ApiModelProperty(value = "商户名称", example = "1") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "实际保险生效止期") |
| | | @TableField(exist = false) |
| | |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | | .in(ApplyDetail::getMemberId,memberList.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | .in(CollectionUtils.isNotEmpty(memberList),ApplyDetail::getMemberId,memberList.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | .apply(CollectionUtils.isEmpty(memberList),"1 = 2 ") |
| | | .eq(ApplyDetail::getIsdeleted,Constants.ZERO)); |
| | | |
| | | List<ApplyChagneDetail> applyChangeDetailAllList = applyChagneDetailJoinMapper.selectJoinList(ApplyChagneDetail.class, |
| | |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | | .leftJoin(Member.class,Member::getId,ApplyChagneDetail::getMemberId) |
| | | .eq(ApplyChange::getApplyId,applyChange.getApplyId()) |
| | | .in(Member::getIdcardNo,memberList.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | .in(CollectionUtils.isNotEmpty(memberList),Member::getIdcardNo,memberList.stream().map(i->i.getIdcardNo()).collect(Collectors.toList())) |
| | | .apply(CollectionUtils.isEmpty(memberList),"1 = 2 ") |
| | | .in(ApplyChange::getStatus, Constants.ZERO, Constants.ONE)); |
| | | |
| | | List<ApplyChagneDetail> applyChagneDetailList = new ArrayList<>(); |
| | |
| | | // memberMapper.updateById(member); |
| | | updMemberList.add(member); |
| | | applyChagneDetail.setMemberId(member.getId()); |
| | | if(applyChangeDetailAllList.stream().filter( |
| | | if(CollectionUtils.isNotEmpty(applyChangeDetailAllList)&&applyChangeDetailAllList.stream().filter( |
| | | j->Constants.equalsInteger(j.getMemberId(),applyChagneDetail.getMemberId()) |
| | | ).collect(Collectors.toList()).size()>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "加保人员【" + applyChagneDetail.getMemberName() + "】存在申请中的加减保/换厂单据"); |
| | |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,投保员工信息数据缺失,请按照要求填写员工的有效信息!"); |
| | | } |
| | | applyDetail.setId(null); |
| | | applyDetail.setChangeStatus(Constants.ZERO); |
| | | applyDetail.setCreateDate(new Date()); |
| | | applyDetail.setCreator(loginUserInfo.getId()); |
| | |
| | | } |
| | | Long end = System.currentTimeMillis(); |
| | | logger.error("处理单数据结束时间:=========================>"+end +";耗时:====》"+(end-start)); |
| | | applyDetailJoinMapper.insert(applyDetailList); |
| | | applyDetailMapper.insert(applyDetailList); |
| | | } |
| | | } |
| | | |
| | |
| | | queryWrapper.selectAs(Solutions::getPrice,InsuranceApply::getPrice); |
| | | queryWrapper.selectAs(Solutions::getTimeUnit,InsuranceApply::getTimeUnit); |
| | | queryWrapper.select("( select ifnull(sum(ad.FEE),0) from apply_chagne_detail ad left join apply_change a on a.id = ad.APPLY_CHANGE_ID where t.id = a.APPLY_ID and a.status = 2 )",InsuranceApply::getChangeMoney); |
| | | queryWrapper.select(" DATEDIFF( t.END_TIME ,now() ) AS loseEfficacyDays "); |
| | | // queryWrapper.select(" case when t.START_TIME > now() then 0 when t.END_TIME >= now() then DATEDIFF( now() ,t.START_TIME ) when t.END_TIME <= now() then DATEDIFF( t.END_TIME, t.START_TIME )+1 else 0 end loseEfficacyDays "); |
| | | queryWrapper.select(" DATEDIFF( t.END_TIME, t.START_TIME )+1 as loseEfficacyDays "); |
| | | queryWrapper.select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad where ad.apply_id = t.id ) as insureNum"); |
| | | queryWrapper.select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad inner join insurance_apply a on ad.apply_id = a.id and a.status in ( 5 , 27 ) where ad.apply_id = t.id and ad.END_TIME > now() and ad.START_TIME < now() ) as guaranteeNum"); |
| | | if(!Objects.isNull(pageWrap.getModel())&&!Objects.isNull(pageWrap.getModel().getType())){ |
| | |
| | | settleClaimsDataVO.setSettleClaimsTotal(settleClaimsList.size()); |
| | | |
| | | //平均理赔处理时长天数 总计处理时长(单位小时)除以 记录数 换算到天 |
| | | settleClaimsDataVO.setAverageSettleClaimsTime( |
| | | new BigDecimal(closeCaseList.stream().map(i->i.getTotalHours()).reduce(Constants.ZERO,Integer::sum).toString()) |
| | | .divide(new BigDecimal((closeCaseList.size()*24)+"") ,2,BigDecimal.ROUND_HALF_UP) |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(closeCaseList)){ |
| | | settleClaimsDataVO.setAverageSettleClaimsTime( |
| | | new BigDecimal(closeCaseList.stream().map(i->i.getTotalHours()).reduce(Constants.ZERO,Integer::sum).toString()) |
| | | .divide(new BigDecimal((closeCaseList.size()*24)+"") ,2,BigDecimal.ROUND_HALF_UP) |
| | | ); |
| | | } |
| | | |
| | | |
| | | String monthDate = DateUtil.getFomartDate(new Date(),"yyyy-MM"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | |
| | | .selectAs(Solutions::getTimeUnit,UnionApply::getTimeUnit) |
| | | .selectAs(Solutions::getOrtherInfo,UnionApply::getOrtherInfo) |
| | | .selectAs(Solutions::getSpecialAgreement,UnionApply::getSpecialAgreement) |
| | | .selectAs(Solutions::getSpecialInfo,UnionApply::getSpecialInfo); |
| | | .selectAs(Solutions::getSpecialInfo,UnionApply::getSpecialInfo) |
| | | .select(" (select c.NAME from insurance_apply i left join company c on i.COMPANY_ID = c.id where i.UNION_APPLY_ID = t.id limit 1 ) ",UnionApply::getCompanyName); |
| | | queryWrapper.select("(select count(distinct(b.MEMBER_ID)) from apply_detail b where b.isdeleted=0 and b.union_apply_id=t.id) as insureNum "); |
| | | queryWrapper.select(" ( select count(DISTINCT(b.MEMBER_ID)) from apply_detail b inner join insurance_apply a on b.apply_id = a.id and a.status in ( 5 , 27 ) where b.union_apply_id=t.id and b.END_TIME > now() ) as guaranteeNum"); |
| | | |
| | |
| | | queryWrapper.select("(select count(1) from apply_change a inner join insurance_apply b on a.apply_id = b.id where b.union_apply_id=t.id " + |
| | | "and b.status = "+Constants.InsuranceApplyStatus.WTB_TOUBAOING.getKey()+" and a.type = 1 ) as changeApplyNum "); |
| | | } |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId); |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId); |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(Constants.equalsInteger(user.getType(),Constants.TWO)){ |
| | | queryWrapper.eq(UnionApply::getCompanyId, user.getCompanyId()); |
| | |
| | | queryWrapper.selectAll(UnionChange.class); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | queryWrapper.selectAs(UnionApply::getCode,UnionChange::getApplyCode); |
| | | queryWrapper.selectAs(Solutions::getName,UnionChange::getSolutionsName) |
| | | queryWrapper.selectAs(Solutions::getName,UnionChange::getSolutionsName) |
| | | .select(" (select c.NAME from insurance_apply i left join company c on i.COMPANY_ID = c.id where i.UNION_APPLY_ID = t.UNION_APPLY_ID limit 1 ) ",UnionApply::getCompanyName) |
| | | .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 0 )",UnionChange::getAddNum) |
| | | .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 1 )",UnionChange::getDelNum) |
| | | .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 2 )",UnionChange::getChangeNum); |
| | | queryWrapper.leftJoin(UnionApply.class,UnionApply::getId,UnionChange::getUnionApplyId); |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,UnionApply::getCompanyId); |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(Constants.equalsInteger(user.getType(),Constants.TWO)){ |
| | | queryWrapper.eq(UnionChange::getShopId, user.getCompanyId()); |