mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-29 11:38:04 +08:00
后管页面新增 停车平台配置
This commit is contained in:
@@ -16,6 +16,7 @@ import com.jsowell.common.util.poi.ExcelUtil;
|
|||||||
import com.jsowell.pile.domain.PileStationInfo;
|
import com.jsowell.pile.domain.PileStationInfo;
|
||||||
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||||
|
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||||
import com.jsowell.pile.dto.LianLianPushStationInfoDTO;
|
import com.jsowell.pile.dto.LianLianPushStationInfoDTO;
|
||||||
import com.jsowell.pile.dto.QueryStationDTO;
|
import com.jsowell.pile.dto.QueryStationDTO;
|
||||||
@@ -292,7 +293,7 @@ public class PileStationInfoController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/bindParkingPlatform")
|
@PostMapping("/bindParkingPlatform")
|
||||||
public RestApiResponse<?> bindParkingPlatform(BindParkingPlatformDTO dto) {
|
public RestApiResponse<?> bindParkingPlatform(@RequestBody BindParkingPlatformDTO dto) {
|
||||||
logger.info("绑定停车平台 params:{}", JSON.toJSONString(dto));
|
logger.info("绑定停车平台 params:{}", JSON.toJSONString(dto));
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
try {
|
try {
|
||||||
@@ -317,7 +318,9 @@ public class PileStationInfoController extends BaseController {
|
|||||||
logger.info("获取停车平台列表");
|
logger.info("获取停车平台列表");
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
try {
|
try {
|
||||||
|
startPage();
|
||||||
|
List<ThirdpartyParkingConfig> list = parkingConfigService.selectInfoList();
|
||||||
|
response = new RestApiResponse<>(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("获取停车平台列表 error,", e);
|
logger.error("获取停车平台列表 error,", e);
|
||||||
response = new RestApiResponse<>(e);
|
response = new RestApiResponse<>(e);
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
|||||||
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
*
|
*
|
||||||
@@ -53,4 +55,10 @@ public interface ThirdpartyParkingConfigMapper {
|
|||||||
* @return update count
|
* @return update count
|
||||||
*/
|
*/
|
||||||
int updateByPrimaryKey(ThirdpartyParkingConfig record);
|
int updateByPrimaryKey(ThirdpartyParkingConfig record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询基本信息列表(调用时需分页)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ThirdpartyParkingConfig> selectInfoList();
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,8 @@ package com.jsowell.pile.service;
|
|||||||
|
|
||||||
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第三方停车平台Service
|
* 第三方停车平台Service
|
||||||
*
|
*
|
||||||
@@ -50,4 +52,9 @@ public interface IThirdPartyParkingConfigService {
|
|||||||
* @return update count
|
* @return update count
|
||||||
*/
|
*/
|
||||||
int updateByPrimaryKey(ThirdpartyParkingConfig record);
|
int updateByPrimaryKey(ThirdpartyParkingConfig record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询基本信息列表(调用时需分页)
|
||||||
|
*/
|
||||||
|
List<ThirdpartyParkingConfig> selectInfoList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,6 +130,9 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
|||||||
vo.setId(pileStationInfo.getId().toString());
|
vo.setId(pileStationInfo.getId().toString());
|
||||||
vo.setAreaCode(pileStationInfo.getAreaCode());
|
vo.setAreaCode(pileStationInfo.getAreaCode());
|
||||||
vo.setAddress(pileStationInfo.getAddress());
|
vo.setAddress(pileStationInfo.getAddress());
|
||||||
|
if (StringUtils.isNotBlank(pileStationInfo.getParkingId())) {
|
||||||
|
vo.setParkingId(pileStationInfo.getParkingId());
|
||||||
|
}
|
||||||
if (StringUtils.isNotBlank(pileStationInfo.getQrcodePrefix())) {
|
if (StringUtils.isNotBlank(pileStationInfo.getQrcodePrefix())) {
|
||||||
vo.setQrcodePrefix(pileStationInfo.getQrcodePrefix());
|
vo.setQrcodePrefix(pileStationInfo.getQrcodePrefix());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import com.jsowell.pile.service.IThirdPartyParkingConfigService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
*
|
*
|
||||||
@@ -49,4 +51,12 @@ public class ThirdPartyParkingConfigServiceImpl implements IThirdPartyParkingCon
|
|||||||
return thirdpartyParkingConfigMapper.updateByPrimaryKey(record);
|
return thirdpartyParkingConfigMapper.updateByPrimaryKey(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询基本信息列表(调用时需分页)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ThirdpartyParkingConfig> selectInfoList() {
|
||||||
|
return thirdpartyParkingConfigMapper.selectInfoList();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ public class PileStationVO {
|
|||||||
*/
|
*/
|
||||||
private String deptId;
|
private String deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停车平台id
|
||||||
|
*/
|
||||||
|
private String parkingId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 省市辖区编码
|
* 省市辖区编码
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -187,4 +187,10 @@
|
|||||||
del_flag = #{delFlag,jdbcType=VARCHAR}
|
del_flag = #{delFlag,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="selectInfoList" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from thirdparty_parking_config
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -148,3 +148,11 @@ export function bindParkingPlatform(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询停车平台列表
|
||||||
|
export function getParkingInfoList() {
|
||||||
|
return request({
|
||||||
|
url: '/pile/station/getParkingInfoList',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,17 +129,87 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- <el-button size="big" @click="submitConfigForm" v-has-permi="['pile:station:edit']">提交</el-button>-->
|
|
||||||
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">
|
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">
|
||||||
推送站点信息
|
推送站点信息
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi = "['pile:station:edit']" >编辑参数</el-button>-->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<h2>绑定停车平台(配置完成后,订单完成将自动下发优惠券)</h2>
|
||||||
|
<el-button icon="el-icon-edit" size="big" @click="parkingOpenEdit" v-has-permi="['pile:station:edit']">编辑参数
|
||||||
|
</el-button>
|
||||||
|
<el-form ref="parkingForm" :model="parkingInfo" label-position="right"
|
||||||
|
label-width="200px"
|
||||||
|
style="margin-top:10px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="停车平台名称:" prop="type">
|
||||||
|
<el-select
|
||||||
|
v-model="parkingInfo.parkingName"
|
||||||
|
placeholder="请选择停车平台名称"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 220px"
|
||||||
|
:disabled="parkingDisableFlag"
|
||||||
|
@change="getParkingInfo($event)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in parkingInfoList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.parkingName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-input placeholder="请输入" v-model="stationSettingInfo.type" :disabled="disableFlag"/>-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="停车场库商户id:" prop="parkingMerchantId">
|
||||||
|
<el-input placeholder="请输入" v-model="parkingInfo.parkingMerchantId"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="停车场库secretKey:" prop="secretKey">
|
||||||
|
<el-input placeholder="请输入" v-model="parkingInfo.secretKey"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="停车场库appId:" prop="appId">
|
||||||
|
<el-input placeholder="请输入" v-model="parkingInfo.appId"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="票券id:" prop="couponId">
|
||||||
|
<el-input placeholder="请输入" v-model="parkingInfo.couponId"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button size="big" @click="saveParkingSetting(parkingInfo.id)" v-has-permi="['pile:station:edit']">
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
<el-card style="margin-top:10px">
|
<el-card style="margin-top:10px">
|
||||||
<h2>地锁二维码</h2>
|
<h2>地锁二维码</h2>
|
||||||
<el-form label-position="right" label-width="200px" style="margin-top:10px">
|
<el-form label-position="right" label-width="200px" style="margin-top:10px">
|
||||||
@@ -196,12 +266,12 @@ import MapContainer from "../../../components/MapContainer/MapContainer.vue";
|
|||||||
import stationOrderList from "@/views/pile/station/stationOrderList";
|
import stationOrderList from "@/views/pile/station/stationOrderList";
|
||||||
import stationWhiteList from "@/views/pile/station/stationWhiteList";
|
import stationWhiteList from "@/views/pile/station/stationWhiteList";
|
||||||
import {
|
import {
|
||||||
getStationInfo,
|
getStationInfo,
|
||||||
updateStationQRCodePrefix,
|
updateStationQRCodePrefix,
|
||||||
getSettingByStationId,
|
getSettingByStationId,
|
||||||
updateSettingByStationId,
|
updateSettingByStationId,
|
||||||
pushStationInfo,
|
pushStationInfo,
|
||||||
getSettingInfo,
|
getSettingInfo, getParkingInfoList, bindParkingPlatform,
|
||||||
} from "@/api/pile/station";
|
} from "@/api/pile/station";
|
||||||
import Whitelist from "@/views/pile/station/stationWhiteList";
|
import Whitelist from "@/views/pile/station/stationWhiteList";
|
||||||
import OrderReport from './orderReport.vue';
|
import OrderReport from './orderReport.vue';
|
||||||
@@ -226,6 +296,8 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
prefix: '',
|
prefix: '',
|
||||||
},
|
},
|
||||||
|
parkingInfo:{},
|
||||||
|
parkingInfoList:[],
|
||||||
queryGroundLockQrCode: '',
|
queryGroundLockQrCode: '',
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
qrcodePrefix: '',
|
qrcodePrefix: '',
|
||||||
@@ -237,6 +309,7 @@ export default {
|
|||||||
stationLng: null,
|
stationLng: null,
|
||||||
stationSettingInfo: {},
|
stationSettingInfo: {},
|
||||||
disableFlag: true,
|
disableFlag: true,
|
||||||
|
parkingDisableFlag: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -247,8 +320,9 @@ export default {
|
|||||||
const title = "【" + stationName + "】站点详情";
|
const title = "【" + stationName + "】站点详情";
|
||||||
const route = Object.assign({}, this.$route, {title: `${title}`})
|
const route = Object.assign({}, this.$route, {title: `${title}`})
|
||||||
this.$store.dispatch('tagsView/updateVisitedView', route);
|
this.$store.dispatch('tagsView/updateVisitedView', route);
|
||||||
this.queryStationInfo();
|
this.getParkingList();
|
||||||
this.getStationSettingInfo();
|
this.queryStationInfo();
|
||||||
|
this.getStationSettingInfo();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initializeData(this.activeName);
|
this.initializeData(this.activeName);
|
||||||
@@ -284,6 +358,10 @@ export default {
|
|||||||
this.stationLat = res.data.stationLat
|
this.stationLat = res.data.stationLat
|
||||||
this.stationLng = res.data.stationLng
|
this.stationLng = res.data.stationLng
|
||||||
console.log(this.stationLat, this.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);
|
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() {
|
openEdit() {
|
||||||
this.disableFlag = this.disableFlag === false;
|
this.disableFlag = this.disableFlag === false;
|
||||||
},
|
},
|
||||||
|
parkingOpenEdit() {
|
||||||
|
this.parkingDisableFlag = this.parkingDisableFlag === false;
|
||||||
|
},
|
||||||
|
|
||||||
// 提交配置设置
|
// 提交配置设置
|
||||||
submitConfigForm() {
|
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() {
|
handleCreate() {
|
||||||
this.dialogTitle = '配置参数';
|
this.dialogTitle = '配置参数';
|
||||||
|
|||||||
@@ -176,7 +176,6 @@
|
|||||||
filterable
|
filterable
|
||||||
placeholder="请选择产品型号"
|
placeholder="请选择产品型号"
|
||||||
v-selectLoadMore="selectLoadMore"
|
v-selectLoadMore="selectLoadMore"
|
||||||
:remote-method="remoteMethod"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in modelList"
|
v-for="item in modelList"
|
||||||
|
|||||||
Reference in New Issue
Block a user