diff --git a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuiZhouPlatformController.java b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuiZhouPlatformController.java index 71f9a9084..ec192f0a9 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuiZhouPlatformController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuiZhouPlatformController.java @@ -7,6 +7,7 @@ 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.QueryOrderDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; import com.jsowell.pile.thirdparty.CommonParamsDTO; import com.jsowell.thirdparty.lianlian.common.CommonResult; @@ -209,4 +210,13 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController { return response; } + + @PostMapping("/tempPushHistoryOrderInfo") + public RestApiResponse tempPushHistoryOrderInfo(@RequestBody QueryOrderDTO dto) { + RestApiResponse response = null; + String result = platformLogic.pushOrderInfo(dto); + response = new RestApiResponse<>(result); + return response; + } + } \ No newline at end of file diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuiZhouPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuiZhouPlatformServiceImpl.java index 6699638aa..e2b9bc905 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuiZhouPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuiZhouPlatformServiceImpl.java @@ -21,6 +21,7 @@ import com.jsowell.common.util.*; import com.jsowell.pile.domain.*; import com.jsowell.pile.dto.QueryConnectorListDTO; import com.jsowell.pile.dto.QueryOperatorInfoDTO; +import com.jsowell.pile.dto.QueryOrderDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; import com.jsowell.pile.service.*; import com.jsowell.pile.thirdparty.CommonParamsDTO; @@ -692,7 +693,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService { ChargeOrderInfo orderInfo = transformChargeOrderInfo(orderBasicInfo, orderDetail); - List billingList = pileBillingTemplateService.queryBillingPrice(orderBasicInfo.getStationId()); + // List billingList = pileBillingTemplateService.queryBillingPrice(orderBasicInfo.getStationId()); // 先将list按照 尖、峰、平、谷 时段排序 // List collect = billingList.stream().sorted(Comparator.comparing(BillingPriceVO::getTimeType)).collect(Collectors.toList()); // 再循环该list,拼装对应的充电价格、费率 @@ -710,6 +711,28 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService { return result; } + @Override + public String pushOrderInfo(QueryOrderDTO dto) { + // ThirdPartySecretInfoVO thirdPartySecretInfoVO = getGuiZhouPlatformSecretInfo(); + + // 根据站点id, 开始时间,结束时间查询出所有的订单信息 + // List orderListVOS = orderBasicInfoService.selectOrderBasicInfoList(dto); + List orderCodes = orderBasicInfoService.tempGetOrderCodes(dto); + if (CollectionUtils.isEmpty(orderCodes)) { + return "订单信息为空"; + } + // List orderCodeList = orderListVOS.stream().map(OrderListVO::getOrderCode).collect(Collectors.toList()); + for (String orderCode : orderCodes) { + try { + String result = notificationChargeOrderInfoHistory(orderCode); + logger.info("订单:{} 推送结果:{}", orderCode, result); + }catch (Exception e) { + logger.error("订单:{} 推送error, ", orderCode, e); + } + } + return "Success"; + } + /** * 推送充换电站用能统计信息 supervise_notification_operation_stats_info *