ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/TCharingUserEvaluateVO.java
@@ -9,7 +9,7 @@ @Data public class TCharingUserEvaluateVO { @ApiModelProperty("评价分") Long aver; Double aver; @ApiModelProperty("各个评分数量") List<Map<String,Object>> evaluate; @ApiModelProperty("差评数量") ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java
@@ -188,17 +188,17 @@ siteList.setPageSize(99999); PageInfo<GetSiteListDTO> list = siteService.getSiteList(siteList); for (GetSiteListDTO record : list.getRecords()) { Long count = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, record.getId()).eq(TChargingGun::getChargeMode, 1).eq(TChargingGun::getStatus, new int[]{3, 4, 5, 6}).count(); Long count = chargingGunService.lambdaQuery().eq(TChargingGun::getSiteId, record.getId()).eq(TChargingGun::getChargeMode, 1).eq(TChargingGun::getStatus, new int[]{3, 4, 5, 6}).count(); record.setC1(count); Long count1 = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, record.getId()).eq(TChargingGun::getChargeMode, 1).eq(TChargingGun::getStatus, 2).count(); Long count1 = chargingGunService.lambdaQuery().eq(TChargingGun::getSiteId, record.getId()).eq(TChargingGun::getChargeMode, 1).eq(TChargingGun::getStatus, 2).count(); record.setC2(count1); Long count2 = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, record.getId()).eq(TChargingGun::getChargeMode, 2).eq(TChargingGun::getStatus, new int[]{3, 4, 5, 6}).count(); Long count2 = chargingGunService.lambdaQuery().eq(TChargingGun::getSiteId, record.getId()).eq(TChargingGun::getChargeMode, 2).eq(TChargingGun::getStatus, new int[]{3, 4, 5, 6}).count(); record.setK1(count2); Long count3 = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, record.getId()).eq(TChargingGun::getChargeMode, 2).eq(TChargingGun::getStatus, 2).count(); Long count3 = chargingGunService.lambdaQuery().eq(TChargingGun::getSiteId, record.getId()).eq(TChargingGun::getChargeMode, 2).eq(TChargingGun::getStatus, 2).count(); record.setK2(count3); Long count4 = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, record.getId()).eq(TChargingGun::getChargeMode, 3).eq(TChargingGun::getStatus, new int[]{3, 4, 5, 6}).count(); Long count4 = chargingGunService.lambdaQuery().eq(TChargingGun::getSiteId, record.getId()).eq(TChargingGun::getChargeMode, 3).eq(TChargingGun::getStatus, new int[]{3, 4, 5, 6}).count(); record.setM1(count4); Long count5 = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, record.getId()).eq(TChargingGun::getChargeMode, 3).eq(TChargingGun::getStatus, 2).count(); Long count5 = chargingGunService.lambdaQuery().eq(TChargingGun::getSiteId, record.getId()).eq(TChargingGun::getChargeMode, 3).eq(TChargingGun::getStatus, 2).count(); record.setM2(count5); //利用率 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java
@@ -377,6 +377,7 @@ }else if (byId.getAuditStatus()==2){ byId.setTwoRemark(steategyPassDto.getRemark()); byId.setTwoAuditTime(LocalDateTime.now()); } byId.setAuditStatus(4); ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingLotController.java
@@ -155,7 +155,7 @@ @PostMapping(value = "/getRecordAmount") public R<BigDecimal> getRecordAmount(@RequestParam("sixBefore") LocalDate sixBefore){ BigDecimal sum = parkingRecordService.getSum(sixBefore); return R.ok(); return R.ok(sum); } ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java
@@ -63,8 +63,7 @@ @ApiOperation(tags = {"后台-订单管理-停车记录"},value = "列表") @PostMapping(value = "/page") public R<Page<TParkingRecord>> page(@RequestBody ParkingRecordPageQuery query) { Page<TParkingRecord> page = parkingRecordService.lambdaQuery().ge(query.getStart() != null, TParkingRecord::getCreateTime, query.getStart()) .le(query.getEnd() != null, TParkingRecord::getCreateTime, query.getEnd()) Page<TParkingRecord> page = parkingRecordService.lambdaQuery() .like(query.getLicensePlate() != null, TParkingRecord::getLicensePlate, query.getLicensePlate()) .eq(query.getStatus() != null, TParkingRecord::getStatus, query.getStatus()) .eq(query.getOutParkingType() != null, TParkingRecord::getOutParkingType, query.getOutParkingType()) ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/dto/ParkingRecordPageQuery.java
@@ -2,6 +2,7 @@ import com.ruoyi.common.core.web.page.BasePage; import lombok.Data; import org.stringtemplate.v4.ST; import java.time.LocalDate; import java.time.LocalDateTime; @@ -10,6 +11,7 @@ public class ParkingRecordPageQuery extends BasePage { LocalDate start; LocalDate end; String timePeriod; String licensePlate; Integer status; Integer outParkingType; ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -292,6 +292,14 @@ @ApiOperation(value = "充电明细", tags = {"管理后台-支付订单-订单信息"}) public R<List<TChargingOrderAccountingStrategy>> chargingDetail(Long orderId) { List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, orderId).orderByDesc(TChargingOrderAccountingStrategy::getStartTime).list(); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); for (TChargingOrderAccountingStrategy tChargingOrderAccountingStrategy : list) { String format = tChargingOrderAccountingStrategy.getCreateTime().format(formatter); tChargingOrderAccountingStrategy.setStartTime(format+" "+tChargingOrderAccountingStrategy.getStartTime()); tChargingOrderAccountingStrategy.setEndTime(format+" "+tChargingOrderAccountingStrategy.getEndTime()); } return R.ok(list); } @@ -805,7 +813,6 @@ ChargingOrderAndUploadRealTimeMonitoringDataDto dataDto = new ChargingOrderAndUploadRealTimeMonitoringDataDto(); BeanUtils.copyProperties(uploadRealTimeMonitoringData,dataDto); ChargingOrderQuery dto = new ChargingOrderQuery(); dto.setCode(uploadRealTimeMonitoringData.getTransaction_serial_number()); TCharingOrderVO vo = chargingOrderService.chargingOrder(dto); if (!vo.getList().getRecords().isEmpty()) { ChargingOrderVO chargingOrderVO = vo.getList().getRecords().get(0); @@ -904,7 +911,7 @@ start = statisticsQueryDto.getStartTime(); end = statisticsQueryDto.getEndTime(); } List<TChargingOrder> list = chargingOrderService.lambdaQuery().ge(TChargingOrder::getStartTime, start).le(TChargingOrder::getEndTime, end).in(TChargingOrder::getSiteId, siteIds).list(); List<TChargingOrder> list = chargingOrderService.lambdaQuery().ge(TChargingOrder::getCreateTime, start).le(TChargingOrder::getCreateTime, end).in(TChargingOrder::getSiteId, siteIds).list(); List<Long> chargingOrderIds = list.stream().map(TChargingOrder::getId).collect(Collectors.toList()); chargingOrderIds.add(-1L); //上方饼图 @@ -1079,6 +1086,11 @@ //用户标签 List<Map<String,Object>> maps = chargingOrderService.getUserTagCount(); Map<String,Object> stringObjectMap = new HashMap<>(); Long noTagCount = chargingOrderService.countNoTag(); stringObjectMap.put("count",noTagCount); maps.add(stringObjectMap); //会员标签 List<Map<String,Object>> maps1 = chargingOrderService.getVipCount(); @@ -1118,11 +1130,14 @@ siteIds.add(statisticsQueryDto.getSiteId()); } //查询评价分 Long aver = chargingOrderService.getAver(siteIds); Double aver = chargingOrderService.getAver(siteIds); //查询各个分数 List<Map<String,Object>> evaluate = chargingOrderService.getLevelEvaluate(siteIds); //查询差评回复数 Long count = orderEvaluateService.lambdaQuery().isNotNull(TOrderEvaluate::getResponseTime).count(); List<Integer> mark = new ArrayList<>(); mark.add(1); mark.add(2); Long count = orderEvaluateService.lambdaQuery().in(TOrderEvaluate::getMark, mark).isNotNull(TOrderEvaluate::getResponseTime).count(); TCharingUserEvaluateVO tCharingUserEvaluateVO = new TCharingUserEvaluateVO(); tCharingUserEvaluateVO.setAver(aver); tCharingUserEvaluateVO.setEvaluate(evaluate); @@ -1429,8 +1444,9 @@ //将capMap的chargingCapacity除以totalRatedPower保留两位数 capMap.forEach(map -> { BigDecimal chargingCapacity = (BigDecimal) map.get("chargingCapacity"); BigDecimal result = chargingCapacity.divide(totalRatedPower, 2, RoundingMode.HALF_UP); map.put("chargingCapacity", result); BigDecimal result = chargingCapacity.divide(totalRatedPower, 4, RoundingMode.HALF_UP); BigDecimal multiply = result.multiply(new BigDecimal(100)); map.put("chargingCapacity", multiply); }); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/TChargingOrderMapper.java
@@ -106,7 +106,7 @@ Map<String, Object> countLocalCar(); Long getAver(@Param("siteIds") List<Integer> siteIds); Double getAver(@Param("siteIds") List<Integer> siteIds); List<Map<String, Object>> getLevelEvaluate(@Param("siteIds")List<Integer> siteIds); @@ -137,4 +137,6 @@ List<Map<String, Object>> countAllUserData(); List<Map<String, Object>> needElec1(@Param("siteIds")List<Integer> siteIds,@Param("statisticsQueryDto") ChargingStatisticsQueryDto statisticsQueryDto); Long countNoTag(); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/TChargingOrderService.java
@@ -212,7 +212,7 @@ Map<String, Object> countLocalCar(); Long getAver(List<Integer> siteIds); Double getAver(List<Integer> siteIds); List<Map<String, Object>> getLevelEvaluate(List<Integer> siteIds); @@ -266,4 +266,6 @@ * @return */ EndOfChargePageInfo getEndOfChargePageInfo(String id); Long countNoTag(); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -2046,7 +2046,7 @@ } @Override public Long getAver(List<Integer> siteIds) { public Double getAver(List<Integer> siteIds) { return this.baseMapper.getAver(siteIds); } @@ -2064,6 +2064,11 @@ public R payRefund(PayOrderRefundDto payOrderQueryDto) { if (payOrderQueryDto.getType()==1){ TChargingOrder tChargingOrder = this.baseMapper.selectById(payOrderQueryDto.getOrderId()); if (tChargingOrder.getPaymentAmount().compareTo(payOrderQueryDto.getRefundAmount())==-1){ return R.fail("退款金额需小于支付金额"); } TChargingOrderRefund chargingOrderRefund = new TChargingOrderRefund(); chargingOrderRefund.setChargingOrderId(tChargingOrder.getId()); chargingOrderRefund.setRefundAmount(payOrderQueryDto.getRefundAmount()); @@ -2125,6 +2130,9 @@ } if (payOrderQueryDto.getType()==2){ TShoppingOrder tChargingOrder = shoppingOrderService.getById(payOrderQueryDto.getOrderId()); if (tChargingOrder.getPaymentAmount().compareTo(payOrderQueryDto.getRefundAmount())==-1){ return R.fail("退款金额需小于支付金额"); } TShoppingOrderRefund chargingOrderRefund = new TShoppingOrderRefund(); chargingOrderRefund.setShoppingOrderId(tChargingOrder.getId()); chargingOrderRefund.setRefundAmount(payOrderQueryDto.getRefundAmount()); @@ -2174,6 +2182,10 @@ tChargingOrder.setRefundStatus(2); tChargingOrder.setRefundAmount((tChargingOrder.getRefundAmount()==null? BigDecimal.valueOf(0) :tChargingOrder.getRefundAmount()).add(payOrderQueryDto.getRefundAmount())); if (payOrderQueryDto.getRefundAmount().compareTo(tChargingOrder.getPaymentAmount())==0){ tChargingOrder.setStatus(5); } shoppingOrderService.updateById(tChargingOrder); shoppingOrderRefundService.save(chargingOrderRefund); @@ -2667,4 +2679,9 @@ info.setDuration(0 == hour ? String.format("%s分钟", second) : String.format("%s小时%s分钟", hour, second)); return info; } @Override public Long countNoTag() { return this.baseMapper.countNoTag(); } } ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -121,12 +121,12 @@ title, `status`, order_amount, payment_amount , order_amount as payment_amount , create_time, end_time, pay_time, refund_status, (payment_amount-refund_amount) as final_amount, (order_amount) as final_amount, del_flag, app_user_id FROM @@ -372,7 +372,7 @@ </select> <select id="countAll" resultType="java.util.Map"> select sum(electrovalence) as electrovalence,sum(service_charge) as service_charge,ROUND(sum(order_amount) * 0.0006, 2) as commission_amount,sum(sharing_amount) as sharing_amount select sum(electrovalence) as electrovalence,sum(service_charge) as service_charge,ROUND(sum(electrovalence+service_charge) * 0.0006, 2) as commission_amount,sum(sharing_amount) as sharing_amount from t_charging_order where create_time >= #{sixBefore} and del_flag = 0 and recharge_payment_status = 2 </select> @@ -425,6 +425,7 @@ SUM(service_charge-coupon_discount_amount) as servicecharge, SUM(charging_capacity) as electrovalence, SUM(electrovalence) AS paymentAmount, SUM(payment_amount) AS paymoney, count(1) as orderCount FROM t_charging_order @@ -449,6 +450,7 @@ SUM(service_charge-coupon_discount_amount) as servicecharge, SUM(charging_capacity) as electrovalence, SUM(electrovalence) AS paymentAmount, SUM(payment_amount) AS paymoney, count(1) as orderCount FROM t_charging_order @@ -473,6 +475,7 @@ SUM(service_charge-coupon_discount_amount) as servicecharge, SUM(charging_capacity) as electrovalence, SUM(electrovalence) AS paymentAmount, SUM(payment_amount) AS paymoney, count(1) as orderCount FROM @@ -498,6 +501,9 @@ DATE_FORMAT( create_time, '%Y-%m-%d' ) as time, SUM(service_charge-coupon_discount_amount) as servicecharge, SUM(charging_capacity) as electrovalence, SUM(electrovalence) AS paymentAmount, SUM(payment_amount) AS paymoney, count(1) as orderCount FROM t_charging_order @@ -722,6 +728,8 @@ charging_pile_account.t_app_user_tag a JOIN ( SELECT app_user_id, MAX( create_time ) AS max_create_time FROM charging_pile_account.t_app_user_tag GROUP BY app_user_id ) b ON a.app_user_id = b.app_user_id AND a.create_time = b.max_create_time LEFT JOIN `charging_pile_other`.`t_user_tag` ct on a.user_tag_id = ct.id WHERE ct.del_flag = 0 ) o LEFT JOIN `charging_pile_other`.`t_user_tag` tt on o.user_tag_id = tt.id GROUP BY @@ -765,10 +773,10 @@ </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} and DATE(co.create_time) >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> </if> </where> @@ -783,12 +791,14 @@ GROUP BY vehicle_use </select> <select id="carUserBrand" resultType="java.util.Map"> SELECT count(1) as counts,vehicle_brand from charging_pile_account.t_app_user_car where del_flag = 0 where del_flag = 0 GROUP BY vehicle_brand ORDER BY counts DESC limit 5 </select> <select id="countLocalCar" resultType="java.util.Map"> SELECT @@ -799,7 +809,7 @@ WHERE del_flag = 0 </select> <select id="getAver" resultType="java.lang.Long"> <select id="getAver" resultType="java.lang.Double"> SELECT ROUND(AVG(te.mark), 2) AS average_mark FROM @@ -939,19 +949,19 @@ SELECT FORMAT(SUM(TIME_TO_SEC(TIMEDIFF(co.end_time, co.start_time)) / <if test="statisticsQueryDto.dayType == 1"> 86400 864 </if> <if test="statisticsQueryDto.dayType == 2"> 604800 6048 </if> <if test="statisticsQueryDto.dayType == 3"> 2592000 25920 </if> <if test="statisticsQueryDto.dayType == 4"> 31536000 315360 </if> <if test="statisticsQueryDto.dayType == 5"> (86400*(SELECT TIMESTAMPDIFF(DAY, statisticsQueryDto.startTime, statisticsQueryDto.endTime) AS days_difference (86400*(SELECT TIMESTAMPDIFF(DAY, #{statisticsQueryDto.startTime}, #{statisticsQueryDto.endTime}) +1 AS days_difference )) </if> @@ -982,12 +992,12 @@ AND YEAR( co.create_time ) = YEAR(CURDATE() ) </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} </if> and DATE(co.create_time) >= #{statisticsQueryDto.startTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> GROUP BY tc.name,cp.name,co.charging_gun_id @@ -1011,7 +1021,7 @@ 31536000 </if> <if test="statisticsQueryDto.dayType == 5"> (86400*(SELECT TIMESTAMPDIFF(DAY, statisticsQueryDto.startTime, statisticsQueryDto.endTime) AS days_difference (86400*(SELECT TIMESTAMPDIFF(DAY, #{statisticsQueryDto.startTime}, #{statisticsQueryDto.endTime}) +1 AS days_difference )) </if> @@ -1043,10 +1053,10 @@ </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} and DATE(co.create_time) >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> </if> GROUP BY tc.name,cp.name,co.charging_gun_id @@ -1069,7 +1079,7 @@ 31536000 </if> <if test="statisticsQueryDto.dayType == 5"> (86400*(SELECT TIMESTAMPDIFF(DAY, statisticsQueryDto.startTime, statisticsQueryDto.endTime) AS days_difference (86400*(SELECT TIMESTAMPDIFF(DAY, #{statisticsQueryDto.startTime}, #{statisticsQueryDto.endTime}) +1 AS days_difference )) </if> @@ -1100,10 +1110,10 @@ </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} and DATE(co.create_time) >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> </if> GROUP BY tc.name,cp.name,co.charging_gun_id @@ -1126,7 +1136,7 @@ 31536000 </if> <if test="statisticsQueryDto.dayType == 5"> (86400*(SELECT TIMESTAMPDIFF(DAY, statisticsQueryDto.startTime, statisticsQueryDto.endTime) AS days_difference (86400*(SELECT TIMESTAMPDIFF(DAY, #{statisticsQueryDto.startTime}, #{statisticsQueryDto.endTime}) +1 AS days_difference )) </if> @@ -1157,10 +1167,10 @@ </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} and DATE(co.create_time) >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> </if> GROUP BY tc.name,cp.name,co.charging_gun_id @@ -1183,7 +1193,7 @@ 31536000 </if> <if test="statisticsQueryDto.dayType == 5"> (86400*(SELECT TIMESTAMPDIFF(DAY, statisticsQueryDto.startTime, statisticsQueryDto.endTime) AS days_difference (86400*(SELECT TIMESTAMPDIFF(DAY, #{statisticsQueryDto.startTime}, #{statisticsQueryDto.endTime}) +1 AS days_difference )) </if> @@ -1214,10 +1224,10 @@ </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} and DATE(co.create_time) >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> </if> GROUP BY tc.name,cp.name,co.charging_gun_id @@ -1238,7 +1248,7 @@ 31536000 </if> <if test="statisticsQueryDto.dayType == 5"> (86400*(SELECT TIMESTAMPDIFF(DAY, statisticsQueryDto.startTime, statisticsQueryDto.endTime) AS days_difference (86400*(SELECT TIMESTAMPDIFF(DAY, #{statisticsQueryDto.startTime}, #{statisticsQueryDto.endTime}) +1 AS days_difference )) </if> @@ -1269,10 +1279,10 @@ </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} and DATE(co.create_time) >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> </if> GROUP BY tc.name,cp.name,co.charging_gun_id @@ -1289,7 +1299,7 @@ LEFT JOIN `charging_pile_service`.`t_charging_gun` tc ON co.charging_gun_id = tc.id LEFT JOIN `charging_pile_service`.`t_charging_pile` cp ON tc.charging_pile_id = cp.id <where> cp.type = 1 cp.type = 1 and co.need_elec != 0 <if test="siteIds != null and siteIds.size() > 0"> and co.site_id IN <foreach collection="siteIds" item="siteId" open="(" separator="," close=")"> @@ -1309,12 +1319,11 @@ AND YEAR( co.create_time ) = YEAR(CURDATE() ) </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} </if> and DATE(co.create_time) >= #{statisticsQueryDto.startTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> </where> GROUP BY @@ -1505,10 +1514,10 @@ </if> <if test="statisticsQueryDto.dayType == 5"> <if test="statisticsQueryDto.startTime != null"> AND co.create_time >= #{statisticsQueryDto.startTime} and DATE(co.create_time) >= #{statisticsQueryDto.startTime} </if> <if test="statisticsQueryDto.endTime != null"> AND co.create_time <= #{statisticsQueryDto.endTime} and DATE(co.create_time) <= #{statisticsQueryDto.endTime} </if> </if> </where> @@ -1517,4 +1526,15 @@ cp.name, co.charging_gun_id; </select> <select id="countNoTag" resultType="java.lang.Long"> SELECT count(1) from `charging_pile_account`.`t_app_user` au WHERE au.id not IN ( SELECT app_user_id from `charging_pile_account`.`t_app_user_tag` GROUP BY app_user_id ) and au.del_flag = 0 </select> </mapper> ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TShoppingOrderMapper.xml
@@ -280,7 +280,7 @@ <select id="sixBefore" resultType="com.ruoyi.order.dto.SixShopDto"> SELECT DATE_FORMAT( subquery.create_time, '%m' ) AS MONTH, count(1) AS orderNum, count(1) AS count, SUM(payment_amount) AS paymentAmount FROM ( ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TVipOrderMapper.xml
@@ -58,7 +58,7 @@ SELECT vip_id, create_time, payment_amount (payment_amount - refund_amount) as payment_amount FROM t_vip_order <where> @@ -73,7 +73,7 @@ GROUP BY DATE_FORMAT(subquery.create_time, '%Y-%m'), tp.`name` ORDER BY MONTH asc </select> <select id="getSumAmout" resultType="java.math.BigDecimal"> @@ -83,8 +83,7 @@ t_vip_order WHERE del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} AND payment_status = 2 AND refund_amount IS NULL payment_status = 2 <if test="sixBefore != null"> AND create_time > #{sixBefore} </if>