mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-08-02 04:13:48 +08:00
Merge branch 'dev' of https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web into dev
This commit is contained in:
@@ -2,7 +2,6 @@ package com.jsowell.api.thirdparty;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.lianlian.common.CommonResult;
|
||||
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||
import io.minio.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
503
jsowell-admin/src/main/java/com/jsowell/api/thirdparty/YunWeiPlatformController.java
vendored
Normal file
503
jsowell-admin/src/main/java/com/jsowell/api/thirdparty/YunWeiPlatformController.java
vendored
Normal file
@@ -0,0 +1,503 @@
|
||||
package com.jsowell.api.thirdparty;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.lianlian.common.CommonResult;
|
||||
import com.jsowell.thirdparty.platform.dto.RetryOrderDTO;
|
||||
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
@Anonymous
|
||||
@RestController
|
||||
@RequestMapping("/yunwei")
|
||||
public class YunWeiPlatformController extends ThirdPartyBaseController{
|
||||
|
||||
|
||||
private final String platformName = "运维平台";
|
||||
|
||||
|
||||
private final String platformType = ThirdPlatformTypeEnum.YUN_WEI_PLATFORM.getTypeCode();
|
||||
|
||||
|
||||
@Autowired
|
||||
@Qualifier("yunWeiPlatformServiceImpl")
|
||||
private ThirdPartyPlatformService platformLogic;
|
||||
|
||||
|
||||
/**
|
||||
* getToken
|
||||
*/
|
||||
@PostMapping("/v1/query_token")
|
||||
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-请求令牌 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// Map<String, String> map = zdlService.generateToken(dto);
|
||||
Map<String, String> map = platformLogic.queryToken(dto);
|
||||
logger.info("{}-请求令牌 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "请求令牌成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("{}-请求令牌 error:" , platformName , e);
|
||||
return CommonResult.failed("获取token发生异常");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询充电站信息
|
||||
* query_stations_info
|
||||
*/
|
||||
@PostMapping("/v1/query_stations_info")
|
||||
public CommonResult<?> query_stations_info(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-查询充电站信息 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
logger.info("{}-携带的token:{}",platformName, request.getHeader("Authorization"));
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryStationInfoDTO queryStationInfoDTO = parseParamsDTO(dto , QueryStationInfoDTO.class);
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStationsInfo(queryStationInfoDTO);
|
||||
logger.info("{}-查询充电站信息 result:{}" , platformName , JSON.toJSONString(map));
|
||||
return CommonResult.success(0 , "查询充电站信息成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("{}-查询充电站信息 error:" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("查询充电站信息发生异常");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设备状态推送
|
||||
* notification_stationStatus
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/notification_stationStatus")
|
||||
public RestApiResponse<?> notification_stationStatus(@RequestBody PushRealTimeInfoDTO pushRealTimeInfoDTO , HttpServletRequest request) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.notificationStationStatus(pushRealTimeInfoDTO);
|
||||
logger.info("【{}】推送设备状态 result:{}" , this.getClass().getSimpleName() , result);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("【{}】推送设备状态 error:{}" , this.getClass().getSimpleName() , e.getMessage());
|
||||
response = new RestApiResponse<>(e.getCode() , e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("【{}】推送设备状态 error:{}" , this.getClass().getSimpleName() , e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("【{}】推送设备状态 response:{}" , this.getClass().getSimpleName() , response);
|
||||
return response;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备接口状态查询 query_station_status
|
||||
*
|
||||
* @param request
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/query_station_status")
|
||||
public CommonResult<?> query_stations_status(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-设备接口状态查询 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryStationInfoDTO queryStationInfoDTO = parseParamsDTO(dto , QueryStationInfoDTO.class);
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStationStatus(queryStationInfoDTO);
|
||||
logger.info("{}-设备接口状态查询 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "设备接口状态查询成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("{}-设备接口状态查询 error:" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("设备接口状态查询发生异常");
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计信息查询 query_station_stats
|
||||
*
|
||||
* @param request
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/query_station_stats")
|
||||
public CommonResult<?> query_station_stats(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-查询统计信息 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryStationInfoDTO queryStationInfoDTO = parseParamsDTO(dto , QueryStationInfoDTO.class);
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStationStats(queryStationInfoDTO);
|
||||
logger.info("{}-查询统计信息 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "查询统计信息成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("{}-查询统计信息 error:" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("查询统计信息发生异常");
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
*
|
||||
* @param request
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/query_equip_auth")
|
||||
public CommonResult<?> query_equip_auth(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-请求设备认证 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
dto.setPlatformType(platformType);
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryEquipmentDTO queryEquipmentDTO = parseParamsDTO(dto , QueryEquipmentDTO.class);
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryEquipAuth(queryEquipmentDTO);
|
||||
logger.info("{}-请求设备认证 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "请求设备认证成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求设备认证 error:" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("请求设备认证发生异常");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务策略信息
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
@RequestMapping("/v1/query_equip_business_policy")
|
||||
public CommonResult<?> query_equip_business_policy(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-查询业务策略信息 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryStartChargeDTO queryStartChargeDTO = parseParamsDTO(dto , QueryStartChargeDTO.class);
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryEquipBusinessPolicy(queryStartChargeDTO);
|
||||
logger.info("{}-查询业务策略信息 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "查询业务策略信息成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("{}-查询业务策略信息 error:" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("查询业务策略信息发生异常");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 请求启动充电
|
||||
*
|
||||
* @param request
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/query_start_charge")
|
||||
public CommonResult<?> query_start_charge(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-请求启动充电 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
dto.setPlatformType(platformType);
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryStartChargeDTO queryStartChargeDTO = parseParamsDTO(dto , QueryStartChargeDTO.class);
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStartCharge(queryStartChargeDTO);
|
||||
logger.info("{}-请求启动充电 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "请求启动充电成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求启动充电 error:" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("请求启动充电发生异常");
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notification_start_charge_result/{orderCode}")
|
||||
public RestApiResponse<?> notification_start_charge_result(@PathVariable("orderCode") String orderCode) {
|
||||
logger.info("【{}】推送启动充电结果 params:{}" , this.getClass().getSimpleName() , orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.notificationStartChargeResult(orderCode);
|
||||
logger.info("【{}】推送启动充电结果 result:{}" , this.getClass().getSimpleName() , result);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("【{}】推送启动充电结果 error" , this.getClass().getSimpleName() , e);
|
||||
response = new RestApiResponse<>(e.getCode() , e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("【{}】推送启动充电结果 error" , this.getClass().getSimpleName() , e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("【{}】推送启动充电结果 result:{}" , this.getClass().getSimpleName() , response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* http://localhost:8080/xindiantu/query_equip_charge_status/{startChargeSeq}
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/query_equip_charge_status")
|
||||
public CommonResult<?> query_equip_charge_status(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-查询充电状态 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
dto.setPlatformType(platformType);
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryEquipChargeStatusDTO queryEquipChargeStatusDTO = parseParamsDTO(dto , QueryEquipChargeStatusDTO.class);
|
||||
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryEquipChargeStatus(queryEquipChargeStatusDTO);
|
||||
logger.info("{}-查询充电状态 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "查询充电状态成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-查询充电状态 error:" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("查询充电状态发生异常");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* http://localhost:8080/hainan/notificationEquipChargeStatus
|
||||
*
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notification_equip_charge_status/{orderCode}")
|
||||
public RestApiResponse<?> notification_equip_charge_status(@PathVariable("orderCode") String orderCode) {
|
||||
logger.info("推送充电状态 params:{}" , orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.notificationEquipChargeStatus(orderCode);
|
||||
logger.info("推送充电状态 result:{}" , result);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("推送充电状态 error" , e);
|
||||
response = new RestApiResponse<>(e.getCode() , e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("推送充电状态 error" , e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("推送充电状态 result:{}" , response);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
*
|
||||
* @param request
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/query_stop_charge")
|
||||
public CommonResult<?> query_stop_charge(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-请求停止充电 params :{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryStartChargeDTO queryStartChargeDTO = parseParamsDTO(dto , QueryStartChargeDTO.class);
|
||||
logger.info("{}-请求停止充电 params :{}" , platformName , JSON.toJSONString(queryStartChargeDTO));
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryStopCharge(queryStartChargeDTO);
|
||||
|
||||
return CommonResult.success(0 , "请求停止充电成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-请求停止充电 error" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("{}-请求停止充电发生异常");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推送停止充电结果
|
||||
* http://localhost:8080/hainan/notificationStopChargeResult
|
||||
*
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notification_stop_charge_result/{orderCode}")
|
||||
public RestApiResponse<?> notification_stop_charge_result(@PathVariable("orderCode") String orderCode) {
|
||||
logger.info("推送停止充电结果 params:{}" , orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.notificationStopChargeResult(orderCode);
|
||||
logger.info("推送停止充电结果 result:{}" , result);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("推送停止充电结果 error" , e);
|
||||
response = new RestApiResponse<>(e.getCode() , e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("推送停止充电结果 error" , e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("推送停止充电结果 result:{}" , response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 充电订单信息推送
|
||||
*/
|
||||
@PostMapping("/v1/notification_charge_order_info")
|
||||
public RestApiResponse<?> notification_charge_order_info(@RequestBody QueryOrderDTO dto) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String result = platformLogic.pushOrderInfo(dto);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("推送充电订单信息 error" , e);
|
||||
response = new RestApiResponse<>(e.getCode() , e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("推送充电订单信息 error" , e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("推送充电订单信息 result:{}" , response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充电订单信息
|
||||
* retry_notification_order_info
|
||||
* @param request
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/retry_notification_order_info")
|
||||
public CommonResult<?> retry_notification_order_info(HttpServletRequest request , @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-获取充电订单信息 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
// 解析入参
|
||||
RetryOrderDTO retryOrderDTO = parseParamsDTO(dto , RetryOrderDTO.class);
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.retryNotificationOrderInfo(retryOrderDTO.getStartChargeSeqs());
|
||||
logger.info("{}-获取充电订单信息 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "获取充电订单信息成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-获取充电订单信息 error" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("{}-获取充电订单信息发生异常");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,22 @@
|
||||
package com.jsowell.api.thirdparty;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
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.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.JWTUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.thirdparty.lianlian.common.CommonResult;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||
import com.jsowell.thirdparty.platform.service.impl.ZhongDianLianPlatformServiceImpl;
|
||||
import com.jsowell.thirdparty.platform.util.Cryptos;
|
||||
import com.jsowell.thirdparty.platform.util.Encodes;
|
||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.google.common.collect.ImmutableBiMap;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
|
||||
@@ -266,6 +266,6 @@ dubbo:
|
||||
password: 79HMu!6nlOiLm^Q[
|
||||
protocol:
|
||||
name: dubbo
|
||||
port: 20880
|
||||
port: -1
|
||||
consumer:
|
||||
check: false # 关键配置:启动时不检查提供者
|
||||
|
||||
@@ -8,7 +8,7 @@ spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 192.168.8.2
|
||||
host: 192.168.0.32
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
@@ -35,9 +35,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://192.168.8.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://192.168.0.32:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: jsowell_dev
|
||||
# url: jdbc:mysql://192.168.8.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# url: jdbc:mysql://192.168.0.32:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: jsowell_prd_copy
|
||||
password: 123456
|
||||
# 从库数据源
|
||||
@@ -89,7 +89,7 @@ spring:
|
||||
|
||||
# rabbitmq配置 sit
|
||||
rabbitmq:
|
||||
host: 192.168.8.2
|
||||
host: 192.168.0.32
|
||||
port: 5672
|
||||
username: admin
|
||||
password: admin
|
||||
@@ -257,7 +257,7 @@ dubbo:
|
||||
name: wcc-server
|
||||
qosEnable: false
|
||||
registry:
|
||||
address: nacos://192.168.8.2:8848
|
||||
address: nacos://192.168.0.32:8848
|
||||
parameters:
|
||||
namespace: e328faaf-8516-42d0-817a-7406232b3581
|
||||
username: nacos
|
||||
|
||||
@@ -35,10 +35,10 @@ public class DirectRabbitConfig {
|
||||
// return new Queue(RabbitConstants.QUEUE_HEART_BEAT);
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public Queue realtimeDataQueue() {
|
||||
// return new Queue(RabbitConstants.QUEUE_REALTIME_DATA);
|
||||
// }
|
||||
@Bean
|
||||
public Queue realtimeDataQueue() {
|
||||
return new Queue(RabbitConstants.QUEUE_REALTIME_DATA);
|
||||
}
|
||||
//
|
||||
// @Bean
|
||||
// public Queue priceSenderQueue() {
|
||||
@@ -88,10 +88,10 @@ public class DirectRabbitConfig {
|
||||
// return BindingBuilder.bind(heartBeatQueue()).to(exchange()).with(RabbitConstants.QUEUE_HEART_BEAT);
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public Binding bindRealtimeData() {
|
||||
// return BindingBuilder.bind(realtimeDataQueue()).to(exchange()).with(RabbitConstants.QUEUE_REALTIME_DATA);
|
||||
// }
|
||||
@Bean
|
||||
public Binding bindRealtimeData() {
|
||||
return BindingBuilder.bind(realtimeDataQueue()).to(exchange()).with(RabbitConstants.QUEUE_REALTIME_DATA);
|
||||
}
|
||||
//
|
||||
// @Bean
|
||||
// public Binding bindPriceSender() {
|
||||
|
||||
@@ -38,6 +38,7 @@ public enum ThirdPlatformTypeEnum {
|
||||
CHANG_ZHOU_PLATFORM("25", "新运常畅充", "0585PCW57"),
|
||||
SI_CHUAN_PLATFORM("26", "四川省平台", "MA01H3BQ2"),
|
||||
JI_LIN_PLATFORM("27", "吉林省平台", "723195753"),
|
||||
YUN_WEI_PLATFORM("28", "运维平台", "MA27QY0F4"),
|
||||
;
|
||||
|
||||
private String typeCode;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.pile.vo.zdl;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -82,5 +83,16 @@ public class EquipBusinessPolicyVO {
|
||||
*/
|
||||
@JsonProperty(value = "SevicePrice")
|
||||
private BigDecimal servicePrice;
|
||||
|
||||
/**
|
||||
* 单位:元/度,小数点后 4 位。 基础设施运营商和客户运营商协议电 价。无协议电价,则填写基础电费价 格
|
||||
*/
|
||||
@JSONField(name = "DiscountElecPrice")
|
||||
private BigDecimal discountElecPrice;
|
||||
|
||||
|
||||
@JSONField(name = "DiscountServicePrice")
|
||||
private BigDecimal discountServicePrice;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.jsowell.thirdparty.common;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
@@ -11,15 +10,11 @@ import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
|
||||
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.bouncycastle.crypto.CryptoException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
512
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/common/StationInfo1.java
vendored
Normal file
512
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/common/StationInfo1.java
vendored
Normal file
@@ -0,0 +1,512 @@
|
||||
package com.jsowell.thirdparty.platform.common;
|
||||
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
import com.jsowell.pile.thirdparty.publicinfo.BaseStationInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充电站信息
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class StationInfo1 extends BaseStationInfo {
|
||||
/**
|
||||
* 充电站ID Y
|
||||
* 对接平台自定义的唯一编码
|
||||
* <=20字符
|
||||
*/
|
||||
@JSONField(name = "StationID")
|
||||
private String stationID;
|
||||
|
||||
/**
|
||||
* 运营商ID Y
|
||||
* 运营商ID
|
||||
* 9字符
|
||||
*/
|
||||
@JSONField(name = "OperatorID")
|
||||
private String operatorID;
|
||||
|
||||
/**
|
||||
* 设备所属运营商ID Y
|
||||
* 设备所属运营商组织机构代码
|
||||
* 9字符
|
||||
*/
|
||||
@JSONField(name = "EquipmentOwnerID")
|
||||
private String equipmentOwnerID;
|
||||
|
||||
/**
|
||||
* 充电站名称 Y
|
||||
* 充电站名称的描述
|
||||
* <=50字符
|
||||
*/
|
||||
@JSONField(name = "StationName")
|
||||
private String stationName;
|
||||
|
||||
/**
|
||||
* 充电站国家代码 Y
|
||||
* 比如CN
|
||||
* 2字符
|
||||
*/
|
||||
@JSONField(name = "CountryCode")
|
||||
private String countryCode;
|
||||
|
||||
/**
|
||||
* 充电站省市辖区编码 Y
|
||||
* 填写内容为参照GB/T 2260-2007
|
||||
* 20字符
|
||||
*/
|
||||
@JSONField(name = "AreaCode")
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 街道编码
|
||||
*/
|
||||
@JSONField(name = "StreetCode")
|
||||
private String streetCode;
|
||||
|
||||
/**
|
||||
* 详细地址 Y
|
||||
* <=50字符
|
||||
*/
|
||||
@JSONField(name = "Address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 站点电话 Y
|
||||
* 能够联系场站工作人员进行协助的联系电话
|
||||
* <=30字符
|
||||
*/
|
||||
@JSONField(name = "StationTel")
|
||||
private String stationTel;
|
||||
|
||||
/**
|
||||
* 服务电话 Y
|
||||
* 平台服务电话,例如400的电话
|
||||
* <=30字符
|
||||
*/
|
||||
@JSONField(name = "ServiceTel")
|
||||
private String serviceTel;
|
||||
|
||||
/**
|
||||
* 站点类型 Y
|
||||
* 1-公共
|
||||
* 50-个人
|
||||
* 100-公交(专用)
|
||||
* 101-环卫(专用)
|
||||
* 102-物流(专用)
|
||||
* 103-出租车(专用)
|
||||
* 104-分时租赁(专用)
|
||||
* 105-小区共享(专用)
|
||||
* 106-单位(专用)
|
||||
* 255-其他
|
||||
*/
|
||||
@JSONField(name = "StationType")
|
||||
private Integer stationType;
|
||||
|
||||
/**
|
||||
* 站点状态 Y
|
||||
* 0:未知
|
||||
* 1:建设中
|
||||
* 5:关闭下线
|
||||
* 6:维护中
|
||||
* 50:正常使用
|
||||
*/
|
||||
@JSONField(name = "StationStatus")
|
||||
private Integer stationStatus;
|
||||
|
||||
/**
|
||||
* 经度 Y
|
||||
* GCJ-02坐标系
|
||||
* 保留小数点后6位
|
||||
*/
|
||||
@JSONField(name = "StationLng")
|
||||
private BigDecimal stationLng;
|
||||
|
||||
/**
|
||||
* 纬度 Y
|
||||
* GCJ-02坐标系
|
||||
* 保留小数点后6位
|
||||
*/
|
||||
@JSONField(name = "StationLat")
|
||||
private BigDecimal stationLat;
|
||||
|
||||
/**
|
||||
* 站点引导 N
|
||||
* 描述性文字,用于引导车主找到充电车位
|
||||
* <=100字符
|
||||
*/
|
||||
@JSONField(name = "SiteGuide")
|
||||
private String siteGuide;
|
||||
|
||||
/**
|
||||
* 站点额定总功率
|
||||
* 单位 kW,保留 1 位小数
|
||||
*/
|
||||
@JSONField(name = "RatedPower")
|
||||
private BigDecimal ratedPower;
|
||||
|
||||
/**
|
||||
* 建设场所 Y
|
||||
* 1:居民区
|
||||
* 2:公共机构
|
||||
* 3:企事业单位
|
||||
* 4:写字楼
|
||||
* 5:工业园区
|
||||
* 6:交通枢纽
|
||||
* 7:大型文体设施
|
||||
* 8:城市绿地
|
||||
* 9:大型建筑配建停车场
|
||||
* 10:路边停车位
|
||||
* 11:城际高速服务区
|
||||
* 12:风景区
|
||||
* 13:公交场站
|
||||
* 14:加油加气站
|
||||
* 15:出租车
|
||||
* 255:其他
|
||||
*/
|
||||
@JSONField(name = "Construction")
|
||||
private Integer construction;
|
||||
|
||||
/**
|
||||
* 站点照片 N
|
||||
* 充电设备照片、充电车位照片、停车场入口照片
|
||||
*/
|
||||
@JSONField(name = "Pictures")
|
||||
private List<String> pictures;
|
||||
|
||||
/**
|
||||
* 使用车型描述 N
|
||||
* 描述该站点接受的车大小以及类型,如大巴、物流车、私家乘用车、出租车等
|
||||
* <=100字符
|
||||
*/
|
||||
@JSONField(name = "MatchCars")
|
||||
private List<String> matchCars;
|
||||
|
||||
/**
|
||||
* 车位楼层及数量描述 N
|
||||
* 车位楼层以及数量信息
|
||||
* <=100字符
|
||||
*/
|
||||
@JSONField(name = "ParkInfo")
|
||||
private String parkInfo;
|
||||
|
||||
/**
|
||||
* 营业时间 N
|
||||
* 营业时间描述,推荐格式:周一至周日00:00-24:00
|
||||
* <=100字符
|
||||
*/
|
||||
@JSONField(name = "BusineHours")
|
||||
private String busineHours;
|
||||
|
||||
/**
|
||||
* 充电电费率 N
|
||||
* 充电费描述,推荐格式:XX 元/度
|
||||
* <=256字符
|
||||
*/
|
||||
@JSONField(name = "ElectricityFee")
|
||||
private String electricityFee;
|
||||
|
||||
/**
|
||||
* 服务费率 N
|
||||
* 服务费率描述,推荐格式:XX 元/度
|
||||
* <=100字符
|
||||
*/
|
||||
@JSONField(name = "ServiceFee")
|
||||
private String serviceFee;
|
||||
|
||||
/**
|
||||
* 是否停车免费 0:否 1:是
|
||||
*/
|
||||
@JSONField(name = "ParkFree")
|
||||
private Integer parkFree;
|
||||
|
||||
/**
|
||||
* 停车费 N
|
||||
* 停车费率描述
|
||||
*/
|
||||
@JSONField(name = "ParkFee")
|
||||
private String parkFee;
|
||||
|
||||
/**
|
||||
* 支付方式 N
|
||||
* 支付方式:刷卡、线上、现金 其中电子钱包类卡为刷卡,身份鉴权卡、微信/ 支付宝、APP为线上
|
||||
* <=20字符
|
||||
*/
|
||||
@JSONField(name = "Payment")
|
||||
private String payment;
|
||||
|
||||
/**
|
||||
* 备注 N
|
||||
* 其他备注信息
|
||||
* <=100字符
|
||||
*/
|
||||
@JSONField(name = "Remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 充电设备信息列表 Y
|
||||
* 该充电站所有充电设备信息对象集合
|
||||
*/
|
||||
@JSONField(name = "EquipmentInfos")
|
||||
private List<EquipmentInfo> equipmentInfos;
|
||||
|
||||
/**
|
||||
* 投建日期
|
||||
*
|
||||
*/
|
||||
@JSONField(name = "RunDate")
|
||||
private String runDate;
|
||||
|
||||
/**
|
||||
* 投建日期
|
||||
*
|
||||
*/
|
||||
@JSONField(name = "BuildDate")
|
||||
private String buildDate;
|
||||
|
||||
/**
|
||||
* 是否独立报桩 (0-否;1-是) Y
|
||||
* 如果是独立报桩需要填写户号以及容量
|
||||
*/
|
||||
@JSONField(name = "IsAloneApply")
|
||||
private Integer isAloneApply;
|
||||
|
||||
/**
|
||||
* 户号 N
|
||||
* 国网电费账单户号
|
||||
*/
|
||||
@JSONField(name = "AccountNumber")
|
||||
private String accountNumber;
|
||||
|
||||
/**
|
||||
* 容量(单位KW) N
|
||||
* 独立电表申请的功率
|
||||
*/
|
||||
@JSONField(name = "Capacity")
|
||||
private BigDecimal capacity;
|
||||
|
||||
/**
|
||||
* 峰谷分时
|
||||
* 0:否 1:是
|
||||
*/
|
||||
@JSONField(name = "PeriodFee")
|
||||
private Integer periodFee;
|
||||
|
||||
/**
|
||||
* 视频监控配套情况
|
||||
* 0:无 1:有
|
||||
*/
|
||||
@JSONField(name = "VideoMonitor")
|
||||
private Integer videoMonitor;
|
||||
|
||||
/**
|
||||
* 是否是公共停车场库 (0-否;1-是) Y
|
||||
* 如果是公共停车场库需要填写场库编号
|
||||
*/
|
||||
@JSONField(name = "IsPublicParkingLot")
|
||||
private Integer isPublicParkingLot;
|
||||
|
||||
/**
|
||||
* 停车场库编号 N
|
||||
* 公共停车场库编号
|
||||
*/
|
||||
@JSONField(name = "ParkingLotNumber")
|
||||
private String parkingLotNumber;
|
||||
|
||||
/**
|
||||
* 停车场产权方 N
|
||||
* 停车场产权人
|
||||
*/
|
||||
// private String ParkOwner;
|
||||
|
||||
/**
|
||||
* 停车场管理方 N
|
||||
* 停车场管理人(如:XX 物业)
|
||||
*/
|
||||
// private String ParkManager;
|
||||
|
||||
/**
|
||||
* 全天开放 Y
|
||||
* 是否全天开放(0-否;1-是),如果为0,则营业时间必填
|
||||
*/
|
||||
@JSONField(name = "OpenAllDay")
|
||||
private Integer openAllDay;
|
||||
|
||||
|
||||
/**
|
||||
* 最低单价 Y
|
||||
* 最低充电电费率
|
||||
*/
|
||||
@JSONField(name = "MinElectricityPrice")
|
||||
private BigDecimal minElectricityPrice;
|
||||
|
||||
/**
|
||||
* 停车收费类型 Y
|
||||
* 0:停车收费;
|
||||
* 1:停车免费;
|
||||
* 2:限时免费;
|
||||
* 3:充电限免
|
||||
*/
|
||||
@JSONField(name = "ParkFeeType")
|
||||
private Integer parkFeeType;
|
||||
|
||||
/**
|
||||
* 是否靠近卫生间(0-否;1-是) Y
|
||||
*/
|
||||
@JSONField(name = "ToiletFlag")
|
||||
private Integer toiletFlag;
|
||||
|
||||
/**
|
||||
* 是否靠近便利店(0-否;1-是) Y
|
||||
*/
|
||||
@JSONField(name = "StoreFlag")
|
||||
private Integer storeFlag;
|
||||
|
||||
/**
|
||||
* 是否靠近餐厅(0-否;1-是) Y
|
||||
*/
|
||||
@JSONField(name = "RestaurantFlag")
|
||||
private Integer restaurantFlag;
|
||||
|
||||
/**
|
||||
* 是否靠近休息室(0-否;1-是) Y
|
||||
*/
|
||||
@JSONField(name = "LoungeFlag")
|
||||
private Integer loungeFlag;
|
||||
|
||||
/**
|
||||
* 是否有雨棚(0-否;1-是) Y
|
||||
*/
|
||||
@JSONField(name = "CanopyFlag")
|
||||
private Integer canopyFlag;
|
||||
|
||||
/**
|
||||
* 是否有小票机(0-否;1-是) Y
|
||||
*/
|
||||
@JSONField(name = "PrinterFlag")
|
||||
private Integer printerFlag;
|
||||
|
||||
/**
|
||||
* 是否有道闸(0-否;1-是) Y
|
||||
*/
|
||||
@JSONField(name = "BarrierFlag")
|
||||
private Integer barrierFlag;
|
||||
|
||||
/**
|
||||
* 是否有地锁(0-否;1-是) Y
|
||||
*/
|
||||
@JSONField(name = "ParkingLockFlag")
|
||||
private Integer parkingLockFlag;
|
||||
|
||||
/**
|
||||
* 投入运营日期
|
||||
*/
|
||||
@JSONField(name = "OfficialRunTime")
|
||||
private String officialRunTime;
|
||||
|
||||
/**
|
||||
* 站点类别
|
||||
* 1:充电站
|
||||
* 2:换电站
|
||||
* 3:充换电一体站
|
||||
*/
|
||||
@JSONField(name = "StationClassification")
|
||||
private Integer stationClassification;
|
||||
|
||||
/**
|
||||
* 站点类别子分类
|
||||
* 1:集中式:专营充电业务的场站
|
||||
* 2:分散式:充电和停车功能复合的场站
|
||||
*/
|
||||
@JSONField(name = "SubStationClassification")
|
||||
private Integer subStationClassification;
|
||||
|
||||
/**
|
||||
* 充电接口标准支持
|
||||
* 0:国标
|
||||
* 1:欧标
|
||||
*/
|
||||
@JSONField(name = "SupportStandard")
|
||||
private String supportStandard;
|
||||
|
||||
/**
|
||||
* 土地所有权
|
||||
* 1: 国有临时用地
|
||||
* 2: 国有建设用地
|
||||
* 3: 集体土地
|
||||
*/
|
||||
@JSONField(name = "OwnershipOfLand")
|
||||
private Integer ownershipOfLand;
|
||||
|
||||
/**
|
||||
* 城市用地分类
|
||||
* 1: 居住用地
|
||||
* 2: 商业服务用地
|
||||
* 3: 公共管理与服务设施用地
|
||||
* 4: 工业用地
|
||||
* 5: 物流仓储用地
|
||||
* 6: 交通设施用地
|
||||
* 7: 绿地与广场用地
|
||||
* 8:公用设施用地
|
||||
* 255: 其它用地
|
||||
*/
|
||||
@JSONField(name = "LandProperty")
|
||||
private Integer landProperty;
|
||||
|
||||
/**
|
||||
* 服务车辆类型
|
||||
* 1:公交车
|
||||
* 2:出租车
|
||||
* 3:物流车
|
||||
* 4:通勤车
|
||||
* 5:大巴车
|
||||
* 6:私家车
|
||||
* 7:环卫车
|
||||
* 8:泥头、重卡车
|
||||
* 9:公务车
|
||||
* 10:网约车
|
||||
* 11:港口码头作业车
|
||||
* 255:其它
|
||||
*/
|
||||
@JSONField(name = "ServiceCarTypes")
|
||||
private String serviceCarTypes;
|
||||
|
||||
/**
|
||||
* 充电计费信息
|
||||
*/
|
||||
@JSONField(name = "PolicyInfos")
|
||||
private List<PolicyInfo> policyInfos;
|
||||
|
||||
|
||||
@Data
|
||||
public static class PolicyInfo{
|
||||
@JSONField(name = "StartTime")
|
||||
private String startTime;
|
||||
|
||||
@JSONField(name = "ElecPrice")
|
||||
private BigDecimal elecPrice;
|
||||
|
||||
@JSONField(name = "ServicePrice")
|
||||
private BigDecimal servicePrice;
|
||||
|
||||
/**
|
||||
* 单位:元/度,小数点后 4 位。 基础设施运营商和客户运营商协议电 价。无协议电价,则填写基础电费价 格
|
||||
*/
|
||||
@JSONField(name = "DiscountElecPrice")
|
||||
private BigDecimal discountElecPrice;
|
||||
|
||||
@JSONField(name = "DiscountServicePrice")
|
||||
private BigDecimal discountServicePrice;
|
||||
}
|
||||
|
||||
}
|
||||
174
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/domain/SupStationInfo1.java
vendored
Normal file
174
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/domain/SupStationInfo1.java
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
package com.jsowell.thirdparty.platform.domain;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.jsowell.thirdparty.platform.common.StationInfo;
|
||||
import com.jsowell.thirdparty.platform.common.StationInfo1;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 吉林省平台-充电站信息1
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class SupStationInfo1 extends StationInfo1 {
|
||||
/**
|
||||
* 充换电站唯一编码
|
||||
* 行政区划代码,区县地区码(6位)+运营商ID(9位)+充换电站ID
|
||||
*/
|
||||
@JSONField(name = "StationUniqueNumber")
|
||||
private String stationUniqueNumber;
|
||||
|
||||
/**
|
||||
* 充换电站所在县以下行政区划代码
|
||||
* 填写内容为12位行政区划代码,1-6位为县及以上行政区划代码,7-12位为县以下区划代码;
|
||||
* 参考地址:http://www.stats.gov.cn/sj/tjbz/tjyqhdmhcxhfdm/2022/
|
||||
*/
|
||||
@JSONField(name = "AreaCodeCountryside")
|
||||
private String areaCodeCountryside;
|
||||
|
||||
|
||||
@JSONField(name = "TownCode")
|
||||
private String townCode;
|
||||
|
||||
/**
|
||||
* 站点分类
|
||||
* 1:充电站
|
||||
* 2:换电站
|
||||
* 3:充换电一体站
|
||||
*/
|
||||
@JSONField(name = "StationClassification")
|
||||
private Integer stationClassification;
|
||||
|
||||
/**
|
||||
* 7*24小时营业
|
||||
* 0:否
|
||||
* 1:是
|
||||
*/
|
||||
@JSONField(name = "RoundTheClock")
|
||||
private Integer roundTheClock;
|
||||
|
||||
|
||||
/**
|
||||
* 停车费类型
|
||||
* 0:免费
|
||||
* 1:不免费
|
||||
* 2:限时免费停车
|
||||
* 3:充电限时减免
|
||||
* 255:参考场地实际收费标准
|
||||
*/
|
||||
@JSONField(name = "ParkType")
|
||||
private Integer parkType;
|
||||
|
||||
/**
|
||||
* 电费类型
|
||||
* 1:商业用电
|
||||
* 2:普通工业用电
|
||||
* 3:大工业用电
|
||||
* 4:其它用电
|
||||
*/
|
||||
@JSONField(name = "ElectricityType")
|
||||
private Integer electricityType;
|
||||
|
||||
/**
|
||||
* 报装类型
|
||||
* 是否独立报装:
|
||||
* 0:否
|
||||
* 1:是
|
||||
*/
|
||||
@JSONField(name = "BusinessExpandType")
|
||||
private Integer businessExpandType;
|
||||
|
||||
/**
|
||||
* 正式投运时间
|
||||
*/
|
||||
@JSONField(name = "OfficialRunTime")
|
||||
private String officialRunTime;
|
||||
|
||||
/**
|
||||
* 建站时间
|
||||
*/
|
||||
@JSONField(name = "BuildTime")
|
||||
private String buildTime;
|
||||
|
||||
/**
|
||||
* 充换电站方位
|
||||
* 1:地面-停车场
|
||||
* 2:地面-路侧
|
||||
* 3:地下停车场
|
||||
* 4:立体式停车楼
|
||||
*/
|
||||
@JSONField(name = "StationOrientation")
|
||||
private String stationOrientation;
|
||||
|
||||
/**
|
||||
* 充换电站建筑面积
|
||||
* 该充电场站建设用 地面积
|
||||
*/
|
||||
@JSONField(name = "StationArea")
|
||||
private String stationArea;
|
||||
|
||||
/**
|
||||
* 充换电站人工值守
|
||||
* 0:无
|
||||
* 1:有
|
||||
*/
|
||||
@JSONField(name = "HavePerson")
|
||||
private String havePerson;
|
||||
|
||||
/**
|
||||
* 周边配套设施
|
||||
* 1:卫生间
|
||||
* 2:便利店
|
||||
* 3:餐厅
|
||||
* 4:休息室
|
||||
* 5:雨棚
|
||||
*/
|
||||
@JSONField(name = "SupportingFacilities")
|
||||
private String supportingFacilities;
|
||||
|
||||
/**
|
||||
* 设备所属方名称
|
||||
*/
|
||||
@JSONField(name = "EquipmentOwnerName")
|
||||
private String equipmentOwnerName;
|
||||
|
||||
/**
|
||||
* 供电类型
|
||||
* 1:直供电 2:转供电
|
||||
*/
|
||||
@JSONField(name = "SupplyType")
|
||||
private Integer supplyType;
|
||||
|
||||
/**
|
||||
* 供电局用户编号
|
||||
*/
|
||||
@JSONField(name = "ResidentNo")
|
||||
private String residentNo;
|
||||
|
||||
/**
|
||||
* 表号
|
||||
*/
|
||||
@JSONField(name = "WattHourMeterNo")
|
||||
private String wattHourMeterNo;
|
||||
|
||||
/**
|
||||
* 外电功率
|
||||
*/
|
||||
@JSONField(name = "ForwardPower")
|
||||
private String forwardPower;
|
||||
|
||||
/**
|
||||
* 充电站全省 唯一备案号
|
||||
*/
|
||||
@JSONField(name = "RecordUniqueNo")
|
||||
private String recordUniqueNo;
|
||||
|
||||
private List<PolicyInfo> PolicyInfos;
|
||||
}
|
||||
27
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/dto/SupStationInfoDTO1.java
vendored
Normal file
27
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/dto/SupStationInfoDTO1.java
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
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 com.jsowell.thirdparty.platform.domain.SupStationInfo1;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 内蒙古平台站点信息
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class SupStationInfoDTO1 extends SupStationInfo1 {
|
||||
|
||||
@JSONField(name = "EquipmentInfos")
|
||||
private List<EquipmentInfoDTO> equipmentInfosDTO;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.jsowell.thirdparty.platform.service.impl;
|
||||
|
||||
import cn.hutool.core.util.PageUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
@@ -10,11 +9,9 @@ import com.google.common.collect.Maps;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.lianlian.StationPaymentEnum;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.enums.ykc.BillingTimeTypeEnum;
|
||||
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.util.*;
|
||||
@@ -33,7 +30,6 @@ import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileMerchantInfoVO;
|
||||
@@ -45,7 +41,6 @@ import com.jsowell.thirdparty.platform.domain.*;
|
||||
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
|
||||
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||
import com.jsowell.thirdparty.platform.util.Cryptos;
|
||||
import com.jsowell.thirdparty.platform.util.GBSignUtils;
|
||||
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
|
||||
import com.jsowell.thirdparty.platform.util.ThirdPartyPlatformUtils;
|
||||
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
||||
@@ -59,7 +54,6 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.enums.thirdparty.BusinessInformationExchangeEnum;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
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.util.*;
|
||||
@@ -26,12 +25,10 @@ import com.jsowell.pile.thirdparty.ConnectorInfo;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
||||
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.thirdparty.lianlian.domain.*;
|
||||
import com.jsowell.thirdparty.lianlian.vo.AccessTokenVO;
|
||||
import com.jsowell.thirdparty.lianlian.vo.LianLianResultVO;
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.jsowell.common.enums.ykc.*;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.*;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.ykcCommond.RemoteControlGroundLockCommand;
|
||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.mapper.PileBasicInfoMapper;
|
||||
@@ -38,8 +37,7 @@ import com.jsowell.thirdparty.lianlian.domain.*;
|
||||
import com.jsowell.thirdparty.lianlian.vo.*;
|
||||
import com.jsowell.thirdparty.platform.domain.*;
|
||||
import com.jsowell.thirdparty.platform.dto.ChargeOrderInfoDTO;
|
||||
import com.jsowell.thirdparty.platform.dto.QueryParkingLockDTO;
|
||||
import com.jsowell.thirdparty.platform.dto.SupStationInfoDTO;
|
||||
import com.jsowell.thirdparty.platform.dto.SupStationInfoDTO1;
|
||||
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
|
||||
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||
import com.jsowell.thirdparty.platform.util.Cryptos;
|
||||
@@ -219,19 +217,19 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
||||
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
||||
int pageSize = dto.getPageSize() == null ? 50 : dto.getPageSize();
|
||||
dto.setThirdPlatformType("25");
|
||||
dto.setThirdPlatformType(thirdPlatformType);
|
||||
PageUtils.startPage(pageNo, pageSize);
|
||||
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.selectStationInfosByThirdParty(dto);
|
||||
if (CollectionUtils.isEmpty(stationInfos)) {
|
||||
// 未查到数据
|
||||
return null;
|
||||
}
|
||||
ThirdPartySecretInfoVO thirdPartySecretInfoVO = null;
|
||||
ThirdPartySecretInfoVO thirdPartySecretInfoVO = getJiLinSecretInfo();
|
||||
|
||||
PageInfo<ThirdPartyStationInfoVO> pageInfo = new PageInfo<>(stationInfos);
|
||||
List<SupStationInfoDTO> resultList = new ArrayList<>();
|
||||
List<SupStationInfoDTO1> resultList = new ArrayList<>();
|
||||
for (ThirdPartyStationInfoVO pileStationInfo : pageInfo.getList()) {
|
||||
SupStationInfoDTO stationInfo = new SupStationInfoDTO();
|
||||
SupStationInfoDTO1 stationInfo = new SupStationInfoDTO1();
|
||||
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
||||
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||
@@ -268,6 +266,9 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
// 站点图片
|
||||
if (StringUtils.isNotBlank(pileStationInfo.getPictures())) {
|
||||
stationInfo.setPictures(Lists.newArrayList(pileStationInfo.getPictures().split(",")));
|
||||
}else{
|
||||
// 无照片传空数组
|
||||
stationInfo.setPictures(Lists.newArrayList());
|
||||
}
|
||||
stationInfo.setRoundTheClock(Constants.one);
|
||||
//计费信息
|
||||
@@ -277,24 +278,28 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
if (CollectionUtils.isEmpty(billingPriceVOList)) {
|
||||
return null;
|
||||
}
|
||||
SupStationInfo.PolicyInfo policyInfo = null;
|
||||
SupStationInfo1.PolicyInfo policyInfo = null;
|
||||
// 获取计费模板
|
||||
List<SupStationInfo.PolicyInfo> policyInfoList = new ArrayList<>();
|
||||
List<SupStationInfo1.PolicyInfo> policyInfoList = new ArrayList<>();
|
||||
for (BillingPriceVO billingPriceVO : billingPriceVOList) {
|
||||
// 将时段开始时间、电费、服务费信息进行封装
|
||||
policyInfo = new SupStationInfo.PolicyInfo();
|
||||
policyInfo = new SupStationInfo1.PolicyInfo();
|
||||
String startTime = billingPriceVO.getStartTime() + ":00"; // 00:00:00 格式
|
||||
// 需要将中间的冒号去掉,改为 000000 格式
|
||||
String replace = StringUtils.replace(startTime, ":", "");
|
||||
policyInfo.setStartTime(replace);
|
||||
policyInfo.setElecFee(new BigDecimal(billingPriceVO.getElectricityPrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
policyInfo.setServiceFee(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
BigDecimal elecPrice = new BigDecimal(billingPriceVO.getElectricityPrice()).setScale(4 , BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal servicePrice = new BigDecimal(billingPriceVO.getServicePrice()).setScale(4 , BigDecimal.ROUND_HALF_UP);
|
||||
|
||||
policyInfo.setStartTime(replace);
|
||||
policyInfo.setElecPrice(elecPrice);
|
||||
policyInfo.setServicePrice(servicePrice);
|
||||
policyInfo.setDiscountElecPrice(elecPrice);
|
||||
policyInfo.setDiscountServicePrice(servicePrice);
|
||||
policyInfoList.add(policyInfo);
|
||||
}
|
||||
stationInfo.setPolicyInfos(policyInfoList);
|
||||
|
||||
stationInfo.setParkType("255");
|
||||
stationInfo.setParkType(255);
|
||||
stationInfo.setElectricityType(Constants.one);
|
||||
stationInfo.setBusinessExpandType(Integer.valueOf(pileStationInfo.getAloneApply())); //是否独立报装 //0,否 1,是
|
||||
// 报装电源容量
|
||||
@@ -340,7 +345,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationInfo(String stationId) {
|
||||
List<SupStationInfoDTO> stationInfos = new ArrayList<>();
|
||||
List<SupStationInfoDTO1> stationInfos = new ArrayList<>();
|
||||
// 通过id查询站点相关信息
|
||||
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.parseLong(stationId));
|
||||
// 查询相关配置信息
|
||||
@@ -355,7 +360,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
|
||||
// 组装中电联平台所需要的数据格式
|
||||
SupStationInfoDTO info = SupStationInfoDTO.builder()
|
||||
SupStationInfoDTO1 info = SupStationInfoDTO1.builder()
|
||||
.stationID(stationId)
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.stationName(pileStationInfo.getStationName())
|
||||
@@ -363,7 +368,6 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
.areaCode(pileStationInfo.getAreaCode())
|
||||
.address(pileStationInfo.getAddress())
|
||||
.serviceTel(pileStationInfo.getStationTel())
|
||||
|
||||
.stationClassification(Constants.one)
|
||||
.stationType(Integer.valueOf(pileStationInfo.getStationType()))
|
||||
.stationStatus(Integer.valueOf(pileStationInfo.getStationStatus()))
|
||||
@@ -372,12 +376,12 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
.stationLat(new BigDecimal(pileStationInfo.getStationLat()).setScale(6, RoundingMode.HALF_UP))
|
||||
.construction(Integer.valueOf(pileStationInfo.getConstruction()))
|
||||
.roundTheClock(Constants.one)//7*24小时营业 0:否 1:是
|
||||
.parkType("255")//0:免费 1:不免费 2:限时免费停车 3:充电限时减免 255:参考场地实际收费标准
|
||||
.parkType(255)//0:免费 1:不免费 2:限时免费停车 3:充电限时减免 255:参考场地实际收费标准
|
||||
.electricityType(Constants.one) //1:商业用电 2:普通工业用电 3:大工业用电 4:其他用电
|
||||
.businessExpandType(Constants.one)
|
||||
.businessExpandType(Integer.valueOf(pileStationInfo.getAloneApply()))
|
||||
.videoMonitor(Constants.zero)
|
||||
.equipmentOwnerName("通榆县公路客运总站(通榆县开通客运服务有限公司)")
|
||||
.supplyType(Constants.one)
|
||||
// .equipmentOwnerName("通榆县公路客运总站(通榆县开通客运服务有限公司)")
|
||||
// .supplyType(Constants.one)
|
||||
.build();
|
||||
|
||||
// 报装电源容量
|
||||
@@ -402,19 +406,23 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
if (CollectionUtils.isEmpty(billingPriceVOList)) {
|
||||
return null;
|
||||
}
|
||||
SupStationInfo.PolicyInfo policyInfo = null;
|
||||
SupStationInfo1.PolicyInfo policyInfo = null;
|
||||
// 获取计费模板
|
||||
List<SupStationInfo.PolicyInfo> policyInfoList = new ArrayList<>();
|
||||
List<SupStationInfo1.PolicyInfo> policyInfoList = new ArrayList<>();
|
||||
for (BillingPriceVO billingPriceVO : billingPriceVOList) {
|
||||
// 将时段开始时间、电费、服务费信息进行封装
|
||||
policyInfo = new SupStationInfo.PolicyInfo();
|
||||
policyInfo = new SupStationInfo1.PolicyInfo();
|
||||
String startTime = billingPriceVO.getStartTime() + ":00"; // 00:00:00 格式
|
||||
// 需要将中间的冒号去掉,改为 000000 格式
|
||||
String replace = StringUtils.replace(startTime, ":", "");
|
||||
policyInfo.setStartTime(replace);
|
||||
policyInfo.setElecFee(new BigDecimal(billingPriceVO.getElectricityPrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
policyInfo.setServiceFee(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
BigDecimal elecPrice = new BigDecimal(billingPriceVO.getElectricityPrice()).setScale(4 , BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal servicePrice = new BigDecimal(billingPriceVO.getServicePrice()).setScale(4 , BigDecimal.ROUND_HALF_UP);
|
||||
|
||||
policyInfo.setStartTime(replace);
|
||||
policyInfo.setElecPrice(elecPrice);
|
||||
policyInfo.setServicePrice(servicePrice);
|
||||
policyInfo.setDiscountElecPrice(elecPrice);
|
||||
policyInfo.setDiscountServicePrice(servicePrice);
|
||||
policyInfoList.add(policyInfo);
|
||||
}
|
||||
info.setPolicyInfos(policyInfoList);
|
||||
@@ -529,8 +537,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("StationStatusInfos", stationStatusInfos);
|
||||
|
||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO.getOurDataSecret(),
|
||||
thirdPartySecretInfoVO.getOurDataSecretIv(), thirdPartySecretInfoVO.getTheirSigSecret());
|
||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@@ -666,7 +673,8 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
policyInfo.setStartTime(replace);
|
||||
policyInfo.setElecPrice(new BigDecimal(billingPriceVO.getElectricityPrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
policyInfo.setServicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
|
||||
policyInfo.setDiscountElecPrice(new BigDecimal(billingPriceVO.getElectricityPrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
policyInfo.setDiscountServicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
policyInfoList.add(policyInfo);
|
||||
}
|
||||
|
||||
@@ -1010,8 +1018,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
|
||||
log.info("请求参数:{}", JSON.toJSONString(json));
|
||||
return ThirdPartyPlatformUtils.generateResultMapV2(json, jiLinSecretInfo.getOurDataSecret()
|
||||
, jiLinSecretInfo.getOurDataSecretIv(), jiLinSecretInfo.getOurSigSecret());
|
||||
return ThirdPartyPlatformUtils.generateResultMap(json, jiLinSecretInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -1273,8 +1280,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("StationStats", supStationStatsInfo);
|
||||
|
||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMapV2(map, thirdPartySecretInfoVO.getOurDataSecret(),
|
||||
thirdPartySecretInfoVO.getOurDataSecretIv(), thirdPartySecretInfoVO.getTheirSigSecret());
|
||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@@ -1711,6 +1717,8 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
chargeOrderInfo.setConnectorID(orderBasicInfo.getPileConnectorCode());
|
||||
chargeOrderInfo.setStartSoc(startSoc.setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||
chargeOrderInfo.setEndSoc(endSoc.setScale(1, BigDecimal.ROUND_HALF_UP));
|
||||
chargeOrderInfo.setStartTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderBasicInfo.getChargeStartTime()));
|
||||
chargeOrderInfo.setEndTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderBasicInfo.getChargeEndTime()));
|
||||
// 累计充电量
|
||||
chargeOrderInfo.setTotalPower(orderDetail.getTotalUsedElectricity().setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||
chargeOrderInfo.setPushTimeStamp(DateUtils.getDateTime()); // 推送时间戳
|
||||
@@ -1767,8 +1775,6 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
List<ConnectorInfoDTO> connectorList = getConnectorList(pileDetailInfoVO,pileStationInfo);
|
||||
equipmentInfo.setConnectorInfos(connectorList);
|
||||
|
||||
equipmentInfo.setConnectorInfos(connectorList);
|
||||
|
||||
resultList.add(equipmentInfo);
|
||||
}
|
||||
|
||||
@@ -1819,7 +1825,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
connectorInfo.setNationalStandard(2);
|
||||
connectorInfo.setAuxPower(3);
|
||||
connectorInfo.setOpreateStatus(Integer.valueOf(pileStationInfo.getStationStatus()));
|
||||
connectorInfo.setOperateStatus(Integer.valueOf(pileStationInfo.getStationStatus()));
|
||||
// connectorInfo.setOperateStatus(Integer.valueOf(pileStationInfo.getStationStatus()));
|
||||
|
||||
String parkingLockFlag = pileStationInfo.getParkingLockFlag() == null ? "0" : pileStationInfo.getParkingLockFlag();
|
||||
connectorInfo.setHasLock(Integer.valueOf(parkingLockFlag)); //有无地锁 0 无 1 有
|
||||
@@ -1832,7 +1838,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
} else {
|
||||
// 为null时,使用默认生成的
|
||||
String pileConnectorQrCodeUrl = pileConnectorInfoService.getPileConnectorQrCodeUrl(connectorInfo.getConnectorID());
|
||||
connectorInfo.setChargingQrCode(pileConnectorQrCodeUrl+pileConnectorCode); // https://api.jsowellcloud.com/app-xcx-h5/pile/connectorDetail/8825000001536502
|
||||
connectorInfo.setChargingQrCode(pileConnectorQrCodeUrl); // https://api.jsowellcloud.com/app-xcx-h5/pile/connectorDetail/8825000001536502
|
||||
}
|
||||
|
||||
connectorInfo.setEquipmentClassification(Constants.one);
|
||||
|
||||
@@ -23,7 +23,6 @@ import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.*;
|
||||
import com.jsowell.common.util.bean.BeanUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.dto.*;
|
||||
@@ -41,7 +40,6 @@ import com.jsowell.pile.vo.lianlian.PushStationFeeVO;
|
||||
import com.jsowell.pile.vo.lianlian.StationElectStatsInfos;
|
||||
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.thirdparty.lianlian.domain.*;
|
||||
import com.jsowell.thirdparty.lianlian.vo.*;
|
||||
import com.jsowell.thirdparty.platform.common.ChargeDetail;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,6 @@ import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
||||
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
|
||||
import com.jsowell.pile.vo.web.OrderListVO;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
||||
import com.jsowell.pile.vo.zdl.EquipBusinessPolicyVO;
|
||||
|
||||
Reference in New Issue
Block a user