update 查询新增站点互联互通配置

This commit is contained in:
Guoqs
2025-12-04 15:59:46 +08:00
parent 3fc5a3273f
commit c88f9a2ea2
8 changed files with 72 additions and 10 deletions

View File

@@ -234,6 +234,25 @@ public class PileStationInfoController extends BaseController {
return AjaxResult.success(pileService.updateStationQRCodePrefix(dto)); return AjaxResult.success(pileService.updateStationQRCodePrefix(dto));
} }
/**
* 新增站点互联互通配置
*/
@PreAuthorize("@ss.hasPermi('pile:station:add')")
@Log(title = "新增站点互联互通配置", businessType = BusinessType.INSERT)
@PostMapping("/insertThirdPartyStationRelation")
public AjaxResult insertRelation(@RequestBody ThirdPartyStationRelationDTO dto) {
return toAjax(thirdPartyStationRelationService.insertThirdPartyStationRelation(dto.getStationId(), dto.getThirdPartyType()));
}
/**
* 删除站点互联互通配置
*/
@PreAuthorize("@ss.hasPermi('pile:station:remove')")
@Log(title = "删除站点互联互通配置", businessType = BusinessType.DELETE)
@PostMapping("/deleteThirdPartyStationRelation")
public AjaxResult deleteRelation(@RequestBody ThirdPartyStationRelationDTO dto) {
return toAjax(thirdPartyStationRelationService.deleteThirdPartyStationRelation(dto.getId()));
}
/** /**
* 查询站点互联互通配置 * 查询站点互联互通配置
* *
@@ -379,7 +398,6 @@ public class PileStationInfoController extends BaseController {
public AjaxResult updateThirdPartyStationRelation(@RequestBody ThirdPartyStationRelationDTO dto) { public AjaxResult updateThirdPartyStationRelation(@RequestBody ThirdPartyStationRelationDTO dto) {
AjaxResult result; AjaxResult result;
try { try {
// startPage();
thirdPartyStationRelationService.updateThirdPartyStationRelation(dto); thirdPartyStationRelationService.updateThirdPartyStationRelation(dto);
result = AjaxResult.success(); result = AjaxResult.success();
} catch (Exception e) { } catch (Exception e) {

View File

@@ -17,4 +17,14 @@ public class ThirdPartyStationRelationDTO {
* 要推送的第三方平台类型数组 * 要推送的第三方平台类型数组
*/ */
private List<String> thirdPartyTypes; private List<String> thirdPartyTypes;
/**
* 要推送的某个第三方平台类型
*/
private String thirdPartyType;
/**
* 关系id
*/
private String id;
} }

View File

@@ -115,4 +115,6 @@ public interface ThirdPartyStationRelationMapper {
int batchInsert(List<ThirdPartyStationRelation> list); int batchInsert(List<ThirdPartyStationRelation> list);
List<ThirdPartyStationRelationVO> getRelationInfoListV2(@Param("stationId") String stationId); List<ThirdPartyStationRelationVO> getRelationInfoListV2(@Param("stationId") String stationId);
int deleteThirdPartyStationRelation(String id);
} }

View File

@@ -113,6 +113,21 @@ public interface ThirdPartyStationRelationService {
*/ */
List<StationInfoVO> selectStationList(String thirdPlatformType); List<StationInfoVO> selectStationList(String thirdPlatformType);
/**
* 新增站点与第三方平台对接关系
*/
int insertThirdPartyStationRelation(String stationId, String thirdPlatformType);
/**
* 删除站点对接第三方平台关系
*/
int deleteThirdPartyStationRelation(String id);
/**
* 修改站点对接第三方平台关系
*/
// int updateThirdPartyStationRelation(ThirdPartyStationRelationDTO dto);
/** /**
* 根据站点id查询该站点对接了哪些第三方平台 * 根据站点id查询该站点对接了哪些第三方平台
* @param stationId * @param stationId

View File

@@ -210,4 +210,20 @@ public class ThirdPartyStationRelationServiceImpl implements ThirdPartyStationRe
public List<StationInfoVO> selectStationList(String thirdPlatformType) { public List<StationInfoVO> selectStationList(String thirdPlatformType) {
return thirdPartyStationRelationMapper.selectStationList(thirdPlatformType); return thirdPartyStationRelationMapper.selectStationList(thirdPlatformType);
} }
@Override
public int insertThirdPartyStationRelation(String stationId, String thirdPlatformType) {
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(stationId));
relation.setThirdPartyType(thirdPlatformType);
return thirdPartyStationRelationMapper.insertThirdPartyStationRelation(relation);
}
@Override
public int deleteThirdPartyStationRelation(String id) {
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setId(Long.parseLong(id));
relation.setDelFlag(DelFlagEnum.DELETE.getValue());
return thirdPartyStationRelationMapper.updateThirdPartyStationRelation(relation);
}
} }

View File

@@ -10,6 +10,11 @@ import lombok.Data;
*/ */
@Data @Data
public class ThirdPartyStationRelationVO { public class ThirdPartyStationRelationVO {
/**
* id
*/
private String id;
/** /**
* 站点id * 站点id
*/ */

View File

@@ -334,6 +334,7 @@
<select id="getRelationInfoListV2" resultType="com.jsowell.pile.vo.base.ThirdPartyStationRelationVO"> <select id="getRelationInfoListV2" resultType="com.jsowell.pile.vo.base.ThirdPartyStationRelationVO">
SELECT SELECT
t1.id AS id,
t1.station_id AS stationId, t1.station_id AS stationId,
t1.third_party_type AS thirdPartyType, t1.third_party_type AS thirdPartyType,
t1.equipment_owner_id as equipmentOwnerId, t1.equipment_owner_id as equipmentOwnerId,
@@ -355,4 +356,8 @@
where t1.del_flag = '0' where t1.del_flag = '0'
and t1.station_id = #{stationId,jdbcType=VARCHAR} and t1.station_id = #{stationId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteThirdPartyStationRelation">
</delete>
</mapper> </mapper>

View File

@@ -46,10 +46,8 @@ import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
import com.jsowell.thirdparty.xindiantu.service.XDTService; import com.jsowell.thirdparty.xindiantu.service.XDTService;
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO; import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
import com.jsowell.thirdparty.yongchengboche.service.YCBCService; import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.logging.log4j.util.Strings;
import org.bouncycastle.crypto.CryptoException; import org.bouncycastle.crypto.CryptoException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -63,7 +61,6 @@ import java.text.ParseException;
import java.time.LocalTime; import java.time.LocalTime;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** /**
@@ -88,15 +85,9 @@ public class CommonService {
@Autowired @Autowired
private ThirdPartyStationRelationService thirdPartyStationRelationService; private ThirdPartyStationRelationService thirdPartyStationRelationService;
@Autowired
private ThirdPartyParkingConfigService thirdPartyParkingConfigService;
@Autowired @Autowired
private LianLianService lianLianService; private LianLianService lianLianService;
@Autowired
private ZDLService zdlService;
@Autowired @Autowired
private ChargeParkingDiscountService chargeParkingDiscountService; private ChargeParkingDiscountService chargeParkingDiscountService;