推送第三方平台

This commit is contained in:
Guoqs
2024-08-13 14:39:53 +08:00
parent b031ea4583
commit ff7fe68b58
5 changed files with 106 additions and 9 deletions

View File

@@ -81,7 +81,9 @@ public interface PileStationInfoMapper {
* 查询充电站信息(联联平台,分页使用)
* @return
*/
List<ThirdPartyStationInfoVO> getStationInfoForLianLian(@Param("dto") QueryStationInfoDTO dto);
List<ThirdPartyStationInfoVO> getStationInfoForThirdParty(@Param("dto") QueryStationInfoDTO dto);
List<ThirdPartyStationInfoVO> selectStationInfoForThirdParty(@Param("dto") QueryStationInfoDTO dto);
List<PileStationInfo> getStationInfoForAmap(@Param("dto") GetStationInfoDTO dto);

View File

@@ -119,7 +119,9 @@ public interface PileStationInfoService {
List<ThirdPartyStationInfoVO> getStationInfosByThirdParty(QueryStationInfoDTO dto);
List<PileStationInfo> getStationInfosByAmap(GetStationInfoDTO dto);
List<ThirdPartyStationInfoVO> selectStationInfosByThirdParty(QueryStationInfoDTO dto);
List<PileStationInfo> getStationInfosByAmap(GetStationInfoDTO dto);
List<String> queryByStationDeptIds(List<String> stationIds);

View File

@@ -235,7 +235,12 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
@Override
public List<ThirdPartyStationInfoVO> getStationInfosByThirdParty(QueryStationInfoDTO dto) {
// PageUtils.startPage(pageNum, pageSize);
return pileStationInfoMapper.getStationInfoForLianLian(dto);
return pileStationInfoMapper.getStationInfoForThirdParty(dto);
}
@Override
public List<ThirdPartyStationInfoVO> selectStationInfosByThirdParty(QueryStationInfoDTO dto) {
return pileStationInfoMapper.selectStationInfoForThirdParty(dto);
}
@Override

View File

@@ -427,7 +427,7 @@
and del_flag = '0'
</select>
<select id="getStationInfoForLianLian" resultType="com.jsowell.pile.vo.base.ThirdPartyStationInfoVO">
<select id="getStationInfoForThirdParty" resultType="com.jsowell.pile.vo.base.ThirdPartyStationInfoVO">
SELECT
t1.id,
t1.merchant_id AS merchantId,
@@ -499,6 +499,82 @@
</if>
</select>
<select id="selectStationInfoForThirdParty" resultType="com.jsowell.pile.vo.base.ThirdPartyStationInfoVO">
SELECT
t1.id,
t1.merchant_id AS merchantId,
t2.merchant_name AS merchantName,
t2.organization_code AS organizationCode,
t1.station_name AS stationName,
t1.dept_id AS deptId,
t1.parking_id AS parkingId,
t1.qrcode_prefix AS qrcodePrefix,
t1.alone_apply AS aloneApply,
t1.account_number AS accountNumber,
t1.capacity AS capacity,
t1.public_parking AS publicParking,
t1.parking_number AS parkingNumber,
t1.park_fee_describe AS parkFeeDescribe,
t1.country_code AS countryCode,
t1.area_code AS areaCode,
t1.address AS address,
t1.station_tel AS stationTel,
t1.service_tel AS serviceTel,
t1.station_type AS stationType,
t1.station_status AS stationStatus,
t1.station_admin_name AS stationAdminName,
t1.park_nums AS parkNums,
t1.station_lng AS stationLng,
t1.station_lat AS stationLat,
t1.site_guide AS siteGuide,
t1.construction AS construction,
t1.pictures AS pictures,
t1.match_cars AS matchCars,
t1.park_info AS parkInfo,
t1.park_owner AS parkOwner,
t1.park_manager AS parkManager,
t1.open_all_day AS openAllDay,
t1.business_hours AS businessHours,
t1.park_free AS parkFree,
t1.payment AS payment,
t1.support_order AS supportOrder,
t1.remark AS remark,
t1.public_flag AS publicFlag,
t1.amap_flag AS amapFlag,
t1.open_flag AS openFlag,
t1.toilet_flag AS toiletFlag,
t1.store_flag AS storeFlag,
t1.restaurant_flag AS restaurantFlag,
t1.lounge_flag AS loungeFlag,
t1.canopy_flag AS canopyFlag,
t1.printer_flag AS printerFlag,
t1.barrier_flag AS barrierFlag,
t1.parking_lock_flag AS parkingLockFlag,
t1.create_by AS createBy,
t1.create_time AS createTime,
t1.update_by AS updateBy,
t1.update_time AS updateTime,
t1.del_flag AS delFlag
FROM
pile_station_info t1
JOIN pile_merchant_info t2 ON t1.merchant_id = t2.id
join thirdparty_station_relation t3 on t3.station_id = t1.id
AND t1.del_flag = '0'
and t1.public_flag = '1'
<if test="dto.address != null and dto.address != ''">
and t1.address like concat('%', #{dto.address}, '%')
</if>
<if test="dto.stationIds != null and dto.stationIds.size() != 0">
and t1.id in
<foreach collection="dto.stationIds" item="stationId" open="(" separator="," close=")">
#{stationId,jdbcType=VARCHAR}
</foreach>
</if>
<if test="dto.thirdPlatformType != null and dto.thirdPlatformType != ''">
and t3.third_party_type = #{dto.thirdPlatformType,jdbcType=VARCHAR}
</if>
</select>
<select id="queryByStationDeptIds" resultType="java.lang.String">
select id
from pile_station_info

View File

@@ -195,9 +195,9 @@ public class ZheJiangPlatformServiceImpl implements ThirdPartyPlatformService {
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
dto.setThirdPlatformType(thirdPlatformType);
PageUtils.startPage(pageNo, pageSize);
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.getStationInfosByThirdParty(dto);
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.selectStationInfosByThirdParty(dto);
if (CollectionUtils.isEmpty(stationInfos)) {
// 未查到数据
return null;
@@ -220,7 +220,20 @@ public class ZheJiangPlatformServiceImpl implements ThirdPartyPlatformService {
stationInfo.setIsAloneApply(Integer.valueOf(pileStationInfo.getAloneApply()));
stationInfo.setIsPublicParkingLot(Integer.valueOf(pileStationInfo.getPublicParking()));
stationInfo.setCountryCode(pileStationInfo.getCountryCode());
stationInfo.setAreaCode(pileStationInfo.getAreaCode());
// 根据逗号分组
String[] split = StringUtils.split(pileStationInfo.getAreaCode(), ",");
// 只取最后一部分 330213
String subAreaCode = split[split.length - 1];
stationInfo.setAreaCode(subAreaCode);
// areaCodeCountryside
GeoCodeInfo geoCode = TermRelationTreeCoordinate.completeGeoCode(pileStationInfo.getAddress());
if (geoCode != null) {
String areaCodeCountryside = geoCode.getCounty_code();
stationInfo.setAreaCodeCountryside(areaCodeCountryside);
}
stationInfo.setAddress(pileStationInfo.getAddress());
stationInfo.setServiceTel(pileStationInfo.getStationTel());
stationInfo.setStationType(Integer.valueOf(pileStationInfo.getStationType()));
@@ -255,8 +268,7 @@ public class ZheJiangPlatformServiceImpl implements ThirdPartyPlatformService {
map.put("PageCount", pageInfo.getPages());
map.put("ItemSize", pageInfo.getTotal());
map.put("StationInfos", resultList);
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
return resultMap;
return ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
}
// 获取平台配置密钥信息