mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-23 16:49:49 +08:00
Merge branch 'dev' into dev-g
This commit is contained in:
@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,7 +23,7 @@ import java.util.Map;
|
|||||||
@Anonymous
|
@Anonymous
|
||||||
@RequestMapping("/sichuan")
|
@RequestMapping("/sichuan")
|
||||||
public class SiChuanController extends ThirdPartyBaseController {
|
public class SiChuanController extends ThirdPartyBaseController {
|
||||||
private final String platformName = "";
|
private final String platformName = "四川省监管平台";
|
||||||
|
|
||||||
|
|
||||||
private final String platformType = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
|
private final String platformType = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
|
||||||
|
|||||||
@@ -98,75 +98,17 @@ public class PileBillingTemplate extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String memberFlag;
|
private String memberFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外展示VIP价格标识(0-不展示; 1-展示)
|
||||||
|
*/
|
||||||
|
private String displayFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布时间
|
* 发布时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date publishTime;
|
private Date publishTime;
|
||||||
|
|
||||||
// public String getPublicFlag() {
|
|
||||||
// return publicFlag;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setPublicFlag(String publicFlag) {
|
|
||||||
// this.publicFlag = publicFlag;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setId(Long id) {
|
|
||||||
// this.id = id;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public Long getId() {
|
|
||||||
// return id;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setTemplateCode(String templateCode) {
|
|
||||||
// this.templateCode = templateCode;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getTemplateCode() {
|
|
||||||
// return templateCode;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setName(String name) {
|
|
||||||
// this.name = name;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getName() {
|
|
||||||
// return name;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setType(String type) {
|
|
||||||
// this.type = type;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getType() {
|
|
||||||
// return type;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setStationId(Long stationId) {
|
|
||||||
// this.stationId = stationId;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public Long getStationId() {
|
|
||||||
// return stationId;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setDelFlag(String delFlag) {
|
|
||||||
// this.delFlag = delFlag;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getDelFlag() {
|
|
||||||
// return delFlag;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public List<PileBillingDetail> getPileBillingDetailList() {
|
|
||||||
// return pileBillingDetailList;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setPileBillingDetailList(List<PileBillingDetail> pileBillingDetailList) {
|
|
||||||
// this.pileBillingDetailList = pileBillingDetailList;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -95,4 +95,9 @@ public class CreateOrUpdateBillingTemplateDTO {
|
|||||||
|
|
||||||
// 集团编号
|
// 集团编号
|
||||||
private String groupCode;
|
private String groupCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外展示VIP价格标识(0-不展示; 1-展示)
|
||||||
|
*/
|
||||||
|
private String displayFlag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
billingTemplate.setFreeTime(dto.getFreeTime());
|
billingTemplate.setFreeTime(dto.getFreeTime());
|
||||||
billingTemplate.setOccupyFee(dto.getOccupyFee());
|
billingTemplate.setOccupyFee(dto.getOccupyFee());
|
||||||
billingTemplate.setMaxOccupyFee(dto.getMaxOccupyFee());
|
billingTemplate.setMaxOccupyFee(dto.getMaxOccupyFee());
|
||||||
|
billingTemplate.setDisplayFlag(dto.getDisplayFlag());
|
||||||
|
|
||||||
// 查询站点信息
|
// 查询站点信息
|
||||||
PileStationInfo stationInfo = pileStationInfoService.selectPileStationInfoById(billingTemplate.getStationId());
|
PileStationInfo stationInfo = pileStationInfoService.selectPileStationInfoById(billingTemplate.getStationId());
|
||||||
@@ -315,6 +316,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
result.setFreeTime(pileBillingTemplate.getFreeTime());
|
result.setFreeTime(pileBillingTemplate.getFreeTime());
|
||||||
result.setOccupyFee(pileBillingTemplate.getOccupyFee());
|
result.setOccupyFee(pileBillingTemplate.getOccupyFee());
|
||||||
result.setMaxOccupyFee(pileBillingTemplate.getMaxOccupyFee());
|
result.setMaxOccupyFee(pileBillingTemplate.getMaxOccupyFee());
|
||||||
|
result.setDisplayFlag(pileBillingTemplate.getDisplayFlag());
|
||||||
|
|
||||||
// 查计费模板详情
|
// 查计费模板详情
|
||||||
// List<PileBillingDetail> detailList = pileBillingTemplateMapper.queryBillingDetailByTemplateIds(new Long[]{id});
|
// List<PileBillingDetail> detailList = pileBillingTemplateMapper.queryBillingDetailByTemplateIds(new Long[]{id});
|
||||||
@@ -410,6 +412,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
// 将桩的费率存入stationVO
|
// 将桩的费率存入stationVO
|
||||||
BigDecimal electricityPrice = detailVO.getElectricityPrice();
|
BigDecimal electricityPrice = detailVO.getElectricityPrice();
|
||||||
BigDecimal servicePrice = detailVO.getServicePrice();
|
BigDecimal servicePrice = detailVO.getServicePrice();
|
||||||
|
result.setDisplayFlag(preferentialBillingTemplate.getDisplayFlag());
|
||||||
result.setVipElectricityPrice(electricityPrice.toString());
|
result.setVipElectricityPrice(electricityPrice.toString());
|
||||||
result.setVipServicePrice(servicePrice.toString());
|
result.setVipServicePrice(servicePrice.toString());
|
||||||
result.setVipTotalPrice(electricityPrice.add(servicePrice).toString());
|
result.setVipTotalPrice(electricityPrice.add(servicePrice).toString());
|
||||||
@@ -796,6 +799,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
|||||||
// 优惠计费模板价格
|
// 优惠计费模板价格
|
||||||
BillingDetailVO preferentialBillingDetailVO = preferentialBillingDetailVOMap.get(type);
|
BillingDetailVO preferentialBillingDetailVO = preferentialBillingDetailVOMap.get(type);
|
||||||
if (Objects.nonNull(preferentialBillingDetailVO)) {
|
if (Objects.nonNull(preferentialBillingDetailVO)) {
|
||||||
|
vo.setDisplayFlag(preferentialBillingTemplate != null ? preferentialBillingTemplate.getDisplayFlag() : "0");
|
||||||
// vip电费
|
// vip电费
|
||||||
vo.setVipElectricityPrice(preferentialBillingDetailVO.getElectricityPrice().toString());
|
vo.setVipElectricityPrice(preferentialBillingDetailVO.getElectricityPrice().toString());
|
||||||
// vip服务费
|
// vip服务费
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ import com.jsowell.pile.vo.uniapp.business.StationBusinessAnalyzeInfoVO;
|
|||||||
import com.jsowell.pile.vo.uniapp.business.StationOrderQuantityInfoVO;
|
import com.jsowell.pile.vo.uniapp.business.StationOrderQuantityInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.business.StationStatisticsInfosVO;
|
import com.jsowell.pile.vo.uniapp.business.StationStatisticsInfosVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
|
import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
|
||||||
import com.jsowell.pile.vo.web.PileDetailVO;
|
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import com.jsowell.system.service.SysDeptService;
|
import com.jsowell.system.service.SysDeptService;
|
||||||
import com.jsowell.system.service.SysUserService;
|
import com.jsowell.system.service.SysUserService;
|
||||||
@@ -598,6 +597,7 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
|
|||||||
stationVO.setFreeTime(currentTimePriceDetails.getFreeTime());
|
stationVO.setFreeTime(currentTimePriceDetails.getFreeTime());
|
||||||
stationVO.setOccupyFee(currentTimePriceDetails.getOccupyFee());
|
stationVO.setOccupyFee(currentTimePriceDetails.getOccupyFee());
|
||||||
// vip价
|
// vip价
|
||||||
|
stationVO.setDisplayFlag(currentTimePriceDetails.getDisplayFlag());
|
||||||
stationVO.setVipElectricityPrice(currentTimePriceDetails.getVipElectricityPrice());
|
stationVO.setVipElectricityPrice(currentTimePriceDetails.getVipElectricityPrice());
|
||||||
stationVO.setVipServicePrice(currentTimePriceDetails.getVipServicePrice());
|
stationVO.setVipServicePrice(currentTimePriceDetails.getVipServicePrice());
|
||||||
stationVO.setVipTotalPrice(currentTimePriceDetails.getVipTotalPrice());
|
stationVO.setVipTotalPrice(currentTimePriceDetails.getVipTotalPrice());
|
||||||
|
|||||||
170
jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/dto/ConnectorInfoDTO.java
vendored
Normal file
170
jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/dto/ConnectorInfoDTO.java
vendored
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
package com.jsowell.pile.thirdparty.dto;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电设备接口信息
|
||||||
|
*/
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class ConnectorInfoDTO {
|
||||||
|
/**
|
||||||
|
* 充电设备接口编码 Y
|
||||||
|
* 充电设备接口编码,同一对接平台内唯一
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConnectorID")
|
||||||
|
private String connectorID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备接口分类
|
||||||
|
* 1:车辆充电设备接口
|
||||||
|
* 2:换电站内的电池箱 充电设备接口
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentClassification")
|
||||||
|
private Integer equipmentClassification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电设备接口名称 N
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConnectorName")
|
||||||
|
private String connectorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电设备接口类型 Y
|
||||||
|
* 1:家用插座(模式2)
|
||||||
|
* 2:交流接口插座(模式3,连接方式B )
|
||||||
|
* 3:交流接口插头(带枪线,模式3,连接方式C)
|
||||||
|
* 4:直流接口枪头(带枪线,模式4)
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConnectorType")
|
||||||
|
private Integer connectorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 枪口状态
|
||||||
|
*/
|
||||||
|
@JSONField(name = "Status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额定电压上限(单位:V) Y
|
||||||
|
*/
|
||||||
|
@JSONField(name = "VoltageUpperLimits")
|
||||||
|
private BigDecimal voltageUpperLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额定电压下限(单位:V) Y
|
||||||
|
*/
|
||||||
|
@JSONField(name = "VoltageLowerLimits")
|
||||||
|
private BigDecimal voltageLowerLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*恒功率电压上限
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConstantVoltageUpperLimits")
|
||||||
|
private Integer constantVoltageUpperLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*恒功率电压下限
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConstantVoltageLowerLimits")
|
||||||
|
private Integer constantVoltageLowerLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额定电流(单位:A) Y
|
||||||
|
*/
|
||||||
|
@JSONField(name = "Current")
|
||||||
|
private BigDecimal current;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*恒功率电流上限
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConstantCurrentUpperLimits")
|
||||||
|
private Integer ConstantCurrentUpperLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额 定 电 流 上限
|
||||||
|
*/
|
||||||
|
@JSONField(name = "CurrentUpperLimits")
|
||||||
|
private Integer currentUpperLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额 定 电 流 下限
|
||||||
|
*/
|
||||||
|
@JSONField(name = "CurrentLowerLimits")
|
||||||
|
private Integer currentLowerLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*恒功率电流下限
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConstantCurrentLowerLimits")
|
||||||
|
private Integer ConstantCurrentLowerLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额定功率(单位:kW) Y
|
||||||
|
*/
|
||||||
|
@JSONField(name = "Power")
|
||||||
|
private BigDecimal power;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口功率类型
|
||||||
|
*/
|
||||||
|
@JSONField(name = "PowerType")
|
||||||
|
private Integer powerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车位号 N
|
||||||
|
* 停车场车位编号
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ParkNo")
|
||||||
|
private String parkNo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营状态
|
||||||
|
* 0-未知
|
||||||
|
* 1-建设中
|
||||||
|
* 5-关闭下线
|
||||||
|
* 6-维护中
|
||||||
|
* 50-正常使用
|
||||||
|
*/
|
||||||
|
@JSONField(name = "OperateStatus")
|
||||||
|
private Integer operateStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营状态
|
||||||
|
* 0-未知
|
||||||
|
* 1-建设中
|
||||||
|
* 5-关闭下线
|
||||||
|
* 6-维护中
|
||||||
|
* 50-正常使用
|
||||||
|
*/
|
||||||
|
@JSONField(name = "OpreateStatus")
|
||||||
|
private Integer opreateStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国家标准
|
||||||
|
*/
|
||||||
|
@JSONField(name = "NationalStandard")
|
||||||
|
private Integer nationalStandard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅助电源
|
||||||
|
*/
|
||||||
|
@JSONField(name = "AuxPower")
|
||||||
|
private Integer auxPower;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营时间
|
||||||
|
*/
|
||||||
|
@JSONField(name = "OpreateHours")
|
||||||
|
private String opreateHours;
|
||||||
|
|
||||||
|
}
|
||||||
217
jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/dto/EquipmentInfoDTO.java
vendored
Normal file
217
jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/dto/EquipmentInfoDTO.java
vendored
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
package com.jsowell.pile.thirdparty;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
|
import com.jsowell.pile.thirdparty.dto.ConnectorInfoDTO;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电设备信息
|
||||||
|
*/
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class EquipmentInfoDTO {
|
||||||
|
/**
|
||||||
|
* 设备编码 Y
|
||||||
|
* 设备唯一编码,对同一对接平台,保证唯一
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentID")
|
||||||
|
private String equipmentID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一编码
|
||||||
|
*设备生产商组织机构代 码 9 位+设备出厂唯一 编码
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentUniqueNumber")
|
||||||
|
private String equipmentUniqueNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备生产商组织机构代码 Y
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ManufacturerID")
|
||||||
|
private String manufacturerID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备生产商名称
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ManufacturerName")
|
||||||
|
private String manufacturerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备型号 N
|
||||||
|
* 由设备生厂商定义的设备型号
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentModel")
|
||||||
|
private String equipmentModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称 N
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentName")
|
||||||
|
private String equipmentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备生产日期 N
|
||||||
|
* YYYY-MM-DD
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ProductionDate")
|
||||||
|
private String productionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建设时间 Y
|
||||||
|
* YYYY-MM-DD
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConstructionTime")
|
||||||
|
private String constructionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备类型(1-直流设备;2-交流设备;3-交直流一体设备) Y
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentType")
|
||||||
|
private Integer equipmentType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备分类
|
||||||
|
* 1:车辆充电设备 2:换电站内的电池箱 充电设备
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentClassification")
|
||||||
|
private Integer equipmentClassification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备状态 Y
|
||||||
|
* 0:未知
|
||||||
|
* 1:建设中
|
||||||
|
* 5:关闭下线
|
||||||
|
* 6:维护中
|
||||||
|
* 50:正常使用
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentStatus")
|
||||||
|
private Integer equipmentStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电设备用途
|
||||||
|
* 1:公用;
|
||||||
|
* 2:专用;
|
||||||
|
* 3:个人分时共享;
|
||||||
|
* 4:限制类公用;
|
||||||
|
* 9:其他
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentApplication")
|
||||||
|
private String equipmentApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额定功率(单位:kW) Y
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentPower")
|
||||||
|
private BigDecimal equipmentPower;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新国标(0-否;1-是) Y
|
||||||
|
* 是否新国标
|
||||||
|
*/
|
||||||
|
@JSONField(name = "NewNationalStandard")
|
||||||
|
private Integer newNationalStandard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电设备接口列表 Y
|
||||||
|
* 该充电设备所有的充电设备接口的信息对象集合
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConnectorInfos")
|
||||||
|
private List<ConnectorInfoDTO> connectorInfos;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电设备经度 N
|
||||||
|
* GCJ-02坐标系
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentLng")
|
||||||
|
private BigDecimal equipmentLng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电设备纬度 N
|
||||||
|
* GCJ-02坐标系
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentLat")
|
||||||
|
private BigDecimal equipmentLat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否支持VIN码识别(0-否;1-是) Y
|
||||||
|
*/
|
||||||
|
@JSONField(name = "VinFlag")
|
||||||
|
private Integer vinFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备总功率
|
||||||
|
*/
|
||||||
|
@JSONField(name = "Power")
|
||||||
|
private BigDecimal power;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备开通时间
|
||||||
|
*/
|
||||||
|
@JSONField(name = "OpenDate")
|
||||||
|
private String openDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备投资金额
|
||||||
|
*/
|
||||||
|
@JSONField(name = "EquipmentInvestment")
|
||||||
|
private BigDecimal equipmentInvestment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备出厂序号
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ProductSN")
|
||||||
|
private String productSN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否支持自动识别VIN码
|
||||||
|
*/
|
||||||
|
@JSONField(name = "SVIN")
|
||||||
|
private Integer svin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否支持有序充电
|
||||||
|
*/
|
||||||
|
@JSONField(name = "SautoPower")
|
||||||
|
private Integer sautoPower;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额定电压上限
|
||||||
|
*/
|
||||||
|
@JSONField(name = "VoltageUpperLimits")
|
||||||
|
private BigDecimal voltageUpperLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额定电压下限
|
||||||
|
*/
|
||||||
|
@JSONField(name = "VoltageLowerLimits")
|
||||||
|
private BigDecimal voltageLowerLimits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额定电流
|
||||||
|
*/
|
||||||
|
@JSONField(name = "Current")
|
||||||
|
private BigDecimal current;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点额定功率
|
||||||
|
*/
|
||||||
|
private BigDecimal stationRatedPower;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*报装户号
|
||||||
|
* 如整个站按一个户号立户的,则站内所以设备的户号为同一个,如果是桩立户,则为桩实际立户户号。20 字符。
|
||||||
|
*/
|
||||||
|
@JSONField(name = "ConsNo")
|
||||||
|
private String ConsNo;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -63,6 +63,11 @@ public class StationInfoVO {
|
|||||||
*/
|
*/
|
||||||
private String totalPrice;
|
private String totalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外展示VIP价格标识(0-不展示; 1-展示)
|
||||||
|
*/
|
||||||
|
private String displayFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vip电费
|
* vip电费
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ public class BillingPriceVO {
|
|||||||
*/
|
*/
|
||||||
private String totalPrice;
|
private String totalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外展示VIP价格标识(0-不展示; 1-展示)
|
||||||
|
*/
|
||||||
|
private String displayFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vip电费
|
* vip电费
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ public class CurrentTimePriceDetails {
|
|||||||
*/
|
*/
|
||||||
private String totalPrice;
|
private String totalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外展示VIP价格标识(0-不展示; 1-展示)
|
||||||
|
*/
|
||||||
|
private String displayFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vip电费
|
* vip电费
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ public class BillingTemplateVO {
|
|||||||
*/
|
*/
|
||||||
private String memberFlag;
|
private String memberFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外展示VIP价格标识(0-不展示; 1-展示)
|
||||||
|
*/
|
||||||
|
private String displayFlag;
|
||||||
|
|
||||||
// 计费模板备注
|
// 计费模板备注
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
<result property="occupyFee" column="occupy_fee"/>
|
<result property="occupyFee" column="occupy_fee"/>
|
||||||
<result property="maxOccupyFee" column="max_occupy_fee"/>
|
<result property="maxOccupyFee" column="max_occupy_fee"/>
|
||||||
<result property="publicFlag" column="public_flag"/>
|
<result property="publicFlag" column="public_flag"/>
|
||||||
<result property="memberFlag" column="memberFlag"/>
|
<result property="memberFlag" column="member_flag"/>
|
||||||
|
<result property="displayFlag" column="display_flag"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated PileBillingTemplate-->
|
<!--@mbg.generated PileBillingTemplate-->
|
||||||
id, template_code, name, status, template_remark, template_desc, type, station_id, free_time, occupy_fee, max_occupy_fee, public_flag,
|
id, template_code, name, status, template_remark, template_desc, type, station_id, free_time, occupy_fee, max_occupy_fee, public_flag,
|
||||||
member_flag, create_time, update_by, update_time, del_flag
|
member_flag, display_flag, create_by, create_time, update_by, update_time, del_flag
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<resultMap type="com.jsowell.pile.domain.PileBillingDetail" id="PileBillingDetailResult">
|
<resultMap type="com.jsowell.pile.domain.PileBillingDetail" id="PileBillingDetailResult">
|
||||||
@@ -92,6 +93,7 @@
|
|||||||
a.occupy_fee,
|
a.occupy_fee,
|
||||||
a.max_occupy_fee,
|
a.max_occupy_fee,
|
||||||
a.template_remark,
|
a.template_remark,
|
||||||
|
a.display_flag as display_flag,
|
||||||
a.type,
|
a.type,
|
||||||
a.station_id,
|
a.station_id,
|
||||||
a.create_by,
|
a.create_by,
|
||||||
@@ -253,6 +255,9 @@
|
|||||||
<if test="stationId != null">
|
<if test="stationId != null">
|
||||||
station_id = #{stationId},
|
station_id = #{stationId},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="displayFlag != null">
|
||||||
|
display_flag = #{displayFlag},
|
||||||
|
</if>
|
||||||
<if test="freeTime != null">
|
<if test="freeTime != null">
|
||||||
free_time = #{freeTime},
|
free_time = #{freeTime},
|
||||||
</if>
|
</if>
|
||||||
@@ -506,6 +511,7 @@
|
|||||||
t2.id as templateId,
|
t2.id as templateId,
|
||||||
t2.template_code AS templateCode,
|
t2.template_code AS templateCode,
|
||||||
t2.`name` AS templateName,
|
t2.`name` AS templateName,
|
||||||
|
t2.display_flag AS displayFlag,
|
||||||
t3.electricity_price AS sharpElectricityPrice,
|
t3.electricity_price AS sharpElectricityPrice,
|
||||||
t3.service_price AS sharpServicePrice,
|
t3.service_price AS sharpServicePrice,
|
||||||
t3.apply_time AS sharpApplyDate,
|
t3.apply_time AS sharpApplyDate,
|
||||||
@@ -627,6 +633,7 @@
|
|||||||
t2.id as templateId,
|
t2.id as templateId,
|
||||||
t2.template_code AS templateCode,
|
t2.template_code AS templateCode,
|
||||||
t2.`name` AS templateName,
|
t2.`name` AS templateName,
|
||||||
|
t2.display_flag as displayFlag,
|
||||||
t3.electricity_price AS sharpElectricityPrice,
|
t3.electricity_price AS sharpElectricityPrice,
|
||||||
t3.service_price AS sharpServicePrice,
|
t3.service_price AS sharpServicePrice,
|
||||||
t3.apply_time AS sharpApplyDate,
|
t3.apply_time AS sharpApplyDate,
|
||||||
|
|||||||
26
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/dto/SupStationInfoDTO.java
vendored
Normal file
26
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/dto/SupStationInfoDTO.java
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package com.jsowell.thirdparty.platform.dto;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
|
import com.jsowell.pile.thirdparty.EquipmentInfoDTO;
|
||||||
|
import com.jsowell.thirdparty.platform.domain.SupStationInfo;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内蒙古平台站点信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
public class SupStationInfoDTO extends SupStationInfo {
|
||||||
|
|
||||||
|
@JSONField(name = "EquipmentInfos")
|
||||||
|
private List<EquipmentInfoDTO> equipmentInfosDTO;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.jsowell.thirdparty.platform.service.impl;
|
package com.jsowell.thirdparty.platform.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
@@ -8,39 +9,33 @@ import com.google.common.collect.Lists;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.jsowell.common.constant.Constants;
|
import com.jsowell.common.constant.Constants;
|
||||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||||
import com.jsowell.common.enums.thirdparty.BusinessInformationExchangeEnum;
|
import com.jsowell.common.enums.lianlian.LianLianPileStatusEnum;
|
||||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||||
import com.jsowell.common.enums.ykc.BillingTimeTypeEnum;
|
import com.jsowell.common.enums.ykc.*;
|
||||||
import com.jsowell.common.enums.ykc.OrderStatusEnum;
|
|
||||||
import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
|
||||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
|
||||||
import com.jsowell.common.exception.BusinessException;
|
import com.jsowell.common.exception.BusinessException;
|
||||||
import com.jsowell.common.util.*;
|
import com.jsowell.common.util.*;
|
||||||
import com.jsowell.pile.domain.*;
|
import com.jsowell.pile.domain.*;
|
||||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.mapper.OrderMonitorDataMapper;
|
import com.jsowell.pile.mapper.PileBasicInfoMapper;
|
||||||
import com.jsowell.pile.service.*;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
import com.jsowell.pile.thirdparty.*;
|
||||||
import com.jsowell.pile.thirdparty.ConnectorInfo;
|
import com.jsowell.pile.thirdparty.EquipmentInfoDTO;
|
||||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
import com.jsowell.pile.thirdparty.dto.ConnectorInfoDTO;
|
||||||
import com.jsowell.pile.util.MerchantUtils;
|
import com.jsowell.pile.util.MerchantUtils;
|
||||||
import com.jsowell.pile.vo.SupStationStatsVO;
|
import com.jsowell.pile.vo.SupStationStatsVO;
|
||||||
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
|
||||||
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
|
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
|
||||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||||
import com.jsowell.pile.vo.web.PileMerchantInfoVO;
|
import com.jsowell.pile.vo.web.PileMerchantInfoVO;
|
||||||
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import com.jsowell.pile.vo.zdl.EquipBusinessPolicyVO;
|
|
||||||
import com.jsowell.thirdparty.lianlian.domain.ConnectorStatusInfo;
|
import com.jsowell.thirdparty.lianlian.domain.ConnectorStatusInfo;
|
||||||
import com.jsowell.thirdparty.lianlian.domain.StationStatusInfo;
|
import com.jsowell.thirdparty.lianlian.domain.StationStatusInfo;
|
||||||
import com.jsowell.thirdparty.lianlian.vo.*;
|
import com.jsowell.thirdparty.lianlian.vo.*;
|
||||||
import com.jsowell.thirdparty.platform.domain.*;
|
import com.jsowell.thirdparty.platform.domain.*;
|
||||||
|
import com.jsowell.thirdparty.platform.dto.SupStationInfoDTO;
|
||||||
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
|
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
|
||||||
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||||
import com.jsowell.thirdparty.platform.util.Cryptos;
|
import com.jsowell.thirdparty.platform.util.Cryptos;
|
||||||
@@ -51,19 +46,11 @@ import com.yi.business.geo.GeoCodeInfo;
|
|||||||
import com.yi.business.geo.TermRelationTreeCoordinate;
|
import com.yi.business.geo.TermRelationTreeCoordinate;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.bouncycastle.crypto.CryptoException;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
import java.security.NoSuchProviderException;
|
|
||||||
import java.security.spec.InvalidKeySpecException;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -94,11 +81,10 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PileBillingTemplateService pileBillingTemplateService;
|
private PileBillingTemplateService pileBillingTemplateService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private YKCPushCommandService ykcPushCommandService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PileRemoteService pileRemoteService;
|
private PileBasicInfoMapper pileBasicInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||||
@@ -228,13 +214,12 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
// 未查到数据
|
// 未查到数据
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
|
|
||||||
ThirdPartySecretInfoVO thirdPartySecretInfoVO = getSiChuanSecretInfo();
|
ThirdPartySecretInfoVO thirdPartySecretInfoVO = getSiChuanSecretInfo();
|
||||||
|
|
||||||
PageInfo<ThirdPartyStationInfoVO> pageInfo = new PageInfo<>(stationInfos);
|
PageInfo<ThirdPartyStationInfoVO> pageInfo = new PageInfo<>(stationInfos);
|
||||||
List<SupStationInfo> resultList = new ArrayList<>();
|
List<SupStationInfoDTO> resultList = new ArrayList<>();
|
||||||
for (ThirdPartyStationInfoVO pileStationInfo : pageInfo.getList()) {
|
for (ThirdPartyStationInfoVO pileStationInfo : pageInfo.getList()) {
|
||||||
SupStationInfo stationInfo = new SupStationInfo();
|
SupStationInfoDTO stationInfo = new SupStationInfoDTO();
|
||||||
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
||||||
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
||||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||||
@@ -275,10 +260,13 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
stationInfo.setCapacity(pileStationInfo.getCapacity().setScale(4, RoundingMode.HALF_UP));
|
stationInfo.setCapacity(pileStationInfo.getCapacity().setScale(4, RoundingMode.HALF_UP));
|
||||||
}
|
}
|
||||||
// 获取充电桩设备列表
|
// 获取充电桩设备列表
|
||||||
List<EquipmentInfo> pileList = getPileList(pileStationInfo,pileStationInfo.getStationStatus());
|
List<EquipmentInfoDTO> pileList = getPileList(String.valueOf(pileStationInfo.getId()));
|
||||||
|
if (CollectionUtils.isNotEmpty(pileList)) {
|
||||||
|
stationInfo.setEquipmentInfosDTO(pileList); // 充电设备信息列表
|
||||||
|
}
|
||||||
// 站点额定总功率
|
// 站点额定总功率
|
||||||
BigDecimal stationRatedPower = pileList.stream()
|
BigDecimal stationRatedPower = pileList.stream()
|
||||||
.map(EquipmentInfo::getEquipmentPower)
|
.map(EquipmentInfoDTO::getEquipmentPower)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
stationInfo.setRatedPower(stationRatedPower.setScale(4, RoundingMode.HALF_UP));
|
stationInfo.setRatedPower(stationRatedPower.setScale(4, RoundingMode.HALF_UP));
|
||||||
|
|
||||||
@@ -294,9 +282,6 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
if (StringUtils.isNotBlank(pileStationInfo.getPictures())) {
|
if (StringUtils.isNotBlank(pileStationInfo.getPictures())) {
|
||||||
stationInfo.setPictures(Lists.newArrayList(pileStationInfo.getPictures().split(",")));
|
stationInfo.setPictures(Lists.newArrayList(pileStationInfo.getPictures().split(",")));
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(pileList)) {
|
|
||||||
stationInfo.setEquipmentInfos(pileList); // 充电设备信息列表
|
|
||||||
}
|
|
||||||
StringBuilder electricityFee = new StringBuilder();
|
StringBuilder electricityFee = new StringBuilder();
|
||||||
StringBuilder serviceFee = new StringBuilder();
|
StringBuilder serviceFee = new StringBuilder();
|
||||||
// 查询计费模板
|
// 查询计费模板
|
||||||
@@ -339,6 +324,7 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
map.put("PageCount", pageInfo.getPages());
|
map.put("PageCount", pageInfo.getPages());
|
||||||
map.put("PageNo", pageInfo.getPageNum());
|
map.put("PageNo", pageInfo.getPageNum());
|
||||||
map.put("StationInfos", resultList);
|
map.put("StationInfos", resultList);
|
||||||
|
log.info("queryStationsInfo result : " + JSON.toJSONString(map));
|
||||||
|
|
||||||
return ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
|
return ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
|
||||||
}
|
}
|
||||||
@@ -366,7 +352,7 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
|
|
||||||
|
|
||||||
// 组装中电联平台所需要的数据格式
|
// 组装中电联平台所需要的数据格式
|
||||||
SupStationInfo info = SupStationInfo.builder()
|
SupStationInfoDTO info = SupStationInfoDTO.builder()
|
||||||
.stationID(stationId)
|
.stationID(stationId)
|
||||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||||
.stationName(pileStationInfo.getStationName())
|
.stationName(pileStationInfo.getStationName())
|
||||||
@@ -401,11 +387,11 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取充电桩设备列表
|
//获取充电桩设备列表
|
||||||
List<EquipmentInfo> pileList = getPileList(pileStationInfo,pileStationInfo.getStationStatus());
|
List<EquipmentInfoDTO> pileList = getPileList(String.valueOf(pileStationInfo.getId()));
|
||||||
|
|
||||||
// 站点额定总功率
|
// 站点额定总功率
|
||||||
BigDecimal stationRatedPower = pileList.stream()
|
BigDecimal stationRatedPower = pileList.stream()
|
||||||
.map(EquipmentInfo::getEquipmentPower)
|
.map(EquipmentInfoDTO::getEquipmentPower)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
info.setRatedPower(stationRatedPower.setScale(4, RoundingMode.HALF_UP));
|
info.setRatedPower(stationRatedPower.setScale(4, RoundingMode.HALF_UP));
|
||||||
info.setPeriodFee(Constants.one);
|
info.setPeriodFee(Constants.one);
|
||||||
@@ -461,7 +447,7 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(pileList)) {
|
if (CollectionUtils.isNotEmpty(pileList)) {
|
||||||
info.setEquipmentInfos(pileList); // 充电设备信息列表
|
info.setEquipmentInfosDTO(pileList); // 充电设备信息列表
|
||||||
}
|
}
|
||||||
stationInfos.add(info);
|
stationInfos.add(info);
|
||||||
|
|
||||||
@@ -1125,79 +1111,98 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
public List<EquipmentInfoDTO> getPileList(String stationId) {
|
||||||
* 获取桩列表信息
|
List<EquipmentInfoDTO> resultList = new ArrayList<>();
|
||||||
*
|
|
||||||
* @param pileStationInfo
|
|
||||||
* @param stationStatus
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private List<EquipmentInfo> getPileList(PileStationInfo pileStationInfo , String stationStatus) {
|
|
||||||
List<EquipmentInfo> resultList = new ArrayList<>();
|
|
||||||
// 通过站点id查询桩基本信息
|
// 通过站点id查询桩基本信息
|
||||||
List<PileBasicInfo> list = pileBasicInfoService.getPileListByStationId(String.valueOf(pileStationInfo.getId()));
|
List<PileDetailInfoVO> list = getPileDetailInfoList(stationId);
|
||||||
// 封装成中电联平台对象
|
// 封装成联联平台对象
|
||||||
for (PileBasicInfo pileBasicInfo : list) {
|
for (PileDetailInfoVO pileDetailInfoVO : list) {
|
||||||
EquipmentInfo equipmentInfo = new EquipmentInfo();
|
com.jsowell.pile.thirdparty.EquipmentInfoDTO equipmentInfo = new EquipmentInfoDTO();
|
||||||
String pileSn = pileBasicInfo.getSn();
|
String pileSn = pileDetailInfoVO.getPileSn();
|
||||||
|
|
||||||
equipmentInfo.setEquipmentID(pileSn);
|
equipmentInfo.setEquipmentID(pileSn);
|
||||||
equipmentInfo.setEquipmentClassification(Constants.one);
|
equipmentInfo.setEquipmentClassification(1);
|
||||||
PileModelInfoVO modelInfo = pileModelInfoService.getPileModelInfoByPileSn(pileSn);
|
|
||||||
equipmentInfo.setEquipmentType(Integer.parseInt(modelInfo.getSpeedType()));
|
|
||||||
equipmentInfo.setPower(new BigDecimal(modelInfo.getRatedPower()).setScale(4, RoundingMode.HALF_UP));
|
|
||||||
|
|
||||||
List<ConnectorInfo> connectorList = getConnectorList(pileBasicInfo,stationStatus);
|
if (StringUtils.isBlank(pileDetailInfoVO.getSpeedType())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
equipmentInfo.setEquipmentType(Integer.valueOf(pileDetailInfoVO.getSpeedType()));
|
||||||
|
equipmentInfo.setEquipmentPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||||
|
|
||||||
|
String pileStatus = pileDetailInfoVO.getPileStatus();
|
||||||
|
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.setPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(4, RoundingMode.HALF_UP));
|
||||||
|
|
||||||
|
// 枪口列表
|
||||||
|
List<ConnectorInfoDTO> connectorList = getConnectorListForLianLian(pileDetailInfoVO);
|
||||||
equipmentInfo.setConnectorInfos(connectorList);
|
equipmentInfo.setConnectorInfos(connectorList);
|
||||||
|
|
||||||
resultList.add(equipmentInfo);
|
resultList.add(equipmentInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public List<PileDetailInfoVO> getPileDetailInfoList(String stationId) {
|
||||||
* 获取枪口列表
|
List<PileDetailInfoVO> pileDetailInfoList = pileBasicInfoMapper.getPileDetailInfoList(stationId);
|
||||||
*
|
if (CollectionUtils.isEmpty(pileDetailInfoList)) {
|
||||||
* @param pileBasicInfo
|
return new ArrayList<>();
|
||||||
* @param stationStatus
|
}
|
||||||
* @return
|
List<String> pileSnList = pileDetailInfoList.stream()
|
||||||
*/
|
.map(PileDetailInfoVO::getPileSn)
|
||||||
private List<ConnectorInfo> getConnectorList(PileBasicInfo pileBasicInfo , String stationStatus) {
|
.collect(Collectors.toList());
|
||||||
List<ConnectorInfo> resultList = new ArrayList<>();
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
List<PileConnectorInfo> list = pileConnectorInfoService.selectPileConnectorInfoList(pileBasicInfo.getSn());
|
|
||||||
|
public List<ConnectorInfoDTO> getConnectorListForLianLian(PileDetailInfoVO pileDetailInfoVO) {
|
||||||
|
List<ConnectorInfoDTO> resultList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<PileConnectorInfo> list = pileConnectorInfoService.selectPileConnectorInfoList(pileDetailInfoVO.getPileSn());
|
||||||
for (PileConnectorInfo pileConnectorInfo : list) {
|
for (PileConnectorInfo pileConnectorInfo : list) {
|
||||||
ConnectorInfo connectorInfo = new ConnectorInfo();
|
ConnectorInfoDTO connectorInfo = new ConnectorInfoDTO();
|
||||||
|
|
||||||
connectorInfo.setConnectorID(pileConnectorInfo.getPileConnectorCode());
|
connectorInfo.setConnectorID(pileConnectorInfo.getPileConnectorCode());
|
||||||
connectorInfo.setEquipmentClassification(Constants.one);
|
connectorInfo.setEquipmentClassification(1);
|
||||||
String pileSn = pileConnectorInfo.getPileSn();
|
int connectorType = StringUtils.equals("1", pileDetailInfoVO.getSpeedType()) ? 4 : 3;
|
||||||
PileModelInfoVO modelInfo = pileModelInfoService.getPileModelInfoByPileSn(pileSn);
|
|
||||||
int connectorType = StringUtils.equals("1", modelInfo.getSpeedType()) ? 4 : 3;
|
|
||||||
|
|
||||||
connectorInfo.setConnectorType(connectorType);
|
connectorInfo.setConnectorType(connectorType);
|
||||||
// 车位号
|
|
||||||
if (StringUtils.isNotBlank(pileConnectorInfo.getParkNo())) {
|
connectorInfo.setVoltageUpperLimits(new BigDecimal(pileDetailInfoVO.getRatedVoltage()).setScale(4, RoundingMode.HALF_UP));
|
||||||
connectorInfo.setParkNo(pileConnectorInfo.getParkNo());
|
connectorInfo.setVoltageLowerLimits(new BigDecimal(pileDetailInfoVO.getRatedVoltage()).setScale(4, RoundingMode.HALF_UP));
|
||||||
}
|
connectorInfo.setCurrent(new BigDecimal(pileDetailInfoVO.getRatedCurrent()).setScale(4, RoundingMode.HALF_UP));
|
||||||
connectorInfo.setVoltageUpperLimits(Integer.valueOf(modelInfo.getRatedVoltage()));
|
connectorInfo.setPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(4, RoundingMode.HALF_UP));
|
||||||
connectorInfo.setVoltageLowerLimits(Integer.valueOf(modelInfo.getRatedVoltage()));
|
connectorInfo.setNationalStandard(StringUtils.equals("1", pileDetailInfoVO.getSpeedType()) ? 12 : 11);
|
||||||
connectorInfo.setCurrent(Integer.valueOf(modelInfo.getRatedCurrent()));
|
connectorInfo.setAuxPower(3); // 3-兼容12V和24V
|
||||||
connectorInfo.setNationalStandard(2);
|
connectorInfo.setOperateStatus(50); // 50-正常使用
|
||||||
// if (!StringUtils.equals(modelInfo.getConnectorNum(), "1")) {
|
|
||||||
// // 如果不是单枪,则枪口功率需要除以枪口数量
|
/* if (!StringUtils.equals(pileDetailInfoVO.getConnectorNum(), "1")) {
|
||||||
// String ratedPowerStr = modelInfo.getRatedPower();
|
// 如果不是单枪,则枪口功率需要除以枪口数量
|
||||||
// BigDecimal ratedPower = new BigDecimal(ratedPowerStr);
|
String ratedPowerStr = pileDetailInfoVO.getRatedPower();
|
||||||
// connectorInfo.setPower(ratedPower.divide(new BigDecimal(modelInfo.getConnectorNum()), 1, BigDecimal.ROUND_HALF_UP));
|
BigDecimal ratedPower = new BigDecimal(ratedPowerStr);
|
||||||
// }else {
|
connectorInfo.setPower(ratedPower.divide(new BigDecimal(pileDetailInfoVO.getConnectorNum()), 1, BigDecimal.ROUND_HALF_UP));
|
||||||
// }
|
}else {
|
||||||
connectorInfo.setAuxPower(3);
|
connectorInfo.setPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||||
connectorInfo.setOpreateStatus(Integer.valueOf(stationStatus));
|
}*/
|
||||||
connectorInfo.setPower(new BigDecimal(modelInfo.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
|
|
||||||
|
|
||||||
resultList.add(connectorInfo);
|
resultList.add(connectorInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user