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 74724baa1..35b0ef967 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 @@ -16,6 +16,7 @@ import com.jsowell.common.util.poi.ExcelUtil; import com.jsowell.pile.domain.PileStationInfo; import com.jsowell.pile.domain.ThirdPartyStationRelation; import com.jsowell.pile.domain.ThirdPartySettingInfo; +import com.jsowell.pile.domain.ThirdpartyParkingConfig; import com.jsowell.pile.dto.FastCreateStationDTO; import com.jsowell.pile.dto.LianLianPushStationInfoDTO; import com.jsowell.pile.dto.QueryStationDTO; @@ -292,7 +293,7 @@ public class PileStationInfoController extends BaseController { * @return */ @PostMapping("/bindParkingPlatform") - public RestApiResponse bindParkingPlatform(BindParkingPlatformDTO dto) { + public RestApiResponse bindParkingPlatform(@RequestBody BindParkingPlatformDTO dto) { logger.info("绑定停车平台 params:{}", JSON.toJSONString(dto)); RestApiResponse response = null; try { @@ -317,7 +318,9 @@ public class PileStationInfoController extends BaseController { 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); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartyParkingConfigMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartyParkingConfigMapper.java index 8bd1d420d..a3d6f5a1c 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartyParkingConfigMapper.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartyParkingConfigMapper.java @@ -4,6 +4,8 @@ import com.jsowell.pile.domain.ThirdPartyPlatformConfig; import com.jsowell.pile.domain.ThirdpartyParkingConfig; import org.springframework.stereotype.Repository; +import java.util.List; + /** * TODO * @@ -53,4 +55,10 @@ public interface ThirdpartyParkingConfigMapper { * @return update count */ int updateByPrimaryKey(ThirdpartyParkingConfig record); + + /** + * 查询基本信息列表(调用时需分页) + * @return + */ + List selectInfoList(); } \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyParkingConfigService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyParkingConfigService.java index e5fa5d56a..4c8c402a3 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyParkingConfigService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyParkingConfigService.java @@ -2,6 +2,8 @@ package com.jsowell.pile.service; import com.jsowell.pile.domain.ThirdpartyParkingConfig; +import java.util.List; + /** * 第三方停车平台Service * @@ -50,4 +52,9 @@ public interface IThirdPartyParkingConfigService { * @return update count */ int updateByPrimaryKey(ThirdpartyParkingConfig record); + + /** + * 查询基本信息列表(调用时需分页) + */ + List selectInfoList(); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java index e00980153..16f8e29f0 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java @@ -130,6 +130,9 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService { vo.setId(pileStationInfo.getId().toString()); vo.setAreaCode(pileStationInfo.getAreaCode()); vo.setAddress(pileStationInfo.getAddress()); + if (StringUtils.isNotBlank(pileStationInfo.getParkingId())) { + vo.setParkingId(pileStationInfo.getParkingId()); + } if (StringUtils.isNotBlank(pileStationInfo.getQrcodePrefix())) { vo.setQrcodePrefix(pileStationInfo.getQrcodePrefix()); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyParkingConfigServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyParkingConfigServiceImpl.java index 36c9c819d..9cd620479 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyParkingConfigServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyParkingConfigServiceImpl.java @@ -6,6 +6,8 @@ import com.jsowell.pile.service.IThirdPartyParkingConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * TODO * @@ -49,4 +51,12 @@ public class ThirdPartyParkingConfigServiceImpl implements IThirdPartyParkingCon return thirdpartyParkingConfigMapper.updateByPrimaryKey(record); } + /** + * 查询基本信息列表(调用时需分页) + */ + @Override + public List selectInfoList() { + return thirdpartyParkingConfigMapper.selectInfoList(); + } + } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/PileStationVO.java b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/PileStationVO.java index da6670743..5c5c8cb1a 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/PileStationVO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/PileStationVO.java @@ -34,6 +34,11 @@ public class PileStationVO { */ private String deptId; + /** + * 停车平台id + */ + private String parkingId; + /** * 省市辖区编码 */ diff --git a/jsowell-pile/src/main/resources/mapper/pile/ThirdpartyParkingConfigMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/ThirdpartyParkingConfigMapper.xml index e84cd35b0..0784489dd 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/ThirdpartyParkingConfigMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/ThirdpartyParkingConfigMapper.xml @@ -187,4 +187,10 @@ del_flag = #{delFlag,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/jsowell-ui/src/api/pile/station.js b/jsowell-ui/src/api/pile/station.js index c3534b447..9e61068fe 100644 --- a/jsowell-ui/src/api/pile/station.js +++ b/jsowell-ui/src/api/pile/station.js @@ -148,3 +148,11 @@ export function bindParkingPlatform(data) { }) } +// 查询停车平台列表 +export function getParkingInfoList() { + return request({ + url: '/pile/station/getParkingInfoList', + method: 'get', + }) +} + diff --git a/jsowell-ui/src/views/pile/station/detail.vue b/jsowell-ui/src/views/pile/station/detail.vue index 94f3602e1..c0f26d91b 100644 --- a/jsowell-ui/src/views/pile/station/detail.vue +++ b/jsowell-ui/src/views/pile/station/detail.vue @@ -129,17 +129,87 @@ - 推送站点信息 - + +

绑定停车平台(配置完成后,订单完成将自动下发优惠券)

+ 编辑参数 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + + + + + +
+ +

地锁二维码

@@ -196,12 +266,12 @@ import MapContainer from "../../../components/MapContainer/MapContainer.vue"; import stationOrderList from "@/views/pile/station/stationOrderList"; import stationWhiteList from "@/views/pile/station/stationWhiteList"; import { - getStationInfo, - updateStationQRCodePrefix, - getSettingByStationId, - updateSettingByStationId, - pushStationInfo, - getSettingInfo, + getStationInfo, + updateStationQRCodePrefix, + getSettingByStationId, + updateSettingByStationId, + pushStationInfo, + getSettingInfo, getParkingInfoList, bindParkingPlatform, } from "@/api/pile/station"; import Whitelist from "@/views/pile/station/stationWhiteList"; import OrderReport from './orderReport.vue'; @@ -226,6 +296,8 @@ export default { form: { prefix: '', }, + parkingInfo:{}, + parkingInfoList:[], queryGroundLockQrCode: '', dialogTitle: '', qrcodePrefix: '', @@ -237,6 +309,7 @@ export default { stationLng: null, stationSettingInfo: {}, disableFlag: true, + parkingDisableFlag: true, }; }, created() { @@ -247,8 +320,9 @@ export default { const title = "【" + stationName + "】站点详情"; const route = Object.assign({}, this.$route, {title: `${title}`}) this.$store.dispatch('tagsView/updateVisitedView', route); - this.queryStationInfo(); - this.getStationSettingInfo(); + this.getParkingList(); + this.queryStationInfo(); + this.getStationSettingInfo(); }, mounted() { this.initializeData(this.activeName); @@ -284,6 +358,10 @@ export default { this.stationLat = res.data.stationLat this.stationLng = res.data.stationLng console.log(this.stationLat, this.stationLng, "父组件里面的经纬度") + console.log("res.data", res.data) + if (res.data.parkingId != null) { + this.getParkingInfo(parseInt(res.data.parkingId)) + } }); console.log("queryStationInfo==", this.stationDetail); }, @@ -316,10 +394,32 @@ export default { }) }, + // 获取停车平台列表 + getParkingList() { + getParkingInfoList().then((response) =>{ + console.info("response", response) + this.parkingInfoList = response.obj; + }) + }, + // 通过id获取停车平台信息 + getParkingInfo(parkingId) { + console.log("parkingId", parkingId) + this.parkingInfoList.forEach(item => { + if (parkingId === item.id){ + console.log("item", item) + this.parkingInfo = item; + // console.log("this.parkingInfo", this.parkingInfo) + } + }) + }, + // 开放编辑按钮 openEdit() { this.disableFlag = this.disableFlag === false; }, + parkingOpenEdit() { + this.parkingDisableFlag = this.parkingDisableFlag === false; + }, // 提交配置设置 submitConfigForm() { @@ -357,6 +457,17 @@ export default { }) }, + // 绑定站点与停车平台配置 + saveParkingSetting(parkingId) { + console.log("parkingId", parkingId) + const params = { + stationId: this.stationId, + parkingId: parkingId, + } + bindParkingPlatform(params).then(response =>{ + console.log("绑定站点与停车平台配置 response", response) + }) + }, // 配置参数按钮 handleCreate() { this.dialogTitle = '配置参数'; diff --git a/jsowell-ui/src/views/pile/station/pileList.vue b/jsowell-ui/src/views/pile/station/pileList.vue index df1db35dd..a0930aed9 100644 --- a/jsowell-ui/src/views/pile/station/pileList.vue +++ b/jsowell-ui/src/views/pile/station/pileList.vue @@ -176,7 +176,6 @@ filterable placeholder="请选择产品型号" v-selectLoadMore="selectLoadMore" - :remote-method="remoteMethod" >