Merge remote-tracking branch 'origin/master'
| | |
| | | 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; |
| | | } |
| | |
| | | @TableId(type = IdType.INPUT, value = "id") |
| | | private Integer id; |
| | | @ApiModelProperty(value = "策略id") |
| | | @TableField("accounting_strategy_order_id") |
| | | private Integer accountingStrategyOrderId; |
| | | @TableField("accounting_strategy_id") |
| | | private Integer accountingStrategyId; |
| | | |
| | | @ApiModelProperty(value = "阶段(1=尖阶段,2=峰阶段,3=平阶段,4=谷阶段)") |
| | | @TableField("type") |
| | |
| | | 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(); |
| | |
| | | out.close(); |
| | | inputStream.close(); |
| | | |
| | | //清楚服务器上的文件 |
| | | // Process process = null; |
| | | // try { |
| | | // process = Runtime.getRuntime().exec("sudo rm -rf " + filePath); |
| | | // } catch (IOException e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // if (process != null) { |
| | | // process.destroy(); |
| | | // } |
| | | //清除服务器上的文件 |
| | | try { |
| | | // 使用Runtime执行命令 |
| | | Process process = Runtime.getRuntime().exec("sudo rm -rf " + filePath); |
| | | // 读取命令的输出 |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); |
| | | String line; |
| | | while ((line = reader.readLine()) != null) { |
| | | System.out.println(line); |
| | | } |
| | | // 等待命令执行完成 |
| | | process.waitFor(); |
| | | // 关闭流 |
| | | reader.close(); |
| | | } catch (IOException | InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/getChargingGunByCode") |
| | | public R<TChargingGun> getChargingGunByCode(@RequestBody GetChargingGunByCode code){ |
| | | TChargingPile chargingPile = chargingPileService.getOne(new LambdaQueryWrapper<TChargingPile>().eq(TChargingPile::getCode, code.getCharging_pile_code()).eq(TChargingPile::getDelFlag, 0)); |
| | | TChargingPile chargingPile = chargingPileService.getOne(new LambdaQueryWrapper<TChargingPile>() |
| | | .eq(TChargingPile::getCode, code.getCharging_pile_code()).eq(TChargingPile::getDelFlag, 0)); |
| | | return R.ok(chargingGunService.getOne(Wrappers.lambdaQuery(TChargingGun.class) |
| | | .eq(TChargingGun::getChargingPileId, chargingPile.getId()) |
| | | .eq(TChargingGun::getCode, code.getCharging_gun_code()) |
| | |
| | | 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 |
| | |
| | | @ResponseBody |
| | | @PostMapping(value = "/securityDetection") |
| | | public void securityDetection(@RequestBody SecurityDetectionVO securityDetection){ |
| | | log.error("-------------------安全检测数据-------------------:" + securityDetection); |
| | | chargingOrderService.securityDetection(securityDetection); |
| | | } |
| | | |
| | |
| | | |
| | | // 获取本月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日的日期 |
| | |
| | | import com.ruoyi.order.dto.GetOrderEvaluatePageListDTO; |
| | | import com.ruoyi.order.dto.OrderEvaluateVo; |
| | | import com.ruoyi.order.service.TOrderEvaluateService; |
| | | import com.ruoyi.order.vo.ReplyEvaluationVO; |
| | | import com.ruoyi.other.api.vo.TEvaluationTagVO; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | |
| | | |
| | | @DeleteMapping(value = "/delOrderEvaluate") |
| | | @DeleteMapping(value = "/delOrderEvaluate/{id}") |
| | | @ApiOperation(value = "删除充电评价", tags = {"管理后台-充电评价"}) |
| | | public AjaxResult delOrderEvaluate(@PathVariable Long id){ |
| | | public AjaxResult delOrderEvaluate(@PathVariable("id") Long id){ |
| | | TOrderEvaluate orderEvaluate = orderEvaluateService.getById(id); |
| | | orderEvaluateService.removeById(orderEvaluate); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping(value = "/replyEvaluation") |
| | | @ApiOperation(value = "充电评价回复", tags = {"管理后台-充电评价"}) |
| | | public AjaxResult replyEvaluation(@PathVariable("id") Long id, @RequestParam("reply") String reply){ |
| | | TOrderEvaluate orderEvaluate = orderEvaluateService.getById(id); |
| | | reply = reply.replaceAll("& #40;", "(") |
| | | public AjaxResult replyEvaluation(@RequestBody ReplyEvaluationVO vo){ |
| | | TOrderEvaluate orderEvaluate = orderEvaluateService.getById(vo.getId()); |
| | | String reply = vo.getReply().replaceAll("& #40;", "(") |
| | | .replaceAll("& #41;", ")") |
| | | .replaceAll("& #40;", "(") |
| | | .replaceAll("& #41;", ")") |
| | |
| | | |
| | | |
| | | |
| | | @DeleteMapping(value = "/delOrderEvaluateReply") |
| | | @DeleteMapping(value = "/delOrderEvaluateReply/{id}") |
| | | @ApiOperation(value = "删除充电评价回复", tags = {"管理后台-充电评价"}) |
| | | public AjaxResult delOrderEvaluateReply(@PathVariable Long id){ |
| | | public AjaxResult delOrderEvaluateReply(@PathVariable("id") Long id){ |
| | | TOrderEvaluate orderEvaluate = orderEvaluateService.getById(id); |
| | | orderEvaluate.setEvaluationResponse(""); |
| | | orderEvaluateService.updateById(orderEvaluate); |
| | |
| | | @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); |
| | | |
| | |
| | | import com.ruoyi.payment.api.model.RefundResp; |
| | | import com.ruoyi.payment.api.model.WxPaymentRefundModel; |
| | | import com.ruoyi.payment.api.vo.*; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import io.seata.spring.annotation.GlobalTransactional; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | |
| | | @Resource |
| | | private SiteClient siteClient; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private AppUserCarClient appUserCarClient; |
| | | @Resource |
| | |
| | | |
| | | @Resource |
| | | private TOrderEvaluateService orderEvaluateService; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private AccountingStrategyDetailClient accountingStrategyDetailClient; |
| | | |
| | |
| | | platformStartCharging.setCard_number(chargingOrder.getId().toString()); |
| | | platformStartCharging.setAccount_balance(electrovalence); |
| | | |
| | | log.error(chargingOrder.getCode() + ":-------------------远程调起开始充电请求-------------------"); |
| | | log.error(platformStartCharging.toString()); |
| | | |
| | | log.error(chargingOrder.getCode() + ":-------------------远程调起开始充电请求-------------------" + platformStartCharging.toString()); |
| | | sendMessageClient.platformStartCharging(platformStartCharging); |
| | | //异步线程检测远程启动的应答结果。如果失败,则需要全额退款 |
| | | Long id = chargingOrder.getId(); |
| | |
| | | } |
| | | |
| | | List<PlatformStartChargingReply> data = platformStartChargingReplyClient.getPlatformStartChargingReply(code).getData(); |
| | | log.error(code + ":-------------------开始检查调起充电结果-------------------"); |
| | | log.error(data.toString()); |
| | | if(null == data){ |
| | | return false; |
| | | } |
| | | log.error(code + ":-------------------开始检查调起充电结果-------------------" + data.toString()); |
| | | if(data.size() != 0){ |
| | | PlatformStartChargingReply platformStartChargingReply = data.get(1); |
| | | Integer startup_result = platformStartChargingReply.getStartup_result(); |
| | |
| | | redisService.setCacheObject(key, preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | return true; |
| | | }else{ |
| | | log.error(code + ":-------------------未上传开启充电结果-------------------"); |
| | | |
| | | Integer counter = boot_failed_map.get(code); |
| | | log.error(code + ":-------------------未上传开启充电结果-------------------" + counter); |
| | | PreChargeCheck preChargeCheck1 = redisService.getCacheObject(key); |
| | | //5分钟内未启动成功,退回金额。 |
| | | if(null == counter || counter < 300){ |
| | |
| | | code.setCharging_pile_code(securityDetection.getCharging_pile_code()); |
| | | code.setCharging_gun_code(securityDetection.getCharging_gun_code()); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunByCode(code).getData(); |
| | | PreChargeCheck preChargeCheck1 = redisService.getCacheObject("AQJC_" + chargingGun.getId()); |
| | | PreChargeCheck preChargeCheck1 = redisService.getCacheObject("AQJC_" + chargingGun.getId()); |
| | | if(null != preChargeCheck1){ |
| | | preChargeCheck1.setElectronicLockLock(preChargeCheck1.getElectronicLockLock()); |
| | | preChargeCheck1.setInsulationTesting(true); |
| | |
| | | TChargingOrderRefund one = chargingOrderRefundService.getOne(new LambdaQueryWrapper<TChargingOrderRefund>().eq(TChargingOrderRefund::getRefundCode, out_refund_no)); |
| | | one.setRefundSerialNumber(refund_id); |
| | | one.setRefundStatus(2); |
| | | one.setRefundTime(LocalDateTime.parse(success_time, DateTimeFormatter.ofPattern("yyyy-MM-DDTHH:mm:ss+TIMEZONE"))); |
| | | one.setRefundTime(LocalDateTime.now()); |
| | | chargingOrderRefundService.updateById(one); |
| | | } |
| | | return AjaxResult.success(); |
| | |
| | | public List<Map<String, Object>> getYearData(List<Long> chargingOrderIds) { |
| | | return this.baseMapper.getYearData(chargingOrderIds); |
| | | } |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | @Resource |
| | | private UserSiteClient userSiteClient; |
| | | |
| | | @Resource |
| | | private RoleSiteClient roleSiteClient; |
| | | |
| | | @Override |
| | | public ChargingOrderTimeVO chargingList(ChargingListQuery dto) { |
| | | String startTime1 = null; |
| | |
| | | return chargingOrderTimeVO; |
| | | } |
| | | |
| | | // @Override |
| | | // public R payRefund(PayOrderRefundDto payOrderQueryDto) { |
| | | // return null; |
| | | // } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ChargingOrderListInfoVO chargingInfo(String uid) { |
| | |
| | | */ |
| | | @Override |
| | | public void chargeMonitoring(UploadRealTimeMonitoringDataQuery query) { |
| | | if(com.ruoyi.common.core.utils.StringUtils.isNotEmpty(query.getCharging_gun_code())){ |
| | | if(com.ruoyi.common.core.utils.StringUtils.isNotEmpty(query.getTransaction_serial_number())){ |
| | | //获取当前的计费策略 |
| | | TChargingOrder chargingOrder = this.getOne(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getCode, query.getCharging_gun_code())); |
| | | TChargingOrder chargingOrder = this.getOne(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getCode, query.getTransaction_serial_number())); |
| | | AccountingStrategyDetailOrder strategyDetail = accountingStrategyDetailOrderClient.getNowAccountingStrategyDetailOrder(chargingOrder.getId()).getData(); |
| | | TChargingOrderAccountingStrategy chargingOrderAccountingStrategy = chargingOrderAccountingStrategyService.getOne(new LambdaQueryWrapper<TChargingOrderAccountingStrategy>() |
| | | .eq(TChargingOrderAccountingStrategy::getChargingOrderId, chargingOrder.getId()).orderByDesc(TChargingOrderAccountingStrategy::getCreateTime).last(" limit 0, 1")); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); |
| | | if(null == chargingOrderAccountingStrategy){ |
| | | chargingOrderAccountingStrategy = new TChargingOrderAccountingStrategy(); |
| | | chargingOrderAccountingStrategy.setChargingOrderId(chargingOrder.getId()); |
| | | chargingOrderAccountingStrategy.setAccountingStrategyDetailId(strategyDetail.getId()); |
| | | chargingOrderAccountingStrategy.setType(strategyDetail.getType()); |
| | | chargingOrderAccountingStrategy.setStartTime(sdf.format(chargingOrder.getStartTime())); |
| | | chargingOrderAccountingStrategy.setEndTime(sdf.format(new Date())); |
| | | chargingOrderAccountingStrategy.setStartTime(chargingOrder.getStartTime().format(DateTimeFormatter.ofPattern("HH:mm"))); |
| | | chargingOrderAccountingStrategy.setEndTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("HH:mm"))); |
| | | chargingOrderAccountingStrategy.setElectrovalence(strategyDetail.getElectrovalence()); |
| | | chargingOrderAccountingStrategy.setServiceCharge(strategyDetail.getServiceCharge()); |
| | | chargingOrderAccountingStrategy.setCostServiceCharge(strategyDetail.getCostServiceCharge()); |
| | |
| | | chargingOrderAccountingStrategy.setPeriodServicePrice(periodServicePrice); |
| | | chargingOrderAccountingStrategy.setPeriodOriginalServicePrice(periodOriginalServicePrice); |
| | | chargingOrderAccountingStrategy.setPeriodElectricPrice(periodElectricPrice); |
| | | chargingOrderAccountingStrategy.setEndTime(sdf.format(new Date())); |
| | | chargingOrderAccountingStrategy.setEndTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("HH:mm"))); |
| | | chargingOrderAccountingStrategyService.updateById(chargingOrderAccountingStrategy); |
| | | }else{ |
| | | TChargingOrderAccountingStrategy chargingOrderAccountingStrategy1 = new TChargingOrderAccountingStrategy(); |
| | | chargingOrderAccountingStrategy1.setChargingOrderId(chargingOrder.getId()); |
| | | chargingOrderAccountingStrategy1.setAccountingStrategyDetailId(strategyDetail.getId()); |
| | | chargingOrderAccountingStrategy1.setType(strategyDetail.getType()); |
| | | chargingOrderAccountingStrategy1.setStartTime(sdf.format(chargingOrderAccountingStrategy.getEndTime())); |
| | | chargingOrderAccountingStrategy1.setEndTime(sdf.format(new Date())); |
| | | chargingOrderAccountingStrategy1.setStartTime(chargingOrderAccountingStrategy.getEndTime()); |
| | | chargingOrderAccountingStrategy1.setEndTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("HH:mm"))); |
| | | chargingOrderAccountingStrategy1.setElectrovalence(strategyDetail.getElectrovalence()); |
| | | chargingOrderAccountingStrategy1.setServiceCharge(strategyDetail.getServiceCharge()); |
| | | chargingOrderAccountingStrategy1.setCostServiceCharge(strategyDetail.getCostServiceCharge()); |
| | |
| | | List<GetOrderEvaluatePageListDTO> list = this.baseMapper.getPageList(pageList, evaluationTagIds, pageInfo); |
| | | for (GetOrderEvaluatePageListDTO dto : list) { |
| | | TAppUser appUser = appUserClient.getUserById(dto.getAppUserId()).getData(); |
| | | dto.setAvatar(appUser.getAvatar()); |
| | | String phone = appUser.getPhone(); |
| | | dto.setPhone(phone.substring(0, 3) + "****" + phone.substring(6)); |
| | | if(null != appUser){ |
| | | dto.setAvatar(appUser.getAvatar()); |
| | | String phone = appUser.getPhone(); |
| | | dto.setPhone(phone.substring(0, 3) + "****" + phone.substring(6)); |
| | | } |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(dto.getSiteId())).getData().get(0); |
| | | dto.setSiteName(site.getName()); |
| | | List<TOrderEvaluateTag> tOrderEvaluateTags = orderEvaluateTagMapper.selectList(new LambdaQueryWrapper<TOrderEvaluateTag>().eq(TOrderEvaluateTag::getOrderEvaluateId, dto.getId())); |
New file |
| | |
| | | package com.ruoyi.order.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/10/10 11:40 |
| | | */ |
| | | @Data |
| | | public class ReplyEvaluationVO { |
| | | private Long id; |
| | | private String reply; |
| | | } |
| | |
| | | namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb |
| | | username: nacos |
| | | password: nacos |
| | | # ip: 192.168.110.85 |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.169:8848 |
| | |
| | | |
| | | </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 |
| | |
| | | |
| | | <select id="getPageList" resultType="com.ruoyi.order.dto.GetOrderEvaluatePageListDTO"> |
| | | select |
| | | CAST(a.id AS CHAR) as id, |
| | | a.id, |
| | | b.`code`, |
| | | a.mark, |
| | | b.site_id as siteId, |
| | |
| | | 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> |
| | |
| | | namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb |
| | | username: nacos |
| | | password: nacos |
| | | # ip: 192.168.110.85 |
| | | config: |
| | | # 配置中心地址 |
| | | server-addr: 192.168.110.169:8848 |
| | |
| | | |
| | | |
| | | |
| | | <select id="pageList" resultMap="BaseResultMap"> |
| | | <select id="pageList" resultType="com.ruoyi.other.api.domain.TEvaluationTag"> |
| | | select * from t_evaluation_tag where del_flag = 0 |
| | | <if test="null != name and '' != name"> |
| | | and name like CONCAT('%', #{name}, '%') |