Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
ad045639
由
康伟
编写于
2024-10-21 09:06:31 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei :
1 个父辈
0ae25119
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
12 行增加
和
13 行删除
sk-module-datafill/src/main/java/com/skua/modules/custom/service/impl/FCustomReportDatasetServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/custom/service/impl/FCustomReportDatasetServiceImpl.java
查看文件 @
ad04563
...
...
@@ -2,26 +2,21 @@ package com.skua.modules.custom.service.impl;
import
com.skua.common.report.ReportViewUtil
;
import
com.skua.core.context.SpringContextUtils
;
import
com.skua.core.excel.demo.Student
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.custom.entity.FCustomReportDataset
;
import
com.skua.modules.custom.mapper.FCustomReportDatasetMapper
;
import
com.skua.modules.custom.service.IFCustomReportDatasetService
;
import
com.skua.modules.custom.vo.DepartWeekReportVO
;
import
com.skua.modules.custom.vo.FCustomReportDatasetVO
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.time.temporal.TemporalAdjusters
;
import
java.time.temporal.WeekFields
;
import
java.util.*
;
import
com.skua.modules.report.vo.*
;
import
com.skua.modules.report.vo.largeScreen.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
/**
...
...
@@ -278,7 +273,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
//节能环保 大屏展示
public
JnhbLargeScreenVO
jnhbLargeScreenShow
(
DataVO
dataVO
){
long
startTime
=
System
.
nanoTime
();
//
long startTime = System.nanoTime();
JnhbLargeScreenVO
largeScreenVO
=
new
JnhbLargeScreenVO
();
//当月数据
String
dataViewName2
=
ReportViewUtil
.
buildView
(
"2119ecbf53a1d2d0708258ff67cfd9e1"
,
"CSL"
,
null
,
dataVO
.
getNowStartTime
(),
dataVO
.
getNowEndTime
());
...
...
@@ -295,7 +290,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
Map
<
String
,
JnhbReportData
>
lastMonthMapData
=
convertJnhbReportDataMap
(
lastMonthReportDataList
);
// 去年数据 环比
dataViewName2
=
ReportViewUtil
.
buildView
(
"2119ecbf53a1d2d0708258ff67cfd9e1"
,
"CSL"
,
null
,
dataVO
.
getLastYearStartTime
(),
dataVO
.
getLastYearEndTime
());
dataViewName3
=
ReportViewUtil
.
buildView
(
"3a243d5715b9e1a3753c180872ca0df9"
,
"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL"
,
null
,
dataVO
.
getLastYearStartTime
(),
dataVO
.
getLastYearEndTime
());
dataViewName3
=
ReportViewUtil
.
buildView
(
"3a243d5715b9e1a3753c180872ca0df9"
,
"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL"
,
null
,
dataVO
.
getLastYearStartTime
(),
dataVO
.
getLastYearEndTime
());
List
<
JnhbReportData
>
lastYearReportDataList
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
dataVO
.
getLastYearStartTime
(),
dataVO
.
getLastYearEndTime
(),
null
);
Map
<
String
,
JnhbReportData
>
lastYearMapData
=
convertJnhbReportDataMap
(
lastYearReportDataList
);
...
...
@@ -308,6 +303,11 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
ResultNumberVO
tp_NumberVO
=
null
;
//TP
ResultNumberVO
tn_NumberVO
=
null
;
//TN
List
<
PowerConsumeVO
>
powerConsumeVOList
=
new
ArrayList
();
//各站点能源消耗排名
List
<
LoadRateVO
>
loadRateVOList
=
new
ArrayList
<>();
//负荷率对象
List
<
ResultNumberVO
>
co2DataList
=
new
ArrayList
<>();
//CO2排放排名
List
<
WasteMaterialVO
>
wasteMaterialList
=
new
ArrayList
<>();
//废物处理对象集合
JnhbReportData
lastMonthReportDataTemp
;
//lastMonthMapData
JnhbReportData
lastYearReportDataTemp
;
//lastYearMapData
ResultChartsVO
energyConsumeChart
=
null
;
...
...
@@ -321,8 +321,9 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
//各站点能源消耗排名:
powerConsumeVO
=
new
PowerConsumeVO
(
reportData
.
getDepartId
(),
reportData
.
getDepartName
(),
reportData
.
getDh
(),
reportData
.
getGffdl
(),
reportData
.
getQy
(),
reportData
.
getZhnyxhl
()
,
reportData
.
getEyhtpfl
()
,
reportData
.
getDsdh
()
);
c02NumberVO
=
new
ResultNumberVO
();
c02NumberVO
.
setName
(
reportData
.
getDepartName
()
);
c02NumberVO
.
setName
(
reportData
.
getDepartName
()
);
c02NumberVO
.
setValue
(
reportData
.
getCodxjl
()
);
cod_NumberVO
=
new
ResultNumberVO
();
cod_NumberVO
.
setValue
(
reportData
.
getCodxjl
());
nh3n_NumberVO
=
new
ResultNumberVO
();
nh3n_NumberVO
.
setValue
(
reportData
.
getTnxjl
());
...
...
@@ -377,8 +378,10 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
largeScreenVO
.
getCo2DataList
().
add
(
c02NumberVO
)
;
//排放指标
// String ybgfcsl, String ybgfczl, String jgwnl, String wfcsl, String wfczl
largeScreenVO
.
getWasteMaterialList
()
.
add
(
new
WasteMaterialVO
(
reportData
.
getDepartId
(),
reportData
.
getDepartName
(),
reportData
.
getYbgfcsl
(),
reportData
.
getYbgfczl
(),
reportData
.
getJgwnl
(),
reportData
.
getWfcsl
(),
reportData
.
getWfczl
()
)
)
;
wasteMaterialList
.
add
(
new
WasteMaterialVO
(
reportData
.
getDepartId
(),
reportData
.
getDepartName
(),
reportData
.
getYbgfcsl
(),
reportData
.
getYbgfczl
(),
reportData
.
getJgwnl
(),
reportData
.
getWfcsl
(),
reportData
.
getWfczl
()
)
)
;
}
largeScreenVO
.
getCo2DataList
().
add
(
c02NumberVO
)
;
largeScreenVO
.
setWasteMaterialList
(
wasteMaterialList
)
;
//System.out.println("44444444---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
//主库数据源
JdbcTemplate
masterDB
=
(
JdbcTemplate
)
SpringContextUtils
.
getBean
(
"master"
);
...
...
@@ -414,8 +417,6 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
loadRateVORank.setRank( rank++);
}*//*
}*/
return
largeScreenVO
;
}
/**转换为Map<部门编号,JnhbReportData> */
...
...
@@ -451,6 +452,4 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
map
.
put
(
"qt"
,
"(1)本周暂无其他情况说明"
);
//其他
return
map
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论