This commit is contained in:
qjq
2024-11-28 18:06:08 +08:00
parent fbc2639629
commit b82ddbd3a9
2 changed files with 13 additions and 2 deletions

View File

@ -87,7 +87,7 @@ public interface CardMapper extends BaseMapperX<CardDO> {
List<CardDO> cardDOS = selectList(new LambdaQueryWrapper<CardDO>()
.eq(CardDO::getFlag, flag)
.eq(CardDO::getType, type)
.ne(CardDO::getBillingExist, BillingStatusEnum.BILLING_INVOICING_IS_COMPLETE.getCode())
.eq(CardDO::getBillingExist, BillingStatusEnum.BILLING_INVOICING_REJECTION.getCode())
.in(CardDO::getUserId, userIds));
return cardDOS.stream()
.map(CardDO::getChangeMoney)

View File

@ -610,8 +610,19 @@ public class BillingServiceImpl implements BillingService {
.eqIfPresent(BillingDO::getCarteenId,carteenId)
);
Map<Integer, List<BillingDO>> collect = billingDOS.stream().collect(Collectors.groupingBy(BillingDO::getStatus));
map.put(BillingStatusEnum.BILLING_INVOICING.getCode(),0);
map.put(BillingStatusEnum.BILLING_INVOICING_IS_COMPLETE.getCode(),0);
map.put(BillingStatusEnum.BILLING_INVOICING_REJECTION.getCode(),0);
for (Map.Entry<Integer, List<BillingDO>> entry : collect.entrySet()) {
map.put(entry.getKey(),entry.getValue().size());
if (BillingStatusEnum.BILLING_INVOICING.getCode().equals(entry.getKey())) {
map.put(entry.getKey(),entry.getValue().size());
}
if (BillingStatusEnum.BILLING_INVOICING_IS_COMPLETE.getCode().equals(entry.getKey())) {
map.put(entry.getKey(),entry.getValue().size());
}
if (BillingStatusEnum.BILLING_INVOICING_REJECTION.getCode().equals(entry.getKey())) {
map.put(entry.getKey(),entry.getValue().size());
}
}
return map;
}