Commit 07c82b63 authored by wanghao's avatar wanghao

1 燃气用户 通过字典表格式 增加燃气类型字段。

parent b8dc6acb
......@@ -37,6 +37,8 @@ public class TDetectorUser extends BaseEntity
@Excel(name = "用户类型")
private String userType;
@Excel(name = "燃气类型",dictType = "gas_type")
private String gasType;
/** 地址 */
@Excel(name = "地址")
private String address;
......@@ -279,6 +281,14 @@ public class TDetectorUser extends BaseEntity
this.hasInspectUser = hasInspectUser;
}
public String getGasType() {
return gasType;
}
public void setGasType(String gasType) {
this.gasType = gasType;
}
@Override
public String toString() {
return "TDetectorUser{" +
......
......@@ -30,6 +30,8 @@ public class TDetectorUserInspectVo {
@Excel(name = "用户类型")
private String userType;
@Excel(name = "燃气类型",dictType = "gas_type")
private String gasType;
/** 地址 */
@Excel(name = "地址")
......@@ -55,7 +57,6 @@ public class TDetectorUserInspectVo {
@Excel(name = "电话")
private String phone;
/**
* 是否入户安检 0否 1是
*/
......@@ -239,6 +240,14 @@ public class TDetectorUserInspectVo {
this.inspectEndTime = inspectEndTime;
}
public String getGasType() {
return gasType;
}
public void setGasType(String gasType) {
this.gasType = gasType;
}
@Override
public String toString() {
return "TDetectorUser{" +
......
......@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="nickName" column="nick_name" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="userType" column="user_type" />
<result property="gasType" column="gas_type" />
<result property="address" column="address" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
......@@ -28,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="nickName" column="nick_name" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="userType" column="user_type" />
<result property="gasType" column="gas_type" />
<result property="address" column="address" />
<result property="linkman" column="linkman" />
<result property="phone" column="phone" />
......@@ -38,11 +40,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTDetectorUserVo">
select user_id, username, nick_name, user_type, address, longitude, latitude, linkman, phone, email, create_time, update_time, is_del, remarks from t_detector_user
select user_id, username, nick_name, user_type, gas_type,address, longitude, latitude, linkman, phone, email, create_time, update_time, is_del, remarks from t_detector_user
</sql>
<select id="selectTDetectorUserList" parameterType="TDetectorUser" resultMap="TDetectorUserResult">
select a.user_id, a.username, a.nick_name, (CASE a.user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '商业用户'WHEN '3' THEN '工业用户'WHEN '4' THEN '煤改气用户'end) as user_type , a.address, a.longitude, a.latitude, a.linkman, a.phone, a.email, a.create_time, a.update_time, a.is_del, a.remarks,
select a.user_id,
a.username,
a.nick_name,
(CASE a.user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '商业用户'WHEN '3' THEN '工业用户'WHEN '4' THEN '餐饮单位用户'end) as user_type ,
(CASE a.gas_type WHEN '0' THEN '天然气' WHEN '1' THEN '液化气' end) as gas_type ,
a.address, a.longitude, a.latitude, a.linkman, a.phone, a.email, a.create_time, a.update_time, a.is_del, a.remarks,
b.enterprise_name
from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
<where> a.is_del = '0'
......@@ -83,7 +90,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTDetectorUser" parameterType="TDetectorUser" resultMap="TDetectorUserResult">
select a.user_id, a.beyond_enterprise_id,a.username, a.nick_name, (CASE a.user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '商业用户'WHEN '3' THEN '工业用户'WHEN '4' THEN '煤改气用户'end) as user_type , a.address, a.longitude, a.latitude, a.linkman, a.phone, a.email, a.create_time, a.update_time, a.is_del, a.remarks,
select a.user_id, a.beyond_enterprise_id,a.username, a.nick_name,
(CASE a.user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '商业用户'WHEN '3' THEN '工业用户'WHEN '4' THEN '餐饮单位用户'end) as user_type ,
(CASE a.gas_type WHEN '0' THEN '天然气' WHEN '1' THEN '液化气' end) as gas_type ,
a.address, a.longitude, a.latitude, a.linkman, a.phone, a.email, a.create_time, a.update_time, a.is_del, a.remarks,
b.enterprise_name
from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
<where>
......@@ -96,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTDetectorUserById" parameterType="Long" resultMap="TDetectorUserResult">
select a.user_id, a.beyond_enterprise_id,a.username, a.nick_name, a.user_type, a.address, a.longitude, a.latitude,
select a.user_id, a.beyond_enterprise_id,a.username, a.nick_name, a.user_type,a.gas_type, a.address, a.longitude, a.latitude,
a.linkman, a.phone, a.email, a.create_time, a.update_time, a.is_del, a.remarks, b.enterprise_name
from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
where a.user_id = #{userId}
......@@ -106,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.user_id AS userId,
a.nick_name AS nickName,
a.user_type AS userType,
a.gas_type AS gasType,
a.address AS address,
a.longitude AS longitude,
a.latitude AS latitude,
......@@ -180,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="username != null">username,</if>
<if test="nickName != null">nick_name,</if>
<if test="userType != null">user_type,</if>
<if test="gasType != null">gas_type,</if>
<if test="address != null">address,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
......@@ -194,6 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="username != null">#{username},</if>
<if test="nickName != null">#{nickName},</if>
<if test="userType != null">#{userType},</if>
<if test="gasType != null">#{gasType},</if>
<if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
......@@ -212,6 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="username != null">username = #{username},</if>
<if test="nickName != null">nick_name = #{nickName},</if>
<if test="userType != null">user_type = #{userType},</if>
<if test="gasType != null">gas_type = #{gasType},</if>
<if test="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
......@@ -269,6 +283,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
'煤改气用户'
END
) AS user_type,
(
CASE a.gas_type
WHEN '0' THEN
'天然气'
WHEN '1' THEN
'液化气'
END
) AS gas_type,
a.address,
a.longitude,
a.latitude,
......
......@@ -75,6 +75,10 @@
<span slot-scope="scope" v-if="scope.row.nickName">{{scope.row.nickName}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="燃气类型" align="center" prop="gasType" >
<span slot-scope="scope" v-if="scope.row.gasType">{{scope.row.gasType}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="用户类型" align="center" prop="userType" >
<span slot-scope="scope" v-if="scope.row.userType">{{scope.row.userType}}</span>
<span v-else>-</span>
......@@ -153,6 +157,14 @@
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="燃气类型" prop="gasType">
<el-select v-model="form.gasType" placeholder="请选择燃气类型">
<el-option v-for="dict in gasTypeOpers" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="用户类型" prop="userType">
<el-select v-model="form.userType" placeholder="请选择用户类型">
......@@ -160,6 +172,17 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择名称" maxlength="255" :disabled="false" clearable style="width: 100%;">
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="地址" prop="address">
......@@ -167,7 +190,6 @@
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="经度" prop="longitude">-->
......@@ -212,17 +234,6 @@
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择名称" maxlength="255" :disabled="false" clearable style="width: 100%;">
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="邮箱" prop="email">
......@@ -291,6 +302,8 @@ export default {
userList: [],
// 燃气类型
userTypeOpers: [],
// 燃气类型
gasTypeOpers: [],
// 弹出层标题
title: "",
// 是否显示弹出层
......@@ -329,6 +342,9 @@ export default {
this.getDicts("yehuaqi_user_type").then(response => {
this.userTypeOpers = response.data;
});
this.getDicts("gas_type").then(response => {
this.gasTypeOpers = response.data;
});
},
methods: {
/** 查询燃气用户列表 */
......@@ -352,6 +368,7 @@ export default {
username: null,
nickName: null,
userType: null,
gasType: null,
address: null,
longitude: null,
latitude: null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment