Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
82ff0e94
由
张雷
编写于
2024-10-10 19:37:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
节能环保报表开发
1 个父辈
89067cfb
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
616 行增加
和
24 行删除
sk-module-biz/src/main/java/com/skua/modules/emergency/vo/DangerDatabaseResult.java
sk-module-biz/src/main/java/com/skua/modules/threedimensional/controller/ThreeDController.java
sk-module-biz/src/main/resources/application-prod.yml
sk-module-datafill/src/main/java/com/skua/modules/custom/controller/FCustomReportDatasetController.java
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/IFCustomReportDatasetService.java
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/ReportDataController.java
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbReportData.java
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbReportDetailsDy.java
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbReportDetailsHj.java
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbReportDetailsJs.java
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryInfoController.java
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryUserInfoController.java
sk-module-system/src/main/java/com/skua/modules/system/service/ISysFactoryInfoService.java
sk-module-system/src/main/java/com/skua/modules/system/service/impl/SysFactoryInfoServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/emergency/vo/DangerDatabaseResult.java
查看文件 @
82ff0e9
...
...
@@ -22,8 +22,15 @@ public class DangerDatabaseResult {
/**最近风险点*/
@ApiModelProperty
(
value
=
"最近风险点"
)
private
String
dangerLocation
;
/**
隐患排查事件数量
*/
@ApiModelProperty
(
value
=
"
隐患排查事件数量
"
)
/**
是否异常
*/
@ApiModelProperty
(
value
=
"
是否异常
"
)
private
String
isFault
;
/**巡查人员*/
@ApiModelProperty
(
value
=
"巡查人员"
)
private
String
dangerUser
;
/**巡查照片*/
@ApiModelProperty
(
value
=
"巡查照片"
)
private
String
dangerImg
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/threedimensional/controller/ThreeDController.java
查看文件 @
82ff0e9
...
...
@@ -116,10 +116,8 @@ public class ThreeDController {
List
<
Object
>
list
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
deviceMap
:
deviceList
)
{
String
status
=
"offline"
;
String
id
=
String
.
valueOf
(
deviceMap
.
get
(
"departId"
));
String
departName
=
String
.
valueOf
(
deviceMap
.
get
(
"departName"
));
String
deviceId
=
String
.
valueOf
(
deviceMap
.
get
(
"deviceId"
));
String
deviceStatus
=
String
.
valueOf
(
deviceMap
.
get
(
"deviceStatus"
));
String
sql
=
"SELECT count(1) FROM realtimedata WHERE factoryname ='"
+
deviceId
+
"' AND nm like'"
+
"%IoStatus%'"
+
" AND v = '"
+
"1'"
;
Map
<
String
,
Object
>
countMap
=
pgDb
.
queryForMap
(
sql
);
Integer
count
=
Integer
.
parseInt
(
String
.
valueOf
(
countMap
.
get
(
"count"
)));
...
...
sk-module-biz/src/main/resources/application-prod.yml
查看文件 @
82ff0e9
...
...
@@ -89,7 +89,8 @@ spring:
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource
:
master
:
url
:
jdbc:mysql://20.0.99.3:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
# url: jdbc:mysql://20.0.99.3:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
url
:
jdbc:mysql://47.104.179.187:6003/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800
username
:
root
password
:
jkauto@123
driver-class-name
:
com.mysql.jdbc.Driver
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/controller/FCustomReportDatasetController.java
查看文件 @
82ff0e9
...
...
@@ -46,10 +46,7 @@ public class FCustomReportDatasetController {
private
ISequenceService
sequenceService
;
/**
* 获取数据填报配置报表
* @param fCustomReportDataset
* @param pageNo
* @param pageSize
* @param req
* @param reportId
* @return
*/
@AutoLog
(
value
=
"数据集管理-填报报表数据集获取"
)
...
...
@@ -64,21 +61,17 @@ public class FCustomReportDatasetController {
}
/**
* 分页列表查询
* @param fCustomReportDataset
* @param pageNo
* @param pageSize
* @param req
* @param reportId
* @return
*/
@AutoLog
(
value
=
"数据集管理-数据集信息树获取"
)
@ApiOperation
(
value
=
"数据集管理-数据集信息树获取"
,
notes
=
"数据集管理-数据集信息树获取"
)
@GetMapping
(
value
=
"/datasetTree"
)
public
Result
<
List
<
TreeData
>>
getDatasetTree
(
String
reportId
,
HttpServletRequest
req
)
{
public
Result
<
List
<
TreeData
>>
getDatasetTree
(
String
reportId
)
{
Result
<
List
<
TreeData
>>
result
=
new
Result
<>();
//获取数据列表
List
<
FCustomReportDatasetVO
>
fieldList
=
fCustomReportDatasetService
.
getDatasetTree
(
reportId
);
List
<
FCustomReportDatasetVO
>
list
=
new
ArrayList
<
FCustomReportDatasetVO
>();
//数据集默认添加时间、厂站字段
for
(
FCustomReportDatasetVO
vo
:
fieldList
)
{
...
...
@@ -104,7 +97,7 @@ public class FCustomReportDatasetController {
}
/**
* 将SysDeptUserVO对象数据填充到TransTreeModel中
* @param
sysDeptUser
VO
* @param
fCustomReportDataset
VO
* @return
*/
private
TransTreeModel
convertToTreeModel
(
FCustomReportDatasetVO
fCustomReportDatasetVO
)
{
...
...
@@ -137,7 +130,7 @@ public class FCustomReportDatasetController {
}
return
result
;
}
/**
* 通过id删除
* @param id
...
...
@@ -155,10 +148,10 @@ public class FCustomReportDatasetController {
}
return
Result
.
ok
(
"删除成功!"
);
}
/**
* 通过填报报表id删除
* @param
i
d
* @param
reportI
d
* @return
*/
@AutoLog
(
value
=
"数据集管理-通过填报报表id删除"
)
...
...
@@ -173,7 +166,7 @@ public class FCustomReportDatasetController {
}
return
Result
.
ok
(
"删除成功!"
);
}
/**
* 批量删除
* @param ids
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/FCustomReportDatasetMapper.java
查看文件 @
82ff0e9
...
...
@@ -4,6 +4,10 @@ import java.util.List;
import
java.util.Map
;
import
com.skua.modules.custom.vo.DepartWeekReportVO
;
import
com.skua.modules.report.vo.JnhbReportData
;
import
com.skua.modules.report.vo.JnhbReportDetailsDy
;
import
com.skua.modules.report.vo.JnhbReportDetailsHj
;
import
com.skua.modules.report.vo.JnhbReportDetailsJs
;
import
org.apache.ibatis.annotations.Param
;
import
com.skua.modules.custom.entity.FCustomReportDataset
;
...
...
@@ -89,4 +93,18 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData
@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
);
List
<
JnhbReportData
>
getJnhbReport
(
@Param
(
value
=
"dataViewName2"
)
String
dataViewName2
,
@Param
(
value
=
"dataViewName3"
)
String
dataViewName3
,
@Param
(
value
=
"start"
)
String
start
,
@Param
(
value
=
"end"
)
String
end
);
String
getChildDepartId
(
@Param
(
value
=
"departId"
)
String
departId
);
List
<
JnhbReportDetailsDy
>
getDyList
(
@Param
(
value
=
"dataViewName2"
)
String
dataViewName2
,
@Param
(
value
=
"dataViewName3"
)
String
dataViewName3
,
@Param
(
value
=
"departId"
)
String
departId
,
@Param
(
value
=
"year"
)
String
year
);
List
<
JnhbReportDetailsJs
>
getJsList
(
@Param
(
value
=
"dataViewName2"
)
String
dataViewName2
,
@Param
(
value
=
"dataViewName3"
)
String
dataViewName3
,
@Param
(
value
=
"departId"
)
String
departId
,
@Param
(
value
=
"year"
)
String
year
);
List
<
JnhbReportDetailsHj
>
getHjList
(
@Param
(
value
=
"dataViewName2"
)
String
dataViewName2
,
@Param
(
value
=
"dataViewName3"
)
String
dataViewName3
,
@Param
(
value
=
"departId"
)
String
departId
,
@Param
(
value
=
"year"
)
String
year
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/xml/FCustomReportDatasetMapper.xml
查看文件 @
82ff0e9
...
...
@@ -254,4 +254,214 @@
d.depart_order
</select>
<select
id=
"getJnhbReport"
resultType=
"com.skua.modules.report.vo.JnhbReportData"
>
SELECT
d.id AS depart_id,
d.depart_name AS depart_name,
f.pro_scale * v2.day_num AS wsclgm,
v2.clsl AS wssjcll,
round( 100 * ( v2.clsl / ( f.pro_scale * v2.day_num ) ), 2 ) AS wsfhl,
v3.dh,
v3.qy,
ROUND(0.123*v3.dh+1.4286*v3.qy,4) AS zhnyxhl,
ROUND(3*v3.qy+0.703*10*v3.dh,4) AS eyhtpfl,
ROUND( v3.dh / v2.clsl, 2 ) AS dsdh,
v3.wnl AS ybgfcsl,
v3.ybgfczl AS ybgfczl,
ROUND(v3.wnl*(1-v3.wnhsl/100),2) AS jgwnl,
v3.wfcsl AS wfcsl,
v3.wfczl AS wfczl
FROM
sys_depart d
LEFT JOIN sys_factory_info f ON f.depart_id = d.id
LEFT JOIN (
SELECT
v.depart_id,
ROUND( SUM( v.CSL ) / 10000, 2 ) AS clsl,
count( v.id ) AS day_num
FROM
${dataViewName2} v
WHERE
v.time
>
= #{start} AND v.time
<
= #{end}
GROUP BY
v.depart_id
) v2 ON v2.depart_id = d.id
LEFT JOIN (
SELECT
v.depart_id,
ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dh,
ROUND( SUM( v.GFFDL ) / 10000, 2 ) AS gffdl,
ROUND( SUM( v.QY ) / 10000, 2 ) AS qy,
ROUND( SUM( v.WNL ), 2 ) AS wnl,
ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl,
ROUND( SUM( v.GFCZL ), 2 ) AS ybgfczl,
ROUND( SUM( v.WFCSL ), 2 ) AS wfcsl,
ROUND( SUM( v.WFCZL ), 2 ) AS wfczl
FROM
${dataViewName3} v
WHERE
v.time
>
= #{start} AND v.time
<
= #{end}
GROUP BY
v.depart_id
) v3 ON v3.depart_id = d.id
WHERE
d.depart_type = 1
ORDER BY
d.depart_order
</select>
<select
id=
"getChildDepartId"
resultType=
"java.lang.String"
>
SELECT
GROUP_CONCAT( id SEPARATOR ',' ) AS depart_ids
FROM
sys_depart
WHERE
parent_id IN
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
OR id IN
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
)
</select>
<select
id=
"getDyList"
resultType=
"com.skua.modules.report.vo.JnhbReportDetailsDy"
>
SELECT
RIGHT(LEFT( v.time, 7 ),2) AS time,
v2.sjwscll,
v2.rwscll,
v2.scsj,
ROUND(v2.scsj*f.pro_scale,2) AS wsclnl,
ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl,
ROUND( SUM( v.GFFDL ), 2 ) AS gffdl,
ROUND( SUM( v.QY ), 2 ) AS qy,
ROUND( SUM( v.HXT ), 2 ) AS hxtsyl,
ROUND( SUM( v.SH ), 2 ) AS shsyl,
ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam,
ROUND( SUM( v.PACGT ), 2 ) AS xnjpac,
ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt,
ROUND( SUM( v.YSL ), 2 ) AS xssyl,
ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl,
ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl,
ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl,
ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl,
ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl,
ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl
FROM
${dataViewName3} v
LEFT JOIN (
SELECT
LEFT ( v.time, 7 ) AS time,
ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll,
ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll,
count( v.id ) AS scsj
FROM
${dataViewName2} v
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
) v2 ON v2.time = LEFT( v.time, 7 )
LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
</select>
<select
id=
"getJsList"
resultType=
"com.skua.modules.report.vo.JnhbReportDetailsJs"
>
SELECT
RIGHT(LEFT( v.time, 7 ),2) AS time,
v2.sjwscll,
v2.rwscll,
v2.scsj,
ROUND(v2.scsj*f.pro_scale,2) AS wsclnl,
ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl,
ROUND( SUM( v.GFFDL ), 2 ) AS gffdl,
ROUND( SUM( v.QY ), 2 ) AS qy,
ROUND( SUM( v.HXT ), 2 ) AS hxtsyl,
ROUND( SUM( v.SH ), 2 ) AS shsyl,
ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam,
ROUND( SUM( v.PACGT ), 2 ) AS xnjpac,
ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt,
ROUND( SUM( v.YSL ), 2 ) AS xssyl,
ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl,
ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl,
ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl,
ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl,
ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl,
ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl
FROM
${dataViewName3} v
LEFT JOIN (
SELECT
LEFT ( v.time, 7 ) AS time,
ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll,
ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll,
count( v.id ) AS scsj
FROM
${dataViewName2} v
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
) v2 ON v2.time = LEFT( v.time, 7 )
LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
</select>
<select
id=
"getHjList"
resultType=
"com.skua.modules.report.vo.JnhbReportDetailsHj"
>
SELECT
RIGHT(LEFT( v.time, 7 ),2) AS time,
v2.sjwscll,
v2.rwscll,
v2.scsj,
ROUND(v2.scsj*f.pro_scale,2) AS wsclnl,
ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl,
ROUND( SUM( v.GFFDL ), 2 ) AS gffdl,
ROUND( SUM( v.QY ), 2 ) AS qy,
ROUND( SUM( v.HXT ), 2 ) AS hxtsyl,
ROUND( SUM( v.SH ), 2 ) AS shsyl,
ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam,
ROUND( SUM( v.PACGT ), 2 ) AS xnjpac,
ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt,
ROUND( SUM( v.YSL ), 2 ) AS xssyl,
ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl,
ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl,
ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl,
ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl,
ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl,
ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl
FROM
${dataViewName3} v
LEFT JOIN (
SELECT
LEFT ( v.time, 7 ) AS time,
ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll,
ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll,
count( v.id ) AS scsj
FROM
${dataViewName2} v
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
) v2 ON v2.time = LEFT( v.time, 7 )
LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id
WHERE
v.time LIKE CONCAT(#{year}, '%')
AND v.depart_id = #{departId}
GROUP BY
LEFT ( v.time, 7 )
</select>
</mapper>
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/service/IFCustomReportDatasetService.java
查看文件 @
82ff0e9
...
...
@@ -6,6 +6,7 @@ import java.util.Map;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.skua.modules.custom.entity.FCustomReportDataset
;
import
com.skua.modules.custom.vo.FCustomReportDatasetVO
;
import
com.skua.modules.report.vo.JnhbReportData
;
/**
* 数据集管理
...
...
@@ -91,4 +92,10 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData
Map
<
String
,
Object
>
getWeekReport
(
String
dataTime
,
String
departId
,
String
week
);
Map
<
String
,
Object
>
reportWeekShow
(
String
dataTime
,
String
week
);
//节能环保统计报表
List
<
JnhbReportData
>
jnhbReportShow
(
String
departId
,
String
month
);
//节能环保统计报表明细
Map
<
String
,
Object
>
jnhbReportDetails
(
String
departId
,
String
month
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/service/impl/FCustomReportDatasetServiceImpl.java
查看文件 @
82ff0e9
...
...
@@ -13,13 +13,20 @@ import java.time.format.DateTimeFormatter;
import
java.time.temporal.TemporalAdjusters
;
import
java.time.temporal.WeekFields
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.skua.modules.report.vo.JnhbReportData
;
import
com.skua.modules.report.vo.JnhbReportDetailsDy
;
import
com.skua.modules.report.vo.JnhbReportDetailsHj
;
import
com.skua.modules.report.vo.JnhbReportDetailsJs
;
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
;
import
javax.annotation.Resource
;
/**
* 数据集管理
*/
...
...
@@ -208,6 +215,35 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
}
@Override
public
List
<
JnhbReportData
>
jnhbReportShow
(
String
departId
,
String
month
)
{
String
start
=
month
.
substring
(
0
,
4
)+
"-01-31"
;
String
end
=
month
+
"-31"
;
String
departIds
=
mapper
.
getChildDepartId
(
departId
);
String
dataViewName2
=
ReportViewUtil
.
buildView
(
"2119ecbf53a1d2d0708258ff67cfd9e1"
,
"CSL"
,
departIds
,
start
,
end
);
String
dataViewName3
=
ReportViewUtil
.
buildView
(
"3a243d5715b9e1a3753c180872ca0df9"
,
"DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL"
,
departIds
,
start
,
end
);
List
<
JnhbReportData
>
list
=
mapper
.
getJnhbReport
(
dataViewName2
,
dataViewName3
,
start
,
end
);
return
list
;
}
@Override
public
Map
<
String
,
Object
>
jnhbReportDetails
(
String
departId
,
String
month
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
JnhbReportDetailsDy
>
dyList
=
new
ArrayList
<>();
List
<
JnhbReportDetailsJs
>
jsList
=
new
ArrayList
<>();
List
<
JnhbReportDetailsHj
>
hjList
=
new
ArrayList
<>();
String
year
=
month
.
substring
(
0
,
4
);
String
dataViewName2
=
ReportViewUtil
.
buildViewLike
(
"2119ecbf53a1d2d0708258ff67cfd9e1"
,
"CSL"
,
departId
,
year
);
String
dataViewName3
=
ReportViewUtil
.
buildViewLike
(
"3a243d5715b9e1a3753c180872ca0df9"
,
""
,
departId
,
year
);
dyList
=
mapper
.
getDyList
(
dataViewName2
,
dataViewName3
,
departId
,
year
);
jsList
=
mapper
.
getJsList
(
dataViewName2
,
dataViewName3
,
departId
,
year
);
hjList
=
mapper
.
getHjList
(
dataViewName2
,
dataViewName3
,
departId
,
year
);
map
.
put
(
"zbtj"
,
dyList
);
map
.
put
(
"zbfx"
,
jsList
);
map
.
put
(
"zblj"
,
hjList
);
return
map
;
}
@Override
public
Map
<
String
,
Object
>
reportWeekShow
(
String
dataTime
,
String
week
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
DepartWeekReportVO
>
list
=
new
ArrayList
<>();
...
...
@@ -231,4 +267,5 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
return
map
;
}
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/controller/ReportDataController.java
查看文件 @
82ff0e9
...
...
@@ -9,6 +9,7 @@ import com.skua.core.util.ConvertUtils;
import
com.skua.core.util.DateUtils
;
import
com.skua.modules.custom.service.IFCustomReportDatasetService
;
import
com.skua.modules.report.service.IReportDataService
;
import
com.skua.modules.report.vo.JnhbReportData
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -166,4 +167,24 @@ public class ReportDataController {
return
result
;
}
@AutoLog
(
value
=
"能源节约与生态环境保护统计表展示"
)
@ApiOperation
(
value
=
"能源节约与生态环境保护统计表展示"
,
notes
=
"能源节约与生态环境保护统计表展示"
)
@GetMapping
(
value
=
"/jnhbReportShow"
)
public
Result
<
List
<
JnhbReportData
>>
jnhbReportShow
(
String
departId
,
String
month
)
{
Result
<
List
<
JnhbReportData
>>
result
=
new
Result
<>();
List
<
JnhbReportData
>
list
=
fCustomReportDatasetService
.
jnhbReportShow
(
departId
,
month
);
result
.
setResult
(
list
);
return
result
;
}
@AutoLog
(
value
=
"能源节约与生态环境保护统计表明细展示"
)
@ApiOperation
(
value
=
"能源节约与生态环境保护统计表明细展示"
,
notes
=
"能源节约与生态环境保护统计表明细展示"
)
@GetMapping
(
value
=
"/jnhbReportDetails"
)
public
Result
<
Map
<
String
,
Object
>>
jnhbReportDetails
(
String
departId
,
String
month
)
{
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<>();
Map
<
String
,
Object
>
map
=
fCustomReportDatasetService
.
jnhbReportDetails
(
departId
,
month
);
result
.
setResult
(
map
);
return
result
;
}
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbReportData.java
0 → 100644
查看文件 @
82ff0e9
package
com
.
skua
.
modules
.
report
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 报表展示
*/
@Data
public
class
JnhbReportData
{
/**所属厂区*/
@ApiModelProperty
(
value
=
"所属厂区"
)
private
String
departId
;
/**厂区名称*/
@ApiModelProperty
(
value
=
"厂区名称"
)
private
String
departName
;
/**污水处理量规模*/
@ApiModelProperty
(
value
=
"污水处理量规模(万吨)"
)
private
String
wsclgm
;
/**实际污水处理量*/
@ApiModelProperty
(
value
=
"实际污水处理量(万吨)"
)
private
String
wssjcll
;
/**系统负荷率*/
@ApiModelProperty
(
value
=
"系统负荷率(%)"
)
private
String
wsfhl
;
/**电耗*/
@ApiModelProperty
(
value
=
"电耗(万千瓦时)"
)
private
String
dh
;
/**光伏发电量(万千瓦时)*/
@ApiModelProperty
(
value
=
"光伏发电量(万千瓦时)"
)
private
String
gffdl
;
/**汽油*/
@ApiModelProperty
(
value
=
"汽油(吨)"
)
private
String
qy
;
/**综合能源消费量*/
@ApiModelProperty
(
value
=
"综合能源消费量(吨标准煤)"
)
private
String
zhnyxhl
;
/**二氧化碳排放量*/
@ApiModelProperty
(
value
=
"二氧化碳排放量(吨CO2当量)"
)
private
String
eyhtpfl
;
/**吨水电耗*/
@ApiModelProperty
(
value
=
"吨水电耗(千瓦时/吨)"
)
private
String
dsdh
;
/**COD消减量*/
@ApiModelProperty
(
value
=
"COD消减量(吨)"
)
private
String
codxjl
;
/**NH3-N消减量*/
@ApiModelProperty
(
value
=
"NH3-N消减量(吨)"
)
private
String
adxjl
;
/**TP消减量*/
@ApiModelProperty
(
value
=
"TP消减量(吨)"
)
private
String
tpxjl
;
/**TN消减量*/
@ApiModelProperty
(
value
=
"TN消减量(吨)"
)
private
String
tnxjl
;
/**一般固废产生量*/
@ApiModelProperty
(
value
=
"一般固废产生量(吨)"
)
private
String
ybgfcsl
;
/**一般固废处置量*/
@ApiModelProperty
(
value
=
"一般固废处置量(吨)"
)
private
String
ybgfczl
;
/**绝干泥量*/
@ApiModelProperty
(
value
=
"绝干泥量(吨)"
)
private
String
jgwnl
;
/**危险废物产生量*/
@ApiModelProperty
(
value
=
"危险废物产生量(吨)"
)
private
String
wfcsl
;
/**危险废物处置量*/
@ApiModelProperty
(
value
=
"危险废物处置量(吨)"
)
private
String
wfczl
;
}
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbReportDetailsDy.java
0 → 100644
查看文件 @
82ff0e9
package
com
.
skua
.
modules
.
report
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 报表展示
*/
@Data
public
class
JnhbReportDetailsDy
{
@ApiModelProperty
(
value
=
"生产时间(天)"
)
private
String
scsj
;
@ApiModelProperty
(
value
=
"日污水处理能力(万吨/天)"
)
private
String
rwscll
;
@ApiModelProperty
(
value
=
"污水处理能力(万吨/月)"
)
private
String
wsclnl
;
@ApiModelProperty
(
value
=
"实际污水处理量(万吨)"
)
private
String
sjwscll
;
@ApiModelProperty
(
value
=
"电力(万千瓦时)"
)
private
String
dl
;
@ApiModelProperty
(
value
=
"光伏发电量(万千瓦时)"
)
private
String
gffdl
;
@ApiModelProperty
(
value
=
"汽油(吨)"
)
private
String
qy
;
@ApiModelProperty
(
value
=
"活性炭使用量(吨)"
)
private
String
hxtsyl
;
@ApiModelProperty
(
value
=
"石灰使用量(吨)"
)
private
String
shsyl
;
@ApiModelProperty
(
value
=
"絮凝剂PAM(按浓度折减后,吨)"
)
private
String
xnjpam
;
@ApiModelProperty
(
value
=
"絮凝剂PAC(按浓度折减后,吨)"
)
private
String
xnjpac
;
@ApiModelProperty
(
value
=
"絮凝剂其他(按浓度折减后,吨)"
)
private
String
xnjqt
;
@ApiModelProperty
(
value
=
"新水使用量(吨)"
)
private
String
xssyl
;
@ApiModelProperty
(
value
=
"一般固废产生量(含水份,吨)"
)
private
String
ybgfcsl
;
@ApiModelProperty
(
value
=
"一般固废处置量(含水份,吨)"
)
private
String
ybgfczl
;
@ApiModelProperty
(
value
=
"污泥含水率(%)"
)
private
String
wnhsl
;
@ApiModelProperty
(
value
=
"绝干泥量(吨)"
)
private
String
jgnl
;
@ApiModelProperty
(
value
=
"危险废物产生量(吨)"
)
private
String
wxfwcsl
;
@ApiModelProperty
(
value
=
"危险废物处置量(吨)"
)
private
String
wxfwczl
;
@ApiModelProperty
(
value
=
"进水COD量(吨)"
)
private
String
jscodl
;
@ApiModelProperty
(
value
=
"出水COD量(吨)"
)
private
String
cscodl
;
@ApiModelProperty
(
value
=
"进水NH3-N量(吨)"
)
private
String
jsadl
;
@ApiModelProperty
(
value
=
"出水NH3-N量(吨)"
)
private
String
csadl
;
@ApiModelProperty
(
value
=
"进水TP量(吨)"
)
private
String
jstpl
;
@ApiModelProperty
(
value
=
"出水TP量(吨)"
)
private
String
cstpl
;
@ApiModelProperty
(
value
=
"进水TN量(吨)"
)
private
String
jstnl
;
@ApiModelProperty
(
value
=
"出水TN量(吨)"
)
private
String
cstnl
;
}
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbReportDetailsHj.java
0 → 100644
查看文件 @
82ff0e9
package
com
.
skua
.
modules
.
report
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 报表展示
*/
@Data
public
class
JnhbReportDetailsHj
{
@ApiModelProperty
(
value
=
"污水处理设计能力(万吨/月)"
)
private
String
wsclsjnl
;
@ApiModelProperty
(
value
=
"实际污水处理量(万吨)"
)
private
String
scsj
;
@ApiModelProperty
(
value
=
"电力(万千瓦时)"
)
private
String
dl
;
@ApiModelProperty
(
value
=
"光伏发电量(万千瓦时)"
)
private
String
gffdl
;
@ApiModelProperty
(
value
=
"汽油(吨)"
)
private
String
qy
;
@ApiModelProperty
(
value
=
"活性炭使用量(吨)"
)
private
String
hxtsyl
;
@ApiModelProperty
(
value
=
"石灰使用量(吨)"
)
private
String
shsyl
;
@ApiModelProperty
(
value
=
"絮凝剂PAM(按浓度折减后,吨)"
)
private
String
xnjpam
;
@ApiModelProperty
(
value
=
"絮凝剂PAC(按浓度折减后,吨)"
)
private
String
xnjpac
;
@ApiModelProperty
(
value
=
"絮凝剂其他(按浓度折减后,吨)"
)
private
String
xnjqt
;
@ApiModelProperty
(
value
=
"絮凝剂合计(吨)"
)
private
String
xnjhj
;
@ApiModelProperty
(
value
=
"新水使用量(吨)"
)
private
String
xssyl
;
@ApiModelProperty
(
value
=
"绝干泥量(吨)"
)
private
String
jgnl
;
@ApiModelProperty
(
value
=
"危险废物产生量(吨)"
)
private
String
wxfwcsl
;
@ApiModelProperty
(
value
=
"危险废物处置量(吨)"
)
private
String
wxfwczl
;
@ApiModelProperty
(
value
=
"综合能源消费量(吨标准煤)"
)
private
String
zhnyxfl
;
@ApiModelProperty
(
value
=
"二氧化碳排放量(吨二氧化碳当量)"
)
private
String
eyhtpfl
;
@ApiModelProperty
(
value
=
"一般固废产生量(含水份,吨)"
)
private
String
ybgfcsl
;
@ApiModelProperty
(
value
=
"一般固废处置量(含水份,吨)"
)
private
String
ybgfczl
;
@ApiModelProperty
(
value
=
"COD消减量(吨)"
)
private
String
codxjl
;
@ApiModelProperty
(
value
=
"NH3-N消减量(吨)"
)
private
String
adxjl
;
@ApiModelProperty
(
value
=
"TP消减量(吨)"
)
private
String
tpxjl
;
@ApiModelProperty
(
value
=
"TN消减量(吨)"
)
private
String
tnxjl
;
}
sk-module-datafill/src/main/java/com/skua/modules/report/vo/JnhbReportDetailsJs.java
0 → 100644
查看文件 @
82ff0e9
package
com
.
skua
.
modules
.
report
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 报表展示
*/
@Data
public
class
JnhbReportDetailsJs
{
@ApiModelProperty
(
value
=
"月污水处理量环比"
)
private
String
ywscllhb
;
@ApiModelProperty
(
value
=
"日均污水处理量环比"
)
private
String
rjwscllhb
;
@ApiModelProperty
(
value
=
"日均电耗环比"
)
private
String
rjdhhb
;
@ApiModelProperty
(
value
=
"吨水电耗环比"
)
private
String
dsdhhb
;
@ApiModelProperty
(
value
=
"综合能源消费量(吨标准煤)"
)
private
String
zhnyxfl
;
@ApiModelProperty
(
value
=
"二氧化碳排放量(吨二氧化碳当量)"
)
private
String
eyhtpfl
;
@ApiModelProperty
(
value
=
"系统负荷率(%)"
)
private
String
wsfhl
;
@ApiModelProperty
(
value
=
"吨COD消减能耗(吨标准煤/COD吨)"
)
private
String
dcodxjnh
;
@ApiModelProperty
(
value
=
"吨NH3-N消减能耗(吨标准煤/NH3-N吨)"
)
private
String
dadxjnh
;
@ApiModelProperty
(
value
=
"吨TP消减能耗(吨标准煤/TP吨)"
)
private
String
dtpxjnh
;
@ApiModelProperty
(
value
=
"吨TN消减能耗(吨标准煤/TP吨)"
)
private
String
dtnxjnh
;
@ApiModelProperty
(
value
=
"吨水电耗(千瓦时/吨)"
)
private
String
dsdh
;
@ApiModelProperty
(
value
=
"万吨水综合能耗(吨标准煤/万吨)"
)
private
String
wdszhnh
;
@ApiModelProperty
(
value
=
"万吨水CO2排放(吨二氧化碳当量/万吨)"
)
private
String
wdseyhtpf
;
@ApiModelProperty
(
value
=
"一般固废处置率(%)"
)
private
String
ybgfcsl
;
@ApiModelProperty
(
value
=
"危废处置率(%)"
)
private
String
wfczl
;
@ApiModelProperty
(
value
=
"万吨水固废产生量(吨/万吨水)"
)
private
String
wdsgfcsl
;
@ApiModelProperty
(
value
=
"万吨水污泥产生量(吨/万吨水)"
)
private
String
wdswncsl
;
@ApiModelProperty
(
value
=
"COD消减量(吨)"
)
private
String
codxjl
;
@ApiModelProperty
(
value
=
"NH3-N消减量(吨)"
)
private
String
adxjl
;
@ApiModelProperty
(
value
=
"TP消减量(吨)"
)
private
String
tpxjl
;
@ApiModelProperty
(
value
=
"TN消减量(吨)"
)
private
String
tnxjl
;
}
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryInfoController.java
查看文件 @
82ff0e9
...
...
@@ -787,4 +787,22 @@ public class SysFactoryInfoController {
return
result
;
}
@AutoLog
(
value
=
"获取厂区进出水标准"
)
@ApiOperation
(
value
=
"获取厂区进出水标准"
,
notes
=
"获取厂区进出水标准"
)
@GetMapping
(
value
=
"/queryLevel"
)
public
Result
<
Map
<
String
,
Object
>>
queryLevel
(
String
departId
)
{
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
SysFactoryInfo
sysFactoryInfo
=
sysFactoryInfoService
.
queryInfoByDeaprtId
(
departId
);
if
(
sysFactoryInfo
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
map
=
sysFactoryInfoService
.
queryLevel
(
sysFactoryInfo
.
getInLevel
(),
sysFactoryInfo
.
getOutLevel
());
result
.
setResult
(
map
);
result
.
setSuccess
(
true
);
}
return
result
;
}
}
...
...
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryUserInfoController.java
查看文件 @
82ff0e9
...
...
@@ -112,7 +112,7 @@ public class SysFactoryUserInfoController {
if
(
list
.
size
()>
0
){
map
.
put
(
"total"
,
list
.
size
());
for
(
SysFactoryUserInfo
factoryUserInfo
:
list
)
{
if
(
"
1
"
.
equals
(
factoryUserInfo
.
getSex
())){
if
(
"
2
"
.
equals
(
factoryUserInfo
.
getSex
())){
female
++;
}
else
{
male
++;
...
...
sk-module-system/src/main/java/com/skua/modules/system/service/ISysFactoryInfoService.java
查看文件 @
82ff0e9
...
...
@@ -70,7 +70,7 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> {
* @return
*/
List
<
SysFactoryTreeVO
>
queryFactoryTreeListForVideo
();
List
<
SysFactoryTreeVO
>
queryFactoryTreeListForCustom
();
/**
* <pre>
...
...
@@ -108,5 +108,11 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> {
*/
public
String
querySumProScale
();
/**
* 获取进出水标准
* @param inLevel
* @param outLevel
* @return
*/
Map
<
String
,
Object
>
queryLevel
(
String
inLevel
,
String
outLevel
);
}
...
...
sk-module-system/src/main/java/com/skua/modules/system/service/impl/SysFactoryInfoServiceImpl.java
查看文件 @
82ff0e9
...
...
@@ -14,6 +14,7 @@ import com.skua.core.excel.CustomExcelUtil.FieldType;
import
com.skua.core.excel.entity.HeadEntity
;
import
com.skua.core.excel.entity.SheetEntity
;
import
com.skua.modules.alarmtmp.entity.*
;
import
com.skua.modules.alarmtmp.service.AlarmParamStandardConfigService
;
import
com.skua.modules.alarmtmp.service.AlarmRuleConfigService
;
import
com.skua.modules.alarmtmp.service.AlarmRuleLevelConfigService
;
import
com.skua.modules.alarmtmp.service.IAlarmRuleLevelConfigTemplateService
;
...
...
@@ -63,6 +64,8 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper,
private
AlarmRuleLevelConfigService
alarmRuleLevelConfigService
;
@Autowired
private
AlarmRuleConfigService
alarmRuleConfigService
;
@Autowired
private
AlarmParamStandardConfigService
alarmParamStandardConfigService
;
@Override
public
SysFactoryInfoVO
getByDepartId
(
String
departId
)
{
SysFactoryInfoVO
sysFactoryInfo
=
new
SysFactoryInfoVO
();
...
...
@@ -673,4 +676,18 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper,
public
String
querySumProScale
(){
return
sysFactoryInfoMapper
.
querySumProScale
();
}
@Override
public
Map
<
String
,
Object
>
queryLevel
(
String
inLevel
,
String
outLevel
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
QueryWrapper
<
AlarmParamStandardConfig
>
inQueryWrapper
=
new
QueryWrapper
<>();
inQueryWrapper
.
eq
(
"del_flag"
,
1
).
eq
(
"alarm_level_standard_id"
,
inLevel
);
List
<
AlarmParamStandardConfig
>
inList
=
alarmParamStandardConfigService
.
list
(
inQueryWrapper
);
QueryWrapper
<
AlarmParamStandardConfig
>
outQueryWrapper
=
new
QueryWrapper
<>();
outQueryWrapper
.
eq
(
"del_flag"
,
1
).
eq
(
"alarm_level_standard_id"
,
outLevel
);
List
<
AlarmParamStandardConfig
>
outList
=
alarmParamStandardConfigService
.
list
(
outQueryWrapper
);
map
.
put
(
"in"
,
inList
);
map
.
put
(
"out"
,
outList
);
return
map
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论