mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
Merge branch 'dev-new' into dev-new-rabbitmq
# Conflicts: # jsowell-admin/src/test/java/SpringBootTestController.java # jsowell-pile/src/main/java/com/jsowell/pile/service/OrderBasicInfoService.java # jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
package com.jsowell.adapay.common;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.jsowell.adapay.response.AdapayBaseResponse;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支付确认对象
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class PaymentConfirmInfo extends AdapayBaseResponse {
|
||||
/**
|
||||
* 返参,必填,由AdaPay生成的支付对象 ID
|
||||
*/
|
||||
@JSONField(name = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 返参,必填,支付创建时的时间戳
|
||||
*/
|
||||
@JSONField(name = "created_time")
|
||||
private String createdTime;
|
||||
|
||||
/**
|
||||
* 必填,订单号
|
||||
*/
|
||||
@JSONField(name = "order_no")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 商户发起支付的应用id,不同的前端应用将无法使用该 Payment 对象完成支付
|
||||
*/
|
||||
@JSONField(name = "app_id")
|
||||
private String appId;
|
||||
|
||||
@JSONField(name = "confirm_amt")
|
||||
private String confirmAmt;
|
||||
|
||||
@JSONField(name = "confirmed_amt")
|
||||
private String confirmedAmt;
|
||||
|
||||
@JSONField(name = "fee_mode")
|
||||
private String feeMode;
|
||||
|
||||
private String description;
|
||||
|
||||
@JSONField(name = "reserved_amt")
|
||||
private String reservedAmt;
|
||||
|
||||
@JSONField(name = "refunded_amt")
|
||||
private String refundedAmt;
|
||||
|
||||
@JSONField(name = "fee_amt")
|
||||
private String feeAmt;
|
||||
|
||||
@JSONField(name = "error_msg")
|
||||
private String errorMsg;
|
||||
|
||||
@JSONField(name = "div_members")
|
||||
private List<DivMember> divMembers;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.jsowell.adapay.response;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.jsowell.adapay.common.PaymentConfirmInfo;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,12 +10,12 @@ import java.util.List;
|
||||
* 查询支付确认对象详情反参
|
||||
*/
|
||||
@Data
|
||||
public class QueryPaymentConfirmDetailResponse extends AdapayBaseResponse{
|
||||
public class QueryPaymentConfirmDetailResponse extends AdapayBaseResponse {
|
||||
@JSONField(name = "payment_id")
|
||||
private String paymentId;
|
||||
|
||||
@JSONField(name = "prod_mode")
|
||||
private String prodMode;
|
||||
// @JSONField(name = "prod_mode")
|
||||
// private String prodMode;
|
||||
|
||||
@JSONField(name = "payment_confirms")
|
||||
private List<PaymentConfirmInfo> paymentConfirms;
|
||||
@@ -29,53 +28,4 @@ public class QueryPaymentConfirmDetailResponse extends AdapayBaseResponse{
|
||||
|
||||
@JSONField(name = "object")
|
||||
private String object;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class PaymentConfirmInfo{
|
||||
/**
|
||||
* 返参,必填,由AdaPay生成的支付对象 ID
|
||||
*/
|
||||
@JSONField(name = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 返参,必填,支付创建时的时间戳
|
||||
*/
|
||||
@JSONField(name = "created_time")
|
||||
private String createdTime;
|
||||
|
||||
/**
|
||||
* 必填,订单号
|
||||
*/
|
||||
@JSONField(name = "order_no")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 商户发起支付的应用id,不同的前端应用将无法使用该 Payment 对象完成支付
|
||||
*/
|
||||
@JSONField(name = "app_id")
|
||||
private String appId;
|
||||
|
||||
@JSONField(name = "confirm_amt")
|
||||
private String confirmAmt;
|
||||
|
||||
@JSONField(name = "confirmed_amt")
|
||||
private String confirmedAmt;
|
||||
|
||||
@JSONField(name = "fee_mode")
|
||||
private String feeMode;
|
||||
|
||||
private String description;
|
||||
|
||||
@JSONField(name = "reserved_amt")
|
||||
private String reservedAmt;
|
||||
|
||||
@JSONField(name = "refunded_amt")
|
||||
private String refundedAmt;
|
||||
|
||||
@JSONField(name = "fee_amt")
|
||||
private String feeAmt;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,10 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.huifu.adapay.model.CorpMember;
|
||||
import com.huifu.adapay.model.SettleAccount;
|
||||
import com.huifu.adapay.model.*;
|
||||
import com.jsowell.adapay.common.AdaPayment;
|
||||
import com.jsowell.adapay.common.CreateAdaPaymentParam;
|
||||
import com.jsowell.adapay.common.DivMember;
|
||||
import com.jsowell.adapay.common.RefundInfo;
|
||||
import com.jsowell.adapay.common.*;
|
||||
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
||||
import com.jsowell.adapay.dto.*;
|
||||
import com.jsowell.adapay.factory.AdapayConfigFactory;
|
||||
@@ -51,7 +50,10 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -1236,11 +1238,11 @@ public class AdapayService {
|
||||
QueryPaymentConfirmDetailResponse response = null;
|
||||
// 查缓存
|
||||
String redisKey = CacheConstants.PAYMENT_CONFIRM_LIST + dto.getPaymentId();
|
||||
String redisResult = redisCache.getCacheObject(redisKey);
|
||||
if (StringUtils.isNotBlank(redisResult)) {
|
||||
response = JSONObject.parseObject(redisResult, QueryPaymentConfirmDetailResponse.class);
|
||||
return response;
|
||||
}
|
||||
// String redisResult = redisCache.getCacheObject(redisKey);
|
||||
// if (StringUtils.isNotBlank(redisResult)) {
|
||||
// response = JSONObject.parseObject(redisResult, QueryPaymentConfirmDetailResponse.class);
|
||||
// return response;
|
||||
// }
|
||||
|
||||
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(dto.getWechatAppId());
|
||||
if (config == null) {
|
||||
@@ -1254,7 +1256,7 @@ public class AdapayService {
|
||||
Map<String, Object> map = PaymentConfirm.queryList(param, config.getWechatAppId());
|
||||
response = JSON.parseObject(JSON.toJSONString(map), QueryPaymentConfirmDetailResponse.class);
|
||||
// log.info("queryPaymentConfirmDetailResponse:{}", JSON.toJSONString(queryPaymentConfirmDetailResponse));
|
||||
redisCache.setCacheObject(redisKey, JSON.toJSONString(response), CacheConstants.cache_expire_time_12h);
|
||||
redisCache.setCacheObject(redisKey, JSON.toJSONString(response), CacheConstants.cache_expire_time_10m);
|
||||
} catch (BaseAdaPayException e) {
|
||||
log.error("查询支付确认对象列表error", e);
|
||||
}
|
||||
@@ -1264,7 +1266,7 @@ public class AdapayService {
|
||||
/**
|
||||
* 查询支付确认对象详情
|
||||
*/
|
||||
public QueryPaymentConfirmDetailResponse.PaymentConfirmInfo queryPaymentConfirmDetail(QueryPaymentConfirmDTO dto) {
|
||||
public PaymentConfirmInfo queryPaymentConfirmDetail(QueryPaymentConfirmDTO dto) {
|
||||
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(dto.getWechatAppId());
|
||||
if (config == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_CONFIG_IS_NULL_ERROR);
|
||||
@@ -1272,10 +1274,11 @@ public class AdapayService {
|
||||
Map<String, Object> confirmParams = Maps.newHashMap();
|
||||
confirmParams.put("payment_confirm_id", dto.getPaymentConfirmId());
|
||||
|
||||
QueryPaymentConfirmDetailResponse.PaymentConfirmInfo result = null;
|
||||
PaymentConfirmInfo result = null;
|
||||
try {
|
||||
Map<String, Object> paymentConfirm = PaymentConfirm.query(confirmParams, config.getWechatAppId());
|
||||
result = JSON.parseObject(JSON.toJSONString(paymentConfirm), QueryPaymentConfirmDetailResponse.PaymentConfirmInfo.class);
|
||||
log.info("查询支付确认对象详情:{}", JSON.toJSONString(paymentConfirm));
|
||||
result = JSON.parseObject(JSON.toJSONString(paymentConfirm), PaymentConfirmInfo.class);
|
||||
} catch (BaseAdaPayException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import com.jsowell.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 中国行政地区对象 area_code_info
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-12-20
|
||||
*/
|
||||
public class AreaCodeInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
@Excel(name = "层级")
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 父级行政代码
|
||||
*/
|
||||
@Excel(name = "父级行政代码")
|
||||
private Long parentCode;
|
||||
|
||||
/**
|
||||
* 行政代码
|
||||
*/
|
||||
@Excel(name = "行政代码")
|
||||
private Long areaCode;
|
||||
|
||||
/**
|
||||
* 邮政编码
|
||||
*/
|
||||
@Excel(name = "邮政编码")
|
||||
private Integer zipCode;
|
||||
|
||||
/**
|
||||
* 区号
|
||||
*/
|
||||
@Excel(name = "区号")
|
||||
private String cityCode;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 简称
|
||||
*/
|
||||
@Excel(name = "简称")
|
||||
private String shortName;
|
||||
|
||||
/**
|
||||
* 组合名
|
||||
*/
|
||||
@Excel(name = "组合名")
|
||||
private String mergerName;
|
||||
|
||||
/**
|
||||
* 拼音
|
||||
*/
|
||||
@Excel(name = "拼音")
|
||||
private String pinyin;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Excel(name = "经度")
|
||||
private BigDecimal lng;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Excel(name = "纬度")
|
||||
private BigDecimal lat;
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setParentCode(Long parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public Long getParentCode() {
|
||||
return parentCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(Long areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public Long getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setZipCode(Integer zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
||||
public Integer getZipCode() {
|
||||
return zipCode;
|
||||
}
|
||||
|
||||
public void setCityCode(String cityCode) {
|
||||
this.cityCode = cityCode;
|
||||
}
|
||||
|
||||
public String getCityCode() {
|
||||
return cityCode;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setShortName(String shortName) {
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public void setMergerName(String mergerName) {
|
||||
this.mergerName = mergerName;
|
||||
}
|
||||
|
||||
public String getMergerName() {
|
||||
return mergerName;
|
||||
}
|
||||
|
||||
public void setPinyin(String pinyin) {
|
||||
this.pinyin = pinyin;
|
||||
}
|
||||
|
||||
public String getPinyin() {
|
||||
return pinyin;
|
||||
}
|
||||
|
||||
public void setLng(BigDecimal lng) {
|
||||
this.lng = lng;
|
||||
}
|
||||
|
||||
public BigDecimal getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public void setLat(BigDecimal lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public BigDecimal getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||
.append("id", getId())
|
||||
.append("level", getLevel())
|
||||
.append("parentCode", getParentCode())
|
||||
.append("areaCode", getAreaCode())
|
||||
.append("zipCode", getZipCode())
|
||||
.append("cityCode", getCityCode())
|
||||
.append("name", getName())
|
||||
.append("shortName", getShortName())
|
||||
.append("mergerName", getMergerName())
|
||||
.append("pinyin", getPinyin())
|
||||
.append("lng", getLng())
|
||||
.append("lat", getLat())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* 占桩订单DTO
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2024/7/15 13:37:04
|
||||
@@ -47,6 +47,11 @@ public class OrderPileOccupyDTO extends BaseEntity {
|
||||
*/
|
||||
private String stationId;
|
||||
|
||||
/**
|
||||
* 站点名称
|
||||
*/
|
||||
private String stationName;
|
||||
|
||||
/**
|
||||
* 车牌号码
|
||||
*/
|
||||
|
||||
@@ -75,4 +75,28 @@ public class QueryStartChargeDTO {
|
||||
* 支付方式(1-余额支付;3-白名单支付;4-微信支付;5-支付宝支付)
|
||||
*/
|
||||
private String payMode;
|
||||
|
||||
/**
|
||||
* 查询页码
|
||||
*/
|
||||
@JsonProperty(value = "PageNo")
|
||||
private Integer pageNo;
|
||||
|
||||
/**
|
||||
* 每页数量
|
||||
*/
|
||||
@JsonProperty(value = "PageSize")
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
* 上次查询时间
|
||||
*/
|
||||
@JsonProperty(value = "LastQueryTime")
|
||||
private String lastQueryTime;
|
||||
|
||||
/**
|
||||
* 上次查询结束时间
|
||||
*/
|
||||
@JsonProperty(value = "LastQueryEndTime")
|
||||
private String lastQueryEndTime;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,12 @@ public class QueryStationInfoDTO {
|
||||
@JsonProperty(value = "StationIDs")
|
||||
private List<String> stationIds;
|
||||
|
||||
/**
|
||||
* 更多标志
|
||||
*/
|
||||
@JsonProperty(value = "MoreFlag")
|
||||
private Integer moreFlag;
|
||||
|
||||
|
||||
private String address;
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.AreaCodeInfo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 中国行政地区Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-12-20
|
||||
*/
|
||||
@Repository
|
||||
public interface AreaCodeInfoMapper {
|
||||
/**
|
||||
* 查询中国行政地区
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 中国行政地区
|
||||
*/
|
||||
public AreaCodeInfo selectAreaCodeInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询中国行政地区列表
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 中国行政地区集合
|
||||
*/
|
||||
public List<AreaCodeInfo> selectAreaCodeInfoList(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 新增中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAreaCodeInfo(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 修改中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAreaCodeInfo(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 删除中国行政地区
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAreaCodeInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除中国行政地区
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAreaCodeInfoByIds(Integer[] ids);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.alipay.api.domain.ChargeOrderInfo;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderDetail;
|
||||
import com.jsowell.pile.dto.*;
|
||||
@@ -394,4 +395,11 @@ public interface OrderBasicInfoMapper {
|
||||
|
||||
|
||||
List<String> tempGetOrderCodes(QueryOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 查询第三方平台订单列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<OrderVO> selectThirdPartyOrderList(@Param("dto") QueryStartChargeDTO dto);
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.jsowell.pile.domain.PileBasicInfo;
|
||||
import com.jsowell.pile.dto.IndexQueryDTO;
|
||||
import com.jsowell.pile.dto.QueryPileDTO;
|
||||
import com.jsowell.pile.dto.ReplaceMerchantStationDTO;
|
||||
import com.jsowell.pile.thirdparty.PileDetailInfoVO;
|
||||
import com.jsowell.pile.vo.base.PileInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.PersonalPileInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.PileConnectorDetailVO;
|
||||
@@ -169,4 +170,11 @@ public interface PileBasicInfoMapper {
|
||||
* @return
|
||||
*/
|
||||
PileBasicInfo getMaxNumPileInfo();
|
||||
|
||||
/**
|
||||
* 获取桩信息详情列表
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
List<PileDetailInfoVO> getPileDetailInfoList(String stationId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.AreaCodeInfo;
|
||||
|
||||
/**
|
||||
* 中国行政地区Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-12-20
|
||||
*/
|
||||
public interface IAreaCodeInfoService {
|
||||
/**
|
||||
* 查询中国行政地区
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 中国行政地区
|
||||
*/
|
||||
public AreaCodeInfo selectAreaCodeInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询中国行政地区列表
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 中国行政地区集合
|
||||
*/
|
||||
public List<AreaCodeInfo> selectAreaCodeInfoList(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 新增中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAreaCodeInfo(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 修改中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAreaCodeInfo(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 批量删除中国行政地区
|
||||
*
|
||||
* @param ids 需要删除的中国行政地区主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAreaCodeInfoByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除中国行政地区信息
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAreaCodeInfoById(Integer id);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.alipay.api.domain.ChargeOrderInfo;
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.jsowell.adapay.common.DivMember;
|
||||
import com.jsowell.adapay.response.PaymentReverseResponse;
|
||||
@@ -208,6 +209,8 @@ public interface OrderBasicInfoService{
|
||||
|
||||
List<DivMember> calculationOfSplitAmount(List<StationSplitConfig> stationSplitConfigList, AfterSettleOrderDTO afterSettleOrderDTO, List<PaymentInfo> paymentInfos);
|
||||
|
||||
OrderSplitResult verifyOrderConfirmAmount(List<String> paymentIds, String orderCode, BigDecimal settleAmount, String wechatAppId) throws BaseAdaPayException;
|
||||
|
||||
/**
|
||||
* 批量查询订单
|
||||
* @param orderCodeList
|
||||
@@ -479,6 +482,12 @@ public interface OrderBasicInfoService{
|
||||
*/
|
||||
void createReservationOrder(ReservationChargingStartupResult chargingStartupResult);
|
||||
|
||||
/**
|
||||
* 查询第三方平台订单列表
|
||||
* @param dto
|
||||
*/
|
||||
List<OrderVO> selectThirdPartyOrderList(QueryStartChargeDTO dto);
|
||||
|
||||
|
||||
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 后管小程序 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
||||
/**
|
||||
|
||||
@@ -6,10 +6,7 @@ import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.pile.domain.PileBasicInfo;
|
||||
import com.jsowell.pile.domain.ebike.deviceupload.EBikeMessageCmd20;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.thirdparty.ConnectorInfo;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
import com.jsowell.pile.thirdparty.ZDLConnectorInfo;
|
||||
import com.jsowell.pile.thirdparty.ZDLEquipmentInfo;
|
||||
import com.jsowell.pile.thirdparty.*;
|
||||
import com.jsowell.pile.vo.base.PileInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.PersonalPileInfoVO;
|
||||
@@ -252,4 +249,6 @@ public interface PileBasicInfoService {
|
||||
* @param message
|
||||
*/
|
||||
void registrationEBikePile(EBikeMessageCmd20 message);
|
||||
|
||||
List<PileDetailInfoVO> getPileDetailInfoList(String stationId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.AreaCodeInfoMapper;
|
||||
import com.jsowell.pile.domain.AreaCodeInfo;
|
||||
import com.jsowell.pile.service.IAreaCodeInfoService;
|
||||
|
||||
/**
|
||||
* 中国行政地区Service业务层处理
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-12-20
|
||||
*/
|
||||
@Service
|
||||
public class AreaCodeInfoServiceImpl implements IAreaCodeInfoService {
|
||||
@Autowired
|
||||
private AreaCodeInfoMapper areaCodeInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询中国行政地区
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 中国行政地区
|
||||
*/
|
||||
@Override
|
||||
public AreaCodeInfo selectAreaCodeInfoById(Integer id) {
|
||||
return areaCodeInfoMapper.selectAreaCodeInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询中国行政地区列表
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 中国行政地区
|
||||
*/
|
||||
@Override
|
||||
public List<AreaCodeInfo> selectAreaCodeInfoList(AreaCodeInfo areaCodeInfo) {
|
||||
return areaCodeInfoMapper.selectAreaCodeInfoList(areaCodeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAreaCodeInfo(AreaCodeInfo areaCodeInfo) {
|
||||
return areaCodeInfoMapper.insertAreaCodeInfo(areaCodeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAreaCodeInfo(AreaCodeInfo areaCodeInfo) {
|
||||
return areaCodeInfoMapper.updateAreaCodeInfo(areaCodeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除中国行政地区
|
||||
*
|
||||
* @param ids 需要删除的中国行政地区主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAreaCodeInfoByIds(Integer[] ids) {
|
||||
return areaCodeInfoMapper.deleteAreaCodeInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除中国行政地区信息
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAreaCodeInfoById(Integer id) {
|
||||
return areaCodeInfoMapper.deleteAreaCodeInfoById(id);
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,14 @@ package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alipay.api.domain.ChargeOrderInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.jsowell.adapay.common.DivMember;
|
||||
import com.jsowell.adapay.dto.PaymentConfirmParam;
|
||||
import com.jsowell.adapay.common.PaymentConfirmInfo;
|
||||
import com.jsowell.adapay.dto.QueryConfirmReverseDTO;
|
||||
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
||||
import com.jsowell.adapay.operation.PaymentReverseOperation;
|
||||
@@ -312,6 +314,20 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
String label = ThirdPlatformTypeEnum.getTypeLabelByTypeCode(thirdPartyType);
|
||||
orderListVO.setThirdPartyType(label + "启动");
|
||||
}
|
||||
|
||||
// 设置soc
|
||||
if (StringUtils.isNotBlank(orderListVO.getStartSoc()) || StringUtils.isNotBlank(orderListVO.getEndSoc())) {
|
||||
// 取redis中的soc数据
|
||||
Map<String, String> socMap = YKCUtils.getSOCMap(orderListVO.getTransactionCode());
|
||||
if (Objects.nonNull(socMap)) {
|
||||
if (StringUtils.isBlank(orderListVO.getStartSoc())) {
|
||||
orderListVO.setStartSoc(socMap.get("startSoc"));
|
||||
}
|
||||
if (StringUtils.isBlank(orderListVO.getEndSoc())) {
|
||||
orderListVO.setEndSoc(socMap.get("endSoc"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
batchQueryFeeAmt(orderListVOS);
|
||||
@@ -1871,7 +1887,8 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
* @param orderCode 订单编号
|
||||
* @param settleAmount 结算金额
|
||||
*/
|
||||
private OrderSplitResult verifyOrderConfirmAmount(List<String> paymentIds, String orderCode, BigDecimal settleAmount, String wechatAppId) throws BaseAdaPayException {
|
||||
@Override
|
||||
public OrderSplitResult verifyOrderConfirmAmount(List<String> paymentIds, String orderCode, BigDecimal settleAmount, String wechatAppId) throws BaseAdaPayException {
|
||||
// 分账金额
|
||||
BigDecimal totalConfirmAmt = BigDecimal.ZERO;
|
||||
// 手续费
|
||||
@@ -1883,9 +1900,9 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
dto.setWechatAppId(wechatAppId);
|
||||
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
||||
if (response != null) {
|
||||
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> confirms = response.getPaymentConfirms();
|
||||
List<PaymentConfirmInfo> confirms = response.getPaymentConfirms();
|
||||
if (CollectionUtils.isNotEmpty(confirms)) {
|
||||
for (QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirm : confirms) {
|
||||
for (PaymentConfirmInfo confirm : confirms) {
|
||||
// 校验分账是否撤销
|
||||
if (queryConfirmReverseStatus(confirm.getId(), wechatAppId)) {
|
||||
logger.info("支付确认id:" + confirm.getId() + "撤销了。。。");
|
||||
@@ -2204,6 +2221,8 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
orderBasicInfo.setChargeStartTime(DateUtils.parseDate(data.getStartTime()));
|
||||
// 充电结束时间
|
||||
orderBasicInfo.setChargeEndTime(DateUtils.parseDate(data.getEndTime()));
|
||||
// 停止原因码
|
||||
orderBasicInfo.setStopReasonCode("0x" + data.getStopReasonCode());
|
||||
// 停止原因
|
||||
orderBasicInfo.setReason(data.getStopReasonMsg());
|
||||
// 结算时间
|
||||
@@ -2890,7 +2909,18 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
*/
|
||||
@Override
|
||||
public List<AccumulativeInfoVO> getAccumulativeInfoForLianLian(QueryStationInfoDTO dto) {
|
||||
return orderBasicInfoMapper.getAccumulativeInfoForLianLian(dto);
|
||||
List<AccumulativeInfoVO> accumulativeInfoList = orderBasicInfoMapper.getAccumulativeInfoForLianLian(dto);
|
||||
for (AccumulativeInfoVO accumulativeInfoVO : accumulativeInfoList) {
|
||||
String startTime = accumulativeInfoVO.getStartTime();
|
||||
String endTime = accumulativeInfoVO.getEndTime();
|
||||
if (startTime == null || endTime == null) {
|
||||
continue;
|
||||
}
|
||||
// 计算充电时长
|
||||
int chargingTime = Integer.parseInt(String.valueOf(DateUtils.intervalTime(startTime, endTime))) * 60;
|
||||
accumulativeInfoVO.setChargingTime(String.valueOf(chargingTime));
|
||||
}
|
||||
return accumulativeInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3669,7 +3699,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
// dto.setPaymentId(record.getPaymentId());
|
||||
// QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
||||
// if (response != null && CollectionUtils.isNotEmpty(response.getPaymentConfirms())) {
|
||||
// for (QueryPaymentConfirmDetailResponse.PaymentConfirmInfo paymentConfirm : response.getPaymentConfirms()) {
|
||||
// for (PaymentConfirmInfo paymentConfirm : response.getPaymentConfirms()) {
|
||||
// JSONObject jsonObject = JSON.parseObject(paymentConfirm.getDescription());
|
||||
// if (StringUtils.equals(jsonObject.getString("orderCode"), orderCode)) {
|
||||
// // 订单号对的上,累计分账金额
|
||||
@@ -4393,6 +4423,15 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
orderPayRecordService.batchInsert(Lists.newArrayList(principalPayRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询第三方平订单列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OrderVO> selectThirdPartyOrderList(QueryStartChargeDTO dto) {
|
||||
return orderBasicInfoMapper.selectThirdPartyOrderList(dto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jsowell.pile.service.impl;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.PersonalChargingRecord;
|
||||
import com.jsowell.pile.domain.PileBasicInfo;
|
||||
@@ -130,7 +131,10 @@ public class PersonalChargingRecordServiceImpl implements PersonalChargingRecord
|
||||
chargingRecord.setValleyUsedElectricity(valleyUsedElectricity);
|
||||
BigDecimal totalUsedElectricity = sharpUsedElectricity.add(peakUsedElectricity).add(flatUsedElectricity).add(valleyUsedElectricity);
|
||||
chargingRecord.setTotalUsedElectricity(totalUsedElectricity);
|
||||
chargingRecord.setReason(data.getStopReasonMsg());
|
||||
chargingRecord.setStopReasonCode("0x" + data.getStopReasonCode());
|
||||
if (StringUtils.isNotBlank(data.getStopReasonMsg())) {
|
||||
chargingRecord.setReason(data.getStopReasonMsg());
|
||||
}
|
||||
// 创建或更新
|
||||
this.insertOrUpdateSelective(chargingRecord);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import com.jsowell.common.core.domain.ykc.*;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.DelFlagEnum;
|
||||
import com.jsowell.common.enums.lianlian.LianLianPileStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.PileConnectorStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.PileStatusEnum;
|
||||
@@ -24,10 +23,7 @@ import com.jsowell.pile.mapper.PileBasicInfoMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.service.programlogic.AbstractProgramLogic;
|
||||
import com.jsowell.pile.service.programlogic.ProgramLogicFactory;
|
||||
import com.jsowell.pile.thirdparty.ConnectorInfo;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
import com.jsowell.pile.thirdparty.ZDLConnectorInfo;
|
||||
import com.jsowell.pile.thirdparty.ZDLEquipmentInfo;
|
||||
import com.jsowell.pile.thirdparty.*;
|
||||
import com.jsowell.pile.transaction.dto.PileTransactionDTO;
|
||||
import com.jsowell.pile.transaction.service.TransactionService;
|
||||
import com.jsowell.pile.util.UserUtils;
|
||||
@@ -138,8 +134,6 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
redisCache.setCacheObject(redisKey, pileBasicInfo, 15, TimeUnit.MINUTES);
|
||||
}
|
||||
}
|
||||
|
||||
// PileBasicInfo pileBasicInfo = pileBasicInfoMapper.selectPileBasicInfoBySn(pileSn);
|
||||
return pileBasicInfo;
|
||||
}
|
||||
|
||||
@@ -1226,48 +1220,35 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
public List<EquipmentInfo> getPileListForLianLian(String stationId) {
|
||||
List<EquipmentInfo> resultList = new ArrayList<>();
|
||||
// 通过站点id查询桩基本信息
|
||||
List<PileBasicInfo> list = this.getPileListByStationId(stationId);
|
||||
List<PileDetailInfoVO> list = getPileDetailInfoList(stationId);
|
||||
// 封装成联联平台对象
|
||||
for (PileBasicInfo pileBasicInfo : list) {
|
||||
for (PileDetailInfoVO pileDetailInfoVO : list) {
|
||||
EquipmentInfo equipmentInfo = new EquipmentInfo();
|
||||
String pileSn = pileBasicInfo.getSn();
|
||||
String pileSn = pileDetailInfoVO.getPileSn();
|
||||
|
||||
equipmentInfo.setEquipmentID(pileSn);
|
||||
equipmentInfo.setEquipmentClassification(1);
|
||||
equipmentInfo.setManufacturerID(Constants.OPERATORID_LIANLIAN);
|
||||
equipmentInfo.setManufacturerName(Constants.MANUFACTURER_NAME);
|
||||
equipmentInfo.setConstructionTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileBasicInfo.getCreateTime()));
|
||||
equipmentInfo.setProductionDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileBasicInfo.getCreateTime()));
|
||||
equipmentInfo.setConstructionTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileDetailInfoVO.getCreateTime()));
|
||||
equipmentInfo.setProductionDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileDetailInfoVO.getCreateTime()));
|
||||
|
||||
PileModelInfoVO modelInfo = pileModelInfoService.getPileModelInfoByPileSn(pileSn);
|
||||
if (StringUtils.isBlank(modelInfo.getSpeedType())) {
|
||||
// PileModelInfoVO modelInfo = pileModelInfoService.getPileModelInfoByPileSn(pileSn);
|
||||
if (StringUtils.isBlank(pileDetailInfoVO.getSpeedType())) {
|
||||
continue;
|
||||
}
|
||||
equipmentInfo.setEquipmentType(Integer.valueOf(modelInfo.getSpeedType()));
|
||||
equipmentInfo.setEquipmentModel(modelInfo.getModelName());
|
||||
equipmentInfo.setEquipmentType(Integer.valueOf(pileDetailInfoVO.getSpeedType()));
|
||||
equipmentInfo.setEquipmentModel(pileDetailInfoVO.getModelName());
|
||||
|
||||
// Map<String, String> pileStatus = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileBasicInfo.getSn()));
|
||||
Map<String, String> pileStatusMap = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileSn));
|
||||
String pileStatus = pileStatusMap.get(pileSn);
|
||||
if (StringUtils.equals(PileStatusEnum.ON_LINE.getValue(), pileStatus)) {
|
||||
// 1-在线
|
||||
pileStatus = LianLianPileStatusEnum.NORMAL.getCode();
|
||||
} else if (StringUtils.equals(PileStatusEnum.OFF_LINE.getValue(), pileStatus)) {
|
||||
// 2-离线
|
||||
pileStatus = LianLianPileStatusEnum.CLOSE_OFFLINE.getCode();
|
||||
} else if (StringUtils.equals(PileStatusEnum.FAULT.getValue(), pileStatus)) {
|
||||
// 3-故障
|
||||
pileStatus = LianLianPileStatusEnum.UNDER_MAINTENANCE.getCode();
|
||||
}
|
||||
equipmentInfo.setEquipmentStatus(Integer.valueOf(pileStatus));
|
||||
equipmentInfo.setEquipmentPower(new BigDecimal(modelInfo.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||
equipmentInfo.setEquipmentStatus(Integer.valueOf(pileDetailInfoVO.getPileStatus()));
|
||||
equipmentInfo.setEquipmentPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||
equipmentInfo.setNewNationalStandard(1);
|
||||
equipmentInfo.setVinFlag(1);
|
||||
equipmentInfo.setEquipmentName(pileSn);
|
||||
equipmentInfo.setPower(new BigDecimal(modelInfo.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||
equipmentInfo.setPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||
|
||||
// 枪口列表
|
||||
List<ConnectorInfo> connectorList = getConnectorListForLianLian(pileSn);
|
||||
List<ConnectorInfo> connectorList = getConnectorListForLianLian(pileDetailInfoVO);
|
||||
equipmentInfo.setConnectorInfos(connectorList);
|
||||
|
||||
resultList.add(equipmentInfo);
|
||||
@@ -1276,6 +1257,25 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PileDetailInfoVO> getPileDetailInfoList(String stationId) {
|
||||
List<PileDetailInfoVO> pileDetailInfoList = pileBasicInfoMapper.getPileDetailInfoList(stationId);
|
||||
if (CollectionUtils.isEmpty(pileDetailInfoList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<String> pileSnList = pileDetailInfoList.stream()
|
||||
.map(PileDetailInfoVO::getPileSn)
|
||||
.collect(Collectors.toList());
|
||||
Map<String, String> pileStatusV2 = pileConnectorInfoService.getPileStatus(pileSnList);
|
||||
pileDetailInfoList.forEach(pileDetailInfoVO -> {
|
||||
String pileSn = pileDetailInfoVO.getPileSn();
|
||||
if (pileStatusV2.containsKey(pileSn)) {
|
||||
pileDetailInfoVO.setPileStatus(pileStatusV2.get(pileSn));
|
||||
}
|
||||
});
|
||||
return pileDetailInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取枪口列表
|
||||
*
|
||||
@@ -1357,6 +1357,43 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
public List<ConnectorInfo> getConnectorListForLianLian(PileDetailInfoVO pileDetailInfoVO) {
|
||||
List<ConnectorInfo> resultList = new ArrayList<>();
|
||||
|
||||
List<PileConnectorInfo> list = pileConnectorInfoService.selectPileConnectorInfoList(pileDetailInfoVO.getPileSn());
|
||||
for (PileConnectorInfo pileConnectorInfo : list) {
|
||||
ConnectorInfo connectorInfo = new ConnectorInfo();
|
||||
connectorInfo.setConnectorID(pileConnectorInfo.getPileConnectorCode());
|
||||
int connectorType = StringUtils.equals("1", pileDetailInfoVO.getSpeedType()) ? 4 : 3;
|
||||
connectorInfo.setConnectorType(connectorType);
|
||||
// 车位号
|
||||
if (StringUtils.isNotBlank(pileConnectorInfo.getParkNo())) {
|
||||
connectorInfo.setParkNo(pileConnectorInfo.getParkNo());
|
||||
}
|
||||
connectorInfo.setVoltageUpperLimits(Integer.valueOf(pileDetailInfoVO.getRatedVoltage()));
|
||||
connectorInfo.setEquipmentClassification(1);
|
||||
connectorInfo.setVoltageLowerLimits(Integer.valueOf(pileDetailInfoVO.getRatedVoltage()));
|
||||
connectorInfo.setCurrent(Integer.valueOf(pileDetailInfoVO.getRatedCurrent()));
|
||||
connectorInfo.setConnectorName(pileConnectorInfo.getPileConnectorCode());
|
||||
connectorInfo.setOperateStatus(50); // 50-正常使用
|
||||
connectorInfo.setOpreateStatus(50); // 50-正常使用
|
||||
connectorInfo.setNationalStandard(2); // 2-2015
|
||||
connectorInfo.setAuxPower(3); // 3-兼容12V和24V
|
||||
|
||||
if (!StringUtils.equals(pileDetailInfoVO.getConnectorNum(), "1")) {
|
||||
// 如果不是单枪,则枪口功率需要除以枪口数量
|
||||
String ratedPowerStr = pileDetailInfoVO.getRatedPower();
|
||||
BigDecimal ratedPower = new BigDecimal(ratedPowerStr);
|
||||
connectorInfo.setPower(ratedPower.divide(new BigDecimal(pileDetailInfoVO.getConnectorNum()), 1, BigDecimal.ROUND_HALF_UP));
|
||||
}else {
|
||||
connectorInfo.setPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
resultList.add(connectorInfo);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZDLEquipmentInfo> getPileListForZDL(String stationId) {
|
||||
List<ZDLEquipmentInfo> resultList = new ArrayList<>();
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.jsowell.adapay.common.PaymentConfirmInfo;
|
||||
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
||||
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
||||
import com.jsowell.adapay.service.AdapayService;
|
||||
@@ -126,7 +127,7 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
||||
.paymentId(paymentId)
|
||||
.build();
|
||||
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(build);
|
||||
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> paymentConfirms = response.getPaymentConfirms();
|
||||
List<PaymentConfirmInfo> paymentConfirms = response.getPaymentConfirms();
|
||||
// 如果没有分账信息,说明没有清分
|
||||
String clearingStatus = null;
|
||||
if (CollectionUtils.isEmpty(paymentConfirms)) {
|
||||
@@ -548,7 +549,7 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
||||
.paymentId(paymentId)
|
||||
.build();
|
||||
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(build);
|
||||
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> paymentConfirms = response.getPaymentConfirms();
|
||||
List<PaymentConfirmInfo> paymentConfirms = response.getPaymentConfirms();
|
||||
if (!CollectionUtils.isEmpty(paymentConfirms)) {
|
||||
clearingBillVO.setConfirmInfo(paymentConfirms.get(0));
|
||||
clearingList.add(clearingBillVO);
|
||||
|
||||
33
jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/PileDetailInfoVO.java
vendored
Normal file
33
jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/PileDetailInfoVO.java
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.jsowell.pile.thirdparty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 第三方平台桩信息VO
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2024/12/19 14:41:52
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class PileDetailInfoVO {
|
||||
|
||||
private String pileSn;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String speedType;
|
||||
private String modelName;
|
||||
private String ratedPower;
|
||||
private String ratedVoltage;
|
||||
private String ratedCurrent;
|
||||
private String connectorNum;
|
||||
private String pileStatus;
|
||||
}
|
||||
@@ -41,6 +41,11 @@ public class AccumulativeInfoVO {
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 充电时长
|
||||
*/
|
||||
private String chargingTime;
|
||||
|
||||
/**
|
||||
* 枪口充电量
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.jsowell.pile.vo.web;
|
||||
|
||||
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
||||
import com.jsowell.adapay.common.PaymentConfirmInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -37,5 +37,5 @@ public class ClearingBillVO {
|
||||
*/
|
||||
private String withdrawStatus;
|
||||
|
||||
private QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirmInfo;
|
||||
private PaymentConfirmInfo confirmInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user