Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | @ApiModelProperty(value = "会员开始时间") |
| | | @TableField("start_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime startTime; |
| | | |
| | | @ApiModelProperty(value = "会员结束时间") |
| | | @TableField("end_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime endTime; |
| | | |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/8 9:29 |
| | |
| | | private String address; |
| | | @ApiModelProperty(value = "站点电话") |
| | | private String phone; |
| | | @ApiModelProperty(value = "lon") |
| | | private String lon; |
| | | @ApiModelProperty(value = "lat") |
| | | private String lat; |
| | | @ApiModelProperty(value = "服务电话") |
| | | private String servicePhone; |
| | | @ApiModelProperty(value = "车位数") |
| | |
| | | private boolean authUpdate = true; |
| | | @ApiModelProperty(value = "删除权限") |
| | | private boolean authDelete = true; |
| | | @ApiModelProperty("超1") |
| | | private Long c1; |
| | | @ApiModelProperty("超2") |
| | | private Long c2; |
| | | @ApiModelProperty("快1") |
| | | private Long k1; |
| | | @ApiModelProperty("快2") |
| | | private Long k2; |
| | | @ApiModelProperty("慢1") |
| | | private Long m1; |
| | | @ApiModelProperty("慢2") |
| | | private Long m2; |
| | | |
| | | @ApiModelProperty("利用率") |
| | | private BigDecimal p1; |
| | | } |
| | |
| | | private BigDecimal bms_current_measurement_value; // BMS 充电电流测量值 |
| | | private Integer bms_battery_voltage_and_group_number; // BMS 最高单体动力蓄电池电压及组号(1-12 位:最高单体动力蓄电池电压,数据分辨率:0.01 V/位,0 V 偏移量;数据范围:0~24 V;13-16 位:最高单体动力蓄电池电压所在组号,数据分辨率:1/位,0 偏移量;数据范围:0~15) |
| | | private BigDecimal bms_charged_status; // BMS 当前荷电状态 SOC( %) |
| | | private Integer bms_remaining_charging_time; // BMS 估算剩余充电时间 |
| | | private BigDecimal bms_remaining_charging_time; // BMS 估算剩余充电时间 |
| | | private BigDecimal voltage_output_value; // 电桩电压输出值 |
| | | private BigDecimal current_output_value; // 电桩电流输出值 |
| | | private Integer cumulative_charging_time; // 累计充电时间 |
| | | private BigDecimal cumulative_charging_time; // 累计充电时间 |
| | | |
| | | |
| | | } |
| | |
| | | private String charging_gun_code; // 抢号 |
| | | private Integer bms_highest_voltage_number; // BMS 最高单体动力蓄电池电压所在编号 |
| | | private String bms_maximum_battery_temperature; // BMS 最高动力蓄电池温度 |
| | | private Integer maximum_temperature_detection_point_number; // 最高温度检测点编号 |
| | | private String maximum_temperature_detection_point_number; // 最高温度检测点编号 |
| | | private String minimum_cell_temperature; // 最低动力蓄电池温度 |
| | | private Integer lowest_temperature_detection_pointt_number; // 最低动力蓄电池温度检测点编号 |
| | | private String lowest_temperature_detection_pointt_number; // 最低动力蓄电池温度检测点编号 |
| | | private Integer bms_battery_voltage; // BMS 单体动力蓄电池电压过高 /过低(0:正常,1:过高,10:过低) |
| | | private Integer bms_battery_charging_status; // BMS 整车动力蓄电池荷电状态SOC 过高/过低(0:正常,1:过高,10:过低) |
| | | private Integer bms_charging_overcurrent; // BMS 动力蓄电池充电过电流(0:正常,1:过流,10:不可信状态) |
| | |
| | | boolean doubleVip = false; |
| | | if (one!=null){ |
| | | TVip tVip = JSONObject.parseObject(one.getVipJson(), TVip.class); |
| | | if (tVip.getDoubleIntegration()==1){ |
| | | if (tVip.getDoubleIntegration()!=null&&tVip.getDoubleIntegration()==1){ |
| | | doubleVip = true; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.dto.ChargingPercentProvinceDto; |
| | | import com.ruoyi.chargingPile.service.*; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.GeodesyUtil; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | |
| | | @GetMapping("/map/getSiteList") |
| | | @ApiOperation(value = "获取站点", tags = {"管理后台-数据分析-电站分析"}) |
| | | public R<List<GetSiteListDTO>> getMapSiteList(GetSiteList siteList){ |
| | | |
| | | siteList.setPageCurr(1); |
| | | siteList.setPageCurr(99999); |
| | | 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(); |
| | | record.setC1(count); |
| | | Long count1 = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, 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(); |
| | | record.setK1(count2); |
| | | Long count3 = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, 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(); |
| | | record.setM1(count4); |
| | | Long count5 = chargingGunService.lambdaQuery().eq(TChargingGun::getChargingPileId, record.getId()).eq(TChargingGun::getChargeMode, 3).eq(TChargingGun::getStatus, 2).count(); |
| | | record.setM2(count5); |
| | | |
| | | //利用率 |
| | | BigDecimal bigDecimal = new BigDecimal("0"); |
| | | //获取该站点的总充电度数 |
| | | List<TChargingOrder> chargingOrders = chargingOrderClient.getList(record.getId()).getData(); |
| | | for (TChargingOrder chargingOrder : chargingOrders) { |
| | | bigDecimal = bigDecimal.add(chargingOrder.getChargingCapacity()); |
| | | } |
| | | //获取该站点的所有充电桩 |
| | | List<TChargingPile> chargingPiles = chargingPileService.lambdaQuery().eq(TChargingPile::getSiteId, record.getId()).list(); |
| | | BigDecimal bigDecimal1 = new BigDecimal("0"); |
| | | for (TChargingPile chargingPile : chargingPiles) { |
| | | bigDecimal1 = bigDecimal1.add(chargingPile.getRatedPower()); |
| | | } |
| | | BigDecimal multiply = bigDecimal1.multiply(new BigDecimal("24")); |
| | | |
| | | BigDecimal divide = bigDecimal.divide(multiply, 0, BigDecimal.ROUND_HALF_UP); |
| | | record.setP1(divide); |
| | | |
| | | } |
| | | return R.ok(list.getRecords()); |
| | | } |
| | | |
| | |
| | | List<GetSiteListDTO> records = siteService.getSiteList(siteList).getRecords(); |
| | | List<Integer> collect = records.stream().map(GetSiteListDTO::getId).collect(Collectors.toList()); |
| | | // 通过时间段获取和充电桩id获取各个充电站的充电订单 |
| | | List<ChargingOrderGroup> data = chargingOrderClient.getBySiteIdAndTime(chargingPercentProvinceDto).getData(); |
| | | List<ChargingOrderGroup> data = chargingOrderClient.getBySiteIdAndTime(chargingPercentProvinceDto).getData(); |
| | | // 计算利用率展示 |
| | | for (ChargingOrderGroup datum : data) { |
| | | List<TChargingPile> chargingPiles = chargingPileService.lambdaQuery().eq(TChargingPile::getSiteId, datum.getSiteId()).list(); |
| | |
| | | * @param gunId |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-fault-message/getFaultMessageByGunId/{gunId}") |
| | | @PostMapping("/getFaultMessageByGunId/{gunId}") |
| | | public R<TFaultMessage> getFaultMessageByGunId(@PathVariable("gunId") Integer gunId){ |
| | | return R.ok(faultMessageService.getOne(Wrappers.lambdaQuery(TFaultMessage.class) |
| | | .eq(TFaultMessage::getChargingGunId,gunId) |
| | |
| | | DATE_FORMAT(a.establishment_time, '%Y-%m-%d %H:%i:%s') as establishmentTime, |
| | | c.num as chargingPileNumber, |
| | | a.sort, |
| | | a.lon, |
| | | a.lat, |
| | | a.accounting_strategy_id as accountingStrategyId, |
| | | if(a.accounting_strategy_id is null, 1, if(d.site_id is null, 1, 2)) as accountingStrategyType |
| | | from t_site a |
| | |
| | | case SendTagConstant.ONLINE: |
| | | OnlineMessage onlineMessage = JSON.parseObject(content.toJSONString(),OnlineMessage.class); |
| | | chargingMessage.setOnlineMessage(onlineMessage); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | // 响应硬件 |
| | | // 业务处理 登录认证应答 |
| | | OnlineReply onlineReply = new OnlineReply(); |
| | |
| | | timingSettingReplyOnline.setCharging_pile_code(onlineMessage.getCharging_pile_code()); |
| | | timingSettingReplyOnline.setCurrent_time(CP56Time2aConverter.convertToCP56Time2a(new Date())); |
| | | iotMessageProduce.sendMessage(deviceId, ServiceIdMenu.TIMING_SETTING_REPLY.getKey(),messageUtil.timingSettingReply(timingSettingReplyOnline)); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | break; |
| | | case SendTagConstant.PING: |
| | | PingMessage pingMessage = JSON.parseObject(content.toJSONString(),PingMessage.class); |
| | | chargingMessage.setPingMessage(pingMessage); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | // 响应硬件 |
| | | Pong pong = new Pong(); |
| | | pong.setCharging_pile_code(pingMessage.getCharging_pile_code()); |
| | |
| | | pong.setCharging_gun_status(0); |
| | | result = iotMessageProduce.sendMessage(deviceId, ServiceIdMenu.PONG.getKey(), messageUtil.pong(pong)); |
| | | log.info("充电桩心跳包-返回结果:{}",result); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | break; |
| | | case SendTagConstant.END_CHARGE: |
| | | EndChargeMessage endChargeMessage = JSON.parseObject(content.toJSONString(),EndChargeMessage.class); |
| | |
| | | case SendTagConstant.BILLING_MODE_VERIFY: |
| | | BillingModeVerifyMessage billingModeVerifyMessage = JSON.parseObject(content.toJSONString(),BillingModeVerifyMessage.class); |
| | | chargingMessage.setBillingModeVerifyMessage(billingModeVerifyMessage); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | // 响应硬件 |
| | | BillingModeVerifyReply billingModeVerifyReply = new BillingModeVerifyReply(); |
| | | if(billingModeVerifyMessage.getBilling_model_code().equals("0")){ |
| | |
| | | } |
| | | } |
| | | iotMessageProduce.sendMessage(deviceId, ServiceIdMenu.BILLING_MODE_VERIFY_REPLY.getKey(),messageUtil.billingModeVerifyReply(billingModeVerifyReply)); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | break; |
| | | case SendTagConstant.ACQUISITION_BILLING_MODE: |
| | | AcquisitionBillingModeMessage acquisitionBillingModeMessage = JSON.parseObject(content.toJSONString(),AcquisitionBillingModeMessage.class); |
| | | chargingMessage.setAcquisitionBillingModeMessage(acquisitionBillingModeMessage); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | // 响应硬件 计费模型请求应答 1=尖阶段,2=峰阶段,3=平阶段,4=谷阶段 |
| | | List<TAccountingStrategyDetail> accountingStrategyDetails = accountingStrategyDetailClient.getDetailListByCode(acquisitionBillingModeMessage.getCharging_pile_code().substring(0,14)).getData(); |
| | | Map<Integer, TAccountingStrategyDetail> strategyPrice = StrategyUtil.getStrategyPrice(accountingStrategyDetails); |
| | |
| | | acquisitionBillingModeReply.setCharging_pile_code(acquisitionBillingModeMessage.getCharging_pile_code()); |
| | | acquisitionBillingModeReply.setLoss_ratio(BigDecimal.ZERO); |
| | | iotMessageProduce.sendMessage(deviceId, ServiceIdMenu.ACQUISITION_BILLING_MODE_REPLY.getKey(),messageUtil.acquisitionBillingModeReply(acquisitionBillingModeReply)); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | break; |
| | | case SendTagConstant.UPLOAD_REAL_TIME_MONITORING_DATA: |
| | | UploadRealTimeMonitoringDataMessage uploadRealTimeMonitoringDataMessage = JSON.parseObject(content.toJSONString(),UploadRealTimeMonitoringDataMessage.class); |
| | |
| | | case SendTagConstant.CHARGING_PILE_STARTS_CHARGING: |
| | | ChargingPileStartsChargingMessage chargingPileStartsChargingMessage = JSON.parseObject(content.toJSONString(),ChargingPileStartsChargingMessage.class); |
| | | chargingMessage.setChargingPileStartsChargingMessage(chargingPileStartsChargingMessage); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | // 响应硬件 |
| | | PlatformConfirmationCharging platformConfirmationCharging = new PlatformConfirmationCharging(); |
| | | platformConfirmationCharging.setCharging_pile_code(chargingPileStartsChargingMessage.getCharging_pile_code()); |
| | |
| | | platformConfirmationCharging.setAuthentication(1); |
| | | // TODO 若是失败,给出失败原因 |
| | | iotMessageProduce.sendMessage(deviceId, ServiceIdMenu.PLATFORM_CONFIRMATION_CHARGING.getKey(),messageUtil.platformConfirmationCharging(platformConfirmationCharging)); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | break; |
| | | case SendTagConstant.PLATFORM_START_CHARGING_REPLY: |
| | | PlatformStartChargingReplyMessage platformStartChargingReplyMessage = JSON.parseObject(content.toJSONString(),PlatformStartChargingReplyMessage.class); |
| | |
| | | case SendTagConstant.TRANSACTION_RECORD: |
| | | TransactionRecordMessage transactionRecordMessage = JSON.parseObject(content.toJSONString(),TransactionRecordMessage.class); |
| | | chargingMessage.setTransactionRecordMessage(transactionRecordMessage); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | // 响应硬件 |
| | | ConfirmTransactionRecord confirmTransactionRecord = new ConfirmTransactionRecord(); |
| | | confirmTransactionRecord.setTransaction_serial_number(transactionRecordMessage.getTransaction_serial_number()); |
| | | confirmTransactionRecord.setConfirm_result(0); |
| | | iotMessageProduce.sendMessage(deviceId, ServiceIdMenu.CONFIRM_TRANSACTION_RECORD.getKey(),messageUtil.confirmTransactionRecord(confirmTransactionRecord)); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | break; |
| | | case SendTagConstant.UPDATE_BALANCE_REPLY: |
| | | UpdateBalanceReplyMessage updateBalanceReplyMessage = JSON.parseObject(content.toJSONString(),UpdateBalanceReplyMessage.class); |
| | |
| | | case SendTagConstant.TIMING_SETTING: |
| | | TimingSettingMessage timingSettingMessage = JSON.parseObject(content.toJSONString(),TimingSettingMessage.class); |
| | | chargingMessage.setTimingSettingMessage(timingSettingMessage); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | // 响应硬件 对时设置应答 |
| | | TimingSettingReply timingSettingReply = new TimingSettingReply(); |
| | | timingSettingReply.setCharging_pile_code(timingSettingMessage.getCharging_pile_code()); |
| | | timingSettingReply.setCurrent_time(CP56Time2aConverter.convertToCP56Time2a(new Date())); |
| | | iotMessageProduce.sendMessage(deviceId, ServiceIdMenu.TIMING_SETTING_REPLY.getKey(),messageUtil.timingSettingReply(timingSettingReply)); |
| | | sendResult = enhanceProduce.chargingMessage(chargingMessage); |
| | | break; |
| | | case SendTagConstant.SETUP_BILLING_MODEL_REPLY: |
| | | SetupBillingModelReplyMessage setupBillingModelReplyMessage = JSON.parseObject(content.toJSONString(),SetupBillingModelReplyMessage.class); |
| | |
| | | private BigDecimal bms_battery_voltage; // 最高电压 BMS 最高单体动力蓄电池电压及组号(1-12 位:最高单体动力蓄电池电压,数据分辨率:0.01 V/位,0 V 偏移量;数据范围:0~24 V;13-16 位:最高单体动力蓄电池电压所在组号,数据分辨率:1/位,0 偏移量;数据范围:0~15) |
| | | private Integer bms_group_number; // 所在组号 BMS 最高单体动力蓄电池电压及组号(1-12 位:最高单体动力蓄电池电压,数据分辨率:0.01 V/位,0 V 偏移量;数据范围:0~24 V;13-16 位:最高单体动力蓄电池电压所在组号,数据分辨率:1/位,0 偏移量;数据范围:0~15) |
| | | private BigDecimal bms_charged_status; // BMS 当前荷电状态 SOC( %) |
| | | private Integer bms_remaining_charging_time; // BMS 估算剩余充电时间 |
| | | private BigDecimal bms_remaining_charging_time; // BMS 估算剩余充电时间 |
| | | private BigDecimal voltage_output_value; // 电桩电压输出值 |
| | | private BigDecimal current_output_value; // 电桩电流输出值 |
| | | private Integer cumulative_charging_time; // 累计充电时间 |
| | | private BigDecimal cumulative_charging_time; // 累计充电时间 |
| | | |
| | | |
| | | } |
| | |
| | | private String charging_gun_code; // 抢号 |
| | | private Integer bms_highest_voltage_number; // BMS 最高单体动力蓄电池电压所在编号 |
| | | private String bms_maximum_battery_temperature; // BMS 最高动力蓄电池温度 |
| | | private Integer maximum_temperature_detection_point_number; // 最高温度检测点编号 |
| | | private String maximum_temperature_detection_point_number; // 最高温度检测点编号 |
| | | private String minimum_cell_temperature; // 最低动力蓄电池温度 |
| | | private Integer lowest_temperature_detection_pointt_number; // 最低动力蓄电池温度检测点编号 |
| | | private String lowest_temperature_detection_pointt_number; // 最低动力蓄电池温度检测点编号 |
| | | private Integer bms_battery_voltage; // BMS 单体动力蓄电池电压过高 /过低(0:正常,1:过高,10:过低) |
| | | private Integer bms_battery_charging_status; // BMS 整车动力蓄电池荷电状态SOC 过高/过低(0:正常,1:过高,10:过低) |
| | | private Integer bms_charging_overcurrent; // BMS 动力蓄电池充电过电流(0:正常,1:过流,10:不可信状态) |
| | |
| | | uploadRealTimeMonitoringData.setService_charge(accountingStrategyDetail.getServiceCharge()); |
| | | if (Objects.nonNull(data)) { |
| | | uploadRealTimeMonitoringData.setLast_time(data.getLast_time()); |
| | | uploadRealTimeMonitoringData.setPeriod_electric_price(uploadRealTimeMonitoringDataMessage.getPaid_amount().divide(data.getPaid_amount())); |
| | | uploadRealTimeMonitoringData.setPeriod_charging_degree(uploadRealTimeMonitoringDataMessage.getCharging_degree().divide(data.getCharging_degree())); |
| | | uploadRealTimeMonitoringData.setPeriod_electric_price(uploadRealTimeMonitoringDataMessage.getPaid_amount().subtract(data.getPaid_amount())); |
| | | uploadRealTimeMonitoringData.setPeriod_charging_degree(uploadRealTimeMonitoringDataMessage.getCharging_degree().subtract(data.getCharging_degree())); |
| | | uploadRealTimeMonitoringData.setPeriod_service_price(uploadRealTimeMonitoringDataMessage.getCharging_degree().multiply(accountingStrategyDetail.getServiceCharge()).setScale(4, RoundingMode.HALF_UP)); |
| | | }else { |
| | | log.info("首次上传实时监测数据"); |
| | |
| | | |
| | | // 获取本月1号的日期 |
| | | YearMonth yearMonth = YearMonth.from(today); |
| | | start = yearMonth.atDay(1); |
| | | |
| | | System.out.println("本月1号是: " + start); |
| | | // start = yearMonth.atDay(1); |
| | | // |
| | | // System.out.println("本月1号是: " + start); |
| | | }else if (statisticsQueryDto.getDayType()==4){ |
| | | LocalDate today = LocalDate.now(); |
| | | // 获取当前年份 |
| | | int currentYear = today.getYear(); |
| | | // 获取今年1月1日的日期 |
| | | start = LocalDate.of(currentYear, 1, 1); |
| | | System.out.println("今年1月1日是: " + start); |
| | | start = statisticsQueryDto.getStartTime(); |
| | | end = statisticsQueryDto.getEndTime(); |
| | | }else if (statisticsQueryDto.getDayType()==5){ |
| | | |
| | | // 获取今年1月1日的日期 |
| | |
| | | byte[] imageBytes = IOUtils.toByteArray(inputStream); |
| | | |
| | | // 创建临时文件 |
| | | File tempFile = File.createTempFile("tempImage", ".png"); |
| | | // 截取imageUrl后缀名 |
| | | String fileExtension = imageUrl.substring(imageUrl.lastIndexOf(".")); |
| | | File tempFile = File.createTempFile("tempImage", fileExtension); |
| | | try (FileOutputStream fos = new FileOutputStream(tempFile)) { |
| | | fos.write(imageBytes); |
| | | } |
| | |
| | | @Data |
| | | public class SixVipDto { |
| | | private String month; |
| | | private String vipName; |
| | | private String name; |
| | | private Integer vipId; |
| | | private BigDecimal paymentAmount; |
| | | } |
| | |
| | | |
| | | List<Map<String, Object>> getSumByType(@Param("chargingOrderIds")List<Long> chargingOrderIds); |
| | | |
| | | List<Map<String, Object>> getDateData(List<Long> chargingOrderIds); |
| | | List<Map<String, Object>> getDateData(@Param("chargingOrderIds")List<Long> chargingOrderIds); |
| | | |
| | | List<Map<String, Object>> getWeekData(List<Long> chargingOrderIds); |
| | | List<Map<String, Object>> getWeekData(@Param("chargingOrderIds")List<Long> chargingOrderIds); |
| | | |
| | | List<Map<String, Object>> getMonthData(List<Long> chargingOrderIds); |
| | | List<Map<String, Object>> getMonthData(@Param("chargingOrderIds")List<Long> chargingOrderIds); |
| | | |
| | | List<Map<String, Object>> getYearData(List<Long> chargingOrderIds); |
| | | List<Map<String, Object>> getYearData(@Param("chargingOrderIds")List<Long> chargingOrderIds); |
| | | |
| | | List<ChargingOrderListVO> chargingList(@Param("pageInfo")PageInfo<ChargingOrderListVO> pageInfo, @Param("req") ChargingListQuery dto, @Param("startTime1")String startTime1, @Param("startTime2")String startTime2, @Param("endTime1")String endTime1, @Param("endTime2")String endTime2); |
| | | List<ChargingOrderListVO> chargingListNoPage( @Param("req")ChargingListQuery dto, @Param("startTime1")String startTime1, @Param("startTime2")String startTime2, @Param("endTime1")String endTime1, @Param("endTime2")String endTime2); |
| | | |
| | | List<Map<String, Object>> getByDate(List<Long> chargingOrderIds); |
| | | List<Map<String, Object>> getByDate(@Param("chargingOrderIds")List<Long> chargingOrderIds); |
| | | |
| | | List<Map<String, Object>> queryPower(List<Integer> siteIds); |
| | | List<Map<String, Object>> queryPower(@Param("siteIds")List<Integer> siteIds); |
| | | |
| | | Map<String, Object> queryPowerLevel(@Param("siteIds") List<Integer> siteIds,@Param("statisticsQueryDto") ChargingStatisticsQueryDto statisticsQueryDto); |
| | | |
| | |
| | | |
| | | </select> |
| | | <select id="chargingOrderGroup" resultType="com.ruoyi.common.core.dto.ChargingOrderGroup"> |
| | | SELECT SUM(charging_capacity) ,site_id |
| | | FROM t_charging_order |
| | | GROUP BY site_id |
| | | SELECT SUM(tc.charging_capacity) as charging_capacity,tc.site_id |
| | | FROM t_charging_order tc |
| | | left join `charging_pile_service`.`t_site` ts on tc.site_id = ts.id |
| | | <where> |
| | | <if test="chargingPercentProvinceDto.date1 != null"> |
| | | AND create_time >= #{chargingPercentProvinceDto.date1} |
| | | AND tc.create_time >= #{chargingPercentProvinceDto.date1} |
| | | </if> |
| | | <if test="chargingPercentProvinceDto.date2 != null"> |
| | | AND create_time <= #{chargingPercentProvinceDto.date2} |
| | | AND tc.create_time <= #{chargingPercentProvinceDto.date2} |
| | | </if> |
| | | <if test="chargingPercentProvinceDto.provinceCode != null"> |
| | | AND province_code = #{chargingPercentProvinceDto.provinceCode} |
| | | AND ts.province_code = #{chargingPercentProvinceDto.provinceCode} |
| | | </if> |
| | | |
| | | </where> |
| | | GROUP BY site_id |
| | | |
| | | |
| | | |
| | | </select> |
| | |
| | | |
| | | </select> |
| | | <select id="countAll" resultType="java.util.Map"> |
| | | select sum(electrovalence),sum(service_charge),sum(commission_amount),sum(sharing_amount) |
| | | select sum(electrovalence) as electrovalence,sum(service_charge) as service_charge,sum(commission_amount) 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 and ISNULL(refund_status) |
| | | </select> |
| | |
| | | DATE_FORMAT( create_time, '%Y-%m-%d %H' ) as time, |
| | | SUM(service_charge) as servicecharge, |
| | | SUM(electrovalence) as electrovalence, |
| | | SUM(payment_amount) AS paymentAmount, |
| | | count(1) as orderCount |
| | | FROM |
| | | t_charging_order |
| | |
| | | DATE_FORMAT( create_time, '%Y-%m-%d' ) as time, |
| | | SUM(service_charge) as servicecharge, |
| | | SUM(electrovalence) as electrovalence, |
| | | SUM(payment_amount) AS paymentAmount, |
| | | count(1) as orderCount |
| | | FROM |
| | | t_charging_order |
| | |
| | | DATE_FORMAT( create_time, '%Y-%m-%d' ) as time, |
| | | SUM(service_charge) as servicecharge, |
| | | SUM(electrovalence) as electrovalence, |
| | | SUM(payment_amount) AS paymentAmount, |
| | | count(1) as orderCount |
| | | FROM |
| | | t_charging_order |
| | |
| | | DATE_FORMAT( create_time, '%Y-%m-%d' ) as time, |
| | | SUM(service_charge) as servicecharge, |
| | | SUM(electrovalence) as electrovalence, |
| | | SUM(payment_amount) AS paymentAmount, |
| | | |
| | | count(1) as orderCount |
| | | FROM |
| | | t_charging_order |
| | | <where> |
| | | del_flag = 0 and recharge_payment_status = 2 and ISNULL(refund_status) and YEAR(createTime) = YEAR(NOW()) |
| | | del_flag = 0 and recharge_payment_status = 2 and ISNULL(refund_status) and YEAR(create_time) = YEAR(NOW()) |
| | | <if test="chargingOrderIds != null and chargingOrderIds.size() > 0"> |
| | | AND id IN |
| | | <foreach collection="chargingOrderIds" item="chargingOrderId" open="(" separator="," close=")"> |
| | |
| | | <select id="queryPower" resultType="java.util.Map"> |
| | | SELECT |
| | | 'today' AS data_type, |
| | | DATE_FORMAT(create_time, '%Y-%m-%d %H') AS TIME, |
| | | DATE_FORMAT(create_time, '%H') AS TIME, |
| | | SUM(power) AS power |
| | | FROM |
| | | t_charging_order |
| | |
| | | |
| | | SELECT |
| | | 'yesterday' AS data_type, |
| | | DATE_FORMAT(create_time, '%Y-%m-%d %H') AS TIME, |
| | | DATE_FORMAT(create_time, '%H') AS TIME, |
| | | SUM(power) AS power |
| | | FROM |
| | | t_charging_order |
| | |
| | | t_vip_order |
| | | <where> |
| | | del_flag = 0 AND |
| | | payment_status = 2 AND |
| | | payment_status = 2 |
| | | <if test="sixBefore != null"> |
| | | AND create_time > #{sixBefore} |
| | | </if> |
| | |
| | | LEFT JOIN `charging_pile_other`.`t_vip` tp on subquery.vip_id = tp.id |
| | | GROUP BY |
| | | DATE_FORMAT(subquery.create_time, '%Y-%m'), |
| | | tp.`name`; |
| | | tp.`name` |
| | | |
| | | |
| | | </select> |