后管页面新增 停车平台配置

This commit is contained in:
Lemon
2023-08-25 15:50:23 +08:00
parent cb79523b8b
commit c08c4f4a95
10 changed files with 173 additions and 13 deletions

View File

@@ -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<ThirdpartyParkingConfig> list = parkingConfigService.selectInfoList();
response = new RestApiResponse<>(list);
} catch (Exception e) {
logger.error("获取停车平台列表 error,", e);
response = new RestApiResponse<>(e);

View File

@@ -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<ThirdpartyParkingConfig> selectInfoList();
}

View File

@@ -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<ThirdpartyParkingConfig> selectInfoList();
}

View File

@@ -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());
}

View File

@@ -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<ThirdpartyParkingConfig> selectInfoList() {
return thirdpartyParkingConfigMapper.selectInfoList();
}
}

View File

@@ -34,6 +34,11 @@ public class PileStationVO {
*/
private String deptId;
/**
* 停车平台id
*/
private String parkingId;
/**
* 省市辖区编码
*/

View File

@@ -187,4 +187,10 @@
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectInfoList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from thirdparty_parking_config
</select>
</mapper>

View File

@@ -148,3 +148,11 @@ export function bindParkingPlatform(data) {
})
}
// 查询停车平台列表
export function getParkingInfoList() {
return request({
url: '/pile/station/getParkingInfoList',
method: 'get',
})
}

View File

@@ -129,17 +129,87 @@
</el-col>
<el-col :span="12">
<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>
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi = "['pile:station:edit']" >编辑参数</el-button>-->
</el-form-item>
</el-col>
</el-row>
</el-form>
</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">
<h2>地锁二维码</h2>
<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 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 = '配置参数';

View File

@@ -176,7 +176,6 @@
filterable
placeholder="请选择产品型号"
v-selectLoadMore="selectLoadMore"
:remote-method="remoteMethod"
>
<el-option
v-for="item in modelList"