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

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