ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java
@@ -361,8 +361,11 @@ byId.setSiteId(one.getSiteId()); //将site表对应的模板id修改为新的这个 Site byId1 = siteService.getById(one.getSiteId()); byId1.setAccountingStrategyId(byId.getId()); siteService.updateById(byId1); if (byId1!=null) { byId1.setAccountingStrategyId(byId.getId()); siteService.updateById(byId1); } accountingStrategyService.removeById(one.getId()); } //硬件 List<TChargingPile> list = chargingPileService.lambdaQuery().eq(TChargingPile::getSiteId, byId.getSiteId()).list(); ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/SiteServiceImpl.java
@@ -293,7 +293,9 @@ TVip vip = vipClient.getInfo1(appUser.getVipId()).getData(); if(Objects.nonNull(vip) && vip.getType() == 2){ list.forEach(item -> { item.setVipElectrovalence(vip.getDiscount().divide(new BigDecimal(10)).multiply(item.getServiceCharge()).add(item.getElectrovalenceOriginal())); if(Objects.nonNull(vip.getDiscount())){ item.setVipElectrovalence(vip.getDiscount().divide(new BigDecimal(10)).multiply(item.getServiceCharge()).add(item.getElectrovalenceOriginal())); } }); } } ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/SiteMapper.xml
@@ -154,13 +154,14 @@ a.service_charge AS serviceCharge, a.electrovalence AS electrovalenceOriginal, (a.electrovalence+a.service_charge) AS electrovalence, (a.electrovalence + (a.service_charge*b.discount)) AS vipElectrovalence (a.electrovalence + (a.service_charge*(CASE WHEN b.discount IS NULL THEN 1 ELSE b.discount END))) AS vipElectrovalence from t_accounting_strategy_detail a left join t_accounting_strategy b on (a.accounting_strategy_id = b.id) where b.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} AND DATE_FORMAT(NOW(), '%H:%i:%s') between a.start_time and a.end_time) tasd on (ts.accounting_strategy_id = tasd.accounting_strategy_id) AND DATE_FORMAT(NOW(), '%H:%i:%s') between a.start_time and CASE WHEN a.end_time = '00:00' THEN '23:59:59' ELSE a.end_time END) tasd on (ts.accounting_strategy_id = tasd.accounting_strategy_id) <where> <if test="null != query.name and '' != query.name"> and ts.`name` like CONCAT('%', #{query.name}, '%') @@ -288,13 +289,14 @@ a.service_charge AS serviceCharge, a.electrovalence AS electrovalenceOriginal, (a.electrovalence+a.service_charge) AS electrovalence, (a.electrovalence+(a.service_charge*b.discount)) AS vipElectrovalence (a.electrovalence+(a.service_charge*(CASE WHEN b.discount IS NULL THEN 1 ELSE b.discount END))) AS vipElectrovalence from t_accounting_strategy_detail a left join t_accounting_strategy b on (a.accounting_strategy_id = b.id) where b.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} AND DATE_FORMAT(NOW(), '%H:%i:%s') between a.start_time and a.end_time) tasd on (ts.accounting_strategy_id = tasd.accounting_strategy_id) AND DATE_FORMAT(NOW(), '%H:%i:%s') between a.start_time AND CASE WHEN a.end_time = '00:00' THEN '23:59:59' ELSE a.end_time END) tasd on (ts.accounting_strategy_id = tasd.accounting_strategy_id) <where> <if test="null != query.name and '' != query.name"> and ts.`name` like CONCAT('%', #{query.name}, '%') ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java
@@ -129,8 +129,6 @@ counts.forEach(count -> { if (tag.getId().equals(count.getId())) { tag.setTagCount(count.getTagCount()); }else{ tag.setTagCount(0); } }); }else{ @@ -141,7 +139,8 @@ tagList = tagList.stream().sorted(Comparator.comparing(TEvaluationTagVO::getTagCount).reversed()).collect(Collectors.toList()); // 统计有图,好评,中差评数量 long imgUrlCount = this.count(Wrappers.lambdaQuery(TOrderEvaluate.class) .and(e->e.isNotNull(TOrderEvaluate::getImgUrl)).or().ne(TOrderEvaluate::getImgUrl,"")); .isNotNull(TOrderEvaluate::getImgUrl) .ne(TOrderEvaluate::getImgUrl,"")); packageTagCount(imgUrlCount,"有图",2,tagList); long goodCount = this.count(Wrappers.lambdaQuery(TOrderEvaluate.class) .ge(TOrderEvaluate::getMark,4)); @@ -174,9 +173,11 @@ orderEvaluateVO.setName(appUser.getName()); orderEvaluateVO.setAvatar(appUser.getAvatar()); } TAppUserCar appUserCar = appUserCars.stream().filter(car -> car.getId().equals(Long.parseLong(String.valueOf(orderEvaluateVO.getAppUserCarId())))).findFirst().orElse(null); if(Objects.nonNull(appUserCar)){ orderEvaluateVO.setCarName(appUserCar.getVehicleBrand()); if(Objects.nonNull(orderEvaluateVO.getAppUserCarId())){ TAppUserCar appUserCar = appUserCars.stream().filter(car -> car.getId().equals(Long.parseLong(String.valueOf(orderEvaluateVO.getAppUserCarId())))).findFirst().orElse(null); if(Objects.nonNull(appUserCar)){ orderEvaluateVO.setCarName(appUserCar.getVehicleBrand()); } } }); pageInfo.setRecords(list);