Commit 07c82b63 authored by wanghao's avatar wanghao

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

parent b8dc6acb
...@@ -37,6 +37,8 @@ public class TDetectorUser extends BaseEntity ...@@ -37,6 +37,8 @@ public class TDetectorUser extends BaseEntity
@Excel(name = "用户类型") @Excel(name = "用户类型")
private String userType; private String userType;
@Excel(name = "燃气类型",dictType = "gas_type")
private String gasType;
/** 地址 */ /** 地址 */
@Excel(name = "地址") @Excel(name = "地址")
private String address; private String address;
...@@ -279,6 +281,14 @@ public class TDetectorUser extends BaseEntity ...@@ -279,6 +281,14 @@ public class TDetectorUser extends BaseEntity
this.hasInspectUser = hasInspectUser; this.hasInspectUser = hasInspectUser;
} }
public String getGasType() {
return gasType;
}
public void setGasType(String gasType) {
this.gasType = gasType;
}
@Override @Override
public String toString() { public String toString() {
return "TDetectorUser{" + return "TDetectorUser{" +
......
...@@ -30,6 +30,8 @@ public class TDetectorUserInspectVo { ...@@ -30,6 +30,8 @@ public class TDetectorUserInspectVo {
@Excel(name = "用户类型") @Excel(name = "用户类型")
private String userType; private String userType;
@Excel(name = "燃气类型",dictType = "gas_type")
private String gasType;
/** 地址 */ /** 地址 */
@Excel(name = "地址") @Excel(name = "地址")
...@@ -55,7 +57,6 @@ public class TDetectorUserInspectVo { ...@@ -55,7 +57,6 @@ public class TDetectorUserInspectVo {
@Excel(name = "电话") @Excel(name = "电话")
private String phone; private String phone;
/** /**
* 是否入户安检 0否 1是 * 是否入户安检 0否 1是
*/ */
...@@ -239,6 +240,14 @@ public class TDetectorUserInspectVo { ...@@ -239,6 +240,14 @@ public class TDetectorUserInspectVo {
this.inspectEndTime = inspectEndTime; this.inspectEndTime = inspectEndTime;
} }
public String getGasType() {
return gasType;
}
public void setGasType(String gasType) {
this.gasType = gasType;
}
@Override @Override
public String toString() { public String toString() {
return "TDetectorUser{" + return "TDetectorUser{" +
......
...@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="nickName" column="nick_name" /> <result property="nickName" column="nick_name" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" /> <result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="userType" column="user_type" /> <result property="userType" column="user_type" />
<result property="gasType" column="gas_type" />
<result property="address" column="address" /> <result property="address" column="address" />
<result property="longitude" column="longitude" /> <result property="longitude" column="longitude" />
<result property="latitude" column="latitude" /> <result property="latitude" column="latitude" />
...@@ -28,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -28,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="nickName" column="nick_name" /> <result property="nickName" column="nick_name" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" /> <result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="userType" column="user_type" /> <result property="userType" column="user_type" />
<result property="gasType" column="gas_type" />
<result property="address" column="address" /> <result property="address" column="address" />
<result property="linkman" column="linkman" /> <result property="linkman" column="linkman" />
<result property="phone" column="phone" /> <result property="phone" column="phone" />
...@@ -38,12 +40,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -38,12 +40,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTDetectorUserVo"> <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> </sql>
<select id="selectTDetectorUserList" parameterType="TDetectorUser" resultMap="TDetectorUserResult"> <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,
b.enterprise_name 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 from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
<where> a.is_del = '0' <where> a.is_del = '0'
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if> <if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
...@@ -83,8 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -83,8 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectTDetectorUser" parameterType="TDetectorUser" resultMap="TDetectorUserResult"> <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,
b.enterprise_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 from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
<where> <where>
<if test="isDel != null and isDel != ''"> and a.is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and a.is_del = #{isDel}</if>
...@@ -96,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -96,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectTDetectorUserById" parameterType="Long" resultMap="TDetectorUserResult"> <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 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 from t_detector_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
where a.user_id = #{userId} where a.user_id = #{userId}
...@@ -106,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -106,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.user_id AS userId, select a.user_id AS userId,
a.nick_name AS nickName, a.nick_name AS nickName,
a.user_type AS userType, a.user_type AS userType,
a.gas_type AS gasType,
a.address AS address, a.address AS address,
a.longitude AS longitude, a.longitude AS longitude,
a.latitude AS latitude, a.latitude AS latitude,
...@@ -180,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -180,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="username != null">username,</if> <if test="username != null">username,</if>
<if test="nickName != null">nick_name,</if> <if test="nickName != null">nick_name,</if>
<if test="userType != null">user_type,</if> <if test="userType != null">user_type,</if>
<if test="gasType != null">gas_type,</if>
<if test="address != null">address,</if> <if test="address != null">address,</if>
<if test="longitude != null">longitude,</if> <if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if> <if test="latitude != null">latitude,</if>
...@@ -194,6 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -194,6 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="username != null">#{username},</if> <if test="username != null">#{username},</if>
<if test="nickName != null">#{nickName},</if> <if test="nickName != null">#{nickName},</if>
<if test="userType != null">#{userType},</if> <if test="userType != null">#{userType},</if>
<if test="gasType != null">#{gasType},</if>
<if test="address != null">#{address},</if> <if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if> <if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if> <if test="latitude != null">#{latitude},</if>
...@@ -212,6 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -212,6 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="username != null">username = #{username},</if> <if test="username != null">username = #{username},</if>
<if test="nickName != null">nick_name = #{nickName},</if> <if test="nickName != null">nick_name = #{nickName},</if>
<if test="userType != null">user_type = #{userType},</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="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</if> <if test="longitude != null">longitude = #{longitude},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if> <if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
...@@ -269,6 +283,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -269,6 +283,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
'煤改气用户' '煤改气用户'
END END
) AS user_type, ) AS user_type,
(
CASE a.gas_type
WHEN '0' THEN
'天然气'
WHEN '1' THEN
'液化气'
END
) AS gas_type,
a.address, a.address,
a.longitude, a.longitude,
a.latitude, a.latitude,
......
...@@ -75,6 +75,10 @@ ...@@ -75,6 +75,10 @@
<span slot-scope="scope" v-if="scope.row.nickName">{{scope.row.nickName}}</span> <span slot-scope="scope" v-if="scope.row.nickName">{{scope.row.nickName}}</span>
<span v-else>-</span> <span v-else>-</span>
</el-table-column> </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" > <el-table-column label="用户类型" align="center" prop="userType" >
<span slot-scope="scope" v-if="scope.row.userType">{{scope.row.userType}}</span> <span slot-scope="scope" v-if="scope.row.userType">{{scope.row.userType}}</span>
<span v-else>-</span> <span v-else>-</span>
...@@ -154,20 +158,38 @@ ...@@ -154,20 +158,38 @@
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="用户类型" prop="userType"> <el-form-item label="燃气类型" prop="gasType">
<el-select v-model="form.userType" placeholder="请选择用户类型"> <el-select v-model="form.gasType" placeholder="请选择燃气类型">
<el-option v-for="dict in userTypeOpers" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" /> <el-option v-for="dict in gasTypeOpers" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="地址" prop="address"> <el-form-item label="用户类型" prop="userType">
<el-input v-model="form.address" placeholder="请输入地址" /> <el-select v-model="form.userType" placeholder="请选择用户类型">
</el-form-item> <el-option v-for="dict in userTypeOpers" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col> </el-col>
</el-row> </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">
<el-input v-model="form.address" placeholder="请输入地址" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="11">--> <!-- <el-col :span="11">-->
<!-- <el-form-item label="经度" prop="longitude">--> <!-- <el-form-item label="经度" prop="longitude">-->
...@@ -200,29 +222,18 @@ ...@@ -200,29 +222,18 @@
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="联系人" prop="linkman"> <el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" /> <el-input v-model="form.linkman" placeholder="请输入联系人" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="电话" prop="phone"> <el-form-item label="电话" prop="phone">
<el-input onkeyup="this.value=this.value.replace(/\D/g,'')" v-model="form.phone" placeholder="请输入电话" /> <el-input onkeyup="this.value=this.value.replace(/\D/g,'')" v-model="form.phone" placeholder="请输入电话" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-row>
<el-col :span="22"> <el-col :span="22">
<el-form-item label="邮箱" prop="email"> <el-form-item label="邮箱" prop="email">
...@@ -291,6 +302,8 @@ export default { ...@@ -291,6 +302,8 @@ export default {
userList: [], userList: [],
// 燃气类型 // 燃气类型
userTypeOpers: [], userTypeOpers: [],
// 燃气类型
gasTypeOpers: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
...@@ -329,6 +342,9 @@ export default { ...@@ -329,6 +342,9 @@ export default {
this.getDicts("yehuaqi_user_type").then(response => { this.getDicts("yehuaqi_user_type").then(response => {
this.userTypeOpers = response.data; this.userTypeOpers = response.data;
}); });
this.getDicts("gas_type").then(response => {
this.gasTypeOpers = response.data;
});
}, },
methods: { methods: {
/** 查询燃气用户列表 */ /** 查询燃气用户列表 */
...@@ -352,6 +368,7 @@ export default { ...@@ -352,6 +368,7 @@ export default {
username: null, username: null,
nickName: null, nickName: null,
userType: null, userType: null,
gasType: null,
address: null, address: null,
longitude: null, longitude: null,
latitude: 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