This commit is contained in:
Guoqs
2024-12-26 10:04:45 +08:00
37 changed files with 3758 additions and 2207 deletions

View File

@@ -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();
}
}

View File

@@ -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;
/**
* 车牌号码
*/

View File

@@ -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;
}

View File

@@ -70,6 +70,12 @@ public class QueryStationInfoDTO {
@JsonProperty(value = "StationIDs")
private List<String> stationIds;
/**
* 更多标志
*/
@JsonProperty(value = "MoreFlag")
private Integer moreFlag;
private String address;

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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.response.PaymentReverseResponse;
import com.jsowell.adapay.vo.OrderSplitResult;
@@ -476,6 +477,12 @@ public interface OrderBasicInfoService{
*/
void createReservationOrder(ReservationChargingStartupResult chargingStartupResult);
/**
* 查询第三方平台订单列表
* @param dto
*/
List<OrderVO> selectThirdPartyOrderList(QueryStartChargeDTO dto);
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 后管小程序 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
/**

View File

@@ -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);
}

View File

@@ -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);
}
}

View File

@@ -2,6 +2,7 @@ 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;
@@ -1907,6 +1908,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());
// 结算时间
@@ -2593,7 +2596,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;
}
/**
@@ -4097,6 +4111,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);
}
/**

View File

@@ -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);
}

View File

@@ -24,13 +24,11 @@ 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;
import com.jsowell.pile.vo.base.ConnectorInfoVO;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.base.PileInfoVO;
import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO;
@@ -1226,48 +1224,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 +1261,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 +1361,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<>();

View 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;
}

View File

@@ -41,6 +41,11 @@ public class AccumulativeInfoVO {
*/
private String endTime;
/**
* 充电时长
*/
private String chargingTime;
/**
* 枪口充电量
*/