Commit b442c2a6 authored by 王晓倩's avatar 王晓倩

页面回显时间类型,修改管道长度数据类型

parent 9a63bb8d
......@@ -70,13 +70,13 @@ public class TDeviceInfo extends BaseEntity
private String phone;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inspectionTime;
/** 备注 */
......
......@@ -38,7 +38,7 @@ public class TPipe extends BaseEntity
/** 管道长度 */
@Excel(name = "管道长度")
private Long pipeLength;
private double pipeLength;
/** 管道类型(1地埋管线、2地表管线) */
@Excel(name = "管道类型", readConverterExp = "1地埋管线、2地表管线")
......@@ -53,13 +53,13 @@ public class TPipe extends BaseEntity
private String iconUrl;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inspectionTime;
/** 备注 */
......@@ -111,12 +111,12 @@ public class TPipe extends BaseEntity
{
return coordinates;
}
public void setPipeLength(Long pipeLength)
public void setPipeLength(double pipeLength)
{
this.pipeLength = pipeLength;
}
public Long getPipeLength()
public double getPipeLength()
{
return pipeLength;
}
......
......@@ -31,7 +31,7 @@ public interface TPipeMapper
* 统计管道总长度
* @return
*/
public Long countPipeLength();
public double countPipeLength();
/**
* 新增管道信息
......
......@@ -29,10 +29,10 @@ public interface ITPipeService
/**
* 统计管道总长度
* @param tPipe
* @param
* @return
*/
public Long countPipeLength();
public double countPipeLength();
/**
* 新增管道信息
......
......@@ -48,7 +48,7 @@ public class TPipeServiceImpl implements ITPipeService
* @return
*/
@Override
public Long countPipeLength() {
public double countPipeLength() {
return tPipeMapper.countPipeLength();
};
......
......@@ -30,7 +30,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pipeName != null and pipeName != ''"> and pipe_name like concat('%', #{pipeName}, '%')</if>
<if test="pipeAddr != null and pipeAddr != ''"> and pipe_addr = #{pipeAddr}</if>
<if test="coordinates != null and coordinates != ''"> and coordinates = #{coordinates}</if>
<if test="pipeLength != null "> and pipe_length = #{pipeLength}</if>
<if test="pipeType != null and pipeType != ''"> and pipe_type = #{pipeType}</if>
<if test="pipePressure != null and pipePressure != ''"> and pipe_pressure = #{pipePressure}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
......@@ -45,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where pipe_id = #{pipeId}
</select>
<select id="countPipeLength" resultType="java.lang.Long">
<select id="countPipeLength" resultType="double">
select sum(pipe_length) from t_pipe
</select>
......
......@@ -270,10 +270,6 @@ export default {
};
},
created() {
countDeviceByType().then(response => {
let data = response.data;
console.log(data,"data");
});
this.getList();
this.getDicts("t_device_type").then(response => {
this.typeOptions = response.data;
......
......@@ -141,10 +141,10 @@
<el-input v-model="form.pipeAddr" placeholder="请输入所在地址" />
</el-form-item>
<el-form-item label="管道坐标" prop="coordinates">
<el-input v-model="form.coordinates" placeholder="请输入坐标" />
<el-input v-model="form.coordinates" type="textarea" placeholder="请输入坐标" />
</el-form-item>
<el-form-item label="管道长度" prop="pipeLength">
<el-input v-model="form.pipeLength" placeholder="请输入管道长度" />
<el-input v-model="form.pipeLength"placeholder="请输入管道长度" />
</el-form-item>
<el-form-item label="管道类型">
<el-select v-model="form.pipeType" placeholder="请选择管道类型">
......@@ -190,7 +190,7 @@
</template>
<script>
import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe } from "@/api/device/pipe";
import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe, countPipeLength } from "@/api/device/pipe";
import FileUpload from '@/components/FileUpload';
export default {
......
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