Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
b4b75dce
由
张雷
编写于
2024-10-22 19:49:01 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
禅道BUG修改
1 个父辈
6256fe9c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
77 行增加
和
33 行删除
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/report/controller/ReportElectricCostController.java
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/ReportElectricCostMapper.java
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/xml/ReportElectricCostMapper.xml
sk-module-datafill/src/main/java/com/skua/modules/report/service/IReportElectricCostService.java
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/ReportElectricCostServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/FCustomReportDatasetMapper.java
查看文件 @
b4b75dc
...
...
@@ -99,9 +99,14 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData
* @return
*/
Map
<
String
,
Object
>
getWeekReport
(
@Param
(
value
=
"dataTime"
)
String
dataTime
,
@Param
(
value
=
"departId"
)
String
departId
,
@Param
(
value
=
"week"
)
String
week
,
@Param
(
value
=
"startDate"
)
String
startDate
,
@Param
(
value
=
"endDate"
)
String
endDate
);
List
<
DepartWeekReportVO
>
getWeekReportData
(
@Param
(
value
=
"startDate"
)
String
startDate
,
@Param
(
value
=
"endDate"
)
String
endDate
);
@Param
(
value
=
"week"
)
String
week
,
@Param
(
value
=
"startDate"
)
String
startDate
,
@Param
(
value
=
"endDate"
)
String
endDate
,
@Param
(
value
=
"dataViewName3a24"
)
String
dataViewName3a24
,
@Param
(
value
=
"dataViewName2119"
)
String
dataViewName2119
,
@Param
(
value
=
"dataViewName9bff"
)
String
dataViewName9bff
);
List
<
DepartWeekReportVO
>
getWeekReportData
(
@Param
(
value
=
"startDate"
)
String
startDate
,
@Param
(
value
=
"endDate"
)
String
endDate
,
@Param
(
value
=
"dataViewName3a24"
)
String
dataViewName3a24
,
@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
);
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/xml/FCustomReportDatasetMapper.xml
查看文件 @
b4b75dc
...
...
@@ -208,23 +208,28 @@
sys_depart d
LEFT JOIN (SELECT * FROM view_30a8 WHERE depart_id = #{departId} AND time = #{dataTime} AND zs = #{week}) v3 on v3.depart_id = d.id
LEFT JOIN (SELECT
ROUND(AVG(JSCOD),2) JSCOD,ROUND(AVG(JSAD),2) JSAD,ROUND(AVG(JSPH),2) JSPH,ROUND(AVG(JSZD),2) JSZD,ROUND(AVG(JSZL),2) JSZL,ROUND(AVG(JSSS),2) JSSS,
ROUND(AVG(CSCOD),2) CSCOD,ROUND(AVG(CSAD),2) CSAD,ROUND(AVG(CSPH),2) CSPH,ROUND(AVG(CSTN),2) CSTN,ROUND(AVG(CSZL),2) CSZL,ROUND(AVG(CSSS),2) CSSS,
depart_id
FROM view_9bff
WHERE depart_id = #{departId} AND time
>
= #{startDate} AND time
<
= #{endDate} ) v9 on v9.depart_id = d.id
ROUND(AVG(v.JSCOD),2) JSCOD,ROUND(AVG(v.JSAD),2) JSAD,ROUND(AVG(v.JSPH),2) JSPH,
ROUND(AVG(v.JSZD),2) JSZD,ROUND(AVG(v.JSZL),2) JSZL,ROUND(AVG(v.JSSS),2) JSSS,
ROUND(AVG(v.CSCOD),2) CSCOD,ROUND(AVG(v.CSAD),2) CSAD,ROUND(AVG(v.CSPH),2) CSPH,
ROUND(AVG(v.CSTN),2) CSTN,ROUND(AVG(v.CSZL),2) CSZL,ROUND(AVG(v.CSSS),2) CSSS,
v.depart_id
FROM ${dataViewName9bff} v
WHERE v.depart_id = #{departId} AND v.time
>
= #{startDate} AND v.time
<
= #{endDate} ) v9 on v9.depart_id = d.id
LEFT JOIN (SELECT
SUM(DLHJ) dlhj,(SUM( PAMRJ ) + SUM( SCLPAMZ ) + SUM( SCLPAMF ) + SUM( NACLO ) + SUM( PACGT ) + SUM( PACYT ) + SUM( PFS ) + SUM( FHTY ) +
SUM( RYXNJ ) + SUM( YWL ) + SUM( GXCLJ ) + SUM( CH3COONA ) + SUM( HXT ) + SUM( FECL3 ) + SUM( SH ) + SUM( CH3COOH ) + SUM( FESO4G ) +
SUM( FESO4Y ) + SUM( H2O2 )) yjhl,SUM(WNL) wnl,depart_id
FROM view_3a24
WHERE depart_id = #{departId} AND time
>
= #{startDate} AND time
<
= #{endDate} ) v8 on v8.depart_id = d.id
SUM(IFNULL(v.DLHJ,0)) dlhj,(SUM( IFNULL(v.PAMRJ,0) ) + SUM( IFNULL(v.SCLPAMZ,0) ) +
SUM( IFNULL(v.SCLPAMF,0) ) + SUM( IFNULL(v.NACLO,0) ) + SUM( IFNULL(v.PACGT,0) ) +
SUM( IFNULL(v.PACYT,0) ) + SUM( IFNULL(v.PFS,0) ) + SUM( IFNULL(v.FHTY,0) ) +SUM( IFNULL(v.RYXNJ,0) ) +
SUM( IFNULL(v.YWL,0) ) + SUM( IFNULL(v.GXCLJ,0) ) + SUM( IFNULL(v.CH3COONA,0) ) + SUM( IFNULL(v.HXT,0) ) +
SUM( IFNULL(v.FECL3,0) ) + SUM( IFNULL(v.SH,0) ) + SUM( IFNULL(v.CH3COOH,0) ) + SUM( IFNULL(v.FESO4G,0) ) +
SUM( IFNULL(v.FESO4Y,0) ) + SUM( IFNULL(v.H2O2,0) )) yjhl,SUM(IFNULL(v.WNL,0)) wnl,v.depart_id
FROM ${dataViewName3a24} v
WHERE v.depart_id = #{departId} AND v.time
>
= #{startDate} AND v.time
<
= #{endDate} ) v8 on v8.depart_id = d.id
LEFT JOIN (SELECT
SUM(CSL) zclsl,
ROUND(AVG(CSL),2) rjclsl,
depart_id
FROM
view_2119
WHERE
depart_id = #{departId} AND time
>
= #{startDate} AND
time
<
= #{endDate} ) v2 on v2.depart_id = d.id
SUM(
v.
CSL) zclsl,
ROUND(AVG(
v.
CSL),2) rjclsl,
v.
depart_id
FROM
${dataViewName2119} v
WHERE
v.depart_id = #{departId} AND v.time
>
= #{startDate} AND v.
time
<
= #{endDate} ) v2 on v2.depart_id = d.id
LEFT JOIN sys_factory_info f on f.depart_id = d.id
LEFT JOIN report_target_config t on t.depart_id = d.id
WHERE
...
...
@@ -242,12 +247,12 @@
FROM
sys_depart d
left join sys_factory_info f on f.depart_id = d.id
left join (select
depart_id,ROUND(SUM(WNL),2) wnl,ROUND(SUM(
DLHJ),2) hdl
from
view_3a24
where
time
>
= #{startDate} AND time
<
= #{endDate} GROUP BY
depart_id) v3 on v3.depart_id = d.id
left join (select
depart_id, ROUND(AVG(CSL)/10000,2) AS rjclsl, ROUND(SUM(
CSL),2) AS zclsl
from
view_2119
where
time
>
= #{startDate} AND time
<
= #{endDate} GROUP BY
depart_id) v2 on v2.depart_id = d.id
left join (select
v.depart_id,ROUND(SUM(v.WNL),2) wnl,ROUND(SUM(v.
DLHJ),2) hdl
from
${dataViewName3a24} v
where
v.time
>
= #{startDate} AND v.time
<
= #{endDate} GROUP BY v.
depart_id) v3 on v3.depart_id = d.id
left join (select
v.depart_id, ROUND(AVG(v.CSL)/10000,2) AS rjclsl, ROUND(SUM(v.
CSL),2) AS zclsl
from
${dataViewName2119} v
where
v.time
>
= #{startDate} AND v.time
<
= #{endDate} GROUP BY v.
depart_id) v2 on v2.depart_id = d.id
WHERE
d.depart_type = 1
ORDER BY
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/service/impl/FCustomReportDatasetServiceImpl.java
查看文件 @
b4b75dc
此文件的差异被折叠,
点击展开。
sk-module-datafill/src/main/java/com/skua/modules/report/controller/ReportElectricCostController.java
查看文件 @
b4b75dc
...
...
@@ -70,15 +70,8 @@ public class ReportElectricCostController {
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
ReportElectricCost
>>
result
=
new
Result
<
IPage
<
ReportElectricCost
>>();
QueryWrapper
<
ReportElectricCost
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
reportElectricCost
,
req
.
getParameterMap
());
if
(
reportElectricCost
.
getDepartId
()!=
null
){
queryWrapper
.
eq
(
"depart_id"
,
reportElectricCost
.
getDepartId
());
}
if
(
reportElectricCost
.
getMonth
()!=
null
){
queryWrapper
.
like
(
"month"
,
reportElectricCost
.
getMonth
());
}
Page
<
ReportElectricCost
>
page
=
new
Page
<
ReportElectricCost
>(
pageNo
,
pageSize
);
IPage
<
ReportElectricCost
>
pageList
=
reportElectricCostService
.
page
(
page
,
queryWrapper
);
IPage
<
ReportElectricCost
>
pageList
=
reportElectricCostService
.
getPage
(
page
,
reportElectricCost
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/ReportElectricCostMapper.java
查看文件 @
b4b75dc
...
...
@@ -2,6 +2,7 @@ package com.skua.modules.report.mapper;
import
java.util.List
;
import
com.skua.tool.annotation.Anonymous
;
import
org.apache.ibatis.annotations.Param
;
import
com.skua.modules.report.entity.ReportElectricCost
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -11,4 +12,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
ReportElectricCostMapper
extends
BaseMapper
<
ReportElectricCost
>
{
@Anonymous
List
<
ReportElectricCost
>
getPage
(
@Param
(
"reportElectricCost"
)
ReportElectricCost
reportElectricCost
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/xml/ReportElectricCostMapper.xml
查看文件 @
b4b75dc
...
...
@@ -2,4 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.skua.modules.report.mapper.ReportElectricCostMapper"
>
</mapper>
\ No newline at end of file
<select
id=
"getPage"
resultType=
"com.skua.modules.report.entity.ReportElectricCost"
parameterType=
"com.skua.modules.report.entity.ReportElectricCost"
>
select * from report_electric_cost where 1=1
<if
test=
"reportElectricCost.departId!=null and reportElectricCost.departId!=''"
>
AND depart_id = #{reportElectricCost.departId}
</if>
<if
test=
"reportElectricCost.month!=null and reportElectricCost.month!=''"
>
AND month like CONCAT(#{reportElectricCost.month},'%')
</if>
</select>
</mapper>
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/service/IReportElectricCostService.java
查看文件 @
b4b75dc
package
com
.
skua
.
modules
.
report
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.skua.modules.report.entity.ReportElectricCost
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
...
@@ -8,4 +11,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IReportElectricCostService
extends
IService
<
ReportElectricCost
>
{
IPage
<
ReportElectricCost
>
getPage
(
Page
<
ReportElectricCost
>
page
,
ReportElectricCost
reportElectricCost
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/ReportElectricCostServiceImpl.java
查看文件 @
b4b75dc
package
com
.
skua
.
modules
.
report
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.skua.modules.report.entity.ReportElectricCost
;
import
com.skua.modules.report.mapper.ReportElectricCostMapper
;
import
com.skua.modules.report.service.IReportElectricCostService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 月度电费报表
*/
@Service
public
class
ReportElectricCostServiceImpl
extends
ServiceImpl
<
ReportElectricCostMapper
,
ReportElectricCost
>
implements
IReportElectricCostService
{
@Autowired
private
ReportElectricCostMapper
reportElectricCostMapper
;
@Override
public
IPage
<
ReportElectricCost
>
getPage
(
Page
<
ReportElectricCost
>
page
,
ReportElectricCost
reportElectricCost
)
{
// if(reportElectricCost.getDepartId()!=null){
// queryWrapper.eq("depart_id",reportElectricCost.getDepartId());
// }
// if(reportElectricCost.getMonth()!=null){
// queryWrapper.like("month",reportElectricCost.getMonth());
// }
List
<
ReportElectricCost
>
list
=
new
ArrayList
<>();
list
=
reportElectricCostMapper
.
getPage
(
reportElectricCost
);
page
.
setRecords
(
list
);
return
page
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论