update 华为Service

This commit is contained in:
Lemon
2024-04-01 16:17:00 +08:00
parent 7064f4e4b2
commit 60d54f8fea
12 changed files with 338 additions and 163 deletions

View File

@@ -84,5 +84,5 @@ public interface ThirdpartySnRelationMapper {
* @param stationId
* @return
*/
List<ThirdpartySnRelation> selectSnRelationListByStationId(String stationId);
List<ThirdPartySnRelationVO> selectSnRelationListByParams(@Param("stationId") String stationId, @Param("pileSn") String pileSn);
}

View File

@@ -30,7 +30,7 @@ public interface IThirdpartySnRelationService {
*/
public List<ThirdpartySnRelation> selectThirdpartySnRelationList(ThirdpartySnRelation thirdpartySnRelation);
public List<ThirdpartySnRelation> selectSnRelationListByStationId(String stationId);
public List<ThirdPartySnRelationVO> selectSnRelationListByParams(String stationId, String pileSn);
/**
* 新增万车充--第三方平台桩编号对应关系

View File

@@ -3055,10 +3055,10 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
sendStartCharging = false;
}
// 判断该桩所在的站点是否推送了第三方站点(需要我方平台发送启动指令的,如:华为平台)
List<ThirdPartyStationRelationVO> relationInfoList = thirdPartyStationRelationService.getRelationInfoList(orderInfo.getStationId());
if (CollectionUtils.isNotEmpty(relationInfoList)) {
for (ThirdPartyStationRelationVO vo : relationInfoList) {
// 判断该桩是否对接了类似华为平台的第三方站点
List<ThirdPartySnRelationVO> list = snRelationService.selectSnRelationListByParams(null, orderInfo.getPileSn());
if (CollectionUtils.isNotEmpty(list)) {
for (ThirdPartySnRelationVO vo : list) {
String startMode = vo.getStartMode();
if (StringUtils.equals(Constants.ONE, startMode)) {
// 无需发送启机指令,在汇付回调中发送
@@ -3066,7 +3066,17 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
}
}
}
// 判断该桩所在的站点是否推送了第三方站点(需要我方平台发送启动指令的,如:华为平台)
// List<ThirdPartyStationRelationVO> relationInfoList = thirdPartyStationRelationService.getRelationInfoList(orderInfo.getStationId());
// if (CollectionUtils.isNotEmpty(relationInfoList)) {
// for (ThirdPartyStationRelationVO vo : relationInfoList) {
// String startMode = vo.getStartMode();
// if (StringUtils.equals(Constants.ONE, startMode)) {
// // 无需发送启机指令,在汇付回调中发送
// sendStartCharging = false;
// }
// }
// }
// 修改订单
orderInfo.setPayMode(dto.getPayMode());

View File

@@ -45,8 +45,9 @@ public class ThirdpartySnRelationServiceImpl implements IThirdpartySnRelationSer
return thirdpartySnRelationMapper.selectThirdpartySnRelationList(thirdpartySnRelation);
}
public List<ThirdpartySnRelation> selectSnRelationListByStationId(String stationId) {
return thirdpartySnRelationMapper.selectSnRelationListByStationId(stationId);
public List<ThirdPartySnRelationVO> selectSnRelationListByParams(String stationId, String pileSn) {
return thirdpartySnRelationMapper.selectSnRelationListByParams(stationId, pileSn);
}
/**

View File

@@ -15,6 +15,10 @@ public class ThirdPartySnRelationVO {
*/
private String pileSn;
private String stationId;
private String startMode;
// 第三方平台类型
private String thirdPartyType;

View File

@@ -89,6 +89,26 @@
</foreach>
</delete>
<select id="selectSnRelationListByParams" resultType="com.jsowell.pile.vo.web.ThirdPartySnRelationVO">
SELECT
t1.station_id AS stationId,
t1.pile_sn AS pileSn,
t1.thirdparty_type AS thirdPartyType,
t1.thirdparty_pile_sn AS thirdPartyPileSn,
t2.start_mode AS startMode
FROM
thirdparty_sn_relation t1
JOIN thirdparty_station_relation t2 ON t1.thirdparty_type = t2.third_party_type
WHERE
t1.del_flag = '0'
<if test="stationId != null and stationId != ''">
AND t1.station_id = #{stationId,jdbcType=VARCHAR}
</if>
<if test="pileSn != null and pileSn != ''">
AND t1.pile_sn = #{pileSn,jdbcType=VARCHAR}
</if>
</select>
<select id="getRelationVOList" resultType="com.jsowell.pile.vo.web.ThirdPartySnRelationVO">
SELECT
pile_sn AS pileSn,
@@ -109,7 +129,4 @@
pile_sn = #{dto.pileSn,jdbcType=VARCHAR}
AND thirdparty_type = #{dto.thirdPartyType,jdbcType=VARCHAR}
</update>
<select id="selectSnRelationListByStationId" resultMap="ThirdpartySnRelationResult">
</select>
</mapper>