ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TParkingRecord.java
@@ -37,12 +37,13 @@ @TableField("app_user_id") private Long appUserId; @ApiModelProperty(value = "停车场名称") @TableField("name") private String name; @ApiModelProperty(value = "车牌号") @TableField("license_plate") private String licensePlate; @TableField("name") private String name; @TableField(exist = false) private String uid; ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java
@@ -123,21 +123,15 @@ SiteInfoVO siteInfoVO = new SiteInfoVO(); TChargingGun chargingGun = chargingGunService.getOne(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getFullNumber, number)); TChargingPile one = chargingPileService.getById(chargingGun.getChargingPileId()); Site byId = siteService.getById(one.getSiteId()); TAccountingStrategy byId1 = accountingStrategyService.getById(byId.getAccountingStrategyId()); Site byId = siteService.getById(chargingGun.getSiteId()); TAccountingStrategy byId1 = accountingStrategyService.getById(chargingGun.getAccountingStrategyId()); List<TAccountingStrategyDetail> list = accountingStrategyDetailService.lambdaQuery().eq(TAccountingStrategyDetail::getAccountingStrategyId, byId1.getId()).list(); list.stream().filter(item -> "00:00".equals(item.getEndTime())).forEach(item -> item.setEndTime("23:59:59")); Long userId = tokenService.getLoginUserApplet().getUserId(); TAppUser appUser = appUserClient.getUserById(userId).getData(); for (TAccountingStrategyDetail tAccountingStrategyDetail : list) { // 当前时间属于那个阶段 取哪个阶段的电价 if(DateUtils.string2LocalTime(tAccountingStrategyDetail.getStartTime() + ":00").compareTo(LocalTime.now()) <= 0 && DateUtils.string2LocalTime(tAccountingStrategyDetail.getEndTime() + ("23:59:59".equals(tAccountingStrategyDetail.getEndTime())?"":":00")).compareTo(LocalTime.now()) > 0){ if(null != appUser.getVipId()){ siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().setScale(4, BigDecimal.ROUND_HALF_UP)); }else{ } siteInfoVO.setElectrovalence(tAccountingStrategyDetail.getElectrovalence().setScale(4, BigDecimal.ROUND_HALF_UP)); } } ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/server/ParkingOrderService.java
@@ -51,6 +51,7 @@ parkingRecord.setCode(code); parkingRecord.setVehicleColor(order.getPlateColor()); TParkingLot data = parkingLotClient.getParkingLotByAppKey(order.getAppkey()).getData(); parkingRecord.setName(data.getName()); parkingRecord.setParkingLotId(data.getId()); parkingRecord.setInParkingTime(LocalDateTime.parse(order.getEnterDateTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); parkingRecord.setStatus(1); @@ -101,6 +102,7 @@ parkingRecord.setCode(code); parkingRecord.setVehicleColor(order.getPlatecolor()); TParkingLot data = parkingLotClient.getParkingLotByAppKey(order.getAppkey()).getData(); parkingRecord.setName(data.getName()); parkingRecord.setParkingLotId(data.getId()); parkingRecord.setInParkingTime(LocalDateTime.parse(order.getEntertime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); parkingRecord.setStatus(1); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -1864,10 +1864,10 @@ } catch (ParseException e) { throw new RuntimeException(e); } System.err.println(start.getTime() + "\n" + end.getTime() + "\n" + lists.get(0).getStart() + "\n" + lists.get(0).getEnd()); for (AccountingStrategyDetailOrderVo strategyDetail : lists) { if(strategyDetail.getStart() < start.getTime() || strategyDetail.getEnd() > end.getTime()){ continue; } BigDecimal sharp_peak_charge = strategyDetail.getChargingCapacity(); TChargingOrderAccountingStrategy chargingOrderAccountingStrategy = new TChargingOrderAccountingStrategy(); chargingOrderAccountingStrategy.setChargingOrderId(chargingOrder.getId()); @@ -1883,9 +1883,9 @@ chargingOrderAccountingStrategy.setStartTime(strategyDetail.getStartTime()); } if(end.getTime() >= strategyDetail.getEnd()){ chargingOrderAccountingStrategy.setStartTime(strategyDetail.getEndTime()); chargingOrderAccountingStrategy.setEndTime(strategyDetail.getEndTime()); }else{ chargingOrderAccountingStrategy.setStartTime(sdf2.format(end)); chargingOrderAccountingStrategy.setEndTime(sdf2.format(end)); } //已充电总度数 ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -62,7 +62,7 @@ </if> </select> <select id="getNoInvoicedOrder" resultMap="BaseResultMap"> select * from t_charging_order where del_flag = 0 and status = 5 and recharge_payment_status = 2 and payment_amount is not null and app_user_id = #{appUserId} select * from t_charging_order where del_flag = 0 and status = 5 and recharge_payment_status = 2 and payment_amount is not null and app_user_id = #{appUserId} and refund_status is null <if test="null != month and '' != month"> and DATE_FORMAT(end_time, '%Y-%m') = #{month} </if> ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TShoppingOrderMapper.xml
@@ -203,7 +203,7 @@ <select id="getNoInvoicedOrder" resultMap="BaseResultMap"> select * from t_shopping_order where del_flag = 0 and payment_status = 2 and status = 3 and app_user_id = #{appUserId} select * from t_shopping_order where del_flag = 0 and payment_status = 2 and status = 3 and app_user_id = #{appUserId} and refund_status is null <if test="null != month and '' != month"> and DATE_FORMAT(create_time, '%Y-%m') = #{month} </if>