优化代码
This commit is contained in:
parent
a42360036c
commit
1d09db3c8b
|
|
@ -37,14 +37,14 @@ public class JeecgEntity implements Serializable {
|
|||
* 创建人
|
||||
*/
|
||||
@Schema(description = "创建人")
|
||||
@Excel(name = "创建人", width = 15)
|
||||
// @Excel(name = "创建人", width = 15)
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
// @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime;
|
||||
|
|
@ -53,14 +53,14 @@ public class JeecgEntity implements Serializable {
|
|||
* 更新人
|
||||
*/
|
||||
@Schema(description = "更新人")
|
||||
@Excel(name = "更新人", width = 15)
|
||||
// @Excel(name = "更新人", width = 15)
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
// @Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime;
|
||||
|
|
|
|||
|
|
@ -103,12 +103,12 @@ public class HomeApi {
|
|||
Map<String,Object> result = new HashMap<>();
|
||||
|
||||
//城区锅炉房供回水温度
|
||||
QueryWrapper<Heatanalysis> qw = new QueryWrapper<>();
|
||||
qw.eq("del_flag","0");
|
||||
qw.isNull("view004");
|
||||
// qw.eq(Heatanalysis::getRegionType,"城区");
|
||||
qw.orderByAsc("id");
|
||||
List<Heatanalysis> list = heatanalysisService.list(qw);
|
||||
// QueryWrapper<Heatanalysis> qw = new QueryWrapper<>();
|
||||
// qw.eq("del_flag","0");
|
||||
// qw.isNull("view004");
|
||||
// qw.orderByAsc("id");
|
||||
// List<Heatanalysis> list = heatanalysisService.list(qw);
|
||||
List<Heatanalysis> list = heatanalysisService.findSourceList(null);
|
||||
result.put("data",list);
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
|
@ -137,6 +137,7 @@ public class HomeApi {
|
|||
@RequestMapping(value = "/getStaticList", method = RequestMethod.POST)
|
||||
public Result<?> getStaticList(@RequestBody HomeApiEntity dto) {
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
|
||||
List<Heatanalysis> list = heatanalysisService.getStaticList(dto);
|
||||
result.put("data",list);
|
||||
return Result.ok(result);
|
||||
|
|
|
|||
|
|
@ -211,4 +211,30 @@ public class HeatanalysisController extends JeecgController<Heatanalysis, Heatan
|
|||
return Result.ok(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param heatanalysis
|
||||
*/
|
||||
@RequestMapping(value = "/exportYunweiXls")
|
||||
public ModelAndView exportYunweiXls(HttpServletRequest request, Heatanalysis heatanalysis) {
|
||||
return exportYunweiXls(request, heatanalysis, Heatanalysis.class, "运维数据");
|
||||
}
|
||||
|
||||
protected ModelAndView exportYunweiXls(HttpServletRequest request, Heatanalysis object, Class<Heatanalysis> clazz, String title) {
|
||||
List<Heatanalysis> exportList = heatanalysisService.findYunweiList(object);
|
||||
//AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, clazz);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", title);
|
||||
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,41 +41,41 @@ public class Heatanalysis extends JeecgEntity {
|
|||
private java.util.Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name="热力公司", width = 15)
|
||||
@Excel(name="热力公司", width = 15, orderNum="1")
|
||||
private String view001Name;//公司名称
|
||||
@TableField(exist = false)
|
||||
@Excel(name="热源名称", width = 15)
|
||||
@Excel(name="锅炉房", width = 15, orderNum="2")
|
||||
private String view002Name;//热源名称
|
||||
@TableField(exist = false)
|
||||
private String view003Name;//热源所名称
|
||||
@TableField(exist = false)
|
||||
@Excel(name="换热站名称", width = 15)
|
||||
@Excel(name="换热站名称", width = 15, orderNum="3")
|
||||
private String view004Name;//热力站名称
|
||||
|
||||
private Integer view001; // 热力公司
|
||||
private Integer view002; // 热源站
|
||||
private Integer view003; // 热源所
|
||||
private Integer view004; // 换热站
|
||||
@Excel(name = "数据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "数据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss", orderNum="6")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date datatime; // 数据时间
|
||||
private Integer caveat; // caveat
|
||||
@Excel(name="一次供水温度", width = 15)
|
||||
@Excel(name="一次供水温度", width = 15, orderNum="7")
|
||||
private String view005; // 一次供水温度
|
||||
@Excel(name="一次回水温度", width = 15)
|
||||
@Excel(name="一次回水温度", width = 15, orderNum="8")
|
||||
private String view006; // 一次回水温度
|
||||
@Excel(name="一次供水压力", width = 15)
|
||||
@Excel(name="一次供水压力", width = 15, orderNum="9")
|
||||
private String view007; // 一次供水压力
|
||||
@Excel(name="一次回水压力", width = 15)
|
||||
@Excel(name="一次回水压力", width = 15, orderNum="10")
|
||||
private String view008; // 一次回水压力
|
||||
@Excel(name="二次供水温度", width = 15)
|
||||
@Excel(name="二次供水温度", width = 15, orderNum="11")
|
||||
private String view009; // 二次供水温度
|
||||
@Excel(name="二次回水温度", width = 15)
|
||||
@Excel(name="二次回水温度", width = 15, orderNum="12")
|
||||
private String view010; // 二次回水温度
|
||||
@Excel(name="二次供水压力", width = 15)
|
||||
@Excel(name="二次供水压力", width = 15, orderNum="13")
|
||||
private String view011; // 二次供水压力
|
||||
@Excel(name="二次回水压力", width = 15)
|
||||
@Excel(name="二次回水压力", width = 15, orderNum="14")
|
||||
private String view012; // 二次回水压力
|
||||
private String view013; // view013
|
||||
private String view014; // view014
|
||||
|
|
@ -95,30 +95,44 @@ public class Heatanalysis extends JeecgEntity {
|
|||
private String view028; // view028
|
||||
private String view029; // view029
|
||||
private String view030; // view030
|
||||
@Excel(name="sim", width = 15, orderNum="4")
|
||||
private String sim; // sim
|
||||
@Excel(name="code", width = 15, orderNum="5")
|
||||
private String code; // code
|
||||
private Integer reportType;//数据采集类型 1设备自动上报 2定时模拟
|
||||
private String fromFlow; // 温度是否从流量取 0否 1是
|
||||
@Excel(name="SN", width = 15, orderNum="15")
|
||||
private String view031; // 流量设备SN,view031到view047全是从流量表上获取的数据
|
||||
@Excel(name="流量上报时间", width = 15, orderNum="16")
|
||||
private String view032; // 流量数据上报时间
|
||||
private String view033; // 仪表ID
|
||||
private String view034; // 数据有效标识 0无效 1有效
|
||||
@Excel(name="供水温度", width = 15, orderNum="17")
|
||||
private String view035; // 供水温度
|
||||
@Excel(name="回水温度", width = 15, orderNum="18")
|
||||
private String view036; // 回水温度
|
||||
@Excel(name="瞬时流量", width = 15, orderNum="19")
|
||||
private String view037; // 瞬时流量
|
||||
@Excel(name="正累积流量", width = 15, orderNum="20")
|
||||
private String view038; // 正累积流量
|
||||
@Excel(name="负累积流量", width = 15, orderNum="21")
|
||||
private String view039; // 负累积流量
|
||||
@Excel(name="净累积流量", width = 15, orderNum="22")
|
||||
private String view040; // 净累积流量
|
||||
@Excel(name="瞬时热量", width = 15, orderNum="23")
|
||||
private String view041; // 瞬时热量
|
||||
@Excel(name="正累积热量", width = 15, orderNum="24")
|
||||
private String view042; // 正累积热量
|
||||
@Excel(name="负累积热量", width = 15, orderNum="25")
|
||||
private String view043; // 负累积热量
|
||||
@Excel(name="净累积热量", width = 15, orderNum="26")
|
||||
private String view044; // 净累积热量
|
||||
private String view045; // 流体速度
|
||||
private String view046; // 流量因子
|
||||
private String view047; // 热量因子
|
||||
private Integer isExtract;//是否抽取 0否 1是
|
||||
/**地区类型*/
|
||||
@Excel(name = "地区类型", width = 15)
|
||||
@Excel(name = "地区类型", width = 15, orderNum="0")
|
||||
private java.lang.String regionType;
|
||||
|
||||
@TableField(exist = false)
|
||||
|
|
@ -133,8 +147,11 @@ public class Heatanalysis extends JeecgEntity {
|
|||
@TableField(exist = false)
|
||||
private String tableName;//表名字
|
||||
private String delFlag; // 删除标识
|
||||
@Excel(name = "故障等级", width = 15, orderNum="27")
|
||||
private String faultLevel; // 故障等级
|
||||
|
||||
@Excel(name = "备注", width = 15, orderNum="28")
|
||||
@TableField(exist = false)
|
||||
private String remarks;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ycwgswd;//一次网供水温度
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ public class HeatingReportJob implements Job {
|
|||
HeatName = "松山锅炉房";
|
||||
}
|
||||
try{
|
||||
if(CompanyName!=null&&!"".equals(CompanyName)&&heatanalysisXz!=null&&!"".equals(heatanalysisXz.getId())){
|
||||
if(CompanyName!=null&&!"".equals(CompanyName)&&heatanalysisXz!=null){
|
||||
log.info("sim:"+sim);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ public interface HeatanalysisMapper extends BaseMapper<Heatanalysis> {
|
|||
|
||||
Page<Heatanalysis> yunweiPage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
|
||||
|
||||
List<Heatanalysis> findYunweiList(Heatanalysis heatanalysis);
|
||||
|
||||
List<Heatanalysis> getStaticNowList(@Param("params") HomeApiEntity dto);
|
||||
|
||||
void syncXz(Heatanalysis heatanalysis);
|
||||
|
|
|
|||
|
|
@ -8,62 +8,36 @@
|
|||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
(case a.view026 when '1' then 0 else a.view005 end) AS "view005",
|
||||
(case a.view026 when '1' then 0 else a.view006 end) AS "view006",
|
||||
(case a.view026 when '1' then 0 else a.view007 end) AS "view007",
|
||||
(case a.view026 when '1' then 0 else a.view008 end) AS "view008",
|
||||
(case a.view026 when '1' then 0 else a.view009 end) AS "view009",
|
||||
(case a.view026 when '1' then 0 else a.view010 end) AS "view010",
|
||||
(case a.view026 when '1' then 0 else a.view011 end) AS "view011",
|
||||
(case a.view026 when '1' then 0 else a.view012 end) AS "view012",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.from_flow AS "fromFlow",
|
||||
a.view031 AS "view031",
|
||||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
a.view035 AS "view035",
|
||||
a.view036 AS "view036",
|
||||
a.view037 AS "view037",
|
||||
a.view038 AS "view038",
|
||||
a.view039 AS "view039",
|
||||
a.view040 AS "view040",
|
||||
a.view041 AS "view041",
|
||||
a.view042 AS "view042",
|
||||
a.view043 AS "view043",
|
||||
a.view044 AS "view044",
|
||||
a.view045 AS "view045",
|
||||
a.view046 AS "view046",
|
||||
a.view047 AS "view047",
|
||||
(case a.view026 when '1' then 0 else a.view035 end) AS "view035",
|
||||
(case a.view026 when '1' then 0 else a.view036 end) AS "view036",
|
||||
(case a.view026 when '1' then 0 else a.view037 end) AS "view037",
|
||||
(case a.view026 when '1' then 0 else a.view038 end) AS "view038",
|
||||
(case a.view026 when '1' then 0 else a.view039 end) AS "view039",
|
||||
(case a.view026 when '1' then 0 else a.view040 end) AS "view040",
|
||||
(case a.view026 when '1' then 0 else a.view041 end) AS "view041",
|
||||
(case a.view026 when '1' then 0 else a.view042 end) AS "view042",
|
||||
(case a.view026 when '1' then 0 else a.view043 end) AS "view043",
|
||||
(case a.view026 when '1' then 0 else a.view044 end) AS "view044",
|
||||
(case a.view026 when '1' then 0 else a.view045 end) AS "view045",
|
||||
a.sim AS "sim",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.report_type AS "reportType",
|
||||
a.region_type as "regionType"
|
||||
a.code
|
||||
FROM ${params.tableName} a
|
||||
<where>
|
||||
And a.del_flag = '0'
|
||||
|
|
@ -104,99 +78,74 @@
|
|||
|
||||
<select id="findJxPage" resultType="org.jeecg.modules.heating.entity.HeatanalysisHistory">
|
||||
select * from (
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.from_flow AS "fromFlow",
|
||||
a.view031 AS "view031",
|
||||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
a.view035 AS "view035",
|
||||
a.view036 AS "view036",
|
||||
a.view037 AS "view037",
|
||||
a.view038 AS "view038",
|
||||
a.view039 AS "view039",
|
||||
a.view040 AS "view040",
|
||||
a.view041 AS "view041",
|
||||
a.view042 AS "view042",
|
||||
a.view043 AS "view043",
|
||||
a.view044 AS "view044",
|
||||
a.view045 AS "view045",
|
||||
a.view046 AS "view046",
|
||||
a.view047 AS "view047",
|
||||
a.sim AS "sim",
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date AS "createDate",
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date AS "updateDate",
|
||||
a.del_flag AS "delFlag",
|
||||
a.report_type AS "reportType",
|
||||
a.region_type as "regionType"
|
||||
FROM ${params.tableName} a
|
||||
<where>
|
||||
And a.del_flag = '0'
|
||||
<if test="params.regionType != null and params.regionType != ''">
|
||||
AND a.region_type = #{params.regionType}
|
||||
</if>
|
||||
<if test="params.view001 != null and params.view001 != ''">
|
||||
AND a.view001 = #{params.view001}
|
||||
</if>
|
||||
<if test="params.view002 != null and params.view002 != ''">
|
||||
AND a.view002 = #{params.view002}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != '' and params.view004 != -1">
|
||||
AND a.view004 = #{params.view004}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != '' and params.view004 == -1">
|
||||
AND a.view004 is null
|
||||
</if>
|
||||
<if test="params.SDate != null">
|
||||
AND a.view032 >= #{params.SDate}
|
||||
</if>
|
||||
<if test="params.EDate != null">
|
||||
AND a.view032 <= #{params.EDate}
|
||||
</if>
|
||||
<if test="params.caveat != null">
|
||||
AND a.caveat = #{params.caveat}
|
||||
</if>
|
||||
<if test="params.reportType != null">
|
||||
AND a.report_type = #{params.reportType}
|
||||
</if>
|
||||
<if test="params.sim != null and params.sim != ''">
|
||||
AND a.sim = #{params.sim}
|
||||
</if>
|
||||
</where>
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.caveat AS "caveat",
|
||||
(case a.view026 when '1' then 0 else a.view005 end) AS "view005",
|
||||
(case a.view026 when '1' then 0 else a.view006 end) AS "view006",
|
||||
(case a.view026 when '1' then 0 else a.view007 end) AS "view007",
|
||||
(case a.view026 when '1' then 0 else a.view008 end) AS "view008",
|
||||
(case a.view026 when '1' then 0 else a.view009 end) AS "view009",
|
||||
(case a.view026 when '1' then 0 else a.view010 end) AS "view010",
|
||||
(case a.view026 when '1' then 0 else a.view011 end) AS "view011",
|
||||
(case a.view026 when '1' then 0 else a.view012 end) AS "view012",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.view031 AS "view031",
|
||||
a.view032 AS "view032",
|
||||
(case a.view026 when '1' then 0 else a.view035 end) AS "view035",
|
||||
(case a.view026 when '1' then 0 else a.view036 end) AS "view036",
|
||||
(case a.view026 when '1' then 0 else a.view037 end) AS "view037",
|
||||
(case a.view026 when '1' then 0 else a.view038 end) AS "view038",
|
||||
(case a.view026 when '1' then 0 else a.view039 end) AS "view039",
|
||||
(case a.view026 when '1' then 0 else a.view040 end) AS "view040",
|
||||
(case a.view026 when '1' then 0 else a.view041 end) AS "view041",
|
||||
(case a.view026 when '1' then 0 else a.view042 end) AS "view042",
|
||||
(case a.view026 when '1' then 0 else a.view043 end) AS "view043",
|
||||
(case a.view026 when '1' then 0 else a.view044 end) AS "view044",
|
||||
(case a.view026 when '1' then 0 else a.view045 end) AS "view045",
|
||||
a.sim AS "sim",
|
||||
a.code
|
||||
FROM ${params.tableName} a
|
||||
<where>
|
||||
And a.del_flag = '0'
|
||||
<if test="params.regionType != null and params.regionType != ''">
|
||||
AND a.region_type = #{params.regionType}
|
||||
</if>
|
||||
<if test="params.view001 != null and params.view001 != ''">
|
||||
AND a.view001 = #{params.view001}
|
||||
</if>
|
||||
<if test="params.view002 != null and params.view002 != ''">
|
||||
AND a.view002 = #{params.view002}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != '' and params.view004 != -1">
|
||||
AND a.view004 = #{params.view004}
|
||||
</if>
|
||||
<if test="params.view004 != null and params.view004 != '' and params.view004 == -1">
|
||||
AND a.view004 is null
|
||||
</if>
|
||||
<if test="params.SDate != null">
|
||||
AND a.view032 >= #{params.SDate}
|
||||
</if>
|
||||
<if test="params.EDate != null">
|
||||
AND a.view032 <= #{params.EDate}
|
||||
</if>
|
||||
<if test="params.caveat != null">
|
||||
AND a.caveat = #{params.caveat}
|
||||
</if>
|
||||
<if test="params.reportType != null">
|
||||
AND a.report_type = #{params.reportType}
|
||||
</if>
|
||||
<if test="params.sim != null and params.sim != ''">
|
||||
AND a.sim = #{params.sim}
|
||||
</if>
|
||||
</where>
|
||||
) t
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc,view032 DESC
|
||||
</select>
|
||||
|
|
@ -211,14 +160,14 @@
|
|||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
(case a.view026 when '1' then 0 else a.view005 end) AS "view005",
|
||||
(case a.view026 when '1' then 0 else a.view006 end) AS "view006",
|
||||
(case a.view026 when '1' then 0 else a.view007 end) AS "view007",
|
||||
(case a.view026 when '1' then 0 else a.view008 end) AS "view008",
|
||||
(case a.view026 when '1' then 0 else a.view009 end) AS "view009",
|
||||
(case a.view026 when '1' then 0 else a.view010 end) AS "view010",
|
||||
(case a.view026 when '1' then 0 else a.view011 end) AS "view011",
|
||||
(case a.view026 when '1' then 0 else a.view012 end) AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
|
|
@ -242,17 +191,17 @@
|
|||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
a.view035 AS "view035",
|
||||
a.view036 AS "view036",
|
||||
a.view037 AS "view037",
|
||||
a.view038 AS "view038",
|
||||
a.view039 AS "view039",
|
||||
a.view040 AS "view040",
|
||||
a.view041 AS "view041",
|
||||
a.view042 AS "view042",
|
||||
a.view043 AS "view043",
|
||||
a.view044 AS "view044",
|
||||
a.view045 AS "view045",
|
||||
(case a.view026 when '1' then 0 else a.view035 end) AS "view035",
|
||||
(case a.view026 when '1' then 0 else a.view036 end) AS "view036",
|
||||
(case a.view026 when '1' then 0 else a.view037 end) AS "view037",
|
||||
(case a.view026 when '1' then 0 else a.view038 end) AS "view038",
|
||||
(case a.view026 when '1' then 0 else a.view039 end) AS "view039",
|
||||
(case a.view026 when '1' then 0 else a.view040 end) AS "view040",
|
||||
(case a.view026 when '1' then 0 else a.view041 end) AS "view041",
|
||||
(case a.view026 when '1' then 0 else a.view042 end) AS "view042",
|
||||
(case a.view026 when '1' then 0 else a.view043 end) AS "view043",
|
||||
(case a.view026 when '1' then 0 else a.view044 end) AS "view044",
|
||||
(case a.view026 when '1' then 0 else a.view045 end) AS "view045",
|
||||
a.view046 AS "view046",
|
||||
a.view047 AS "view047",
|
||||
a.sim AS "sim",
|
||||
|
|
@ -311,14 +260,14 @@
|
|||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
(case a.view026 when '1' then 0 else a.view005 end) AS "view005",
|
||||
(case a.view026 when '1' then 0 else a.view006 end) AS "view006",
|
||||
(case a.view026 when '1' then 0 else a.view007 end) AS "view007",
|
||||
(case a.view026 when '1' then 0 else a.view008 end) AS "view008",
|
||||
(case a.view026 when '1' then 0 else a.view009 end) AS "view009",
|
||||
(case a.view026 when '1' then 0 else a.view010 end) AS "view010",
|
||||
(case a.view026 when '1' then 0 else a.view011 end) AS "view011",
|
||||
(case a.view026 when '1' then 0 else a.view012 end) AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
|
|
@ -342,17 +291,17 @@
|
|||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
a.view035 AS "view035",
|
||||
a.view036 AS "view036",
|
||||
a.view037 AS "view037",
|
||||
a.view038 AS "view038",
|
||||
a.view039 AS "view039",
|
||||
a.view040 AS "view040",
|
||||
a.view041 AS "view041",
|
||||
a.view042 AS "view042",
|
||||
a.view043 AS "view043",
|
||||
a.view044 AS "view044",
|
||||
a.view045 AS "view045",
|
||||
(case a.view026 when '1' then 0 else a.view035 end) AS "view035",
|
||||
(case a.view026 when '1' then 0 else a.view036 end) AS "view036",
|
||||
(case a.view026 when '1' then 0 else a.view037 end) AS "view037",
|
||||
(case a.view026 when '1' then 0 else a.view038 end) AS "view038",
|
||||
(case a.view026 when '1' then 0 else a.view039 end) AS "view039",
|
||||
(case a.view026 when '1' then 0 else a.view040 end) AS "view040",
|
||||
(case a.view026 when '1' then 0 else a.view041 end) AS "view041",
|
||||
(case a.view026 when '1' then 0 else a.view042 end) AS "view042",
|
||||
(case a.view026 when '1' then 0 else a.view043 end) AS "view043",
|
||||
(case a.view026 when '1' then 0 else a.view044 end) AS "view044",
|
||||
(case a.view026 when '1' then 0 else a.view045 end) AS "view045",
|
||||
a.view046 AS "view046",
|
||||
a.view047 AS "view047",
|
||||
a.sim AS "sim",
|
||||
|
|
|
|||
|
|
@ -5,37 +5,30 @@
|
|||
<select id="getHeatOne" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
id,
|
||||
view005 AS "view005",
|
||||
view006 AS "view006",
|
||||
view007 AS "view007",
|
||||
view008 AS "view008"
|
||||
(case view026 when '1' then 0 else view005 end) AS "view005",
|
||||
(case view026 when '1' then 0 else view006 end) AS "view006",
|
||||
(case view026 when '1' then 0 else view007 end) AS "view007",
|
||||
(case view026 when '1' then 0 else view008 end) AS "view008"
|
||||
FROM
|
||||
BL_HEATANALYSIS
|
||||
WHERE
|
||||
sim = #{sim}
|
||||
ORDER BY
|
||||
DATATIME DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getXzHeatOne" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
id,
|
||||
view035 AS "view035",
|
||||
view036 AS "view036",
|
||||
view007 AS "view007",
|
||||
view008 AS "view008",
|
||||
view037 AS "view037",
|
||||
view040 AS "view040",
|
||||
view041 AS "view041",
|
||||
view044 AS "view044"
|
||||
(case view026 when '1' then 0 else view035 end) as "view035",
|
||||
(case view026 when '1' then 0 else view036 end) as "view036",
|
||||
(case view026 when '1' then 0 else view007 end) as "view007",
|
||||
(case view026 when '1' then 0 else view008 end) as "view008",
|
||||
(case view026 when '1' then 0 else view037 end) as "view037",
|
||||
(case view026 when '1' then 0 else view040 end) as "view040",
|
||||
(case view026 when '1' then 0 else view041 end) as "view041",
|
||||
(case view026 when '1' then 0 else view044 end) as "view044"
|
||||
FROM
|
||||
BL_HEATANALYSIS
|
||||
WHERE
|
||||
sim = #{sim}
|
||||
ORDER BY
|
||||
DATATIME DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="findPage" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
|
|
@ -48,14 +41,14 @@
|
|||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
(case a.view026 when '1' then 0 else a.view005 end) AS "view005",
|
||||
(case a.view026 when '1' then 0 else a.view006 end) AS "view006",
|
||||
(case a.view026 when '1' then 0 else a.view007 end) AS "view007",
|
||||
(case a.view026 when '1' then 0 else a.view008 end) AS "view008",
|
||||
(case a.view026 when '1' then 0 else a.view009 end) AS "view009",
|
||||
(case a.view026 when '1' then 0 else a.view010 end) AS "view010",
|
||||
(case a.view026 when '1' then 0 else a.view011 end) AS "view011",
|
||||
(case a.view026 when '1' then 0 else a.view012 end) AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
|
|
@ -79,17 +72,17 @@
|
|||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
a.view035 AS "view035",
|
||||
a.view036 AS "view036",
|
||||
a.view037 AS "view037",
|
||||
a.view038 AS "view038",
|
||||
a.view039 AS "view039",
|
||||
a.view040 AS "view040",
|
||||
a.view041 AS "view041",
|
||||
a.view042 AS "view042",
|
||||
a.view043 AS "view043",
|
||||
a.view044 AS "view044",
|
||||
a.view045 AS "view045",
|
||||
(case a.view026 when '1' then 0 else a.view035 end) AS "view035",
|
||||
(case a.view026 when '1' then 0 else a.view036 end) AS "view036",
|
||||
(case a.view026 when '1' then 0 else a.view037 end) AS "view037",
|
||||
(case a.view026 when '1' then 0 else a.view038 end) AS "view038",
|
||||
(case a.view026 when '1' then 0 else a.view039 end) AS "view039",
|
||||
(case a.view026 when '1' then 0 else a.view040 end) AS "view040",
|
||||
(case a.view026 when '1' then 0 else a.view041 end) AS "view041",
|
||||
(case a.view026 when '1' then 0 else a.view042 end) AS "view042",
|
||||
(case a.view026 when '1' then 0 else a.view043 end) AS "view043",
|
||||
(case a.view026 when '1' then 0 else a.view044 end) AS "view044",
|
||||
(case a.view026 when '1' then 0 else a.view045 end) AS "view045",
|
||||
a.view046 AS "view046",
|
||||
a.view047 AS "view047",
|
||||
a.sim AS "sim",
|
||||
|
|
@ -191,26 +184,42 @@
|
|||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
-- b.company_name AS "view001Name",
|
||||
a.view027 AS "view001Name",
|
||||
a.view027 AS "view027",
|
||||
a.view002 AS "view002",
|
||||
-- c.source_name AS "view002Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view028 AS "view028",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
(case a.view026 when '1' then 0 else a.view005 end) AS "view005",
|
||||
(case a.view026 when '1' then 0 else a.view006 end) AS "view006",
|
||||
(case a.view026 when '1' then 0 else a.view007 end) AS "view007",
|
||||
(case a.view026 when '1' then 0 else a.view008 end) AS "view008",
|
||||
(case a.view026 when '1' then 0 else a.view009 end) AS "view009",
|
||||
(case a.view026 when '1' then 0 else a.view010 end) AS "view010",
|
||||
(case a.view026 when '1' then 0 else a.view011 end) AS "view011",
|
||||
(case a.view026 when '1' then 0 else a.view012 end) AS "view012",
|
||||
a.from_flow AS "fromFlow",
|
||||
a.view031 AS "view031",
|
||||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
(case a.view026 when '1' then 0 else a.view035 end) AS "view035",
|
||||
(case a.view026 when '1' then 0 else a.view036 end) AS "view036",
|
||||
(case a.view026 when '1' then 0 else a.view037 end) AS "view037",
|
||||
(case a.view026 when '1' then 0 else a.view038 end) AS "view038",
|
||||
(case a.view026 when '1' then 0 else a.view039 end) AS "view039",
|
||||
(case a.view026 when '1' then 0 else a.view040 end) AS "view040",
|
||||
(case a.view026 when '1' then 0 else a.view041 end) AS "view041",
|
||||
(case a.view026 when '1' then 0 else a.view042 end) AS "view042",
|
||||
(case a.view026 when '1' then 0 else a.view043 end) AS "view043",
|
||||
(case a.view026 when '1' then 0 else a.view044 end) AS "view044",
|
||||
(case a.view026 when '1' then 0 else a.view045 end) AS "view045",
|
||||
a.sim AS "sim",
|
||||
a.code
|
||||
a.code,
|
||||
a.region_type as regionType
|
||||
FROM BL_HEATANALYSIS a
|
||||
-- INNER JOIN thermalcompany b ON b.id=a.view001
|
||||
-- INNER JOIN heatsource c ON c.id=a.view002
|
||||
WHERE
|
||||
a.del_flag = '0'
|
||||
-- and b.del_flag = '0'
|
||||
-- and c.del_flag = '0'
|
||||
WHERE a.del_flag = '0'
|
||||
and ifnull(a.view001,'') != ''
|
||||
and ifnull(a.view002,'') != ''
|
||||
and ifnull(a.view004,'') = ''
|
||||
|
|
@ -571,21 +580,57 @@
|
|||
ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getStaticList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT t1.*
|
||||
FROM bl_heatanalysis_${params.startTime} t1
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
DATE_FORMAT(datatime, '%Y-%m-%d %H') AS hour,
|
||||
MIN(datatime) AS min_time,
|
||||
min(id) as min_id
|
||||
FROM bl_heatanalysis_${params.startTime} where view002= #{params.sourceId} and view004 is null
|
||||
GROUP BY DATE_FORMAT(datatime, '%Y-%m-%d %H')
|
||||
) t2 ON t1.id = t2.min_id
|
||||
where t1.view002= #{params.sourceId} and t1.view004 is null
|
||||
ORDER BY t1.view002,t1.datatime
|
||||
CONCAT(DATE_FORMAT(datatime,'%Y-%m-%d %H'),':00:00') AS datatime,
|
||||
view001,
|
||||
view002,
|
||||
view004,
|
||||
view027,
|
||||
view028,
|
||||
view030,
|
||||
max((case view026 when '1' then 0 else view005 end)) as view005,
|
||||
max((case view026 when '1' then 0 else view006 end)) as view006,
|
||||
max((case view026 when '1' then 0 else view007 end)) as view007,
|
||||
max((case view026 when '1' then 0 else view008 end)) as view008,
|
||||
max((case view026 when '1' then 0 else view009 end)) as view009,
|
||||
max((case view026 when '1' then 0 else view010 end)) as view010,
|
||||
max((case view026 when '1' then 0 else view011 end)) as view011,
|
||||
max((case view026 when '1' then 0 else view012 end)) as view012,
|
||||
sim,
|
||||
code,
|
||||
view031,
|
||||
max((case view026 when '1' then 0 else view035 end)) as view035,
|
||||
max((case view026 when '1' then 0 else view036 end)) as view036,
|
||||
max((case view026 when '1' then 0 else view037 end)) as view037,
|
||||
max((case view026 when '1' then 0 else view038 end)) as view038,
|
||||
max((case view026 when '1' then 0 else view039 end)) as view039,
|
||||
max((case view026 when '1' then 0 else view040 end)) as view040,
|
||||
max((case view026 when '1' then 0 else view041 end)) as view041,
|
||||
max((case view026 when '1' then 0 else view042 end)) as view042,
|
||||
max((case view026 when '1' then 0 else view043 end)) as view043,
|
||||
max((case view026 when '1' then 0 else view044 end)) as view044,
|
||||
region_type AS regionType
|
||||
FROM
|
||||
bl_heatanalysis_${params.startTime}
|
||||
WHERE
|
||||
view002 = #{params.sourceId}
|
||||
AND view004 IS NULL
|
||||
GROUP BY
|
||||
DATE_FORMAT(datatime,'%Y-%m-%d %H'),
|
||||
view001,
|
||||
view002,
|
||||
view004,
|
||||
view027,
|
||||
view028,
|
||||
view030,
|
||||
sim,
|
||||
code,
|
||||
view031,
|
||||
region_type
|
||||
ORDER BY datatime
|
||||
</select>
|
||||
|
||||
<select id="getStaticNowList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
select t.*
|
||||
from (
|
||||
|
|
@ -692,6 +737,70 @@
|
|||
ORDER BY view001 asc ,view002 asc,view004 asc
|
||||
</select>
|
||||
|
||||
<select id="findYunweiList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
|
||||
SELECT
|
||||
a.id AS "id",
|
||||
a.view001 AS "view001",
|
||||
a.view002 AS "view002",
|
||||
a.view003 AS "view003",
|
||||
a.view004 AS "view004",
|
||||
a.datatime AS "datatime",
|
||||
a.caveat AS "caveat",
|
||||
a.view005 AS "view005",
|
||||
a.view006 AS "view006",
|
||||
a.view007 AS "view007",
|
||||
a.view008 AS "view008",
|
||||
a.view009 AS "view009",
|
||||
a.view010 AS "view010",
|
||||
a.view011 AS "view011",
|
||||
a.view012 AS "view012",
|
||||
a.view013 AS "view013",
|
||||
a.view014 AS "view014",
|
||||
a.view015 AS "view015",
|
||||
a.view016 AS "view016",
|
||||
a.view017 AS "view017",
|
||||
a.view018 AS "view018",
|
||||
a.view019 AS "view019",
|
||||
a.view020 AS "view020",
|
||||
a.view021 AS "view021",
|
||||
a.view022 AS "view022",
|
||||
a.view023 AS "view023",
|
||||
a.view024 AS "view024",
|
||||
a.view025 AS "view025",
|
||||
a.view026 AS "view026",
|
||||
a.view027 AS "view001Name",
|
||||
a.view028 AS "view002Name",
|
||||
a.view029 AS "view003Name",
|
||||
a.view030 AS "view004Name",
|
||||
a.view031 AS "view031",
|
||||
a.view032 AS "view032",
|
||||
a.view033 AS "view033",
|
||||
a.view034 AS "view034",
|
||||
a.view035 AS "view035",
|
||||
a.view036 AS "view036",
|
||||
a.view037 AS "view037",
|
||||
a.view038 AS "view038",
|
||||
a.view039 AS "view039",
|
||||
a.view040 AS "view040",
|
||||
a.view041 AS "view041",
|
||||
a.view042 AS "view042",
|
||||
a.view043 AS "view043",
|
||||
a.view044 AS "view044",
|
||||
a.view045 AS "view045",
|
||||
a.view046 AS "view046",
|
||||
a.view047 AS "view047",
|
||||
a.sim AS "sim",
|
||||
a.code AS "code",
|
||||
a.del_flag AS "delFlag",
|
||||
a.report_type AS "reportType",
|
||||
a.is_extract AS "isExtract",
|
||||
a.region_type AS "regionType",
|
||||
a.fault_level AS "faultLevel",
|
||||
(select GROUP_CONCAT(b.create_date,'[',b.remarks,']') from bl_heatanalysis_remarks b where a.id=b.main_id and b.del_flag='0') as remarks
|
||||
FROM BL_HEATANALYSIS a
|
||||
ORDER BY view001 asc ,view002 asc,view004 asc
|
||||
</select>
|
||||
|
||||
<insert id="syncXz">
|
||||
CALL P_Q_D_HEATANALYSIS_SYNC(
|
||||
#{view001},
|
||||
|
|
|
|||
|
|
@ -36,4 +36,6 @@ public interface HeatanalysisService extends JeecgService<Heatanalysis> {
|
|||
List<Heatanalysis> getStaticNowList(HomeApiEntity dto);
|
||||
|
||||
void syncXz(Heatanalysis heatanalysis);
|
||||
|
||||
List<Heatanalysis> findYunweiList(Heatanalysis heatanalysis);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,11 @@ public class HeatanalysisServiceImpl extends JeecgServiceImpl<HeatanalysisMapper
|
|||
return baseMapper.yunweiPage(page,heatanalysis);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Heatanalysis> findYunweiList(Heatanalysis heatanalysis){
|
||||
return baseMapper.findYunweiList(heatanalysis);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Heatanalysis> getStaticNowList(HomeApiEntity dto) {
|
||||
return baseMapper.getStaticNowList(dto);
|
||||
|
|
|
|||
Loading…
Reference in New Issue