From 3fee8832ca52667b26f702255677d62775ce5cd6 Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期二, 09 四月 2024 19:06:40 +0800 Subject: [PATCH] 提交一把 --- server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java index a2e652a..ef92dd9 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java @@ -156,12 +156,19 @@ .selectAs(Solutions::getSpecialInfo,UnionApply::getSpecialInfo); queryWrapper.select("(select count(b.id) from apply_detail b where b.isdeleted=0 and b.union_apply_id=t.id) as insureNum "); - 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 = 0 ) as addApplyNum "); + if(pageWrap.getModel().getQueryFlag() == 1){ + 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 a.status = "+Constants.ApplyChangeStatus.CHECHED_PASSED.getKey()+" and a.type = 0 ) as addApplyNum "); + }else if(pageWrap.getModel().getQueryFlag() ==2){ + 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 a.status = "+Constants.ApplyChangeStatus.CHECHED_PASSED.getKey()+" and a.type = 1 ) as changeApplyNum "); + }else{ + 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 = 0 ) as addApplyNum "); - 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.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); LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); if(Constants.equalsInteger(user.getType(),Constants.TWO)){ -- Gitblit v1.9.3