From fd3ceab0f60a2b9aa8c39b56e550e145e1fd423c Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Tue, 7 Jan 2025 16:59:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=9C=E8=BD=A6=E5=B9=B3=E5=8F=B0,=20?= =?UTF-8?q?=E5=81=9C=E8=BD=A6=E4=BC=98=E6=83=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/PileStationInfoController.java | 603 +++++++++--------- jsowell-ui/src/api/pile/station.js | 8 - jsowell-ui/src/views/pile/station/detail.vue | 2 - 3 files changed, 304 insertions(+), 309 deletions(-) diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java index ca0e6f5cc..1dc501ae9 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java @@ -14,7 +14,6 @@ import com.jsowell.common.response.RestApiResponse; import com.jsowell.common.util.StringUtils; import com.jsowell.common.util.poi.ExcelUtil; import com.jsowell.pile.domain.PileStationInfo; -import com.jsowell.pile.domain.ThirdPartySettingInfo; import com.jsowell.pile.domain.ThirdpartyParkingConfig; import com.jsowell.pile.dto.FastCreateStationDTO; import com.jsowell.pile.dto.PushStationInfoDTO; @@ -48,74 +47,74 @@ import java.util.stream.Collectors; @RestController @RequestMapping("/pile/station") public class PileStationInfoController extends BaseController { - @Autowired - private PileStationInfoService pileStationInfoService; + @Autowired + private PileStationInfoService pileStationInfoService; - @Autowired - private PileService pileService; + @Autowired + private PileService pileService; - @Autowired - private ThirdPartySettingInfoService thirdPartySettingInfoService; + @Autowired + private ThirdPartySettingInfoService thirdPartySettingInfoService; - @Autowired - private CommonService commonService; + @Autowired + private CommonService commonService; - @Autowired - private AMapService aMapService; + @Autowired + private AMapService aMapService; - @Autowired - private ThirdPartyStationRelationService thirdPartyStationRelationService; + @Autowired + private ThirdPartyStationRelationService thirdPartyStationRelationService; - @Autowired - private ThirdPartyParkingConfigService parkingConfigService; + @Autowired + private ThirdPartyParkingConfigService parkingConfigService; - /** - * 查询充电站信息列表NEW - */ + /** + * 查询充电站信息列表NEW + */ @PreAuthorize("@ss.hasPermi('pile:station:list')") @GetMapping("/list") public TableDataInfo list(QueryStationDTO queryStationDTO) { - startPage(); - // List list = pileStationInfoService.selectPileStationInfoList(pileStationInfo); - List list = pileStationInfoService.queryStationInfos(queryStationDTO); - return getDataTable(list); - } + startPage(); + // List list = pileStationInfoService.selectPileStationInfoList(pileStationInfo); + List list = pileStationInfoService.queryStationInfos(queryStationDTO); + return getDataTable(list); + } - /** - * 查询充电站下拉列表 - */ - @PreAuthorize("@ss.hasPermi('pile:station:list')") - @GetMapping("/StationSelectList") - public TableDataInfo getStationSelectList(QueryStationDTO dto) { - logger.info("dto:{}", JSON.toJSONString(dto)); - startPage(); - List list = pileStationInfoService.getStationSelectList(dto); - return getDataTable(list); - } + /** + * 查询充电站下拉列表 + */ + @PreAuthorize("@ss.hasPermi('pile:station:list')") + @GetMapping("/StationSelectList") + public TableDataInfo getStationSelectList(QueryStationDTO dto) { + logger.info("dto:{}", JSON.toJSONString(dto)); + startPage(); + List list = pileStationInfoService.getStationSelectList(dto); + return getDataTable(list); + } - /** - * 快速建站接口 - */ + /** + * 快速建站接口 + */ // @PreAuthorize("@ss.hasPermi('pile:station:add')") @PostMapping("/fastCreateStation") public AjaxResult fastCreateStation(@RequestBody FastCreateStationDTO dto) { - logger.info("快速建站接口 param:{}", JSON.toJSONString(dto)); - int i = 0; - try { - i = pileStationInfoService.fastCreateStation(dto); - } catch (BusinessException e) { - logger.warn("快速建站接口 warn", e); - } catch (Exception e) { - logger.error("快速建站接口 error", e); - } - return toAjax(i); + logger.info("快速建站接口 param:{}", JSON.toJSONString(dto)); + int i = 0; + try { + i = pileStationInfoService.fastCreateStation(dto); + } catch (BusinessException e) { + logger.warn("快速建站接口 warn", e); + } catch (Exception e) { + logger.error("快速建站接口 error", e); + } + return toAjax(i); } - /** - * 查询充电站信息列表 - */ + /** + * 查询充电站信息列表 + */ /*@PreAuthorize("@ss.hasPermi('pile:station:list')") @GetMapping("/list") public TableDataInfo list(PileStationInfo pileStationInfo) { @@ -124,272 +123,278 @@ public class PileStationInfoController extends BaseController { return getDataTable(list); }*/ - /** - * 导出充电站信息列表 - */ - @PreAuthorize("@ss.hasPermi('pile:station:export')") - @Log(title = "充电站信息", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, PileStationInfo pileStationInfo) { - List list = pileStationInfoService.selectPileStationInfoList(pileStationInfo); - ExcelUtil util = new ExcelUtil(PileStationInfo.class); - util.exportExcel(response, list, "充电站信息数据"); - } + /** + * 导出充电站信息列表 + */ + @PreAuthorize("@ss.hasPermi('pile:station:export')") + @Log(title = "充电站信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, PileStationInfo pileStationInfo) { + List list = pileStationInfoService.selectPileStationInfoList(pileStationInfo); + ExcelUtil util = new ExcelUtil(PileStationInfo.class); + util.exportExcel(response, list, "充电站信息数据"); + } - /** - * 获取充电站信息详细信息 - */ - @PreAuthorize("@ss.hasPermi('pile:station:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return AjaxResult.success(pileStationInfoService.selectPileStationInfoById(id)); - } + /** + * 获取充电站信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('pile:station:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(pileStationInfoService.selectPileStationInfoById(id)); + } - /** - * 后管站点基本资料页面 - * @return - */ - @PreAuthorize("@ss.hasPermi('pile:station:query')") - @GetMapping(value = "/getStationInfo/{stationId}") - public AjaxResult getStationInfo(@PathVariable("stationId") String stationId) { - return AjaxResult.success(pileStationInfoService.getStationInfo(stationId)); - } + /** + * 后管站点基本资料页面 + * + * @return + */ + @PreAuthorize("@ss.hasPermi('pile:station:query')") + @GetMapping(value = "/getStationInfo/{stationId}") + public AjaxResult getStationInfo(@PathVariable("stationId") String stationId) { + return AjaxResult.success(pileStationInfoService.getStationInfo(stationId)); + } - /** - * 新增充电站信息 - */ - @PreAuthorize("@ss.hasPermi('pile:station:add')") - @Log(title = "充电站信息", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody PileStationInfo pileStationInfo) { - return toAjax(pileStationInfoService.insertPileStationInfo(pileStationInfo)); - } + /** + * 新增充电站信息 + */ + @PreAuthorize("@ss.hasPermi('pile:station:add')") + @Log(title = "充电站信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody PileStationInfo pileStationInfo) { + return toAjax(pileStationInfoService.insertPileStationInfo(pileStationInfo)); + } - /** - * 修改充电站信息 - */ - @PreAuthorize("@ss.hasPermi('pile:station:edit')") - @Log(title = "充电站信息", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody PileStationInfo pileStationInfo) { - logger.info("修改充电站信息 param:{}", pileStationInfo.toString()); - return toAjax(pileStationInfoService.updatePileStationInfo(pileStationInfo)); - } + /** + * 修改充电站信息 + */ + @PreAuthorize("@ss.hasPermi('pile:station:edit')") + @Log(title = "充电站信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody PileStationInfo pileStationInfo) { + logger.info("修改充电站信息 param:{}", pileStationInfo.toString()); + return toAjax(pileStationInfoService.updatePileStationInfo(pileStationInfo)); + } - /** - * 修改对接高德标识 - */ - @PreAuthorize("@ss.hasPermi('pile:station:edit')") - @Log(title = "修改对接高德标识", businessType = BusinessType.UPDATE) - @PostMapping("/editAmapFlag") - public AjaxResult editAmapFlag(@RequestBody EditAmapFlagDTO dto) { - logger.info("修改对接高德标识 param:{}", JSON.toJSONString(dto)); - return toAjax(pileStationInfoService.updateAmapFlag(dto.getStationId(), dto.getAmapFlag())); - } + /** + * 修改对接高德标识 + */ + @PreAuthorize("@ss.hasPermi('pile:station:edit')") + @Log(title = "修改对接高德标识", businessType = BusinessType.UPDATE) + @PostMapping("/editAmapFlag") + public AjaxResult editAmapFlag(@RequestBody EditAmapFlagDTO dto) { + logger.info("修改对接高德标识 param:{}", JSON.toJSONString(dto)); + return toAjax(pileStationInfoService.updateAmapFlag(dto.getStationId(), dto.getAmapFlag())); + } - /** - * 高德地图商家推送静态信息状态 - * @param dto - * @return - */ - @PreAuthorize("@ss.hasPermi('pile:station:edit')") - @PostMapping("/pushAMapStationStatus") - public RestApiResponse pushAMapStationStatus(EditAmapFlagDTO dto) { - RestApiResponse response = null; - try { - String result = aMapService.pushStationInfo(Lists.newArrayList(dto.getStationId()), dto.getAmapFlag()); - response = new RestApiResponse<>(result); - } catch (Exception e) { - logger.error("高德地图商家推送静态信息状态 error", e); - response = new RestApiResponse<>(e); - } - logger.info("高德地图商家推送静态信息状态 result:{}", response); - return response; - } + /** + * 高德地图商家推送静态信息状态 + * + * @param dto + * @return + */ + @PreAuthorize("@ss.hasPermi('pile:station:edit')") + @PostMapping("/pushAMapStationStatus") + public RestApiResponse pushAMapStationStatus(EditAmapFlagDTO dto) { + RestApiResponse response = null; + try { + String result = aMapService.pushStationInfo(Lists.newArrayList(dto.getStationId()), dto.getAmapFlag()); + response = new RestApiResponse<>(result); + } catch (Exception e) { + logger.error("高德地图商家推送静态信息状态 error", e); + response = new RestApiResponse<>(e); + } + logger.info("高德地图商家推送静态信息状态 result:{}", response); + return response; + } - /** - * 删除充电站信息 - */ - @PreAuthorize("@ss.hasPermi('pile:station:remove')") - @Log(title = "充电站信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(pileStationInfoService.deletePileStationInfoByIds(ids)); - } + /** + * 删除充电站信息 + */ + @PreAuthorize("@ss.hasPermi('pile:station:remove')") + @Log(title = "充电站信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(pileStationInfoService.deletePileStationInfoByIds(ids)); + } - /** - * 根据运营商id获取充电站列表 - */ - @PreAuthorize("@ss.hasPermi('pile:station:query')") - @PostMapping(value = "/selectStationListByMerchantId") - public AjaxResult selectStationListByMerchantId(@RequestBody QueryStationDTO dto) { - return AjaxResult.success(pileStationInfoService.selectStationListByMerchantIdWithAuth(Long.valueOf(dto.getMerchantId()))); - } + /** + * 根据运营商id获取充电站列表 + */ + @PreAuthorize("@ss.hasPermi('pile:station:query')") + @PostMapping(value = "/selectStationListByMerchantId") + public AjaxResult selectStationListByMerchantId(@RequestBody QueryStationDTO dto) { + return AjaxResult.success(pileStationInfoService.selectStationListByMerchantIdWithAuth(Long.valueOf(dto.getMerchantId()))); + } - /** - * 修改站点二维码前缀 - * @param dto - * @return - */ - @PreAuthorize("@ss.hasPermi('pile:station:edit')") - @PostMapping("/updateStationQRCodePrefix") - public AjaxResult updateStationQRCodePrefix(@RequestBody QueryStationDTO dto) { - // 校验入参 - if (StringUtils.isBlank(dto.getStationId()) || StringUtils.isBlank(dto.getQrcodePrefix())) { - return AjaxResult.error(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR.getValue()); - } - return AjaxResult.success(pileService.updateStationQRCodePrefix(dto)); - } + /** + * 修改站点二维码前缀 + * + * @param dto + * @return + */ + @PreAuthorize("@ss.hasPermi('pile:station:edit')") + @PostMapping("/updateStationQRCodePrefix") + public AjaxResult updateStationQRCodePrefix(@RequestBody QueryStationDTO dto) { + // 校验入参 + if (StringUtils.isBlank(dto.getStationId()) || StringUtils.isBlank(dto.getQrcodePrefix())) { + return AjaxResult.error(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR.getValue()); + } + return AjaxResult.success(pileService.updateStationQRCodePrefix(dto)); + } - /** - * 查询站点互联互通配置 - * @param id - * @return - */ - @PreAuthorize("@ss.hasPermi('pile:station:query')") - @GetMapping("/getRelationByStationId/{stationId}") - public TableDataInfo getSettingByStationId(@PathVariable("stationId") Long id) { - List list = thirdPartyStationRelationService.getRelationInfoList(String.valueOf(id)); - for (ThirdPartyStationRelationVO vo : list) { - vo.setThirdPartyType(ThirdPlatformTypeEnum.getTypeLabelByTypeCode(vo.getThirdPartyType())); - } - return getDataTable(list); - } + /** + * 查询站点互联互通配置 + * + * @param id + * @return + */ + @PreAuthorize("@ss.hasPermi('pile:station:query')") + @GetMapping("/getRelationByStationId/{stationId}") + public TableDataInfo getSettingByStationId(@PathVariable("stationId") Long id) { + List list = thirdPartyStationRelationService.getRelationInfoList(String.valueOf(id)); + for (ThirdPartyStationRelationVO vo : list) { + vo.setThirdPartyType(ThirdPlatformTypeEnum.getTypeLabelByTypeCode(vo.getThirdPartyType())); + } + return getDataTable(list); + } - /** - * 查询第三方平台配置信息 - * @param info - * @return - */ - @PreAuthorize("@ss.hasPermi('pile:station:query')") - @PostMapping("/getSettingInfo") - public TableDataInfo getSettingInfo(@RequestBody ThirdPartySettingInfo info) { - List infos = thirdPartySettingInfoService.selectThirdPartySettingInfoList(info); - return getDataTable(infos); - // return AjaxResult.success(thirdPartySettingInfoService.selectSettingInfo(info)); - } + /** + * 查询第三方平台配置信息 + * @param info + * @return + */ + // @PreAuthorize("@ss.hasPermi('pile:station:query')") + // @PostMapping("/getSettingInfo") + // public TableDataInfo getSettingInfo(@RequestBody ThirdPartySettingInfo info) { + // List infos = thirdPartySettingInfoService.selectThirdPartySettingInfoList(info); + // return getDataTable(infos); + // // return AjaxResult.success(thirdPartySettingInfoService.selectSettingInfo(info)); + // } - /** - * 修改站点互联互通配置信息 - * @param info - * @return - */ - // @PreAuthorize("@ss.hasPermi('pile:station:edit')") - // @PostMapping("/updateSettingByStationId") - // public AjaxResult updateSettingByStationId(@RequestBody ThirdPartySettingInfo info) { - // return AjaxResult.success(thirdPartySettingInfoService.updateStationSettingInfo(info)); - // } + /** + * 修改站点互联互通配置信息 + * @param info + * @return + */ + // @PreAuthorize("@ss.hasPermi('pile:station:edit')") + // @PostMapping("/updateSettingByStationId") + // public AjaxResult updateSettingByStationId(@RequestBody ThirdPartySettingInfo info) { + // return AjaxResult.success(thirdPartySettingInfoService.updateStationSettingInfo(info)); + // } - /** - * 新增站点互联互通配置信息 - * @param info - * @return - */ - // @PreAuthorize("@ss.hasPermi('pile:station:add')") - // @PostMapping("/insertSettingInfo") - // public AjaxResult insertSettingInfo(ThirdPartySettingInfo info) { - // return AjaxResult.success(thirdPartySettingInfoService.insertThirdPartySettingInfo(info)); - // } + /** + * 新增站点互联互通配置信息 + * @param info + * @return + */ + // @PreAuthorize("@ss.hasPermi('pile:station:add')") + // @PostMapping("/insertSettingInfo") + // public AjaxResult insertSettingInfo(ThirdPartySettingInfo info) { + // return AjaxResult.success(thirdPartySettingInfoService.insertThirdPartySettingInfo(info)); + // } + /** + * 推送充电站信息 notification_stationInfo + * http://localhost:8080/LianLian/pushStationInfo + * + * @param dto + * @return + */ + @PostMapping("/pushStationInfo") + public RestApiResponse pushStationInfo(@RequestBody PushStationInfoDTO dto) { + logger.info("推送第三方平台充电站信息 params:{}", JSON.toJSONString(dto)); + RestApiResponse response = null; + Long stationId = dto.getStationId(); + List types = dto.getThirdPartyTypes(); + // 先查到该站点推送过的类型 + List infoList = thirdPartyStationRelationService.getRelationInfoList(String.valueOf(stationId)); + List typeList = infoList.stream() + .map(ThirdPartyStationRelationVO::getThirdPartyType) + .collect(Collectors.toList()); + // 对types去重,可获取到需要新推送的第三方平台类型 + types.removeAll(typeList); + dto.setThirdPartyTypes(types); + try { + if (StringUtils.isBlank(String.valueOf(stationId))) { + throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); + } + String result = commonService.commonPushStation(dto); + response = new RestApiResponse<>(result); + } catch (BusinessException e) { + logger.error("推送第三方平台充电站信息 error", e); + response = new RestApiResponse<>(e.getCode(), e.getMessage()); + } catch (Exception e) { + logger.error("推送第三方平台充电站信息 error", e); + response = new RestApiResponse<>("推送失败,请联系管理员"); + // 有报错,所有的都必须删除 + thirdPartyStationRelationService.updateRelationDelFlag(String.valueOf(stationId), types); + } + logger.info("推送第三方平台充电站信息 result:{}", response); + return response; + } - /** - * 推送充电站信息 notification_stationInfo - * http://localhost:8080/LianLian/pushStationInfo - * @param dto - * @return - */ - @PostMapping("/pushStationInfo") - public RestApiResponse pushStationInfo(@RequestBody PushStationInfoDTO dto) { - logger.info("推送第三方平台充电站信息 params:{}", JSON.toJSONString(dto)); - RestApiResponse response = null; - Long stationId = dto.getStationId(); - List types = dto.getThirdPartyTypes(); - // 先查到该站点推送过的类型 - List infoList = thirdPartyStationRelationService.getRelationInfoList(String.valueOf(stationId)); - List typeList = infoList.stream() - .map(ThirdPartyStationRelationVO::getThirdPartyType) - .collect(Collectors.toList()); - // 对types去重,可获取到需要新推送的第三方平台类型 - types.removeAll(typeList); - dto.setThirdPartyTypes(types); - try { - if (StringUtils.isBlank(String.valueOf(stationId))) { - throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); - } - String result = commonService.commonPushStation(dto); - response = new RestApiResponse<>(result); - }catch (BusinessException e) { - logger.error("推送第三方平台充电站信息 error",e); - response = new RestApiResponse<>(e.getCode(), e.getMessage()); - }catch (Exception e) { - logger.error("推送第三方平台充电站信息 error", e); - response = new RestApiResponse<>("推送失败,请联系管理员"); - // 有报错,所有的都必须删除 - thirdPartyStationRelationService.updateRelationDelFlag(String.valueOf(stationId), types); - } - logger.info("推送第三方平台充电站信息 result:{}", response); - return response; - } + /** + * 绑定停车平台(停车充电下发优惠券) + * + * @param dto + * @return + */ + @PostMapping("/bindParkingPlatform") + public RestApiResponse bindParkingPlatform(@RequestBody BindParkingPlatformDTO dto) { + logger.info("绑定停车平台 params:{}", JSON.toJSONString(dto)); + RestApiResponse response = null; + try { + int i = pileStationInfoService.bindParkingPlatform(dto); + response = new RestApiResponse<>(i); + } catch (BusinessException e) { + logger.error("绑定停车平台 error,", e); + response = new RestApiResponse<>(e.getCode(), e.getMessage()); + } catch (Exception e) { + logger.error("绑定停车平台 error", e); + response = new RestApiResponse<>(e); + } + logger.info("绑定停车平台 result:{}", response); + return response; + } - /** - * 绑定停车平台(停车充电下发优惠券) - * @param dto - * @return - */ - @PostMapping("/bindParkingPlatform") - public RestApiResponse bindParkingPlatform(@RequestBody BindParkingPlatformDTO dto) { - logger.info("绑定停车平台 params:{}", JSON.toJSONString(dto)); - RestApiResponse response = null; - try { - int i = pileStationInfoService.bindParkingPlatform(dto); - response = new RestApiResponse<>(i); - }catch (BusinessException e) { - logger.error("绑定停车平台 error,", e); - response = new RestApiResponse<>(e.getCode(), e.getMessage()); - } catch (Exception e) { - logger.error("绑定停车平台 error", e); - response = new RestApiResponse<>(e); - } - logger.info("绑定停车平台 result:{}", response); - return response; - } + /** + * 获取停车平台列表 + * + * @return + */ + @GetMapping("/getParkingInfoList") + public RestApiResponse getParkingInfoList() { + // logger.info("获取停车平台列表"); + RestApiResponse response = null; + try { + startPage(); + List list = parkingConfigService.selectInfoList(); + response = new RestApiResponse<>(list); + } catch (Exception e) { + logger.error("获取停车平台列表 error,", e); + response = new RestApiResponse<>(e); + } + logger.info("获取停车平台列表 result:{}", response); + return response; + } - /** - * 获取停车平台列表 - * @return - */ - @GetMapping("/getParkingInfoList") - public RestApiResponse getParkingInfoList() { - // logger.info("获取停车平台列表"); - RestApiResponse response = null; - try { - startPage(); - List list = parkingConfigService.selectInfoList(); - response = new RestApiResponse<>(list); - } catch (Exception e) { - logger.error("获取停车平台列表 error,", e); - response = new RestApiResponse<>(e); - } - logger.info("获取停车平台列表 result:{}", response); - return response; - } - - /** - * 更新站点与第三方平台关系 - */ - @PostMapping("/updateThirdPartyStationRelation") - public AjaxResult updateThirdPartyStationRelation(@RequestBody ThirdPartyStationRelationDTO dto) { - AjaxResult result; - try { - // startPage(); - thirdPartyStationRelationService.updateThirdPartyStationRelation(dto); - result = AjaxResult.success(); - } catch (Exception e) { - logger.error("更新站点与第三方平台关系error,", e); - result = AjaxResult.error(e.getMessage()); - } - return result; - } + /** + * 更新站点与第三方平台关系 + */ + @PostMapping("/updateThirdPartyStationRelation") + public AjaxResult updateThirdPartyStationRelation(@RequestBody ThirdPartyStationRelationDTO dto) { + AjaxResult result; + try { + // startPage(); + thirdPartyStationRelationService.updateThirdPartyStationRelation(dto); + result = AjaxResult.success(); + } catch (Exception e) { + logger.error("更新站点与第三方平台关系error,", e); + result = AjaxResult.error(e.getMessage()); + } + return result; + } } diff --git a/jsowell-ui/src/api/pile/station.js b/jsowell-ui/src/api/pile/station.js index c8aca1a02..cbff33a08 100644 --- a/jsowell-ui/src/api/pile/station.js +++ b/jsowell-ui/src/api/pile/station.js @@ -121,14 +121,6 @@ export function getRelationByStationId(id) { }); } -// 查询站点互联互通配置 -export function getSettingInfo(data) { - return request({ - url: "/pile/station/getSettingInfo", - method: "post", - data: data, - }); -} // 修改站点互联互通配置 export function updateSettingByStationId(data) { diff --git a/jsowell-ui/src/views/pile/station/detail.vue b/jsowell-ui/src/views/pile/station/detail.vue index e85c945a4..e1b36ecaf 100644 --- a/jsowell-ui/src/views/pile/station/detail.vue +++ b/jsowell-ui/src/views/pile/station/detail.vue @@ -255,10 +255,8 @@ import stationWhiteList from "@/views/pile/station/stationWhiteList"; import { getStationInfo, updateStationQRCodePrefix, - getSettingByStationId, updateSettingByStationId, pushStationInfo, - getSettingInfo, getParkingInfoList, bindParkingPlatform, getRelationByStationId,