数据报表
This commit is contained in:
parent
f1f6596d9f
commit
e94ee6fa44
|
@ -81,6 +81,8 @@ public class Heatanalysis extends JeecgEntity {
|
||||||
private Integer isExtract;//是否抽取 0否 1是
|
private Integer isExtract;//是否抽取 0否 1是
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer isExtracted;//是否被抽取 0否 1是
|
private Integer isExtracted;//是否被抽取 0否 1是
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer isTimeout;//是否超时 0否 1是
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String SDate;//开始时间
|
private String SDate;//开始时间
|
||||||
|
@ -88,10 +90,6 @@ public class Heatanalysis extends JeecgEntity {
|
||||||
private String EDate;//结束时间
|
private String EDate;//结束时间
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String tableName;//表名字
|
private String tableName;//表名字
|
||||||
|
|
||||||
private String delFlag; // 删除标识
|
private String delFlag; // 删除标识
|
||||||
public static final String DEL_FLAG_NORMAL = "0";
|
|
||||||
public static final String DEL_FLAG_DELETE = "1";
|
|
||||||
public static final String DEL_FLAG_AUDIT = "2";
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -86,8 +86,5 @@ public class Heatsource extends JeecgEntity {
|
||||||
private String supplyBuild;
|
private String supplyBuild;
|
||||||
|
|
||||||
private String delFlag; // 删除标识
|
private String delFlag; // 删除标识
|
||||||
public static final String DEL_FLAG_NORMAL = "0";
|
|
||||||
public static final String DEL_FLAG_DELETE = "1";
|
|
||||||
public static final String DEL_FLAG_AUDIT = "2";
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -78,7 +78,4 @@ public class Heatsourcestation extends JeecgEntity {
|
||||||
private String treeId; //树形ID
|
private String treeId; //树形ID
|
||||||
private String supplybuild; //所供楼宇
|
private String supplybuild; //所供楼宇
|
||||||
private String delFlag; // 删除标识
|
private String delFlag; // 删除标识
|
||||||
public static final String DEL_FLAG_NORMAL = "0";
|
|
||||||
public static final String DEL_FLAG_DELETE = "1";
|
|
||||||
public static final String DEL_FLAG_AUDIT = "2";
|
|
||||||
}
|
}
|
|
@ -55,7 +55,4 @@ public class Substation extends JeecgEntity {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String sourceNameView; // 热源名称
|
private String sourceNameView; // 热源名称
|
||||||
private String delFlag; // 删除标识
|
private String delFlag; // 删除标识
|
||||||
public static final String DEL_FLAG_NORMAL = "0";
|
|
||||||
public static final String DEL_FLAG_DELETE = "1";
|
|
||||||
public static final String DEL_FLAG_AUDIT = "2";
|
|
||||||
}
|
}
|
|
@ -55,9 +55,5 @@ public class Thermalcompany extends JeecgEntity {
|
||||||
private String delFlag; // 删除标识
|
private String delFlag; // 删除标识
|
||||||
private String treeId; //排序ID
|
private String treeId; //排序ID
|
||||||
private String orderId;
|
private String orderId;
|
||||||
|
|
||||||
public static final String DEL_FLAG_NORMAL = "0";
|
|
||||||
public static final String DEL_FLAG_DELETE = "1";
|
|
||||||
public static final String DEL_FLAG_AUDIT = "2";
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -62,18 +62,11 @@
|
||||||
a.del_flag AS "delFlag",
|
a.del_flag AS "delFlag",
|
||||||
a.report_type AS "reportType",
|
a.report_type AS "reportType",
|
||||||
a.is_extract AS "isExtract",
|
a.is_extract AS "isExtract",
|
||||||
-- b.company_name AS "view001Name",
|
(select count(*) from bl_data_extract_config bl where bl.one_pipe_sim = a.sim or bl.two_pipe_sim = a.sim) as isExtracted,
|
||||||
-- c.source_name AS "view002Name",
|
(case when datatime > DATE_ADD(NOW(), INTERVAL -10 MINUTE) then 0 else 1 end) as isTimeout
|
||||||
-- d.name AS "view003Name",
|
|
||||||
-- e.station_name AS "view004Name",
|
|
||||||
(select count(*) from bl_data_extract_config bl where bl.one_pipe_sim = a.sim or bl.two_pipe_sim = a.sim) as isExtracted
|
|
||||||
FROM HEATANALYSIS a
|
FROM HEATANALYSIS a
|
||||||
-- LEFT JOIN thermalcompany b ON b.id=a.view001
|
|
||||||
-- LEFT JOIN heatsource c ON c.id=a.view002
|
|
||||||
-- LEFT JOIN substation d ON d.id=a.view003
|
|
||||||
-- LEFT JOIN heatsourcestation e ON e.id=a.view004
|
|
||||||
<where>
|
<where>
|
||||||
a.del_flag = #{params.DEL_FLAG_NORMAL}
|
a.del_flag = '0'
|
||||||
<if test="params.view001 != null and params.view001 != ''">
|
<if test="params.view001 != null and params.view001 != ''">
|
||||||
AND a.view001 = #{params.view001}
|
AND a.view001 = #{params.view001}
|
||||||
</if>
|
</if>
|
||||||
|
@ -143,9 +136,9 @@
|
||||||
-- INNER JOIN thermalcompany b ON b.id=a.view001
|
-- INNER JOIN thermalcompany b ON b.id=a.view001
|
||||||
-- INNER JOIN heatsource c ON c.id=a.view002
|
-- INNER JOIN heatsource c ON c.id=a.view002
|
||||||
WHERE
|
WHERE
|
||||||
a.del_flag = #{DEL_FLAG_NORMAL}
|
a.del_flag = '0'
|
||||||
and b.del_flag = #{DEL_FLAG_NORMAL}
|
-- and b.del_flag = '0'
|
||||||
and c.del_flag = #{DEL_FLAG_NORMAL}
|
-- and c.del_flag = '0'
|
||||||
and ifnull(a.view001,'') != ''
|
and ifnull(a.view001,'') != ''
|
||||||
and ifnull(a.view002,'') != ''
|
and ifnull(a.view002,'') != ''
|
||||||
and ifnull(a.view004,'') = ''
|
and ifnull(a.view004,'') = ''
|
||||||
|
@ -206,7 +199,7 @@
|
||||||
-- LEFT JOIN substation d ON d.id=a.view003
|
-- LEFT JOIN substation d ON d.id=a.view003
|
||||||
-- LEFT JOIN heatsourcestation e ON e.id=a.view004
|
-- LEFT JOIN heatsourcestation e ON e.id=a.view004
|
||||||
<where>
|
<where>
|
||||||
a.del_flag = #{DEL_FLAG_NORMAL}
|
a.del_flag = '0'
|
||||||
and ifnull(a.view001,'') != ''
|
and ifnull(a.view001,'') != ''
|
||||||
<if test="view001 != null and view001 != ''">
|
<if test="view001 != null and view001 != ''">
|
||||||
AND a.view001 = #{view001}
|
AND a.view001 = #{view001}
|
||||||
|
@ -248,7 +241,7 @@
|
||||||
FROM HEATANALYSIS a
|
FROM HEATANALYSIS a
|
||||||
LEFT JOIN thermalcompany b ON b.id=a.view001
|
LEFT JOIN thermalcompany b ON b.id=a.view001
|
||||||
LEFT JOIN heatsourcestation e ON e.id=a.view004 and e.id != 20
|
LEFT JOIN heatsourcestation e ON e.id=a.view004 and e.id != 20
|
||||||
where a.del_flag = #{DEL_FLAG_NORMAL}
|
where a.del_flag = '0'
|
||||||
group by view001,view001Name
|
group by view001,view001Name
|
||||||
ORDER BY A.view001 DESC
|
ORDER BY A.view001 DESC
|
||||||
</select>
|
</select>
|
||||||
|
@ -256,7 +249,7 @@
|
||||||
<select id="findSimulateList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
<select id="findSimulateList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM HEATANALYSIS a
|
FROM HEATANALYSIS a
|
||||||
where a.del_flag = #{DEL_FLAG_NORMAL}
|
where a.del_flag = '0'
|
||||||
and a.report_type = 2
|
and a.report_type = 2
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -346,9 +339,7 @@
|
||||||
a.report_type AS "reportType"
|
a.report_type AS "reportType"
|
||||||
FROM HEATANALYSIS a
|
FROM HEATANALYSIS a
|
||||||
INNER JOIN bl_data_extract_config bl on a.sim = bl.one_pipe_sim and bl.sim = #{params.sim}
|
INNER JOIN bl_data_extract_config bl on a.sim = bl.one_pipe_sim and bl.sim = #{params.sim}
|
||||||
<where>
|
where a.del_flag = '0'
|
||||||
a.del_flag = #{params.DEL_FLAG_NORMAL}
|
|
||||||
</where>
|
|
||||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -391,9 +382,7 @@
|
||||||
a.report_type AS "reportType"
|
a.report_type AS "reportType"
|
||||||
FROM HEATANALYSIS a
|
FROM HEATANALYSIS a
|
||||||
INNER JOIN bl_data_extract_config bl on a.sim = bl.two_pipe_sim and bl.sim = #{params.sim}
|
INNER JOIN bl_data_extract_config bl on a.sim = bl.two_pipe_sim and bl.sim = #{params.sim}
|
||||||
<where>
|
where a.del_flag = '0'
|
||||||
a.del_flag = #{params.DEL_FLAG_NORMAL}
|
|
||||||
</where>
|
|
||||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -436,9 +425,7 @@
|
||||||
a.report_type AS "reportType"
|
a.report_type AS "reportType"
|
||||||
FROM HEATANALYSIS a
|
FROM HEATANALYSIS a
|
||||||
INNER JOIN bl_data_extract_config bl on a.sim = bl.sim and bl.one_pipe_sim = #{params.sim}
|
INNER JOIN bl_data_extract_config bl on a.sim = bl.sim and bl.one_pipe_sim = #{params.sim}
|
||||||
<where>
|
where a.del_flag = '0'
|
||||||
a.del_flag = #{params.DEL_FLAG_NORMAL}
|
|
||||||
</where>
|
|
||||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -481,9 +468,7 @@
|
||||||
a.report_type AS "reportType"
|
a.report_type AS "reportType"
|
||||||
FROM HEATANALYSIS a
|
FROM HEATANALYSIS a
|
||||||
INNER JOIN bl_data_extract_config bl on a.sim = bl.sim and bl.two_pipe_sim = #{params.sim}
|
INNER JOIN bl_data_extract_config bl on a.sim = bl.sim and bl.two_pipe_sim = #{params.sim}
|
||||||
<where>
|
where a.del_flag = '0'
|
||||||
a.del_flag = #{params.DEL_FLAG_NORMAL}
|
|
||||||
</where>
|
|
||||||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
FROM heatsource a
|
FROM heatsource a
|
||||||
<include refid="heatsourceJoins"/>
|
<include refid="heatsourceJoins"/>
|
||||||
<where>
|
<where>
|
||||||
a.del_flag = #{DEL_FLAG_NORMAL}
|
a.del_flag = '0'
|
||||||
<if test="sourceName != null and sourceName != ''">
|
<if test="sourceName != null and sourceName != ''">
|
||||||
AND a.source_name LIKE concat('%',#{sourceName},'%')
|
AND a.source_name LIKE concat('%',#{sourceName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
FROM heatsourcestation a
|
FROM heatsourcestation a
|
||||||
<include refid="heatsourcestationJoins"/>
|
<include refid="heatsourcestationJoins"/>
|
||||||
<where>
|
<where>
|
||||||
a.del_flag = #{DEL_FLAG_NORMAL}
|
a.del_flag = '0'
|
||||||
<if test="stationName != null and stationName != ''">
|
<if test="stationName != null and stationName != ''">
|
||||||
AND a.station_name LIKE concat('%',#{stationName},'%')
|
AND a.station_name LIKE concat('%',#{stationName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
FROM substation a
|
FROM substation a
|
||||||
<include refid="substationJoins"/>
|
<include refid="substationJoins"/>
|
||||||
<where>
|
<where>
|
||||||
a.del_flag = #{DEL_FLAG_NORMAL}
|
a.del_flag = '0'
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
AND a.name LIKE concat('%',#{name},'%')
|
AND a.name LIKE concat('%',#{name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
FROM thermalcompany a
|
FROM thermalcompany a
|
||||||
<include refid="thermalcompanyJoins"/>
|
<include refid="thermalcompanyJoins"/>
|
||||||
<where>
|
<where>
|
||||||
AND del_flag=#{DEL_FLAG_NORMAL}
|
AND del_flag = '0'
|
||||||
<if test="companyName != null and companyName != ''">
|
<if test="companyName != null and companyName != ''">
|
||||||
AND a.company_name LIKE concat('%',#{companyName},'%')
|
AND a.company_name LIKE concat('%',#{companyName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
Loading…
Reference in New Issue