| | |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "已充电百分比") |
| | | @TableField(exist = false) |
| | | private Integer soc; |
| | | |
| | | } |
| | |
| | | @NotNull(message = "地址纬度不能为空") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "城市code") |
| | | private String cityCode; |
| | | |
| | | } |
| | |
| | | private Integer fastFreeCount; |
| | | @ApiModelProperty(value = "慢充空闲数量") |
| | | private Integer slowFreeCount; |
| | | @ApiModelProperty(value = "原始电价") |
| | | private BigDecimal electrovalenceOriginal; |
| | | @ApiModelProperty(value = "服务费") |
| | | private BigDecimal serviceCharge; |
| | | @ApiModelProperty(value = "普通电价") |
| | | private BigDecimal electrovalence; |
| | | @ApiModelProperty(value = "会员电价") |
| | |
| | | @ApiModelProperty(value = "服务费折扣") |
| | | private BigDecimal serviceFeeDiscount; |
| | | |
| | | @ApiModelProperty(value = "折扣") |
| | | private BigDecimal discount; |
| | | |
| | | } |
| | |
| | | public R<List<TEvaluationTagVO>> getTagList(Integer type) { |
| | | return R.fail("获取标签列表:" + throwable.getMessage()); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R<List<TEvaluationTagVO>> getList() { |
| | | return R.fail("获取标签列表失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<List<TEvaluationTag>> getListByIds(List<Integer> tagIds) { |
| | | return R.fail("根据id集合获取数据失败:" + throwable.getMessage()); |
| | |
| | | */ |
| | | @PostMapping("/t-evaluation-tag/getTagList") |
| | | R<List<TEvaluationTagVO>> getTagList(Integer type); |
| | | |
| | | /** |
| | | * 获取标签列表 |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-evaluation-tag/getList") |
| | | R<List<TEvaluationTagVO>> getList(); |
| | | |
| | | |
| | | /** |
| | | * 根据id集合获取数据 |
| | |
| | | select |
| | | user_id AS userId, |
| | | nick_name AS nickName, |
| | | user_name AS userName, |
| | | create_time AS createTime, |
| | | remark AS remark |
| | | from sys_user |
| | |
| | | AND nick_name LIKE concat('%',#{query.nickName},'%') |
| | | </if> |
| | | AND del_flag = '0' |
| | | AND roleType = 1 |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | |
| | | import java.math.BigDecimal; |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "优惠卷可用数量", tags = {"小程序-站点管理-站点详情"}) |
| | | @GetMapping(value = "/couponCount") |
| | | public R<Long> couponCount() { |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | return R.ok(tAppCouponService.lambdaQuery().le(TAppCoupon::getStartTime, now).ge(TAppCoupon::getEndTime, now).eq(TAppCoupon::getStatus, 1).count()); |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | Long count = tAppCouponService.lambdaQuery().eq(TAppCoupon::getAppUserId, userId).ge(TAppCoupon::getEndTime, LocalDateTime.now()).eq(TAppCoupon::getStatus, 1).count(); |
| | | if(Objects.isNull(count)){ |
| | | count = 0L; |
| | | } |
| | | return R.ok(count); |
| | | } |
| | | |
| | | |
| | |
| | | siteDetailVO.setPartnerName(partner.getName()); |
| | | } |
| | | // 计算距离 |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(query.getLat() + "," + query.getLon(), siteDetailVO.getLat() + "," + siteDetailVO.getLon()); |
| | | siteDetailVO.setDistance(distance.get("WGS84")); |
| | | // Map<String, Double> distance = GeodesyUtil.getDistance(query.getLat() + "," + query.getLon(), siteDetailVO.getLat() + "," + siteDetailVO.getLon()); |
| | | // siteDetailVO.setDistance(distance.get("WGS84")); |
| | | // 查询绑定车牌提示文案 |
| | | TParkingLot parkingLot = parkingLotService.getOne(Wrappers.lambdaQuery(TParkingLot.class) |
| | | .eq(TParkingLot::getSiteId, query.getSiteId())); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通过站点id查询当前时间段计费策略展示 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-站点管理-站点详情"},value = "通过枪id查询当前时间段计费策略展示") |
| | | @GetMapping(value = "/queryStrategyByGunIdAndTime") |
| | | public AjaxResult<List<TAccountingStrategyDetailVO>> queryStrategyByGunIdAndTime(@RequestParam("gunId") Integer gunId) { |
| | | return AjaxResult.ok(accountingStrategyDetailService.queryStrategyByGunIdAndTime(gunId)); |
| | | } |
| | | |
| | | /** |
| | | * 价格说明金额返回,会员开通金额说明 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-站点管理-站点详情"},value = "价格说明金额返回,会员开通金额说明") |
| | |
| | | */ |
| | | Boolean isStrategyPriceConsistent(List<TAccountingStrategyDetail> accountingStrategyDetails); |
| | | |
| | | /** |
| | | * 通过枪id查询当前时间段计费策略展示 |
| | | * @param gunId |
| | | * @return |
| | | */ |
| | | List<TAccountingStrategyDetailVO> queryStrategyByGunIdAndTime(Integer gunId); |
| | | } |
| | |
| | | TVip vip = vipClient.getInfo1(appUser.getVipId()).getData(); |
| | | if(Objects.nonNull(vip) && vip.getType() == 2){ |
| | | list.forEach(item -> { |
| | | item.setVipElectrovalence(vip.getDiscount().multiply(item.getElectrovalence())); |
| | | item.setVipElectrovalence(vip.getDiscount().multiply(item.getServiceCharge()).add(item.getElectrovalenceOriginal())); |
| | | }); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.chargingPile.api.model.Site; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategy; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import com.ruoyi.chargingPile.api.vo.StrategyPriceVO; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyDetailVO; |
| | | import com.ruoyi.chargingPile.mapper.TAccountingStrategyDetailMapper; |
| | | import com.ruoyi.chargingPile.mapper.TAccountingStrategyMapper; |
| | | import com.ruoyi.chargingPile.service.ISiteService; |
| | | import com.ruoyi.chargingPile.service.TAccountingStrategyDetailService; |
| | | import com.ruoyi.chargingPile.service.TChargingGunService; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | |
| | | private TokenService tokenService; |
| | | @Autowired |
| | | private ISiteService siteService; |
| | | @Autowired |
| | | private TChargingGunService chargingGunService; |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | @Override |
| | |
| | | .findFirst().orElseThrow(() -> new ServiceException("未查询到下一时间段的计费策略明细")); |
| | | if(Objects.nonNull(vip)) { |
| | | if (vip.getType() == 2) { |
| | | accountingStrategyDetailVO.setTotalPrice(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge()).multiply(vip.getDiscount())); |
| | | accountingStrategyDetailNext.setTotalPrice(accountingStrategyDetailNext.getElectrovalence().add(accountingStrategyDetailNext.getServiceCharge()).multiply(vip.getDiscount())); |
| | | accountingStrategyDetailVO.setTotalPrice(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge().multiply(vip.getDiscount()))); |
| | | accountingStrategyDetailNext.setTotalPrice(accountingStrategyDetailNext.getElectrovalence().add(accountingStrategyDetailNext.getServiceCharge().multiply(vip.getDiscount()))); |
| | | } else { |
| | | accountingStrategyDetailVO.setTotalPrice(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge()).multiply(accountingStrategy.getDiscount())); |
| | | accountingStrategyDetailNext.setTotalPrice(accountingStrategyDetailNext.getElectrovalence().add(accountingStrategyDetailNext.getServiceCharge()).multiply(accountingStrategy.getDiscount())); |
| | | accountingStrategyDetailVO.setTotalPrice(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge().multiply(accountingStrategy.getDiscount()))); |
| | | accountingStrategyDetailNext.setTotalPrice(accountingStrategyDetailNext.getElectrovalence().add(accountingStrategyDetailNext.getServiceCharge().multiply(accountingStrategy.getDiscount()))); |
| | | } |
| | | }else { |
| | | accountingStrategyDetailVO.setTotalPrice(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge())); |
| | |
| | | TAccountingStrategyDetailVO accountingStrategyDetailVO = list.stream().filter(detail -> DateUtils.string2LocalTime(detail.getStartTime() + ":00").compareTo(LocalTime.now()) <= 0 |
| | | && DateUtils.string2LocalTime(detail.getEndTime() + ("23:59:59".equals(detail.getEndTime())?"":":00")).compareTo(LocalTime.now()) > 0) |
| | | .findFirst().orElseThrow(() -> new ServiceException("当前时间段未查询到计费策略明细")); |
| | | strategyPriceVO.setDiscountAmount(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge()) |
| | | // strategyPriceVO.setDiscountAmount(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge()) |
| | | // .subtract(accountingStrategyDetailVO.getServiceCharge().multiply(accountingStrategy.getDiscount())).setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | strategyPriceVO.setDiscountAmount(accountingStrategyDetailVO.getServiceCharge() |
| | | .subtract(accountingStrategyDetailVO.getServiceCharge().multiply(accountingStrategy.getDiscount())).setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | // 查询最高折扣的会员 |
| | | TVip monthlyCardDiscount = vipClient.getVipInfoByType(3).getData(); |
| | | strategyPriceVO.setServiceFeeDiscount(monthlyCardDiscount.getMonthlyCardDiscount()); |
| | | // 查询最高抵扣的会员 |
| | | TVip maximumDeduction = vipClient.getVipInfoByType(1).getData(); |
| | | strategyPriceVO.setMaxDiscountAmount(maximumDeduction.getMaximumDeduction()); |
| | | // 查询最低起步价会员 |
| | | TVip monthlyCard = vipClient.getVipInfoByType(2).getData(); |
| | | strategyPriceVO.setVipStartPrice(monthlyCard.getMonthlyCard()); |
| | | // 查询最高折扣的会员 |
| | | TVip monthlyCardDiscount = vipClient.getVipInfoByType(3).getData(); |
| | | strategyPriceVO.setServiceFeeDiscount(monthlyCardDiscount.getMonthlyCardDiscount()); |
| | | // 模板折扣 |
| | | strategyPriceVO.setDiscount(accountingStrategy.getDiscount()); |
| | | return strategyPriceVO; |
| | | } |
| | | |
| | |
| | | } |
| | | return true; // 所有相同阶段的服务费一致 |
| | | } |
| | | |
| | | @Override |
| | | public List<TAccountingStrategyDetailVO> queryStrategyByGunIdAndTime(Integer gunId) { |
| | | TChargingGun chargingGun = chargingGunService.getById(gunId); |
| | | TAccountingStrategy accountingStrategy = accountingStrategyMapper.selectById(chargingGun.getAccountingStrategyId()); |
| | | if(Objects.isNull(accountingStrategy)){ |
| | | throw new ServiceException("未查询到计费策略"); |
| | | } |
| | | List<TAccountingStrategyDetailVO> list = this.queryAccountingStrategyDetailByStrategyId(accountingStrategy.getId()); |
| | | list.stream().filter(item -> "00:00".equals(item.getEndTime())).forEach(item -> item.setEndTime("23:59:59")); |
| | | // 获取当前登录用户id |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | // 根据id查询用户信息 |
| | | TAppUser appUser = appUserClient.getUserById(userId).getData(); |
| | | if(Objects.nonNull(appUser)){ |
| | | // 查询会员信息 |
| | | TVip vip = vipClient.getInfo1(appUser.getVipId()).getData(); |
| | | TAccountingStrategyDetailVO accountingStrategyDetailVO; |
| | | TAccountingStrategyDetailVO accountingStrategyDetailNext; |
| | | // 获取当前时间段的计费策略明细 |
| | | accountingStrategyDetailVO = list.stream().filter(detail -> DateUtils.string2LocalTime(detail.getStartTime() + ":00").compareTo(LocalTime.now()) <= 0 |
| | | && DateUtils.string2LocalTime(detail.getEndTime() + ("23:59:59".equals(detail.getEndTime())?"":":00")).compareTo(LocalTime.now()) > 0) |
| | | .findFirst().orElseThrow(() -> new ServiceException("当前时间段未查询到计费策略明细")); |
| | | // 获取后一次的计费策略明细 |
| | | accountingStrategyDetailVO.setEndTime("23:59:59".equals(accountingStrategyDetailVO.getEndTime())? "00:00":accountingStrategyDetailVO.getEndTime()); |
| | | accountingStrategyDetailNext = list.stream().filter(detail -> detail.getStartTime().compareTo(accountingStrategyDetailVO.getEndTime()) == 0) |
| | | .findFirst().orElseThrow(() -> new ServiceException("未查询到下一时间段的计费策略明细")); |
| | | if(Objects.nonNull(vip)) { |
| | | if (vip.getType() == 2) { |
| | | accountingStrategyDetailVO.setTotalPrice(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge().multiply(vip.getDiscount()))); |
| | | accountingStrategyDetailNext.setTotalPrice(accountingStrategyDetailNext.getElectrovalence().add(accountingStrategyDetailNext.getServiceCharge().multiply(vip.getDiscount()))); |
| | | } else { |
| | | accountingStrategyDetailVO.setTotalPrice(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge().multiply(accountingStrategy.getDiscount()))); |
| | | accountingStrategyDetailNext.setTotalPrice(accountingStrategyDetailNext.getElectrovalence().add(accountingStrategyDetailNext.getServiceCharge().multiply(accountingStrategy.getDiscount()))); |
| | | } |
| | | }else { |
| | | accountingStrategyDetailVO.setTotalPrice(accountingStrategyDetailVO.getElectrovalence().add(accountingStrategyDetailVO.getServiceCharge())); |
| | | accountingStrategyDetailNext.setTotalPrice(accountingStrategyDetailNext.getElectrovalence().add(accountingStrategyDetailNext.getServiceCharge())); |
| | | } |
| | | list = new ArrayList<>(); |
| | | list.add(accountingStrategyDetailVO); |
| | | list.add(accountingStrategyDetailNext); |
| | | return list; |
| | | } |
| | | return new ArrayList<>(); |
| | | } |
| | | } |
| | |
| | | List<TChargingGun> chargingGuns = chargingGunService.list(wrapper); |
| | | // 查询充电枪信息 |
| | | chargingPileVOS.forEach(item -> { |
| | | item.setChargingGunList(chargingGuns.stream().filter(gun -> gun.getChargingPileId().equals(item.getId())).collect(Collectors.toList())); |
| | | List<TChargingGun> chargingGunList = chargingGuns.stream().filter(gun -> gun.getChargingPileId().equals(item.getId())).collect(Collectors.toList()); |
| | | for (TChargingGun chargingGun : chargingGunList) { |
| | | if(chargingGun.getStatus().equals(4)){ |
| | | // TODO 查询正在充电的单子的实时记录 |
| | | chargingGun.setSoc(100); |
| | | } |
| | | if(chargingGun.getStatus().equals(5)){ |
| | | chargingGun.setSoc(100); |
| | | } |
| | | } |
| | | item.setChargingGunList(chargingGunList); |
| | | }); |
| | | return chargingPileVOS; |
| | | } |
| | |
| | | ts.id, ts.partner_id, ts.code, ts.`name`, ts.site_type, ts.business_category, ts.status, ts.construction_site, ts.img_url, |
| | | ts.lon, ts.lat, ts.address, ts.country_code, ts.phone,ts.guide, ts.service_description, ts.vehicle_description, |
| | | ts.parking_space, ts.rate_description, ts.space_charge_explain, ts.accounting_strategy_id,ts.del_flag,tcg.fastCount, |
| | | tcg.slowCount,tcg.superCount,tasd.electrovalence,tasd.vipElectrovalence,tcg.superFreeCount,tcg.fastFreeCount,tcg.slowFreeCount, |
| | | tcg.slowCount,tcg.superCount,tasd.electrovalence,tasd.vipElectrovalence,tasd.serviceCharge,tasd.electrovalenceOriginal,tcg.superFreeCount,tcg.fastFreeCount,tcg.slowFreeCount, |
| | | ROUND( |
| | | 6378.138 * 2 * ASIN( |
| | | SQRT( |
| | |
| | | left join ( |
| | | select |
| | | a.accounting_strategy_id, |
| | | 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*b.discount)) AS vipElectrovalence |
| | | from |
| | | t_accounting_strategy_detail a |
| | | left join |
| | |
| | | <where> |
| | | <if test="null != query.name and '' != query.name"> |
| | | and ts.`name` like CONCAT('%', #{query.name}, '%') |
| | | </if> |
| | | <if test="null != query.cityCode and '' != query.cityCode"> |
| | | and ts.cityCode = #{query.cityCode} |
| | | </if> |
| | | AND ts.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | AND ts.status = ${@com.ruoyi.common.core.enums.status.SiteStatusEnum@NORMAL_USE.getCode()} |
| | |
| | | </if> |
| | | </select> |
| | | <select id="getDetailById" resultType="com.ruoyi.chargingPile.api.vo.SiteDetailVO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | | SELECT id, partner_id, code, `name`, site_type, business_category, status, construction_site, img_url, province, province_code, |
| | | city, city_code, districts, districts_code, lon, lat, address, country_code, phone, service_phone, guide, start_service_time, |
| | | end_service_time, service_description, vehicle_description, parking_space, rate_description, space_charge_explain, |
| | | accounting_strategy_id, establishment_time, sort, remark, create_time, del_flag, mark, |
| | | ROUND( |
| | | 6378.138 * 2 * ASIN( |
| | | SQRT( |
| | | POW( |
| | | SIN( |
| | | ( |
| | | #{query.lat} * PI() / 180 - ts.lat * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) + COS(#{query.lat} * PI() / 180) * COS(ts.lat * PI() / 180) * POW( |
| | | SIN( |
| | | ( |
| | | #{query.lon} * PI() / 180 - ts.lon * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) |
| | | ) |
| | | ) * 1000 |
| | | ) AS distance |
| | | FROM t_site WHERE id = #{siteId} AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </select> |
| | | <select id="getSiteListParkLot" resultType="com.ruoyi.chargingPile.api.model.Site"> |
| | |
| | | <if test="null != query.name and '' != query.name"> |
| | | and ts.`name` like CONCAT('%', #{query.name}, '%') |
| | | </if> |
| | | <if test="null != query.cityCode and '' != query.cityCode"> |
| | | and ts.cityCode = #{query.cityCode} |
| | | </if> |
| | | AND ts.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | AND ts.status = ${@com.ruoyi.common.core.enums.status.SiteStatusEnum@NORMAL_USE.getCode()} |
| | | </where> |
| | |
| | | throw new RuntimeException(failure_cause); |
| | | } |
| | | |
| | | // 将枪状态重置为空闲 |
| | | chargingGun.setStatus(2); |
| | | chargingGunClient.updateChargingGunById(chargingGun); |
| | | //计算费用,处理退款 |
| | | endCharge(chargingOrder); |
| | | break; |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | PageInfo<TOrderAppealVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TOrderAppealVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | List<Long> orderIds = list.stream().map(TOrderAppealVO::getOrderId).collect(Collectors.toList()); |
| | | // 查询当前页的订单 |
| | | List<TChargingOrder> chargingOrders = chargingOrderMapper.selectList(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | .in(TChargingOrder::getId, orderIds)); |
| | | List<TShoppingOrder> shoppingOrders = shoppingOrderMapper.selectList(Wrappers.lambdaQuery(TShoppingOrder.class) |
| | | .in(TShoppingOrder::getId, orderIds)); |
| | | list.forEach(item -> { |
| | | if (item.getOrderType() == 1) { |
| | | TChargingOrder tChargingOrder = chargingOrders.stream().filter(chargingOrder -> chargingOrder.getId().equals(item.getOrderId())).findFirst().orElse(null); |
| | | if(Objects.nonNull(tChargingOrder)){ |
| | | item.setChargingOrder(tChargingOrder); |
| | | SiteNameVO siteNameVO = chargingGunClient.getAllInfoById(tChargingOrder.getChargingGunId()).getData(); |
| | | item.setGunName(siteNameVO.getGunName()); |
| | | item.setGunNumber(siteNameVO.getGunNumber()); |
| | | item.setPileName(siteNameVO.getPileName()); |
| | | item.setPileNumber(siteNameVO.getPileNumber()); |
| | | item.setSiteName(siteNameVO.getSiteName()); |
| | | item.setEndMode(tChargingOrder.getEndMode()); |
| | | if(!CollectionUtils.isEmpty(orderIds)){ |
| | | // 查询当前页的订单 |
| | | List<TChargingOrder> chargingOrders = chargingOrderMapper.selectList(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | .in(TChargingOrder::getId, orderIds)); |
| | | List<TShoppingOrder> shoppingOrders = shoppingOrderMapper.selectList(Wrappers.lambdaQuery(TShoppingOrder.class) |
| | | .in(TShoppingOrder::getId, orderIds)); |
| | | list.forEach(item -> { |
| | | if (item.getOrderType() == 1) { |
| | | TChargingOrder tChargingOrder = chargingOrders.stream().filter(chargingOrder -> chargingOrder.getId().equals(item.getOrderId())).findFirst().orElse(null); |
| | | if(Objects.nonNull(tChargingOrder)){ |
| | | item.setChargingOrder(tChargingOrder); |
| | | SiteNameVO siteNameVO = chargingGunClient.getAllInfoById(tChargingOrder.getChargingGunId()).getData(); |
| | | item.setGunName(siteNameVO.getGunName()); |
| | | item.setGunNumber(siteNameVO.getGunNumber()); |
| | | item.setPileName(siteNameVO.getPileName()); |
| | | item.setPileNumber(siteNameVO.getPileNumber()); |
| | | item.setSiteName(siteNameVO.getSiteName()); |
| | | item.setEndMode(tChargingOrder.getEndMode()); |
| | | } |
| | | }else if (item.getOrderType() == 2) { |
| | | TShoppingOrder tShoppingOrder = shoppingOrders.stream().filter(shoppingOrder -> shoppingOrder.getId().equals(item.getOrderId())).findFirst().orElse(null); |
| | | setGoodsInfo(item,tShoppingOrder); |
| | | } |
| | | }else if (item.getOrderType() == 2) { |
| | | TShoppingOrder tShoppingOrder = shoppingOrders.stream().filter(shoppingOrder -> shoppingOrder.getId().equals(item.getOrderId())).findFirst().orElse(null); |
| | | setGoodsInfo(item,tShoppingOrder); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | list.forEach(e->e.setUid(e.getId().toString())); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | |
| | | @Override |
| | | public List<TEvaluationTagVO> getTagCount() { |
| | | // 查询标签列表 |
| | | R<List<TEvaluationTagVO>> r = evaluationTagClient.getTagList(null); |
| | | R<List<TEvaluationTagVO>> r = evaluationTagClient.getList(); |
| | | List<TEvaluationTagVO> tagList = r.getData(); |
| | | List<Integer> tagIds = tagList.stream().map(TEvaluationTagVO::getId).collect(Collectors.toList()); |
| | | // 统计标签使用数量 |
| | |
| | | public R<List<TEvaluationTagVO>> getTagList(@RequestParam("type") Integer type) { |
| | | return R.ok(evaluationTagService.getTagList(type)); |
| | | } |
| | | |
| | | @GetMapping("/getList") |
| | | public R<List<TEvaluationTagVO>> getList() { |
| | | return R.ok(evaluationTagService.getList()); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | * @return |
| | | */ |
| | | List<TEvaluationTag> pageList(PageInfo<TEvaluationTag> pageInfo, @Param("name") String name); |
| | | |
| | | /** |
| | | * 获取列表数据 |
| | | * @return |
| | | */ |
| | | List<TEvaluationTagVO> getList(); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TEvaluationTag> pageList(String name, BasePage basePage); |
| | | /** |
| | | * 查询标签列表 |
| | | * @return |
| | | */ |
| | | List<TEvaluationTagVO> getList(); |
| | | |
| | | } |
| | |
| | | List<TEvaluationTag> list = this.baseMapper.pageList(pageInfo, name); |
| | | return pageInfo.setRecords(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<TEvaluationTagVO> getList() { |
| | | return this.baseMapper.getList(); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | order by create_time desc |
| | | </select> |
| | | <select id="getList" resultType="com.ruoyi.other.api.vo.TEvaluationTagVO"> |
| | | select <include refid="Base_Column_List"></include> |
| | | from t_evaluation_tag where del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </select> |
| | | </mapper> |