mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
update pre数据库
This commit is contained in:
@@ -8,17 +8,17 @@ spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: r-uf6k0uet7mihr5z78f.redis.rds.aliyuncs.com
|
||||
# host: 106.14.94.149
|
||||
# host: r-uf6k0uet7mihr5z78f.redis.rds.aliyuncs.com
|
||||
host: 106.14.94.149
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 账号
|
||||
username: jsowell
|
||||
# username: jsowell
|
||||
# 密码
|
||||
password: js@160829
|
||||
# password: js160829
|
||||
# password: js@160829
|
||||
password: js160829
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
@@ -38,12 +38,12 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://rm-uf6ra51u33dc3798l.mysql.rds.aliyuncs.com:3306/jsowell_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: jsowell
|
||||
password: js@160829
|
||||
# url: jdbc:mysql://106.14.94.149:3306/jsowell_pre?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: jsowell_pre
|
||||
# password: Js@160829
|
||||
# url: jdbc:mysql://rm-uf6ra51u33dc3798l.mysql.rds.aliyuncs.com:3306/jsowell_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: jsowell
|
||||
# password: js@160829
|
||||
url: jdbc:mysql://106.14.94.149:3306/jsowell_pre?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: jsowell_pre
|
||||
password: Js@160829
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
||||
@@ -236,12 +236,13 @@ public class JsowellTask {
|
||||
*/
|
||||
public void pushStationRealTimePowerInfo() {
|
||||
String env = SpringUtils.getActiveProfile();
|
||||
if (StringUtils.equalsIgnoreCase(env, "prd")) {
|
||||
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||
log.debug("PRE环境不执行");
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> thirdPartyTypeList = Lists.newArrayList(ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(),
|
||||
List<String> thirdPartyTypeList = Lists.newArrayList(
|
||||
ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(),
|
||||
ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode(),
|
||||
ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode()
|
||||
);
|
||||
@@ -267,53 +268,6 @@ public class JsowellTask {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 查询出要推送的站点(贵州、)
|
||||
// try {
|
||||
// String thirdPartyType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode();
|
||||
// List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
||||
//
|
||||
// List<String> stationIdList = stationInfoVOS.stream()
|
||||
// .map(StationInfoVO::getStationId)
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl();
|
||||
// guiZhouPlatformService.notificationPowerInfo(stationIdList);
|
||||
// } catch (Exception e) {
|
||||
// log.error("贵州省平台推送充电站实时功率失败", e);
|
||||
// }
|
||||
|
||||
//四川省平台推送充电站实时功率
|
||||
// try {
|
||||
// String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
|
||||
// List<StationInfoVO> stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2);
|
||||
//
|
||||
// List<String> stationIdList2 = stationInfoVOS2.stream()
|
||||
// .map(StationInfoVO::getStationId)
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl();
|
||||
// sichuanPlatformService.notificationPowerInfo(stationIdList2);
|
||||
// } catch (Exception e) {
|
||||
// log.error("四川省平台推送充电站实时功率失败", e);
|
||||
// }
|
||||
|
||||
// 吉林省平台推送充电站实时功率
|
||||
// try {
|
||||
// String thirdPartyType3 = ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode();
|
||||
// List<StationInfoVO> stationInfoVOS3 = thirdPartyStationRelationService.selectStationList(thirdPartyType3);
|
||||
//
|
||||
// List<String> stationIdList3 = stationInfoVOS3.stream()
|
||||
// .map(StationInfoVO::getStationId)
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// JiLinPlatformServiceImpl jiLinPlatformService = new JiLinPlatformServiceImpl();
|
||||
// jiLinPlatformService.notificationPowerInfo(stationIdList3);
|
||||
// } catch (Exception e) {
|
||||
// log.error("吉林省平台推送充电站实时功率失败", e);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -322,12 +276,13 @@ public class JsowellTask {
|
||||
*/
|
||||
public void pushStatisticsInfo() {
|
||||
String env = SpringUtils.getActiveProfile();
|
||||
if (StringUtils.equalsIgnoreCase(env, "prd")) {
|
||||
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||
log.debug("PRE环境不执行");
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> thirdPartyTypeList = Lists.newArrayList(ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(),
|
||||
List<String> thirdPartyTypeList = Lists.newArrayList(
|
||||
ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(),
|
||||
ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode(),
|
||||
ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode()
|
||||
);
|
||||
@@ -353,59 +308,6 @@ public class JsowellTask {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 贵州推送充电站统计信息
|
||||
/* try {
|
||||
String thirdPartyType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode();
|
||||
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
||||
|
||||
List<String> stationIdList = stationInfoVOS.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl();
|
||||
for (String stationId : stationIdList) {
|
||||
guiZhouPlatformService.notificationOperationStatsInfo(stationId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("贵州省平台推送充电站统计信息失败", e);
|
||||
}
|
||||
|
||||
//四川省平台推送用能统计
|
||||
try {
|
||||
String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
|
||||
List<StationInfoVO> stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2);
|
||||
|
||||
List<String> stationIdList2 = stationInfoVOS2.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl();
|
||||
for (String stationId : stationIdList2) {
|
||||
sichuanPlatformService.notificationOperationStatsInfo(stationId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("四川省平台推送用能统计失败", e);
|
||||
}
|
||||
|
||||
// 吉林省平台推送充电站用能统计
|
||||
try {
|
||||
String thirdPartyType3 = ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode();
|
||||
List<StationInfoVO> stationInfoVOS3 = thirdPartyStationRelationService.selectStationList(thirdPartyType3);
|
||||
|
||||
List<String> stationIdList3 = stationInfoVOS3.stream()
|
||||
.map(StationInfoVO::getStationId)
|
||||
.collect(Collectors.toList());
|
||||
JiLinPlatformServiceImpl jiLinPlatformService = new JiLinPlatformServiceImpl();
|
||||
for (String stationId : stationIdList3) {
|
||||
jiLinPlatformService.notificationOperationStatsInfo(stationId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("吉林省平台推送充电站用能统计失败", e);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -772,6 +772,13 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationStartChargeResult(String orderCode) {
|
||||
// 校验是否是吉林平台订单
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
if (orderInfo == null) {
|
||||
@@ -816,6 +823,11 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
String operatorID = dto.getOperatorID();
|
||||
String orderNo = dto.getOrderNo();
|
||||
dto.setStartChargeSeq(orderNo);
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderNo , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
// 通过订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(dto.getStartChargeSeq());
|
||||
// logger.info(operatorName + "查询订单信息 orderInfo:{}", orderInfo);
|
||||
@@ -895,6 +907,11 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationEquipChargeStatus(String orderCode) {
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderInfo.getOrderCode());
|
||||
@@ -992,6 +1009,12 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
//使用orderNo接收的数据
|
||||
String orderCode = dto.getOrderNo();
|
||||
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
|
||||
int orderStatus = 2;
|
||||
int succStat = 1;
|
||||
ThirdPartySecretInfoVO jiLinSecretInfo = getJiLinSecretInfo();
|
||||
@@ -1026,6 +1049,12 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationStopChargeResult(String orderCode) {
|
||||
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
if (orderInfo == null) {
|
||||
@@ -1067,6 +1096,11 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
@Override
|
||||
public String notificationChargeOrderInfo(String orderCode) {
|
||||
boolean needPushToThirdPartyPlatform = ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getOperatorId());
|
||||
|
||||
if (!needPushToThirdPartyPlatform) {
|
||||
return null;
|
||||
}
|
||||
// 根据订单号查询出信息
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||
@@ -1562,17 +1596,17 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
list.add(supStationPowerInfo);
|
||||
}
|
||||
|
||||
log.info("推送充电站实时功率信息:{}", JSON.toJSONString(list));
|
||||
|
||||
// 获取推送配置密钥信息
|
||||
ThirdPartySecretInfoVO guiZhouPlatformSecretInfo = getJiLinSecretInfo();
|
||||
ThirdPartySecretInfoVO jiLinSecretInfo = getJiLinSecretInfo();
|
||||
|
||||
String operatorId = Constants.OPERATORID_JIANG_SU;
|
||||
String operatorSecret = guiZhouPlatformSecretInfo.getTheirOperatorSecret();
|
||||
String signSecret = guiZhouPlatformSecretInfo.getTheirSigSecret();
|
||||
String dataSecret = guiZhouPlatformSecretInfo.getTheirDataSecret();
|
||||
String dataSecretIv = guiZhouPlatformSecretInfo.getTheirDataSecretIv();
|
||||
String urlAddress = guiZhouPlatformSecretInfo.getTheirUrlPrefix();
|
||||
String operatorSecret = jiLinSecretInfo.getTheirOperatorSecret();
|
||||
String signSecret = jiLinSecretInfo.getTheirSigSecret();
|
||||
String dataSecret = jiLinSecretInfo.getTheirDataSecret();
|
||||
String dataSecretIv = jiLinSecretInfo.getTheirDataSecretIv();
|
||||
String urlAddress = jiLinSecretInfo.getTheirUrlPrefix();
|
||||
|
||||
log.info("吉林平台信息:{}" , jiLinSecretInfo.toString());
|
||||
|
||||
String url = urlAddress + "notification_realtime_power_info";
|
||||
// 获取令牌
|
||||
@@ -1580,6 +1614,8 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
if (StringUtils.isBlank(token)) {
|
||||
return null;
|
||||
}
|
||||
log.info("获取令牌成功:{}", token);
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("StationPowerInfos", list);
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
Reference in New Issue
Block a user