mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-26 05:55:03 +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,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);
|
||||
|
||||
Reference in New Issue
Block a user