| | |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.ApplyPowerVO; |
| | | import com.doumee.dao.business.vo.CountCyclePriceVO; |
| | | import com.doumee.dao.business.vo.dataBoard.DataListVO; |
| | | import com.doumee.dao.business.vo.dataBoard.InsuranceApplyDataVO; |
| | | import com.doumee.dao.business.vo.dataBoard.InsuranceApplyReportDataVO; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.InsuranceApplyOnService; |
| | |
| | | @Autowired |
| | | private ApplyLogJoinMapper applyLogJoinMapper; |
| | | @Autowired |
| | | private SolutionsMapper solutionsMapper; |
| | | private SolutionsJoinMapper solutionsMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | |
| | | private SystemUserMapper systemUserMapper; |
| | | @Autowired |
| | | private CompanyDepartmentMapper companyDepartmentMapper; |
| | | @Autowired |
| | | private ApplyChangeDetailJoinMapper applyChangeDetailJoinMapper; |
| | | @Autowired |
| | | private SettleClaimsMapper settleClaimsMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public InsuranceApplyDataVO getInsuranceApplyDataVO() { |
| | | InsuranceApplyDataVO insuranceApplyDataVO = new InsuranceApplyDataVO(); |
| | | insuranceApplyDataVO.setInsuranceNum(Constants.ZERO); |
| | | insuranceApplyDataVO.setMonthAddInsuranceNum(Constants.ZERO); |
| | | insuranceApplyDataVO.setInsuranceCompanyNum(Constants.ZERO); |
| | | insuranceApplyDataVO.setMonthAddInsuranceCompanyNum(Constants.ZERO); |
| | | insuranceApplyDataVO.setMemberNum(Constants.ZERO); |
| | | insuranceApplyDataVO.setMonthAddMemberNum(Constants.ZERO); |
| | | insuranceApplyDataVO.setTotalFee(BigDecimal.ZERO); |
| | | insuranceApplyDataVO.setMonthAddTotalFee(BigDecimal.ZERO); |
| | | insuranceApplyDataVO.setUseCompanyNum(Constants.ZERO); |
| | | insuranceApplyDataVO.setUseInsuranceNum(Constants.ZERO); |
| | | insuranceApplyDataVO.setUseMemberNum(Constants.ZERO); |
| | | |
| | | List<InsuranceApply> insuranceApplyList = insuranceApplyJoinMapper.selectJoinList(InsuranceApply.class, |
| | | new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getType, InsuranceApply::getSolutionType) |
| | | .leftJoin(Solutions.class, Solutions::getId, InsuranceApply::getSolutionId) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | ); |
| | | |
| | | String monthDate = DateUtil.getFomartDate(new Date(), "yyyy-MM"); |
| | | |
| | | if (CollectionUtils.isNotEmpty(insuranceApplyList)) { |
| | | //累计ææä¿å |
| | | insuranceApplyDataVO.setInsuranceNum( |
| | | insuranceApplyList.stream().filter(i -> Constants.equalsInteger(i.getStatus(), Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | || Constants.equalsInteger(i.getStatus(), Constants.InsuranceApplyStatus.WTB_DONE.getKey()) |
| | | ).collect(Collectors.toList()).size() |
| | | ); |
| | | //æ¬ææ°å¢ææä¿å |
| | | insuranceApplyDataVO.setMonthAddInsuranceNum( |
| | | insuranceApplyList.stream().filter(i -> (Constants.equalsInteger(i.getStatus(), Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | || Constants.equalsInteger(i.getStatus(), Constants.InsuranceApplyStatus.WTB_DONE.getKey())) |
| | | && DateUtil.formatDate(i.getCreateDate(), "yyyy-MM").equals(monthDate) |
| | | ).collect(Collectors.toList()).size() |
| | | ); |
| | | //å¨ä¿ä¼ä¸æ°é |
| | | List<Integer> useCompanyNum = insuranceApplyList.stream().filter(i -> (Constants.equalsInteger(i.getStatus(), Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | || Constants.equalsInteger(i.getStatus(), Constants.InsuranceApplyStatus.WTB_DONE.getKey())) |
| | | && i.getStartTime().getTime() <= System.currentTimeMillis() && i.getEndTime().getTime() >= System.currentTimeMillis() |
| | | ).map(i -> i.getCompanyId()).collect(Collectors.toList()); |
| | | insuranceApplyDataVO.setUseCompanyNum(new HashSet<>(useCompanyNum).size()); |
| | | |
| | | //å¨ä¿ä¿åæ°é |
| | | insuranceApplyDataVO.setUseInsuranceNum( |
| | | insuranceApplyList.stream().filter(i -> (Constants.equalsInteger(i.getStatus(), Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | || Constants.equalsInteger(i.getStatus(), Constants.InsuranceApplyStatus.WTB_DONE.getKey())) |
| | | && i.getStartTime().getTime() <= System.currentTimeMillis() && i.getEndTime().getTime() >= System.currentTimeMillis() |
| | | ).collect(Collectors.toList()).size() |
| | | ); |
| | | List<Integer> companyIds = insuranceApplyList.stream().map(i -> i.getCompanyId()).collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(companyIds)) { |
| | | //累计æä¿ä¼ä¸æ°é |
| | | insuranceApplyDataVO.setInsuranceCompanyNum(new HashSet<>(companyIds).size()); |
| | | } |
| | | Integer monthAddInsuranceCompanyNum = insuranceApplyJoinMapper.selectJoinCount( |
| | | new MPJLambdaWrapper<InsuranceApply>() |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | .apply(" company_id in ( select c.id from company c where c.ISDELETED = 0 and DATE_FORMAT(c.CREATE_DATE, '%Y-%m') = DATE_FORMAT(now(), '%Y-%m') ) ") |
| | | .groupBy(InsuranceApply::getCompanyId) |
| | | ); |
| | | //æ¬ææ°å¢æä¿ä¼ä¸ |
| | | insuranceApplyDataVO.setMonthAddInsuranceCompanyNum(Objects.nonNull(monthAddInsuranceCompanyNum)?monthAddInsuranceCompanyNum:Constants.ZERO); |
| | | //ç´ä¿ä¿åæ°é |
| | | insuranceApplyDataVO.setZbInsuranceNum(insuranceApplyList.stream().filter(i -> Constants.equalsInteger(i.getSolutionType(), Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | //å§æä¿ä¿åæ°é |
| | | insuranceApplyDataVO.setWtbInsuranceNum(insuranceApplyList.stream().filter(i -> Constants.equalsInteger(i.getSolutionType(), Constants.ONE)).collect(Collectors.toList()).size()); |
| | | } |
| | | |
| | | //å计æ»è´¹ç¨ |
| | | insuranceApplyDataVO.setTotalFee(new BigDecimal(applyDetailJoinMapper.selectJoinMap( new MPJLambdaWrapper<ApplyDetail>() |
| | | .select("ifnull(sum(t.fee),0) as fee") |
| | | .selectAs(InsuranceApply::getStatus, ApplyDetail::getApplyStatus) |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyDetail::getApplyId) |
| | | .eq(ApplyDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | ).get("fee").toString())); |
| | | //æ¬ææ°å¢è´¹ç¨ |
| | | insuranceApplyDataVO.setMonthAddTotalFee( |
| | | new BigDecimal(applyDetailJoinMapper.selectJoinMap( new MPJLambdaWrapper<ApplyDetail>() |
| | | .select("ifnull(sum(t.fee),0) as fee") |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyDetail::getApplyId) |
| | | .eq(ApplyDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | .apply(" DATE_FORMAT(t.CREATE_DATE, '%Y-%m') = DATE_FORMAT(now(), '%Y-%m') ") |
| | | ).get("fee").toString()) |
| | | |
| | | ); |
| | | |
| | | //累计æä¿äººæ¬¡ |
| | | insuranceApplyDataVO.setMemberNum( |
| | | Integer.valueOf(applyDetailJoinMapper.selectJoinMap( new MPJLambdaWrapper<ApplyDetail>() |
| | | .select("count(distinct t.MEMBER_ID) as memberTimes") |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyDetail::getApplyId) |
| | | .eq(ApplyDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | ).get("memberTimes").toString()) |
| | | ); |
| | | //æ¬ææ°å¢æä¿äººæ¬¡ |
| | | insuranceApplyDataVO.setMonthAddMemberNum( |
| | | Integer.valueOf(applyDetailJoinMapper.selectJoinMap( new MPJLambdaWrapper<ApplyDetail>() |
| | | .select("count(distinct t.MEMBER_ID) as memberTimes") |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyDetail::getApplyId) |
| | | .eq(ApplyDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | .apply(" DATE_FORMAT(t.CREATE_DATE, '%Y-%m') = DATE_FORMAT(now(), '%Y-%m') ") |
| | | ).get("memberTimes").toString()) |
| | | |
| | | ); |
| | | |
| | | |
| | | //å½åä¿é人å |
| | | insuranceApplyDataVO.setUseMemberNum( |
| | | |
| | | |
| | | Integer.valueOf(applyDetailJoinMapper.selectJoinMap( new MPJLambdaWrapper<ApplyDetail>() |
| | | .select("count(distinct t.MEMBER_ID) as memberTimes") |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyDetail::getApplyId) |
| | | .eq(ApplyDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | .apply(" t.start_time <= now() and t.end_time >= now() ") |
| | | ).get("memberTimes").toString()) |
| | | |
| | | ); |
| | | return insuranceApplyDataVO; |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public InsuranceApplyReportDataVO getInsuranceApplyReportDataVO(){ |
| | | InsuranceApplyReportDataVO insuranceApplyReportDataVO = new InsuranceApplyReportDataVO(); |
| | | List<DataListVO> companyTopFeeList = applyDetailJoinMapper.selectJoinList(DataListVO.class, new MPJLambdaWrapper<ApplyDetail>() |
| | | .select(" t2.name as dataFirst, ROUND(ifnull(sum(t.fee),0),2) as dataSecond ") |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyDetail::getApplyId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | | .eq(ApplyDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | .groupBy(" t1.company_id,t2.name") |
| | | .orderByDesc(" sum(t.fee) ") |
| | | .last(" limit 10") |
| | | ); |
| | | insuranceApplyReportDataVO.setCompanyTopFeeList(companyTopFeeList); |
| | | |
| | | |
| | | List<DataListVO> hotSolutionList = insuranceApplyJoinMapper.selectJoinList(DataListVO.class, new MPJLambdaWrapper<InsuranceApply>() |
| | | .select(" solution_id as dataFirst, count(1) as dataSecond ") |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | .groupBy(" t.solution_id") |
| | | .orderByDesc(" count(1) ") |
| | | .last(" limit 10") |
| | | ); |
| | | |
| | | if(CollectionUtils.isNotEmpty(hotSolutionList)){ |
| | | List<Solutions> solutionsList = solutionsMapper.selectJoinList(Solutions.class,new MPJLambdaWrapper<Solutions>() |
| | | .select("t.id, t.NAME , t1.name as solutionBaseName ,t.PRICE,t.TIME_UNIT ") |
| | | .leftJoin(SolutionsBase.class,SolutionsBase::getId,Solutions::getParentId) |
| | | .in(Solutions::getId,hotSolutionList.stream().map(i->i.getDataFirst()).collect(Collectors.toList()))); |
| | | if(CollectionUtils.isNotEmpty(solutionsList)){ |
| | | for (DataListVO dataListVO:hotSolutionList) { |
| | | List<Solutions> solutions = solutionsList.stream().filter(i->Constants.equalsInteger(i.getId(),Integer.valueOf(dataListVO.getDataFirst()))).collect(Collectors.toList()); |
| | | if(CollectionUtils.isNotEmpty(solutions)){ |
| | | dataListVO.setSolutions(solutions.get(Constants.ZERO)); |
| | | } |
| | | } |
| | | } |
| | | insuranceApplyReportDataVO.setHotSolutionList(hotSolutionList); |
| | | } |
| | | |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | insuranceApplyReportDataVO.setMonthAddReduceList(this.getAddReduceData(loginUserInfo)); |
| | | return insuranceApplyReportDataVO; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DataListVO> getAddReduceData(LoginUserInfo loginUserInfo){ |
| | | List<DataListVO> monthAddReduceList = new ArrayList<>(); |
| | | for (int i = -11; i <= 0 ; i++) { |
| | | String month = DateUtil.DateToStr( |
| | | DateUtil.afterDateByType(new Date(),1,i),"yyyy-MM"); |
| | | DataListVO dataListVO = new DataListVO(); |
| | | dataListVO.setDataFirst(month); |
| | | dataListVO.setDataSecond( |
| | | applyChangeDetailJoinMapper.selectJoinCount(new MPJLambdaWrapper<ApplyChagneDetail>() |
| | | .leftJoin(ApplyChange.class,ApplyChange::getId,ApplyChagneDetail::getApplyChangeId) |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) |
| | | .eq(ApplyChagneDetail::getType,Constants.ZERO) |
| | | .eq(Objects.nonNull(loginUserInfo)&&Constants.equalsInteger(loginUserInfo.getType(),Constants.ONE),InsuranceApply::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .apply(" DATE_FORMAT(t.CREATE_DATE, '%Y-%m') = '"+month+"'") |
| | | ) +"" |
| | | ); |
| | | dataListVO.setDataThird("-"+ |
| | | applyChangeDetailJoinMapper.selectJoinCount(new MPJLambdaWrapper<ApplyChagneDetail>() |
| | | .leftJoin(ApplyChange.class,ApplyChange::getId,ApplyChagneDetail::getApplyChangeId) |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) |
| | | .eq(ApplyChagneDetail::getType,Constants.ONE) |
| | | .eq(Objects.nonNull(loginUserInfo)&&Constants.equalsInteger(loginUserInfo.getType(),Constants.ONE) |
| | | ,InsuranceApply::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .apply(" DATE_FORMAT(t.CREATE_DATE, '%Y-%m') = '"+month+"'") |
| | | ) |
| | | ); |
| | | monthAddReduceList.add(dataListVO); |
| | | } |
| | | return monthAddReduceList; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public InsuranceApplyDataVO getInsuranceNum(){ |
| | | List<InsuranceApply> insuranceApplyList = insuranceApplyJoinMapper.selectJoinList(InsuranceApply.class, |
| | | new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getType, InsuranceApply::getSolutionType) |
| | | .leftJoin(Solutions.class, Solutions::getId, InsuranceApply::getSolutionId) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus, |
| | | Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey(), |
| | | Constants.InsuranceApplyStatus.CLOSE.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_RETURN.getKey(), |
| | | Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | ); |
| | | InsuranceApplyDataVO insuranceApplyDataVO = new InsuranceApplyDataVO(); |
| | | //ç´ä¿ä¿åæ°é |
| | | insuranceApplyDataVO.setZbInsuranceNum(insuranceApplyList.stream().filter(i -> Constants.equalsInteger(i.getSolutionType(), Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | //å§æä¿ä¿åæ°é |
| | | insuranceApplyDataVO.setWtbInsuranceNum(insuranceApplyList.stream().filter(i -> Constants.equalsInteger(i.getSolutionType(), Constants.ONE)).collect(Collectors.toList()).size()); |
| | | return insuranceApplyDataVO; |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<DataListVO> getSettleClaimsMoney(){ |
| | | List<SettleClaims> settleClaimsList = settleClaimsMapper.selectList(new QueryWrapper<SettleClaims>().lambda() |
| | | .eq(SettleClaims::getStatus,Constants.SettleClaimsStatus.CLOSE_CASE.getKey()) |
| | | .eq(SettleClaims::getIsdeleted,Constants.ZERO)); |
| | | List<DataListVO> monthTotalMoneyDataList = new ArrayList<>(); |
| | | for (int i = -11; i <= 0 ; i++) { |
| | | String month = DateUtil.DateToStr( |
| | | DateUtil.afterDateByType(new Date(),1,i),"yyyy-MM"); |
| | | DataListVO dataListVO = new DataListVO(); |
| | | dataListVO.setDataFirst(month); |
| | | if (CollectionUtils.isNotEmpty(settleClaimsList)) { |
| | | BigDecimal hpAccount = settleClaimsList.stream().filter(j->DateUtil.DateToStr(j.getCreateDate(),"yyyy-MM").equals(month)) |
| | | .map(j->j.getHpAccount().add(j.getHpOtherAccount())).reduce(BigDecimal.ZERO,BigDecimal::add); |
| | | dataListVO.setDataSecond(hpAccount.compareTo(BigDecimal.ZERO)>Constants.ZERO? |
| | | hpAccount.divide(new BigDecimal("10000"),2,BigDecimal.ROUND_HALF_UP).toString():"0" |
| | | ); |
| | | }else{ |
| | | dataListVO.setDataSecond("0"); |
| | | } |
| | | |
| | | monthTotalMoneyDataList.add(dataListVO); |
| | | } |
| | | return monthTotalMoneyDataList; |
| | | } |
| | | |
| | | @Override |
| | | public List<DataListVO> getInsuranceApplyStatusData(LoginUserInfo loginUserInfo){ |
| | | List<DataListVO> dataListVOList = new ArrayList<>(); |
| | | //å¾
çæ |
| | | DataListVO dataListVOA = new DataListVO(); |
| | | dataListVOA.setDataFirst("å¾
çæ"); |
| | | dataListVOA.setDataSecond( |
| | | insuranceApplyMapper.selectCount(new QueryWrapper<InsuranceApply>().lambda().eq(InsuranceApply::getIsdeleted,Constants.ZERO) |
| | | .in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()) |
| | | .eq(InsuranceApply::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .apply(" start_time > now() ") |
| | | ).toString() |
| | | ); |
| | | dataListVOList.add(dataListVOA); |
| | | |
| | | //ä¿éä¸ |
| | | DataListVO dataListVOB = new DataListVO(); |
| | | dataListVOB.setDataFirst("ä¿éä¸"); |
| | | dataListVOB.setDataSecond( |
| | | insuranceApplyMapper.selectCount(new QueryWrapper<InsuranceApply>().lambda().eq(InsuranceApply::getIsdeleted,Constants.ZERO) |
| | | .in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()) |
| | | .eq(InsuranceApply::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .apply(" start_time <= now() and end_time >= now()") |
| | | ).toString() |
| | | ); |
| | | |
| | | dataListVOList.add(dataListVOB); |
| | | |
| | | //å·²è¿æ |
| | | DataListVO dataListVOC = new DataListVO(); |
| | | dataListVOC.setDataFirst("å·²è¿æ"); |
| | | |
| | | dataListVOC.setDataSecond( |
| | | insuranceApplyMapper.selectCount(new QueryWrapper<InsuranceApply>().lambda().eq(InsuranceApply::getIsdeleted,Constants.ZERO) |
| | | .in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()) |
| | | .eq(InsuranceApply::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .apply(" end_time < now()") |
| | | ).toString() |
| | | ); |
| | | dataListVOList.add(dataListVOC); |
| | | return dataListVOList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DataListVO> getInsuranceMemberData(LoginUserInfo loginUserInfo){ |
| | | List<DataListVO> dataListVOList = new ArrayList<>(); |
| | | //å¾
çæ |
| | | DataListVO dataListVOA = new DataListVO(); |
| | | dataListVOA.setDataFirst("ä¸å¨ä¿"); |
| | | dataListVOA.setDataSecond( |
| | | applyDetailJoinMapper.selectJoinCount( new MPJLambdaWrapper<ApplyDetail>() |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyDetail::getApplyId) |
| | | .eq(ApplyDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()) |
| | | .eq(InsuranceApply::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .apply(" t.END_TIME < now() ")).toString() |
| | | |
| | | ); |
| | | dataListVOList.add(dataListVOA); |
| | | |
| | | //ä¿éä¸ |
| | | DataListVO dataListVOB = new DataListVO(); |
| | | dataListVOB.setDataFirst("ä¿éä¸"); |
| | | dataListVOB.setDataSecond( |
| | | applyDetailJoinMapper.selectJoinCount( new MPJLambdaWrapper<ApplyDetail>() |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyDetail::getApplyId) |
| | | .eq(ApplyDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getIsdeleted, Constants.ZERO) |
| | | .in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()) |
| | | .eq(InsuranceApply::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .apply(" t.END_TIME >= now() ")).toString() |
| | | ); |
| | | |
| | | dataListVOList.add(dataListVOB); |
| | | return dataListVOList; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |