Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
b452ab00
由
张雷
编写于
2024-11-04 11:14:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
节能环保问题修改
1 个父辈
16189507
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
7 行删除
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/FCustomReportDatasetMapper.java
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/xml/FCustomReportDatasetMapper.xml
sk-module-datafill/src/main/java/com/skua/modules/custom/service/impl/FCustomReportDatasetServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/FCustomReportDatasetMapper.java
查看文件 @
b452ab0
...
...
@@ -108,7 +108,8 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData
@Param
(
value
=
"dataViewName2119"
)
String
dataViewName2119
);
List
<
JnhbReportData
>
getJnhbReport
(
@Param
(
value
=
"dataViewName2"
)
String
dataViewName2
,
@Param
(
value
=
"dataViewName3"
)
String
dataViewName3
,
@Param
(
value
=
"start"
)
String
start
,
@Param
(
value
=
"end"
)
String
end
,
@Param
(
value
=
"departIds"
)
String
departIds
);
@Param
(
value
=
"start"
)
String
start
,
@Param
(
value
=
"end"
)
String
end
,
@Param
(
value
=
"departIds"
)
String
departIds
,
@Param
(
value
=
"dayCount"
)
int
dayCount
);
String
getChildDepartId
(
@Param
(
value
=
"departId"
)
String
departId
);
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/xml/FCustomReportDatasetMapper.xml
查看文件 @
b452ab0
...
...
@@ -261,7 +261,7 @@
SELECT
d.id AS depart_id,
d.depart_name AS depart_name,
f.pro_scale * v2.day_num
AS wsclgm,
ROUND(f.pro_scale * v2.day_num,2)
AS wsclgm,
v2.clsl AS wssjcll,
round( 100 * ( v2.clsl / ( f.pro_scale * v2.day_num ) ), 2 ) AS wsfhl,
v3.dh,
...
...
@@ -282,7 +282,7 @@
SELECT
v.depart_id,
ROUND( SUM( v.CSL ) / 10000, 2 ) AS clsl,
count( v.id )
AS day_num
#{dayCount}
AS day_num
FROM
${dataViewName2} v
WHERE
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/service/impl/FCustomReportDatasetServiceImpl.java
查看文件 @
b452ab0
...
...
@@ -15,6 +15,7 @@ import java.time.temporal.WeekFields;
import
java.util.*
;
import
com.skua.modules.report.vo.*
;
import
com.skua.modules.report.vo.largeScreen.*
;
import
com.skua.tool.util.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Service
;
...
...
@@ -214,10 +215,11 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
public
List
<
JnhbReportData
>
jnhbReportShow
(
String
departId
,
String
month
)
{
String
start
=
month
.
substring
(
0
,
4
)+
"-01-31"
;
String
end
=
month
+
"-31"
;
int
dayCount
=
(
int
)
DateUtils
.
differenceDay
(
start
,
end
);
String
departIds
=
mapper
.
getChildDepartId
(
departId
);
String
dataViewName2
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
departIds
,
start
,
end
);
String
dataViewName3
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL"
,
departIds
,
start
,
end
);
List
<
JnhbReportData
>
list
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
start
,
end
,
departIds
);
List
<
JnhbReportData
>
list
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
start
,
end
,
departIds
,
dayCount
);
return
list
;
}
...
...
@@ -243,23 +245,27 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
public
JnhbLargeScreenVO
jnhbLargeScreenShow
(
DataVO
dataVO
){
long
startTime
=
System
.
nanoTime
();
JnhbLargeScreenVO
largeScreenVO
=
new
JnhbLargeScreenVO
();
int
dayCount
=
(
int
)
DateUtils
.
differenceDay
(
dataVO
.
getNowStartTime
(),
dataVO
.
getNowEndTime
());
//当月数据
String
dataViewName2
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
null
,
dataVO
.
getNowStartTime
(),
dataVO
.
getNowEndTime
());
String
dataViewName3
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL"
,
null
,
dataVO
.
getNowStartTime
(),
dataVO
.
getNowEndTime
());
List
<
JnhbReportData
>
jnhbReportDataList
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
dataVO
.
getNowStartTime
(),
dataVO
.
getNowEndTime
(),
null
);
List
<
JnhbReportData
>
jnhbReportDataList
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
dataVO
.
getNowStartTime
(),
dataVO
.
getNowEndTime
(),
null
,
dayCount
);
//System.out.println("1111---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
// 上月数据 同比
dataViewName2
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
null
,
dataVO
.
getLastMonthStartTime
(),
dataVO
.
getLastMonthEndTime
());
dataViewName3
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL"
,
null
,
dataVO
.
getLastMonthStartTime
(),
dataVO
.
getLastMonthEndTime
());
List
<
JnhbReportData
>
lastMonthReportDataList
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
dataVO
.
getLastMonthStartTime
(),
dataVO
.
getLastMonthEndTime
(),
null
);
List
<
JnhbReportData
>
lastMonthReportDataList
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
dataVO
.
getLastMonthStartTime
(),
dataVO
.
getLastMonthEndTime
(),
null
,
dayCount
);
//System.out.println("2222---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
Map
<
String
,
JnhbReportData
>
lastMonthMapData
=
convertJnhbReportDataMap
(
lastMonthReportDataList
);
// 去年数据 环比
dataViewName2
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
null
,
dataVO
.
getLastYearStartTime
(),
dataVO
.
getLastYearEndTime
());
dataViewName3
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
"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
);
List
<
JnhbReportData
>
lastYearReportDataList
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
dataVO
.
getLastYearStartTime
(),
dataVO
.
getLastYearEndTime
(),
null
,
dayCount
);
Map
<
String
,
JnhbReportData
>
lastYearMapData
=
convertJnhbReportDataMap
(
lastYearReportDataList
);
//System.out.println("333333---**************执行时间:"+ (System.nanoTime() - startTime) / 1_000_000.0 + " milliseconds");
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论