update 广西平台Service

This commit is contained in:
Lemon
2024-12-30 11:47:32 +08:00
parent e8e85af444
commit eff073a4ce
5 changed files with 81 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.QueryStartChargeDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.thirdparty.CommonParamsDTO;
@@ -88,6 +89,14 @@ public class GuangXiPlatformController extends ThirdPartyBaseController {
return CommonResult.failed("查询充电站信息发生异常");
}
@PostMapping("/queryStationInfo")
public RestApiResponse<?> queryStationInfo(@RequestBody QueryStationInfoDTO queryStationInfoDTO) {
Map<String, String> map = platformLogic.queryStationsInfo(queryStationInfoDTO);
RestApiResponse<?> response = new RestApiResponse<>(map);
return response;
}
/**
* 查询充电站状态信息
* query_station_status

View File

@@ -1245,6 +1245,9 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
equipmentInfo.setNewNationalStandard(1);
equipmentInfo.setVinFlag(1);
equipmentInfo.setEquipmentName(pileSn);
equipmentInfo.setEquipmentInvestment(new BigDecimal("0.0"));
equipmentInfo.setProductSN(pileSn);
equipmentInfo.setOpenDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileDetailInfoVO.getCreateTime()));
equipmentInfo.setPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
// 枪口列表
@@ -1371,15 +1374,19 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
if (StringUtils.isNotBlank(pileConnectorInfo.getParkNo())) {
connectorInfo.setParkNo(pileConnectorInfo.getParkNo());
}
connectorInfo.setVoltageUpperLimits(Integer.valueOf(pileDetailInfoVO.getRatedVoltage()));
connectorInfo.setVoltageUpperLimits(Integer.parseInt(pileDetailInfoVO.getRatedVoltage()));
connectorInfo.setEquipmentClassification(1);
connectorInfo.setVoltageLowerLimits(Integer.valueOf(pileDetailInfoVO.getRatedVoltage()));
connectorInfo.setCurrent(Integer.valueOf(pileDetailInfoVO.getRatedCurrent()));
connectorInfo.setVoltageLowerLimits(Integer.parseInt(pileDetailInfoVO.getRatedVoltage()));
connectorInfo.setCurrent(Integer.parseInt(pileDetailInfoVO.getRatedCurrent()));
connectorInfo.setConnectorName(pileConnectorInfo.getPileConnectorCode());
connectorInfo.setOperateStatus(50); // 50-正常使用
connectorInfo.setOpreateStatus(50); // 50-正常使用
connectorInfo.setNationalStandard(2); // 2-2015
connectorInfo.setNationalStandard(StringUtils.equals("1", pileDetailInfoVO.getSpeedType()) ? 12 : 11); // 2-2015
connectorInfo.setAuxPower(3); // 3-兼容12V和24V
connectorInfo.setStatus(Integer.parseInt(pileConnectorInfo.getStatus()));
connectorInfo.setCurrentUpperLimits(Integer.parseInt(pileDetailInfoVO.getRatedCurrent()));
connectorInfo.setCurrentLowerLimits(Integer.parseInt(pileDetailInfoVO.getRatedCurrent()));
connectorInfo.setPowerType(StringUtils.equals(Constants.ONE, pileDetailInfoVO.getSpeedType()) ? 2 : 1);
if (!StringUtils.equals(pileDetailInfoVO.getConnectorNum(), "1")) {
// 如果不是单枪,则枪口功率需要除以枪口数量

View File

@@ -47,6 +47,12 @@ public class ConnectorInfo {
@JSONField(name = "ConnectorType")
private Integer connectorType;
/**
* 枪口状态
*/
@JSONField(name = "Status")
private Integer status;
/**
* 额定电压上限(单位V) Y
*/
@@ -83,6 +89,18 @@ public class ConnectorInfo {
@JSONField(name = "ConstantCurrentUpperLimits")
private Integer ConstantCurrentUpperLimits;
/**
* 额 定 电 流 上限
*/
@JSONField(name = "CurrentUpperLimits")
private Integer currentUpperLimits;
/**
* 额 定 电 流 下限
*/
@JSONField(name = "CurrentLowerLimits")
private Integer currentLowerLimits;
/**
*恒功率电流下限
*/
@@ -95,6 +113,12 @@ public class ConnectorInfo {
@JSONField(name = "Power")
private BigDecimal power;
/**
* 接口功率类型
*/
@JSONField(name = "PowerType")
private Integer powerType;
/**
* 车位号 N
* 停车场车位编号

View File

@@ -140,6 +140,24 @@ public class EquipmentInfo {
@JSONField(name = "Power")
private BigDecimal power;
/**
* 设备开通时间
*/
@JSONField(name = "OpenDate")
private String openDate;
/**
* 设备投资金额
*/
@JSONField(name = "EquipmentInvestment")
private BigDecimal equipmentInvestment;
/**
* 设备出厂序号
*/
@JSONField(name = "ProductSN")
private String productSN;
/**
* 站点额定功率

View File

@@ -168,7 +168,7 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService {
@Override
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
int pageSize = dto.getPageSize() == null ? 50 : dto.getPageSize();
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
dto.setThirdPlatformType(thirdPlatformType);
PageUtils.startPage(pageNo, pageSize);
@@ -191,7 +191,7 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService {
// .areaCode()
// .streetCode()
.address(pileStationInfo.getAddress())
.serviceTel(pileStationInfo.getServiceTel())
.serviceTel(pileStationInfo.getStationTel())
.stationType(Integer.parseInt(pileStationInfo.getStationType()))
.stationStatus(Integer.parseInt(pileStationInfo.getStationStatus()))
.parkNums(Integer.parseInt(pileStationInfo.getParkNums()))
@@ -204,18 +204,29 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService {
.runDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileStationInfo.getCreateTime()))
.buildDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileStationInfo.getCreateTime()))
.build();
JSONObject electricityFee = new JSONObject();
JSONObject serviceFee = new JSONObject();
StringBuilder electricityFee = new StringBuilder();
StringBuilder serviceFee = new StringBuilder();
// 查询计费模板
List<BillingPriceVO> priceList = pileBillingTemplateService.queryBillingPrice(String.valueOf(pileStationInfo.getId()));
for (BillingPriceVO billingPriceVO : priceList) {
electricityFee.put(billingPriceVO.getStartTime() + "-" + billingPriceVO.getEndTime(), billingPriceVO.getElectricityPrice());
serviceFee.put(billingPriceVO.getStartTime() + "-" + billingPriceVO.getEndTime(), billingPriceVO.getServicePrice());
electricityFee.append(billingPriceVO.getStartTime())
.append("-").append(billingPriceVO.getEndTime())
.append(":").append(billingPriceVO.getElectricityPrice())
.append(";");
serviceFee.append(billingPriceVO.getStartTime())
.append("-").append(billingPriceVO.getEndTime())
.append(":").append(billingPriceVO.getServicePrice())
.append(";");
}
info.setElectricityFee(electricityFee.toJSONString());
info.setServiceFee(serviceFee.toJSONString());
// 去除最后一位的分号
electricityFee.deleteCharAt(electricityFee.length() - 1);
serviceFee.deleteCharAt(serviceFee.length() - 1);
info.setElectricityFee(electricityFee.toString());
info.setServiceFee(serviceFee.toString());
// AreaCode
String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213