Merge branch 'dev-new' into dev-new-rabbitmq

# Conflicts:
#	jsowell-admin/src/test/java/PaymentTestController.java
This commit is contained in:
Guoqs
2024-12-19 13:30:11 +08:00
64 changed files with 2858 additions and 767 deletions

View File

@@ -0,0 +1,39 @@
package com.jsowell.api.thirdparty;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.thirdparty.platform.service.impl.ChargeAlgorithmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 算法应用Controller
*
* @author Lemon
* @Date 2024/12/17 15:20:36
*/
@Anonymous
@RestController
@RequestMapping("/chargealgorithm")
public class ChargeAlgorithmController extends BaseController {
@Autowired
private ChargeAlgorithmService chargeAlgorithmService;
@GetMapping("/pushOrderInfo/{orderCode}")
public RestApiResponse<?> pushOrderInfo(@PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
try {
String result = chargeAlgorithmService.pushOrderInfo(orderCode);
response = new RestApiResponse<>(result);
}catch (Exception e) {
logger.error("算法应用推送订单信息 error, ", e);
response = new RestApiResponse<>(e);
}
return response;
}
}

View File

@@ -1,10 +1,11 @@
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;
import com.jsowell.pile.dto.QueryOperatorInfoDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.thirdparty.CommonParamsDTO;
@@ -12,12 +13,10 @@ import com.jsowell.thirdparty.lianlian.common.CommonResult;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/**
@@ -33,6 +32,7 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController {
@Qualifier("guiZhouPlatformServiceImpl")
private ThirdPartyPlatformService platformLogic;
/**
* getToken
*/
@@ -150,4 +150,63 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController {
}
return CommonResult.failed("查询充电站状态信息发生异常");
}
}
/**
* 历史充电订单信息推送
*/
@GetMapping("/v1/notificationChargeOrderInfoHistory/{orderCode}")
public RestApiResponse<?> notificationChargeOrderInfoHistory(@PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
String result = null;
try {
result = platformLogic.notificationChargeOrderInfoHistory(orderCode);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("贵州平台推送充电站历史充电订单信息 error", e);
return new RestApiResponse<>(e);
}
logger.info("贵州平台推送充电站历史充电订单信息 result:{}", result);
return response;
}
/**
* 推送充换电站用能统计信息
* @param stationId
* @return
*/
@GetMapping("/v1/notificationOperationStatsInfo/{stationId}")
public RestApiResponse<?> notificationOperationStatsInfo(@PathVariable("stationId") String stationId) {
RestApiResponse<?> response = null;
String result = null;
try {
result = platformLogic.notificationOperationStatsInfo(stationId);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("贵州平台推送充换电站用能统计信息 error", e);
return new RestApiResponse<>(e);
}
logger.info("贵州平台推送充换电站用能统计信息 result:{}", result);
return response;
}
/**
* 推送充换电站实时功率
* @param stationIds
* @return
*/
@GetMapping("/v1/notificationPowerInfo/{stationIds}")
public RestApiResponse<?> notificationPowerInfo(@PathVariable("stationIds") List<String> stationIds) {
RestApiResponse<?> response = null;
String result = null;
try {
result = platformLogic.notificationPowerInfo(stationIds);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("贵州平台推送充换电站用能统计信息 error", e);
return new RestApiResponse<>(e);
}
logger.info("贵州平台推送充换电站用能统计信息 result:{}", result);
return response;
}
}

View File

@@ -11,14 +11,12 @@ 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.PushInfoParamDTO;
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
import com.jsowell.pile.dto.PushStationInfoDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
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;
@@ -383,4 +381,12 @@ public class ZDLController extends ThirdPartyBaseController {
logger.info("宁波平台推送订单信息 result:{}", response);
return response;
}
@PostMapping("/tempPushHistoryOrderInfo")
public RestApiResponse<?> tempPushHistoryOrderInfo(@RequestBody QueryOrderDTO dto) {
RestApiResponse<?> response = null;
String result = platformLogic.pushOrderInfo(dto);
response = new RestApiResponse<>(result);
return response;
}
}