mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-13 22:40:16 +08:00
后管页面 新增 修改充电桩别名
This commit is contained in:
@@ -28,6 +28,11 @@ public class PileBasicInfo extends BaseEntity {
|
|||||||
@Excel(name = "桩号")
|
@Excel(name = "桩号")
|
||||||
private String sn;
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 桩别名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态(0-未知;1-在线;2-离线;3-故障)
|
* 状态(0-未知;1-在线;2-离线;3-故障)
|
||||||
*/
|
*/
|
||||||
@@ -118,6 +123,14 @@ public class PileBasicInfo extends BaseEntity {
|
|||||||
return sn;
|
return sn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
public void setBusinessType(String businessType) {
|
public void setBusinessType(String businessType) {
|
||||||
this.businessType = businessType;
|
this.businessType = businessType;
|
||||||
}
|
}
|
||||||
@@ -224,6 +237,7 @@ public class PileBasicInfo extends BaseEntity {
|
|||||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
.append("sn", getSn())
|
.append("sn", getSn())
|
||||||
|
.append("name", getName())
|
||||||
.append("businessType", getBusinessType())
|
.append("businessType", getBusinessType())
|
||||||
.append("secretKey", getSecretKey())
|
.append("secretKey", getSecretKey())
|
||||||
.append("softwareProtocol", getSoftwareProtocol())
|
.append("softwareProtocol", getSoftwareProtocol())
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ public class PileDetailVO {
|
|||||||
*/
|
*/
|
||||||
private String pileSn;
|
private String pileSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 别名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态 0-未知;1-在线;2-离线;3-故障
|
* 状态 0-未知;1-在线;2-离线;3-故障
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<resultMap type="com.jsowell.pile.domain.PileBasicInfo" id="PileBasicInfoResult">
|
<resultMap type="com.jsowell.pile.domain.PileBasicInfo" id="PileBasicInfoResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="sn" column="sn" />
|
<result property="sn" column="sn" />
|
||||||
|
<result property="name" column="name" />
|
||||||
<result property="businessType" column="business_type" />
|
<result property="businessType" column="business_type" />
|
||||||
<result property="secretKey" column="secret_key" />
|
<result property="secretKey" column="secret_key" />
|
||||||
<result property="softwareProtocol" column="software_protocol" />
|
<result property="softwareProtocol" column="software_protocol" />
|
||||||
@@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, sn, business_type, secret_key, software_protocol, production_date, licence_id, model_id, sim_id,
|
id, sn, name, business_type, secret_key, software_protocol, production_date, licence_id, model_id, sim_id,
|
||||||
merchant_id, station_id, fault_reason, create_by, create_time, update_by, update_time, del_flag, remark
|
merchant_id, station_id, fault_reason, create_by, create_time, update_by, update_time, del_flag, remark
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="selectPileBasicInfoVo"/>
|
<include refid="selectPileBasicInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="sn != null and sn != ''"> and sn = #{sn}</if>
|
<if test="sn != null and sn != ''"> and sn = #{sn}</if>
|
||||||
|
<if test="name != null and name != ''"> and name = #{name}</if>
|
||||||
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
|
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
|
||||||
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
|
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
|
||||||
<if test="softwareProtocol != null and softwareProtocol != ''"> and software_protocol = #{softwareProtocol}</if>
|
<if test="softwareProtocol != null and softwareProtocol != ''"> and software_protocol = #{softwareProtocol}</if>
|
||||||
@@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
insert into pile_basic_info
|
insert into pile_basic_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="sn != null">sn,</if>
|
<if test="sn != null">sn,</if>
|
||||||
|
<if test="name != null">name,</if>
|
||||||
<if test="businessType != null">business_type,</if>
|
<if test="businessType != null">business_type,</if>
|
||||||
<if test="secretKey != null">secret_key,</if>
|
<if test="secretKey != null">secret_key,</if>
|
||||||
<if test="softwareProtocol != null">software_protocol,</if>
|
<if test="softwareProtocol != null">software_protocol,</if>
|
||||||
@@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="sn != null">#{sn},</if>
|
<if test="sn != null">#{sn},</if>
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
<if test="businessType != null">#{businessType},</if>
|
<if test="businessType != null">#{businessType},</if>
|
||||||
<if test="secretKey != null">#{secretKey},</if>
|
<if test="secretKey != null">#{secretKey},</if>
|
||||||
<if test="softwareProtocol != null">#{softwareProtocol},</if>
|
<if test="softwareProtocol != null">#{softwareProtocol},</if>
|
||||||
@@ -110,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
update pile_basic_info
|
update pile_basic_info
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="sn != null">sn = #{sn},</if>
|
<if test="sn != null">sn = #{sn},</if>
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
<if test="businessType != null">business_type = #{businessType},</if>
|
<if test="businessType != null">business_type = #{businessType},</if>
|
||||||
<if test="secretKey != null">secret_key = #{secretKey},</if>
|
<if test="secretKey != null">secret_key = #{secretKey},</if>
|
||||||
<if test="softwareProtocol != null">software_protocol = #{softwareProtocol},</if>
|
<if test="softwareProtocol != null">software_protocol = #{softwareProtocol},</if>
|
||||||
@@ -195,12 +200,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<insert id="batchInsertPileBasicInfo">
|
<insert id="batchInsertPileBasicInfo">
|
||||||
insert into pile_basic_info
|
insert into pile_basic_info
|
||||||
(sn, business_type, secret_key, software_protocol, production_date, licence_id, model_id, sim_id,
|
(sn, name, business_type, secret_key, software_protocol, production_date, licence_id, model_id, sim_id,
|
||||||
merchant_id, station_id, fault_reason, create_by, update_by, del_flag, remark)
|
merchant_id, station_id, fault_reason, create_by, update_by, del_flag, remark)
|
||||||
values
|
values
|
||||||
<foreach collection="infoList" item="item" separator=",">
|
<foreach collection="infoList" item="item" separator=",">
|
||||||
(
|
(
|
||||||
#{item.sn,jdbcType=VARCHAR},
|
#{item.sn,jdbcType=VARCHAR},
|
||||||
|
#{item.name,jdbcType=VARCHAR},
|
||||||
#{item.businessType,jdbcType=VARCHAR},
|
#{item.businessType,jdbcType=VARCHAR},
|
||||||
#{item.secretKey,jdbcType=VARCHAR},
|
#{item.secretKey,jdbcType=VARCHAR},
|
||||||
#{item.softwareProtocol,jdbcType=VARCHAR},
|
#{item.softwareProtocol,jdbcType=VARCHAR},
|
||||||
@@ -238,6 +244,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
SELECT
|
SELECT
|
||||||
t1.id as pileId,
|
t1.id as pileId,
|
||||||
t1.sn AS pileSn,
|
t1.sn AS pileSn,
|
||||||
|
t1.name as name,
|
||||||
t1.merchant_id AS merchantId,
|
t1.merchant_id AS merchantId,
|
||||||
t2.merchant_name AS merchantName,
|
t2.merchant_name AS merchantName,
|
||||||
t1.station_id AS stationId,
|
t1.station_id AS stationId,
|
||||||
|
|||||||
@@ -38,8 +38,21 @@
|
|||||||
labelStyle="width: 80px"
|
labelStyle="width: 80px"
|
||||||
contentStyle="width: 150px"
|
contentStyle="width: 150px"
|
||||||
>{{ pileDetail.pileSn }}
|
>{{ pileDetail.pileSn }}
|
||||||
</el-descriptions-item
|
</el-descriptions-item>
|
||||||
>
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
别名
|
||||||
|
<el-button type="text" icon="el-icon-edit" size="medium" circle
|
||||||
|
@click="openEdit"/>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="pileDetail.name" size="medium" clearable
|
||||||
|
:disabled="clearableFlag">
|
||||||
|
<template slot="append">
|
||||||
|
<el-button type="text" icon="el-icon-check" size="medium"
|
||||||
|
circle @click="updateName"/>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="运营商">{{
|
<el-descriptions-item label="运营商">{{
|
||||||
pileDetail.merchantName
|
pileDetail.merchantName
|
||||||
}}
|
}}
|
||||||
@@ -248,19 +261,21 @@ import remoteUpgrade from './components/remoteUpgrade.vue';
|
|||||||
import {
|
import {
|
||||||
getPileDetailById,
|
getPileDetailById,
|
||||||
getPileFeedList,
|
getPileFeedList,
|
||||||
listBasic,
|
listBasic, updateBasic,
|
||||||
} from "@/api/pile/basic";
|
} from "@/api/pile/basic";
|
||||||
import {queryConnectorListByParams} from "@/api/pile/connector";
|
import {queryConnectorListByParams} from "@/api/pile/connector";
|
||||||
// 二维码组件
|
// 二维码组件
|
||||||
import VueQr from "vue-qr";
|
import VueQr from "vue-qr";
|
||||||
import {remoteControlGroundLock} from "@/api/pile/pileRemote";
|
import {remoteControlGroundLock} from "@/api/pile/pileRemote";
|
||||||
|
import Template from "@/views/billing/template";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {VueQr, remoteUpgrade},
|
components: {Template, VueQr, remoteUpgrade},
|
||||||
name: "pile-detail",
|
name: "pile-detail",
|
||||||
dicts: ["connector_status", "connector_type", "sim_supplier", "sim_operator"],
|
dicts: ["connector_status", "connector_type", "sim_supplier", "sim_operator"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
clearableFlag: true,
|
||||||
pileDetailLoading: false,
|
pileDetailLoading: false,
|
||||||
pileListLoading: false,
|
pileListLoading: false,
|
||||||
pileId: this.$route.params.pileId,
|
pileId: this.$route.params.pileId,
|
||||||
@@ -361,6 +376,25 @@ export default {
|
|||||||
test() {
|
test() {
|
||||||
console.log("测试");
|
console.log("测试");
|
||||||
},
|
},
|
||||||
|
// 开放编辑按钮
|
||||||
|
openEdit() {
|
||||||
|
this.clearableFlag = this.clearableFlag === false;
|
||||||
|
},
|
||||||
|
// 修改充电桩别名
|
||||||
|
updateName() {
|
||||||
|
const params = {
|
||||||
|
id: this.pileDetail.pileId,
|
||||||
|
name: this.pileDetail.name,
|
||||||
|
sn: this.pileDetail.pileSn,
|
||||||
|
stationId: this.pileDetail.stationId
|
||||||
|
}
|
||||||
|
console.log("params", params)
|
||||||
|
updateBasic(params).then((response) => {
|
||||||
|
console.log("response", response)
|
||||||
|
this.clearableFlag = true;
|
||||||
|
this.getPileDetail();
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查询充电桩详情接口
|
// 查询充电桩详情接口
|
||||||
getPileDetail() {
|
getPileDetail() {
|
||||||
this.pileDetailLoading = true;
|
this.pileDetailLoading = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user