节能环保问题修改
正在显示
3 个修改的文件
包含
14 行增加
和
7 行删除
... | @@ -108,7 +108,8 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData | ... | @@ -108,7 +108,8 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData |
108 | @Param(value="dataViewName2119") String dataViewName2119); | 108 | @Param(value="dataViewName2119") String dataViewName2119); |
109 | 109 | ||
110 | List<JnhbReportData> getJnhbReport(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3, | 110 | List<JnhbReportData> getJnhbReport(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3, |
111 | @Param(value="start") String start, @Param(value="end") String end, @Param(value="departIds") String departIds); | 111 | @Param(value="start") String start, @Param(value="end") String end, |
112 | @Param(value="departIds") String departIds, @Param(value="dayCount") int dayCount); | ||
112 | 113 | ||
113 | String getChildDepartId(@Param(value="departId") String departId); | 114 | String getChildDepartId(@Param(value="departId") String departId); |
114 | 115 | ... | ... |
... | @@ -261,7 +261,7 @@ | ... | @@ -261,7 +261,7 @@ |
261 | SELECT | 261 | SELECT |
262 | d.id AS depart_id, | 262 | d.id AS depart_id, |
263 | d.depart_name AS depart_name, | 263 | d.depart_name AS depart_name, |
264 | f.pro_scale * v2.day_num AS wsclgm, | 264 | ROUND(f.pro_scale * v2.day_num,2) AS wsclgm, |
265 | v2.clsl AS wssjcll, | 265 | v2.clsl AS wssjcll, |
266 | round( 100 * ( v2.clsl / ( f.pro_scale * v2.day_num ) ), 2 ) AS wsfhl, | 266 | round( 100 * ( v2.clsl / ( f.pro_scale * v2.day_num ) ), 2 ) AS wsfhl, |
267 | v3.dh, | 267 | v3.dh, |
... | @@ -282,7 +282,7 @@ | ... | @@ -282,7 +282,7 @@ |
282 | SELECT | 282 | SELECT |
283 | v.depart_id, | 283 | v.depart_id, |
284 | ROUND( SUM( v.CSL ) / 10000, 2 ) AS clsl, | 284 | ROUND( SUM( v.CSL ) / 10000, 2 ) AS clsl, |
285 | count( v.id ) AS day_num | 285 | #{dayCount} AS day_num |
286 | FROM | 286 | FROM |
287 | ${dataViewName2} v | 287 | ${dataViewName2} v |
288 | WHERE | 288 | WHERE | ... | ... |
... | @@ -15,6 +15,7 @@ import java.time.temporal.WeekFields; | ... | @@ -15,6 +15,7 @@ import java.time.temporal.WeekFields; |
15 | import java.util.*; | 15 | import java.util.*; |
16 | import com.skua.modules.report.vo.*; | 16 | import com.skua.modules.report.vo.*; |
17 | import com.skua.modules.report.vo.largeScreen.*; | 17 | import com.skua.modules.report.vo.largeScreen.*; |
18 | import com.skua.tool.util.DateUtils; | ||
18 | import org.springframework.beans.factory.annotation.Autowired; | 19 | import org.springframework.beans.factory.annotation.Autowired; |
19 | import org.springframework.jdbc.core.JdbcTemplate; | 20 | import org.springframework.jdbc.core.JdbcTemplate; |
20 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
... | @@ -214,10 +215,11 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -214,10 +215,11 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
214 | public List<JnhbReportData> jnhbReportShow(String departId, String month) { | 215 | public List<JnhbReportData> jnhbReportShow(String departId, String month) { |
215 | String start = month.substring(0,4)+"-01-31"; | 216 | String start = month.substring(0,4)+"-01-31"; |
216 | String end = month + "-31"; | 217 | String end = month + "-31"; |
218 | int dayCount = (int)DateUtils.differenceDay(start,end); | ||
217 | String departIds = mapper.getChildDepartId(departId); | 219 | String departIds = mapper.getChildDepartId(departId); |
218 | String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", departIds, start, end); | 220 | String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", departIds, start, end); |
219 | String dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, start, end); | 221 | String dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, start, end); |
220 | List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, start, end, departIds); | 222 | List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, start, end, departIds, dayCount); |
221 | return list; | 223 | return list; |
222 | } | 224 | } |
223 | 225 | ||
... | @@ -243,23 +245,27 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -243,23 +245,27 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
243 | public JnhbLargeScreenVO jnhbLargeScreenShow(DataVO dataVO){ | 245 | public JnhbLargeScreenVO jnhbLargeScreenShow(DataVO dataVO){ |
244 | long startTime = System.nanoTime(); | 246 | long startTime = System.nanoTime(); |
245 | JnhbLargeScreenVO largeScreenVO = new JnhbLargeScreenVO(); | 247 | JnhbLargeScreenVO largeScreenVO = new JnhbLargeScreenVO(); |
248 | int dayCount = (int)DateUtils.differenceDay(dataVO.getNowStartTime(),dataVO.getNowEndTime()); | ||
246 | //当月数据 | 249 | //当月数据 |
247 | String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime()); | 250 | String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime()); |
248 | String dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime()); | 251 | String dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime()); |
249 | List<JnhbReportData> jnhbReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getNowStartTime(), dataVO.getNowEndTime(), null); | 252 | List<JnhbReportData> jnhbReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getNowStartTime(), |
253 | dataVO.getNowEndTime(),null, dayCount); | ||
250 | //System.out.println("1111---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds"); | 254 | //System.out.println("1111---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds"); |
251 | 255 | ||
252 | // 上月数据 同比 | 256 | // 上月数据 同比 |
253 | dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime()); | 257 | dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime()); |
254 | dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime()); | 258 | dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime()); |
255 | List<JnhbReportData> lastMonthReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime(), null); | 259 | List<JnhbReportData> lastMonthReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastMonthStartTime(), |
260 | dataVO.getLastMonthEndTime(), null, dayCount); | ||
256 | 261 | ||
257 | //System.out.println("2222---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds"); | 262 | //System.out.println("2222---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds"); |
258 | Map<String,JnhbReportData> lastMonthMapData= convertJnhbReportDataMap(lastMonthReportDataList); | 263 | Map<String,JnhbReportData> lastMonthMapData= convertJnhbReportDataMap(lastMonthReportDataList); |
259 | // 去年数据 环比 | 264 | // 去年数据 环比 |
260 | dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime()); | 265 | dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime()); |
261 | dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime()); | 266 | dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime()); |
262 | List<JnhbReportData> lastYearReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime(), null); | 267 | List<JnhbReportData> lastYearReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastYearStartTime(), |
268 | dataVO.getLastYearEndTime(), null, dayCount); | ||
263 | Map<String,JnhbReportData> lastYearMapData= convertJnhbReportDataMap(lastYearReportDataList); | 269 | Map<String,JnhbReportData> lastYearMapData= convertJnhbReportDataMap(lastYearReportDataList); |
264 | 270 | ||
265 | //System.out.println("333333---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds"); | 271 | //System.out.println("333333---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds"); | ... | ... |
-
请 注册 或 登录 后发表评论