Commit 9bed3bc3 authored by 耿迪迪's avatar 耿迪迪

Merge branch 'master' of ssh://111.61.77.35:15/gengdidi/gassafety

parents f78f467d 45388b5a
...@@ -83,6 +83,10 @@ public class TDeviceInfo extends BaseEntity ...@@ -83,6 +83,10 @@ public class TDeviceInfo extends BaseEntity
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inspectionTime; private Date inspectionTime;
/** 是否删除 */
@Excel(name = "是否删除")
private String isDel;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
...@@ -231,6 +235,15 @@ public class TDeviceInfo extends BaseEntity ...@@ -231,6 +235,15 @@ public class TDeviceInfo extends BaseEntity
{ {
return inspectionTime; return inspectionTime;
} }
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setRemarks(String remarks) public void setRemarks(String remarks)
{ {
this.remarks = remarks; this.remarks = remarks;
......
...@@ -66,6 +66,10 @@ public class TPipe extends BaseEntity ...@@ -66,6 +66,10 @@ public class TPipe extends BaseEntity
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inspectionTime; private Date inspectionTime;
/** 是否删除 */
@Excel(name = "是否删除")
private String isDel;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
...@@ -178,6 +182,15 @@ public class TPipe extends BaseEntity ...@@ -178,6 +182,15 @@ public class TPipe extends BaseEntity
{ {
return inspectionTime; return inspectionTime;
} }
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setRemarks(String remarks) public void setRemarks(String remarks)
{ {
this.remarks = remarks; this.remarks = remarks;
......
...@@ -21,16 +21,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -21,16 +21,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="phone" column="phone" /> <result property="phone" column="phone" />
<result property="installationTime" column="installation_time" /> <result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" /> <result property="inspectionTime" column="inspection_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
</resultMap> </resultMap>
<sql id="selectTDeviceInfoVo"> <sql id="selectTDeviceInfoVo">
select device_id, enterprise_id, pipe_code, device_name, device_code, device_addr, device_model, device_type, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, remarks from t_device_info select device_id, enterprise_id, pipe_code, device_name, device_code, device_addr, device_model, device_type, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, is_del, remarks from t_device_info
</sql> </sql>
<select id="selectTDeviceInfoList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult"> <select id="selectTDeviceInfoList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult">
<include refid="selectTDeviceInfoVo"/> <include refid="selectTDeviceInfoVo"/>
<where> <where>
is_del = '0'
<if test="enterpriseId != null and enterpriseId != 0 "> and enterprise_id = #{enterpriseId}</if> <if test="enterpriseId != null and enterpriseId != 0 "> and enterprise_id = #{enterpriseId}</if>
<if test="pipeCode != null "> and pipe_code = #{pipeCode}</if> <if test="pipeCode != null "> and pipe_code = #{pipeCode}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if> <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
...@@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="countDeviceByType" resultType="map"> <select id="countDeviceByType" resultType="map">
select count(device_id) number, device_type type from t_device_info select count(device_id) number, device_type type from t_device_info
where is_del = '0'
group by device_type group by device_type
</select> </select>
...@@ -124,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -124,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="installationTime != null">installation_time = #{installationTime},</if> <if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if> <if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim> </trim>
where device_id = #{deviceId} where device_id = #{deviceId}
</update> </update>
......
...@@ -17,16 +17,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -17,16 +17,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="iconUrl" column="icon_url" /> <result property="iconUrl" column="icon_url" />
<result property="installationTime" column="installation_time" /> <result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" /> <result property="inspectionTime" column="inspection_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
</resultMap> </resultMap>
<sql id="selectTPipeVo"> <sql id="selectTPipeVo">
select pipe_id, enterprise_id, pipe_name, pipe_code, pipe_addr, coordinates, pipe_length, pipe_type, pipe_pressure, icon_url, installation_time, inspection_time, remarks from t_pipe select pipe_id, enterprise_id, pipe_name, pipe_code, pipe_addr, coordinates, pipe_length, pipe_type, pipe_pressure, icon_url, installation_time, inspection_time, is_del, remarks from t_pipe
</sql> </sql>
<select id="selectTPipeList" parameterType="TPipe" resultMap="TPipeResult"> <select id="selectTPipeList" parameterType="TPipe" resultMap="TPipeResult">
<include refid="selectTPipeVo"/> <include refid="selectTPipeVo"/>
<where> <where>
is_del = '0'
<if test="enterpriseId != null and enterpriseId != 0"> and enterprise_id = #{enterpriseId}</if> <if test="enterpriseId != null and enterpriseId != 0"> and enterprise_id = #{enterpriseId}</if>
<if test="pipeName != null and pipeName != ''"> and pipe_name like concat('%', #{pipeName}, '%')</if> <if test="pipeName != null and pipeName != ''"> and pipe_name like concat('%', #{pipeName}, '%')</if>
<if test="pipeCode != null and pipeCode != ''"> and pipe_code like concat('%', #{pipeCode}, '%')</if> <if test="pipeCode != null and pipeCode != ''"> and pipe_code like concat('%', #{pipeCode}, '%')</if>
...@@ -53,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -53,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="countPipeLength" resultType="double"> <select id="countPipeLength" resultType="double">
select sum(pipe_length) from t_pipe select sum(pipe_length) from t_pipe
where is_del = '0'
</select> </select>
<insert id="insertTPipe" parameterType="TPipe" useGeneratedKeys="true" keyProperty="pipeId"> <insert id="insertTPipe" parameterType="TPipe" useGeneratedKeys="true" keyProperty="pipeId">
...@@ -101,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -101,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="iconUrl != null">icon_url = #{iconUrl},</if> <if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="installationTime != null">installation_time = #{installationTime},</if> <if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if> <if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
</trim> </trim>
where pipe_id = #{pipeId} where pipe_id = #{pipeId}
......
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