mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-11 10:49:52 +08:00
update 联联
This commit is contained in:
@@ -20,6 +20,7 @@ import com.jsowell.pile.dto.QueryStationDTO;
|
|||||||
import com.jsowell.pile.service.IPileStationInfoService;
|
import com.jsowell.pile.service.IPileStationInfoService;
|
||||||
import com.jsowell.pile.service.IStationSettingRelationService;
|
import com.jsowell.pile.service.IStationSettingRelationService;
|
||||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||||
|
import com.jsowell.pile.vo.base.StationSettingRelationVO;
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import com.jsowell.service.PileService;
|
import com.jsowell.service.PileService;
|
||||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||||
@@ -191,7 +192,9 @@ public class PileStationInfoController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||||
@GetMapping("/getSettingByStationId/{stationId}")
|
@GetMapping("/getSettingByStationId/{stationId}")
|
||||||
public AjaxResult getSettingByStationId(@PathVariable("stationId") Long id) {
|
public AjaxResult getSettingByStationId(@PathVariable("stationId") Long id) {
|
||||||
return AjaxResult.success(thirdPartySettingInfoService.getInfoByStationId(id));
|
StationSettingRelation info = new StationSettingRelation();
|
||||||
|
info.setStationId(id);
|
||||||
|
return AjaxResult.success(stationSettingRelationService.selectRelationInfo(info));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -210,11 +213,11 @@ public class PileStationInfoController extends BaseController {
|
|||||||
* @param info
|
* @param info
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('pile:station:edit')")
|
// @PreAuthorize("@ss.hasPermi('pile:station:edit')")
|
||||||
@PostMapping("/updateSettingByStationId")
|
// @PostMapping("/updateSettingByStationId")
|
||||||
public AjaxResult updateSettingByStationId(@RequestBody ThirdPartySettingInfo info) {
|
// public AjaxResult updateSettingByStationId(@RequestBody ThirdPartySettingInfo info) {
|
||||||
return AjaxResult.success(thirdPartySettingInfoService.updateStationSettingInfo(info));
|
// return AjaxResult.success(thirdPartySettingInfoService.updateStationSettingInfo(info));
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增站点互联互通配置信息
|
* 新增站点互联互通配置信息
|
||||||
@@ -243,14 +246,23 @@ public class PileStationInfoController extends BaseController {
|
|||||||
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
|
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 推送联联
|
||||||
|
if (StringUtils.equals("1", dto.getThirdPartyType())) {
|
||||||
String result = lianLianService.pushStationInfo(dto);
|
String result = lianLianService.pushStationInfo(dto);
|
||||||
response = new RestApiResponse<>(result);
|
response = new RestApiResponse<>(result);
|
||||||
|
}
|
||||||
}catch (BusinessException e) {
|
}catch (BusinessException e) {
|
||||||
logger.error("推送联联平台充电站信息 error",e);
|
logger.error("推送联联平台充电站信息 error",e);
|
||||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
logger.error("推送联联平台充电站信息 error", e);
|
logger.error("推送联联平台充电站信息 error", e);
|
||||||
response = new RestApiResponse<>(e);
|
response = new RestApiResponse<>("推送失败,请联系管理员");
|
||||||
|
// 删除对应配置信息
|
||||||
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
|
relation.setStationId(dto.getStationId());
|
||||||
|
relation.setDelFlag("1");
|
||||||
|
stationSettingRelationService.updateStationSettingRelation(relation);
|
||||||
}
|
}
|
||||||
logger.info("推送联联平台充电站信息 result:{}", response);
|
logger.info("推送联联平台充电站信息 result:{}", response);
|
||||||
return response;
|
return response;
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import lombok.NoArgsConstructor;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Builder
|
@Builder
|
||||||
public class LianLianPushStationInfoDTO {
|
public class LianLianPushStationInfoDTO {
|
||||||
|
private String thirdPartyType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运营商id
|
* 运营商id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.jsowell.pile.service.impl;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.jsowell.common.util.DateUtils;
|
import com.jsowell.common.util.DateUtils;
|
||||||
|
import com.jsowell.common.util.SecurityUtils;
|
||||||
|
import com.jsowell.framework.web.domain.server.Sys;
|
||||||
import com.jsowell.pile.vo.base.StationSettingRelationVO;
|
import com.jsowell.pile.vo.base.StationSettingRelationVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -61,7 +63,8 @@ public class StationSettingRelationServiceImpl implements IStationSettingRelatio
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertStationSettingRelation(StationSettingRelation stationSettingRelation) {
|
public int insertStationSettingRelation(StationSettingRelation stationSettingRelation) {
|
||||||
stationSettingRelation.setCreateTime(DateUtils.getNowDate());
|
// stationSettingRelation.setCreateTime(DateUtils.getNowDate());
|
||||||
|
stationSettingRelation.setCreateBy(SecurityUtils.getUsername());
|
||||||
return stationSettingRelationMapper.insertStationSettingRelation(stationSettingRelation);
|
return stationSettingRelationMapper.insertStationSettingRelation(stationSettingRelation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +76,7 @@ public class StationSettingRelationServiceImpl implements IStationSettingRelatio
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateStationSettingRelation(StationSettingRelation stationSettingRelation) {
|
public int updateStationSettingRelation(StationSettingRelation stationSettingRelation) {
|
||||||
stationSettingRelation.setUpdateTime(DateUtils.getNowDate());
|
// stationSettingRelation.setUpdateTime(DateUtils.getNowDate());
|
||||||
return stationSettingRelationMapper.updateStationSettingRelation(stationSettingRelation);
|
return stationSettingRelationMapper.updateStationSettingRelation(stationSettingRelation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where station_id = #{stationId,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteStationSettingRelationById" parameterType="Long">
|
<delete id="deleteStationSettingRelationById" parameterType="Long">
|
||||||
@@ -92,8 +92,8 @@
|
|||||||
t2.operator_secret as operatorSecret,
|
t2.operator_secret as operatorSecret,
|
||||||
t2.sign_secret as signSecret,
|
t2.sign_secret as signSecret,
|
||||||
t2.data_secret as dataSecret,
|
t2.data_secret as dataSecret,
|
||||||
t2.data_secret_IV as dataSecretIv,
|
t2.data_secret_IV as dataSecretIv
|
||||||
from station_setting_relation t1 join thirdparty_setting_info t2 on t1.type = t2.type
|
from station_setting_relation t1 join thirdparty_setting_info t2 on t1.third_party_type = t2.type
|
||||||
where t1.del_flag = '0'
|
where t1.del_flag = '0'
|
||||||
<if test="stationId != null">
|
<if test="stationId != null">
|
||||||
and t1.station_id = #{stationId,jdbcType=BIGINT}
|
and t1.station_id = #{stationId,jdbcType=BIGINT}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import com.jsowell.pile.dto.*;
|
|||||||
import com.jsowell.pile.service.*;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||||
|
import com.jsowell.pile.vo.base.StationSettingRelationVO;
|
||||||
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.BillingPriceVO;
|
import com.jsowell.pile.vo.uniapp.BillingPriceVO;
|
||||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||||
@@ -91,6 +92,9 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDockingPlatformConfigService dockingPlatformConfigService;
|
private IDockingPlatformConfigService dockingPlatformConfigService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IStationSettingRelationService stationSettingRelationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pushMerchantInfo(Long merchantId) {
|
public void pushMerchantInfo(Long merchantId) {
|
||||||
// 通过id查询运营商信息
|
// 通过id查询运营商信息
|
||||||
@@ -122,16 +126,23 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
// 通过id查询站点相关信息
|
// 通过id查询站点相关信息
|
||||||
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(dto.getStationId());
|
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(dto.getStationId());
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(dto.getStationId());
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(dto.getStationId());
|
||||||
throw new BusinessException("", "");
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(dto.getStationId());
|
||||||
|
if (relationInfo == null) {
|
||||||
|
// 新增
|
||||||
|
relation.setThirdPartyType(dto.getThirdPartyType());
|
||||||
|
stationSettingRelationService.insertStationSettingRelation(relation);
|
||||||
|
|
||||||
|
relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
// 组装联联平台所需要的数据格式
|
// 组装联联平台所需要的数据格式
|
||||||
StationInfo info = StationInfo.builder()
|
StationInfo info = StationInfo.builder()
|
||||||
@@ -790,16 +801,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
|
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
|
||||||
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
|
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationVO.getId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(stationVO.getId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationVO.getId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
String url = urlAddress + "notification_stationStatus";
|
String url = urlAddress + "notification_stationStatus";
|
||||||
|
|
||||||
@@ -836,16 +850,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||||
|
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
String url = urlAddress + "notification_orderInfo";
|
String url = urlAddress + "notification_orderInfo";
|
||||||
|
|
||||||
@@ -960,16 +977,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
// 推送启动充电结果(调用接口 notification_start_charge_result)
|
// 推送启动充电结果(调用接口 notification_start_charge_result)
|
||||||
String url = urlAddress + "notification_start_charge_result";
|
String url = urlAddress + "notification_start_charge_result";
|
||||||
@@ -1015,16 +1035,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
// 根据订单号查询订单信息
|
// 根据订单号查询订单信息
|
||||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
// 调用 查询充电状态方法
|
// 调用 查询充电状态方法
|
||||||
QueryEquipChargeStatusDTO dto = new QueryEquipChargeStatusDTO();
|
QueryEquipChargeStatusDTO dto = new QueryEquipChargeStatusDTO();
|
||||||
@@ -1066,16 +1089,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
String url = urlAddress + "notification_stop_charge_result";
|
String url = urlAddress + "notification_stop_charge_result";
|
||||||
|
|
||||||
@@ -1126,16 +1152,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||||
|
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
String url = urlAddress + "notification_charge_order_info";
|
String url = urlAddress + "notification_charge_order_info";
|
||||||
|
|
||||||
@@ -1224,16 +1253,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||||
|
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
String url = urlAddress + "query_order_settlement_info";
|
String url = urlAddress + "query_order_settlement_info";
|
||||||
|
|
||||||
@@ -1266,16 +1298,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
String url = urlAddress + "check_charge_orders";
|
String url = urlAddress + "check_charge_orders";
|
||||||
|
|
||||||
@@ -1339,16 +1374,19 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// 通过站点id查询相关配置信息
|
// 通过站点id查询相关配置信息
|
||||||
ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
StationSettingRelation relation = new StationSettingRelation();
|
||||||
if (settingInfo == null) {
|
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||||
|
StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation);
|
||||||
|
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||||
|
if (relationInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String operatorId = settingInfo.getOperatorId();
|
String operatorId = relationInfo.getOperatorId();
|
||||||
String operatorSecret = settingInfo.getOperatorSecret();
|
String operatorSecret = relationInfo.getOperatorSecret();
|
||||||
String signSecret = settingInfo.getSignSecret();
|
String signSecret = relationInfo.getSignSecret();
|
||||||
String dataSecret = settingInfo.getDataSecret();
|
String dataSecret = relationInfo.getDataSecret();
|
||||||
String dataSecretIv = settingInfo.getDataSecretIv();
|
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||||
String urlAddress = settingInfo.getUrlAddress();
|
String urlAddress = relationInfo.getUrlAddress();
|
||||||
|
|
||||||
String url = urlAddress + "notification_connector_charge_status";
|
String url = urlAddress + "notification_connector_charge_status";
|
||||||
|
|
||||||
|
|||||||
@@ -40,12 +40,12 @@
|
|||||||
<h2>二维码配置</h2>
|
<h2>二维码配置</h2>
|
||||||
<el-form label-position="right" label-width="200px" style="margin-top:10px">
|
<el-form label-position="right" label-width="200px" style="margin-top:10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="当前配置二维码规则:">
|
<el-form-item label="当前配置二维码规则:">
|
||||||
<el-input v-model="stationDetail.qrcodePrefix" maxlength="100px" :disabled="true"/>
|
<el-input v-model="stationDetail.qrcodePrefix" maxlength="100px" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="12">
|
<el-col :span="12">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button icon="el-icon-setting" size="big" @click="handleCreate"
|
<el-button icon="el-icon-setting" size="big" @click="handleCreate"
|
||||||
v-has-permi="['pile:station:edit']">配置参数
|
v-has-permi="['pile:station:edit']">配置参数
|
||||||
@@ -64,15 +64,15 @@
|
|||||||
style="margin-top:10px">
|
style="margin-top:10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="对接平台名称:" prop="type">
|
<el-form-item label="对接平台名称:" prop="thirdPartyType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="stationSettingInfo.type"
|
v-model="stationSettingInfo.thirdPartyType"
|
||||||
placeholder="请选择对接平台名称"
|
placeholder="请选择对接平台名称"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
:disabled="true"
|
:disabled="disableFlag"
|
||||||
@change="getStationSettingInfo"
|
@change="getSettingParams"
|
||||||
>
|
>
|
||||||
<!-- <el-option label="上海联联平台" value="1" />-->
|
<!-- <el-option label="上海联联平台" value="1" />-->
|
||||||
<!-- <el-option label="abc" value="2" />-->
|
<!-- <el-option label="abc" value="2" />-->
|
||||||
@@ -88,41 +88,41 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="对接平台url地址:" prop="urlAddress">
|
<el-form-item label="对接平台url地址:" prop="urlAddress">
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.urlAddress" :disabled="disableFlag"/>
|
<el-input placeholder="请输入" v-model="stationSettingInfo.urlAddress" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="运营商ID(OperatorID):" prop="operatorId">
|
<el-form-item label="运营商ID(OperatorID):" prop="operatorId">
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.operatorId" :disabled="disableFlag"/>
|
<el-input placeholder="请输入" v-model="stationSettingInfo.operatorId" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="运营商密钥(OperatorSecret):" prop="operatorSecret">
|
<el-form-item label="运营商密钥(OperatorSecret):" prop="operatorSecret">
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.operatorSecret" :disabled="disableFlag"/>
|
<el-input placeholder="请输入" v-model="stationSettingInfo.operatorSecret" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="消息Data密钥(DataSecret):" prop="dataSecret">
|
<el-form-item label="消息Data密钥(DataSecret):" prop="dataSecret">
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.dataSecret" :disabled="disableFlag"/>
|
<el-input placeholder="请输入" v-model="stationSettingInfo.dataSecret" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="签名密钥(SigSecret):" prop="signSecret">
|
<el-form-item label="签名密钥(SigSecret):" prop="signSecret">
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.signSecret" :disabled="disableFlag"/>
|
<el-input placeholder="请输入" v-model="stationSettingInfo.signSecret" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="消息Data密钥初始化向量(DataSecretIV):" prop="dataSecretIv">
|
<el-form-item label="消息Data密钥初始化向量(DataSecretIV):" prop="dataSecretIv">
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.dataSecretIv" :disabled="disableFlag"/>
|
<el-input placeholder="请输入" v-model="stationSettingInfo.dataSecretIv" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button size="big" @click="submitConfigForm" v-has-permi="['pile:station:edit']">提交</el-button>
|
<!-- <el-button size="big" @click="submitConfigForm" v-has-permi="['pile:station:edit']">提交</el-button>-->
|
||||||
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">推送站点信息</el-button>
|
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">推送站点信息</el-button>
|
||||||
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi = "['pile:station:edit']" >编辑参数</el-button>-->
|
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi = "['pile:station:edit']" >编辑参数</el-button>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -252,21 +252,25 @@ export default {
|
|||||||
getStationSettingInfo() {
|
getStationSettingInfo() {
|
||||||
getSettingByStationId(this.stationId).then((res) => {
|
getSettingByStationId(this.stationId).then((res) => {
|
||||||
console.log("stationId:", this.stationId)
|
console.log("stationId:", this.stationId)
|
||||||
console.log("getSettingByStationId==", res)
|
console.log("getSettingByStationId==", res.data === undefined)
|
||||||
|
if (res.data === undefined) {
|
||||||
|
this.stationSettingInfo.thirdPartyType = "0";
|
||||||
|
}else {
|
||||||
this.stationSettingInfo = res.data;
|
this.stationSettingInfo = res.data;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 根据站点id赫对接平台名称查询配置信息
|
// 根据对接平台类型查询配置信息
|
||||||
getSettingParams() {
|
getSettingParams() {
|
||||||
const param = {
|
const param = {
|
||||||
stationId: this.stationId,
|
// stationId: this.stationId,
|
||||||
type: this.stationSettingInfo.type,
|
thirdPartyType: this.stationSettingInfo.thirdPartyType,
|
||||||
}
|
}
|
||||||
console.log("param", param);
|
console.log("param", param);
|
||||||
getSettingInfo(param).then((res) => {
|
getSettingInfo(param).then((res) => {
|
||||||
console.log("getSettingInfo", res)
|
console.log("getSettingInfo", res)
|
||||||
if (res.data === null) {
|
if (res.data === undefined) {
|
||||||
this.stationSettingInfo = null;
|
this.stationSettingInfo = [];
|
||||||
}else {
|
}else {
|
||||||
this.stationSettingInfo = res.data;
|
this.stationSettingInfo = res.data;
|
||||||
}
|
}
|
||||||
@@ -305,9 +309,11 @@ export default {
|
|||||||
pushStation() {
|
pushStation() {
|
||||||
const param = {
|
const param = {
|
||||||
stationId: this.stationId,
|
stationId: this.stationId,
|
||||||
|
thirdPartyType: this.stationSettingInfo.thirdPartyType,
|
||||||
}
|
}
|
||||||
pushStationInfo(param).then((response) => {
|
pushStationInfo(param).then((response) => {
|
||||||
this.$modal.msgSuccess('推送成功')
|
console.log("response", response)
|
||||||
|
this.$modal.msg(response.obj)
|
||||||
this.disableFlag = true;
|
this.disableFlag = true;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user