Commit 274fd254 authored by 耿迪迪's avatar 耿迪迪

管道字段添加 gengdidi

parent b09841f4
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
......@@ -10,9 +8,9 @@ import com.zehong.common.core.domain.BaseEntity;
/**
* 管道信息对象 t_pipe_info
*
*
* @author zehong
* @date 2022-01-26
* @date 2022-02-09
*/
public class TPipeInfo extends BaseEntity
{
......@@ -37,6 +35,10 @@ public class TPipeInfo extends BaseEntity
@Excel(name = "材质")
private String pipeMaterial;
/** 管道地址 */
@Excel(name = "管道地址")
private String pipeAddr;
/** 埋深 */
@Excel(name = "埋深")
private BigDecimal buriedDepth;
......@@ -45,14 +47,9 @@ public class TPipeInfo extends BaseEntity
@Excel(name = "走向")
private String pipeTrend;
/** 人员类型:1.运行维护人员 2.抢修人员 */
@Excel(name = "人员类型")
private String peopleOccupation;
/** 建设年代 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "建设年代", width = 30, dateFormat = "yyyy-MM-dd")
private Date buildDate;
@Excel(name = "建设年代")
private String buildDate;
/** 建设单位 */
@Excel(name = "建设单位")
......@@ -71,144 +68,145 @@ public class TPipeInfo extends BaseEntity
private String coordinates;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setPipeId(Long pipeId)
public void setPipeId(Long pipeId)
{
this.pipeId = pipeId;
}
public Long getPipeId()
public Long getPipeId()
{
return pipeId;
}
public void setPipeLength(BigDecimal pipeLength)
public void setPipeLength(BigDecimal pipeLength)
{
this.pipeLength = pipeLength;
}
public BigDecimal getPipeLength()
public BigDecimal getPipeLength()
{
return pipeLength;
}
public void setPipeDiameter(BigDecimal pipeDiameter)
public void setPipeDiameter(BigDecimal pipeDiameter)
{
this.pipeDiameter = pipeDiameter;
}
public BigDecimal getPipeDiameter()
public BigDecimal getPipeDiameter()
{
return pipeDiameter;
}
public void setPipePressure(BigDecimal pipePressure)
public void setPipePressure(BigDecimal pipePressure)
{
this.pipePressure = pipePressure;
}
public BigDecimal getPipePressure()
public BigDecimal getPipePressure()
{
return pipePressure;
}
public void setPipeMaterial(String pipeMaterial)
public void setPipeMaterial(String pipeMaterial)
{
this.pipeMaterial = pipeMaterial;
}
public String getPipeMaterial()
public String getPipeMaterial()
{
return pipeMaterial;
}
public void setBuriedDepth(BigDecimal buriedDepth)
public void setPipeAddr(String pipeAddr)
{
this.buriedDepth = buriedDepth;
this.pipeAddr = pipeAddr;
}
public BigDecimal getBuriedDepth()
public String getPipeAddr()
{
return buriedDepth;
return pipeAddr;
}
public void setPipeTrend(String pipeTrend)
public void setBuriedDepth(BigDecimal buriedDepth)
{
this.pipeTrend = pipeTrend;
this.buriedDepth = buriedDepth;
}
public String getPipeTrend()
public BigDecimal getBuriedDepth()
{
return pipeTrend;
return buriedDepth;
}
public void setPeopleOccupation(String peopleOccupation)
public void setPipeTrend(String pipeTrend)
{
this.peopleOccupation = peopleOccupation;
this.pipeTrend = pipeTrend;
}
public String getPeopleOccupation()
public String getPipeTrend()
{
return peopleOccupation;
return pipeTrend;
}
public void setBuildDate(Date buildDate)
public void setBuildDate(String buildDate)
{
this.buildDate = buildDate;
}
public Date getBuildDate()
public String getBuildDate()
{
return buildDate;
}
public void setBuildUnit(String buildUnit)
public void setBuildUnit(String buildUnit)
{
this.buildUnit = buildUnit;
}
public String getBuildUnit()
public String getBuildUnit()
{
return buildUnit;
}
public void setBeyondEnterpriseId(Long beyondEnterpriseId)
public void setBeyondEnterpriseId(Long beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public Long getBeyondEnterpriseId()
public Long getBeyondEnterpriseId()
{
return beyondEnterpriseId;
}
public void setBeyondEnterpriseName(String beyondEnterpriseName)
public void setBeyondEnterpriseName(String beyondEnterpriseName)
{
this.beyondEnterpriseName = beyondEnterpriseName;
}
public String getBeyondEnterpriseName()
public String getBeyondEnterpriseName()
{
return beyondEnterpriseName;
}
public void setCoordinates(String coordinates)
public void setCoordinates(String coordinates)
{
this.coordinates = coordinates;
}
public String getCoordinates()
public String getCoordinates()
{
return coordinates;
}
public void setIsDel(String isDel)
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
public String getRemarks()
{
return remarks;
}
......@@ -221,9 +219,9 @@ public class TPipeInfo extends BaseEntity
.append("pipeDiameter", getPipeDiameter())
.append("pipePressure", getPipePressure())
.append("pipeMaterial", getPipeMaterial())
.append("pipeAddr", getPipeAddr())
.append("buriedDepth", getBuriedDepth())
.append("pipeTrend", getPipeTrend())
.append("peopleOccupation", getPeopleOccupation())
.append("buildDate", getBuildDate())
.append("buildUnit", getBuildUnit())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
......
......@@ -3,16 +3,16 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TPipeInfoMapper">
<resultMap type="TPipeInfo" id="TPipeInfoResult">
<result property="pipeId" column="pipe_id" />
<result property="pipeLength" column="pipe_length" />
<result property="pipeDiameter" column="pipe_diameter" />
<result property="pipePressure" column="pipe_pressure" />
<result property="pipeMaterial" column="pipe_material" />
<result property="pipeAddr" column="pipe_addr" />
<result property="buriedDepth" column="buried_depth" />
<result property="pipeTrend" column="pipe_trend" />
<result property="peopleOccupation" column="people_occupation" />
<result property="buildDate" column="build_date" />
<result property="buildUnit" column="build_unit" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
......@@ -27,21 +27,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTPipeInfoVo">
select pipe_id, pipe_length, pipe_diameter, pipe_pressure, pipe_material, buried_depth, pipe_trend, (CASE people_occupation WHEN '1' THEN '运行维护人员' WHEN '2' THEN '抢修人员'end ) as people_occupation, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, coordinates, create_by, create_time, update_by, update_time, is_del, remarks from t_pipe_info
select pipe_id, pipe_length, pipe_diameter, pipe_pressure, pipe_material, pipe_addr, buried_depth, pipe_trend, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, coordinates, create_by, create_time, update_by, update_time, is_del, remarks from t_pipe_info
</sql>
<select id="selectTPipeInfoList" parameterType="TPipeInfo" resultMap="TPipeInfoResult">
<include refid="selectTPipeInfoVo"/>
<where>
is_del='0'
<where>
<if test="pipeLength != null "> and pipe_length = #{pipeLength}</if>
<if test="pipeDiameter != null "> and pipe_diameter = #{pipeDiameter}</if>
<if test="pipePressure != null "> and pipe_pressure = #{pipePressure}</if>
<if test="pipeMaterial != null and pipeMaterial != ''"> and pipe_material = #{pipeMaterial}</if>
<if test="pipeAddr != null and pipeAddr != ''"> and pipe_addr = #{pipeAddr}</if>
<if test="buriedDepth != null "> and buried_depth = #{buriedDepth}</if>
<if test="pipeTrend != null and pipeTrend != ''"> and pipe_trend = #{pipeTrend}</if>
<if test="peopleOccupation != null and peopleOccupation != ''"> and people_occupation = #{peopleOccupation}</if>
<if test="buildDate != null "> and build_date = #{buildDate}</if>
<if test="buildDate != null and buildDate != ''"> and build_date = #{buildDate}</if>
<if test="buildUnit != null and buildUnit != ''"> and build_unit = #{buildUnit}</if>
<if test="beyondEnterpriseId != null "> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if>
......@@ -50,12 +49,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTPipeInfoById" parameterType="Long" resultMap="TPipeInfoResult">
select pipe_id, pipe_length, pipe_diameter, pipe_pressure, pipe_material, buried_depth, pipe_trend,people_occupation, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, coordinates, create_by, create_time, update_by, update_time, is_del, remarks from t_pipe_info
where pipe_id = #{pipeId} and is_del='0'
<include refid="selectTPipeInfoVo"/>
where pipe_id = #{pipeId}
</select>
<insert id="insertTPipeInfo" parameterType="TPipeInfo" useGeneratedKeys="true" keyProperty="pipeId">
insert into t_pipe_info
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -63,9 +62,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pipeDiameter != null">pipe_diameter,</if>
<if test="pipePressure != null">pipe_pressure,</if>
<if test="pipeMaterial != null">pipe_material,</if>
<if test="pipeAddr != null">pipe_addr,</if>
<if test="buriedDepth != null">buried_depth,</if>
<if test="pipeTrend != null">pipe_trend,</if>
<if test="peopleOccupation != null">people_occupation,</if>
<if test="buildDate != null">build_date,</if>
<if test="buildUnit != null">build_unit,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
......@@ -83,9 +82,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pipeDiameter != null">#{pipeDiameter},</if>
<if test="pipePressure != null">#{pipePressure},</if>
<if test="pipeMaterial != null">#{pipeMaterial},</if>
<if test="pipeAddr != null">#{pipeAddr},</if>
<if test="buriedDepth != null">#{buriedDepth},</if>
<if test="pipeTrend != null">#{pipeTrend},</if>
<if test="peopleOccupation != null">#{peopleOccupation},</if>
<if test="buildDate != null">#{buildDate},</if>
<if test="buildUnit != null">#{buildUnit},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
......@@ -107,9 +106,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pipeDiameter != null">pipe_diameter = #{pipeDiameter},</if>
<if test="pipePressure != null">pipe_pressure = #{pipePressure},</if>
<if test="pipeMaterial != null">pipe_material = #{pipeMaterial},</if>
<if test="pipeAddr != null">pipe_addr = #{pipeAddr},</if>
<if test="buriedDepth != null">buried_depth = #{buriedDepth},</if>
<if test="pipeTrend != null">pipe_trend = #{pipeTrend},</if>
<if test="peopleOccupation != null">people_occupation = #{peopleOccupation},</if>
<if test="buildDate != null">build_date = #{buildDate},</if>
<if test="buildUnit != null">build_unit = #{buildUnit},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
......@@ -125,14 +124,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where pipe_id = #{pipeId}
</update>
<update id="deleteTPipeInfoById" parameterType="Long">
update t_pipe_info set is_del='1' where pipe_id = #{pipeId}
</update>
<delete id="deleteTPipeInfoById" parameterType="Long">
delete from t_pipe_info where pipe_id = #{pipeId}
</delete>
<update id="deleteTPipeInfoByIds" parameterType="String">
update t_pipe_info set is_del='1' where pipe_id in
<delete id="deleteTPipeInfoByIds" parameterType="String">
delete from t_pipe_info where pipe_id in
<foreach item="pipeId" collection="array" open="(" separator="," close=")">
#{pipeId}
</foreach>
</update>
</mapper>
</delete>
</mapper>
\ No newline at end of file
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="管道长度" prop="pipeLength">
<el-input
v-model="queryParams.pipeLength"
placeholder="请输入管道长度"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="管径" prop="pipeDiameter">
<el-form-item label="建设单位" prop="buildUnit">
<el-input
v-model="queryParams.pipeDiameter"
placeholder="请输入管径"
v-model="queryParams.buildUnit"
placeholder="请输入建设单位"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="压力" prop="pipePressure">
<el-form-item label="权属单位名称" prop="beyondEnterpriseName">
<el-input
v-model="queryParams.pipePressure"
placeholder="请输入压力"
v-model="queryParams.beyondEnterpriseName"
placeholder="请输入权属单位名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
......@@ -43,7 +35,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['supervise:pipe:add']"
v-hasPermi="['system:info:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
......@@ -54,7 +46,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['supervise:pipe:edit']"
v-hasPermi="['system:info:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
......@@ -65,7 +57,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['supervise:pipe:remove']"
v-hasPermi="['system:info:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
......@@ -76,22 +68,24 @@
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['supervise:pipe:export']"
v-hasPermi="['system:info:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="pipeList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="管径" align="center" prop="pipeDiameter" />
<el-table-column label="压力" align="center" prop="pipePressure" />
<el-table-column label="材质" align="center" prop="pipeMaterial" />
<el-table-column label="管道地址" align="center" prop="pipeAddr" />
<el-table-column label="埋深" align="center" prop="buriedDepth" />
<el-table-column label="走向" align="center" prop="pipeTrend" />
<el-table-column label="人员类型" align="center" prop="peopleOccupation" />
<el-table-column label="建设年代" align="center" prop="buildDate" />
<el-table-column label="建设单位" align="center" prop="buildUnit" />
<el-table-column label="权属单位" align="center" prop="beyondEnterpriseId" />
<el-table-column label="坐标" align="center" prop="coordinates" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="权属单位名称" align="center" prop="beyondEnterpriseName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -99,14 +93,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['supervise:pipe:edit']"
v-hasPermi="['system:info:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['supervise:pipe:remove']"
v-hasPermi="['system:info:remove']"
>删除</el-button>
</template>
</el-table-column>
......@@ -135,19 +129,15 @@
<el-form-item label="材质" prop="pipeMaterial">
<el-input v-model="form.pipeMaterial" placeholder="请输入材质" />
</el-form-item>
<el-form-item label="管道地址" prop="pipeAddr">
<el-input v-model="form.pipeAddr" placeholder="请输入管道地址" />
</el-form-item>
<el-form-item label="埋深" prop="buriedDepth">
<el-input v-model="form.buriedDepth" placeholder="请输入埋深" />
</el-form-item>
<el-form-item label="走向" prop="pipeTrend">
<el-input v-model="form.pipeTrend" placeholder="请输入走向" />
</el-form-item>
<el-form-item label="人员类型" prop="peopleOccupation">
<el-select v-model="form.peopleOccupation" placeholder="请选择人员类型">
<el-option label="运行维护人员" value="1" />
<el-option label="抢修人员" value="2" />
</el-select>
</el-form-item>
<el-form-item label="建设年代" prop="buildDate">
<el-date-picker
v-model="form.buildDate"
......@@ -166,12 +156,6 @@
<el-form-item label="权属单位名称" prop="beyondEnterpriseName">
<el-input v-model="form.beyondEnterpriseName" placeholder="请输入权属单位名称" />
</el-form-item>
<el-form-item label="坐标" prop="coordinates">
<el-input v-model="form.coordinates" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
......@@ -185,7 +169,7 @@
import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe } from "@/api/regulation/pipe";
export default {
name: "Pipe",
name: "Info",
components: {
},
data() {
......@@ -205,7 +189,7 @@ export default {
// 总条数
total: 0,
// 管道信息表格数据
pipeList: [],
infoList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
......@@ -218,9 +202,9 @@ export default {
pipeDiameter: null,
pipePressure: null,
pipeMaterial: null,
pipeAddr: null,
buriedDepth: null,
pipeTrend: null,
peopleOccupation: null,
buildDate: null,
buildUnit: null,
beyondEnterpriseId: null,
......@@ -244,7 +228,7 @@ export default {
getList() {
this.loading = true;
listPipe(this.queryParams).then(response => {
this.pipeList = response.rows;
this.infoList = response.rows;
this.total = response.total;
this.loading = false;
});
......@@ -262,9 +246,9 @@ export default {
pipeDiameter: null,
pipePressure: null,
pipeMaterial: null,
pipeAddr: null,
buriedDepth: null,
pipeTrend: null,
peopleOccupation: null,
buildDate: null,
buildUnit: null,
beyondEnterpriseId: 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