Browse Source

jiahan.wu[CR] bi大屏通用查询service方法

develop
eric777 10 months ago
parent
commit
700274fd03
  1. 74
      lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiDataScreenVo.java
  2. 31
      lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml

74
lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiDataScreenVo.java

@ -13,40 +13,42 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class DcBusiDataScreenVo{ public class DcBusiDataScreenVo{
private String companyName; private String companyName;
private String coallost; private String targetModelCode;
private String countDate; private String coallost;
private String targetUnit; private String countDate;
private Double monthAll; private String targetUnit;
private Double valD1; private Double monthAll;
private Double valD2; private Double dayAll;
private Double valD3; private Double valD1;
private Double valD4; private Double valD2;
private Double valD5; private Double valD3;
private Double valD6; private Double valD4;
private Double valD7; private Double valD5;
private Double valD8; private Double valD6;
private Double valD9; private Double valD7;
private Double valD10; private Double valD8;
private Double valD11; private Double valD9;
private Double valD12; private Double valD10;
private Double valD13; private Double valD11;
private Double valD14; private Double valD12;
private Double valD15; private Double valD13;
private Double valD16; private Double valD14;
private Double valD17; private Double valD15;
private Double valD18; private Double valD16;
private Double valD19; private Double valD17;
private Double valD20; private Double valD18;
private Double valD21; private Double valD19;
private Double valD22; private Double valD20;
private Double valD23; private Double valD21;
private Double valD24; private Double valD22;
private Double valD25; private Double valD23;
private Double valD26; private Double valD24;
private Double valD27; private Double valD25;
private Double valD28; private Double valD26;
private Double valD29; private Double valD27;
private Double valD30; private Double valD28;
private Double valD31; private Double valD29;
private Double valD30;
private Double valD31;
} }

31
lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml

@ -281,27 +281,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
dc_busi_target_draft_daynew d, dc_busi_target_draft_daynew d,
dc_busi_report_target_config c, dc_busi_report_target_config c,
dc_base_target_model m, dc_base_target_model m,
(
select
max(CONCAT( date_year , date_month , date_day)) max_date,
target_model_code,
organize_id
from
dc_busi_target_draft_daynew
where
organize_id in
<foreach item="orgId" collection="orgIds" open="(" separator="," close=")">
#{orgId}
</foreach>
and CONCAT(date_year , date_month , date_day) &lt;= CONCAT(#{dateYear}, #{dateMonth}, #{dateDay})
group by
target_model_code,
organize_id
) md,
( (
select select
asset_code asset_code
from from
dc_base_asset_info dc_base_asset_info
where where
org_id = #{orgId} org_id in
<foreach item="orgId" collection="orgIds" open="(" separator="," close=")">
#{orgId}
</foreach>
and asset_level = #{assetLevel} and asset_level = #{assetLevel}
and asset_type = #{assetType} and asset_type = #{assetType}
limit 1) a limit 1
) a
where where
d.asset_code = a.asset_code d.asset_code = a.asset_code
and CONCAT(d.date_year , d.date_month , d.date_day) = md.max_date
and d.target_model_code = md.target_model_code
and d.organize_id = md.organize_id
and d.target_model_code = c.target_model_code and d.target_model_code = c.target_model_code
and d.target_model_code =m.target_model_code and d.target_model_code =m.target_model_code
and c.report_name in and c.report_name in
<foreach item="reportName" collection="reportNames" open="(" separator="," close=")"> <foreach item="reportName" collection="reportNames" open="(" separator="," close=")">
#{reportName} #{reportName}
</foreach> </foreach>
and d.date_year = #{dateYear}
and d.date_month = #{dateMonth}
and d.date_day = #{dateDay}
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save