Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
5e864231
由
张雷
编写于
2024-11-18 16:00:52 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
大屏组件接口修改
1 个父辈
978f1a06
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
459 行增加
和
6 行删除
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/controller/FactoryCenterController.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/FactoryCenterMapper.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/FactoryCenterMapper.xml
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/IFactoryCenterService.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/FactoryCenterServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/report/entity/ReportTargetConfig.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/controller/FactoryCenterController.java
查看文件 @
5e86423
...
...
@@ -66,6 +66,16 @@ public class FactoryCenterController {
return
result
;
}
@ApiOperation
(
value
=
"厂区驾驶舱耗电量分析"
,
notes
=
"厂区驾驶舱耗电量分析"
)
@GetMapping
(
value
=
"/getDhData"
)
public
Result
<
Map
<
String
,
Object
>>
getDhData
(
StatisticsParam
statisticsParam
)
{
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
factoryCenterService
.
getDhData
(
statisticsParam
);
result
.
setSuccess
(
true
);
result
.
setResult
(
map
);
return
result
;
}
//污水处理水量统计
@ApiOperation
(
value
=
"厂区驾驶舱污水处理水量统计"
,
notes
=
"厂区驾驶舱污水处理水量统计"
)
@GetMapping
(
value
=
"/getWssltj"
)
...
...
@@ -77,6 +87,26 @@ public class FactoryCenterController {
return
result
;
}
@ApiOperation
(
value
=
"厂区驾驶舱处理水量分析"
,
notes
=
"厂区驾驶舱处理水量分析"
)
@GetMapping
(
value
=
"/getSlData"
)
public
Result
<
Map
<
String
,
Object
>>
getSlData
(
StatisticsParam
statisticsParam
)
{
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
factoryCenterService
.
getSlData
(
statisticsParam
);
result
.
setSuccess
(
true
);
result
.
setResult
(
map
);
return
result
;
}
@ApiOperation
(
value
=
"厂区驾驶舱污水电耗统计"
,
notes
=
"厂区驾驶舱污水电耗统计"
)
@GetMapping
(
value
=
"/getWsDhTj"
)
public
Result
<
Map
<
String
,
Object
>>
getWsDhTj
(
StatisticsParam
statisticsParam
)
{
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
factoryCenterService
.
getWsDhTj
(
statisticsParam
);
result
.
setSuccess
(
true
);
result
.
setResult
(
map
);
return
result
;
}
//厂区驾驶舱药耗统计
@ApiOperation
(
value
=
"厂区驾驶舱药耗统计"
,
notes
=
"厂区驾驶舱药耗统计"
)
@GetMapping
(
value
=
"/getYhtj"
)
...
...
@@ -88,6 +118,17 @@ public class FactoryCenterController {
return
result
;
}
//厂区驾驶舱药耗分析
@ApiOperation
(
value
=
"厂区驾驶舱药耗分析"
,
notes
=
"厂区驾驶舱药耗分析"
)
@GetMapping
(
value
=
"/getYhData"
)
public
Result
<
Map
<
String
,
Object
>>
getYhData
(
StatisticsParam
statisticsParam
)
{
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
factoryCenterService
.
getYhData
(
statisticsParam
);
result
.
setSuccess
(
true
);
result
.
setResult
(
map
);
return
result
;
}
//厂区削减量统计
@ApiOperation
(
value
=
"厂区削减量统计"
,
notes
=
"厂区削减量统计"
)
@GetMapping
(
value
=
"/getXjltj"
)
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/FactoryCenterMapper.java
查看文件 @
5e86423
...
...
@@ -36,4 +36,19 @@ public interface FactoryCenterMapper {
@Param
(
"departId"
)
String
departId
,
@Param
(
"view2119"
)
String
view2119
);
List
<
Map
<
String
,
Object
>>
getEquiptj
(
@Param
(
"departId"
)
String
departId
);
Map
<
String
,
Object
>
getYhData
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"departId"
)
String
departId
,
@Param
(
"dataView3a24"
)
String
dataView3a24
,
@Param
(
"dataView2119"
)
String
dataView2119
);
Map
<
String
,
Object
>
getDhData
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"departId"
)
String
departId
,
@Param
(
"dataView3a24"
)
String
dataView3a24
,
@Param
(
"dataView2119"
)
String
dataView2119
);
Map
<
String
,
Object
>
getSlData
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"departId"
)
String
departId
,
@Param
(
"dataView2119"
)
String
dataView2119
);
List
<
Map
<
String
,
Object
>>
getDsdhListGroupByDepart
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"departId"
)
String
departId
,
@Param
(
"dataView3a24"
)
String
dataView3a24
,
@Param
(
"dataView2119"
)
String
dataView2119
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/FactoryCenterMapper.xml
查看文件 @
5e86423
...
...
@@ -6,13 +6,16 @@
SELECT
LEFT ( v.time, 7 ) AS time,
round( sum( v.CSL ) / 10000, 2 ) AS clsl,
ifnull(v2.clsl,0) as clsl_tb
ifnull(v2.clsl,0) as clsl_tb,
round( sum( v.JSL ) / 10000, 2 ) AS jsl,
ifnull(v2.jsl,0) as jsl_tb
FROM
${view2119} v
left join (
SELECT
RIGHT( LEFT ( v2119.time, 7 ), 2 ) AS time,
round( sum( v2119.CSL ) / 10000, 2 ) AS clsl
round( sum( v2119.CSL ) / 10000, 2 ) AS clsl,
round( sum( v2119.JSL ) / 10000, 2 ) AS jsl
FROM
${view2119tb} v2119
WHERE
...
...
@@ -293,4 +296,110 @@
</foreach>
</if>
</select>
<select
id=
"getYhData"
resultType=
"java.util.HashMap"
>
select
v3.zyh,v3.rjyh,ROUND(v3.zyh/v2.clsl,2) AS dsyh
from (select ROUND(SUM(v.CSL),2) as clsl,'yh' as type from ${dataView2119} v
where time
>
= #{startDate} and time
<
= #{endDate}
<if
test=
"departId!=null and departId!=''"
>
AND v.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
) v2
left join (select ROUND(SUM(IFNULL(v.PAMRJ,0)+IFNULL(v.SCLPAMZ,0)+IFNULL(v.SCLPAMF,0)+IFNULL(v.NACLO,0)+IFNULL(v.PACGT,0)+IFNULL(v.PACYT,0)+
IFNULL(v.PFS,0)+IFNULL(v.FHTY,0)+IFNULL(v.RYXNJ,0)+IFNULL(v.YWL,0)+IFNULL(v.GXCLJ,0)+IFNULL(v.CH3COONA,0)+IFNULL(v.HXT,0)+IFNULL(v.FECL3,0)+
IFNULL(v.SH,0)+IFNULL(v.CH3COOH,0)+IFNULL(v.FESO4G,0)+IFNULL(v.FESO4Y,0)+IFNULL(v.H2O2,0)),2) AS zyh,ROUND(AVG(IFNULL(v.PAMRJ,0)+
IFNULL(v.SCLPAMZ,0)+IFNULL(v.SCLPAMF,0)+IFNULL(v.NACLO,0)+IFNULL(v.PACGT,0)+IFNULL(v.PACYT,0)+IFNULL(v.PFS,0)+IFNULL(v.FHTY,0)+
IFNULL(v.RYXNJ,0)+IFNULL(v.YWL,0)+IFNULL(v.GXCLJ,0)+IFNULL(v.CH3COONA,0)+IFNULL(v.HXT,0)+IFNULL(v.FECL3,0)+IFNULL(v.SH,0)+IFNULL(v.CH3COOH,0)+
IFNULL(v.FESO4G,0)+IFNULL(v.FESO4Y,0)+IFNULL(v.H2O2,0)),2) AS rjyh,'yh' as type from ${dataView3a24} v
where v.time
>
= #{startDate} and v.time
<
= #{endDate}
<if
test=
"departId!=null and departId!=''"
>
AND v.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
) v3 ON v2.type = v3.type
</select>
<select
id=
"getDhData"
resultType=
"java.util.HashMap"
>
select
v3.zdh,v3.rjdh,ROUND(v3.zdh/v2.clsl,2) AS dsdh
from (select ROUND(SUM(v.CSL),2) as clsl,'dh' as type from ${dataView2119} v
where time
>
= #{startDate} and time
<
= #{endDate}
<if
test=
"departId!=null and departId!=''"
>
AND v.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
) v2
left join (select ROUND(SUM(IFNULL(v.DLHJ,0)),2) AS zdh,
ROUND(AVG(IFNULL(v.DLHJ,0)),2) AS rjdh,'dh' as type from ${dataView3a24} v
where v.time
>
= #{startDate} and v.time
<
= #{endDate}
<if
test=
"departId!=null and departId!=''"
>
AND v.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
) v3 ON v2.type = v3.type
</select>
<select
id=
"getSlData"
resultType=
"java.util.HashMap"
>
select
f.sjgm,
v2.clsl,
v2.rjclsl
from (select ROUND(SUM(pro_scale),2) AS sjgm,'sl' AS type from sys_factory_info
<if
test=
"departId!=null and departId!=''"
>
WHERE depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
) f
left join (
select
ROUND(SUM(v.CSL)/10000,2) as clsl,
ROUND(AVG(v.CSL)/10000,2) as rjclsl,
'sl' AS type
from ${dataView2119} v
where v.time
>
= #{startDate} and v.time
<
= #{endDate}
<if
test=
"departId!=null and departId!=''"
>
AND v.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
) v2 ON f.type = v2.type
</select>
<select
id=
"getDsdhListGroupByDepart"
resultType=
"java.util.HashMap"
>
select
d.id AS depart_id,
IFNULL(ROUND(IFNULL(v3.dlhj,0)/IFNULL(v2.clsl,2),2),0) AS dsdh
from sys_depart d
left join (
select SUM(v.DLHJ) AS dlhj,v.depart_id from ${dataView3a24} v
where v.time
>
= #{startDate} and v.time
<
= #{endDate}
<if
test=
"departId!=null and departId!=''"
>
AND v.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
GROUP BY v.depart_id
) v3 on d.id = v3.depart_id
left join (
select SUM(v.CSL) AS clsl,v.depart_id from ${dataView2119} v
where v.time
>
= #{startDate} and v.time
<
= #{endDate}
<if
test=
"departId!=null and departId!=''"
>
AND v.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
GROUP BY v.depart_id
) v2 on d.id = v2.depart_id
where depart_type = '1'
</select>
</mapper>
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/IFactoryCenterService.java
查看文件 @
5e86423
...
...
@@ -32,5 +32,13 @@ public interface IFactoryCenterService {
List
<
Map
<
String
,
Object
>>
getSzXjltj
(
StatisticsParam
statisticsParam
);
List
<
Map
<
String
,
Object
>>
getEquiptj
(
StatisticsParam
statisticsParam
);
Map
<
String
,
Object
>
getYhData
(
StatisticsParam
statisticsParam
);
Map
<
String
,
Object
>
getDhData
(
StatisticsParam
statisticsParam
);
Map
<
String
,
Object
>
getSlData
(
StatisticsParam
statisticsParam
);
Map
<
String
,
Object
>
getWsDhTj
(
StatisticsParam
statisticsParam
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/FactoryCenterServiceImpl.java
查看文件 @
5e86423
...
...
@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.YearMonth
;
...
...
@@ -41,6 +42,8 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
@Autowired
private
ISysMonitorMetricInfoService
sysMonitorMetricInfoService
;
private
static
DecimalFormat
df
=
new
DecimalFormat
(
"#.##"
);
@Override
public
List
<
WaterQualityMonitoringDetailVO
>
queryMonitoringData
(
String
departId
)
{
List
<
WaterQualityMonitoringDetailVO
>
list
=
new
ArrayList
<>();
...
...
@@ -404,8 +407,8 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
String
endDate
=
statisticsParam
.
getEndDate
();
String
startDateTb
=
DateUtils
.
getTbDate
(
startDate
);
String
endDateTb
=
DateUtils
.
getTbDate
(
endDate
);
String
dataView2119
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
String
dataView2119tb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDateTb
,
endDateTb
);
String
dataView2119
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"
JSL,
CSL"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
String
dataView2119tb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"
JSL,
CSL"
,
statisticsParam
.
getDepartId
(),
startDateTb
,
endDateTb
);
list
=
factoryCenterMapper
.
getWssltj
(
startDate
,
endDate
,
startDateTb
,
endDateTb
,
statisticsParam
.
getDepartId
(),
dataView2119
,
dataView2119tb
);
if
(
list
.
size
()
==
0
){
List
<
String
>
monthList
=
getMonthsBetween
(
startDate
,
endDate
);
...
...
@@ -414,6 +417,8 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
map
.
put
(
"time"
,
month
);
map
.
put
(
"clsl"
,
"0"
);
map
.
put
(
"clsl_tb"
,
"0"
);
map
.
put
(
"jsl"
,
"0"
);
map
.
put
(
"jsl_tb"
,
"0"
);
list
.
add
(
map
);
}
}
...
...
@@ -642,6 +647,197 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
return
list
;
}
@Override
public
Map
<
String
,
Object
>
getYhData
(
StatisticsParam
statisticsParam
)
{
Map
<
String
,
Object
>
resMap
=
new
HashMap
<>();
double
zyh
=
0.00
;
double
zyhTb
=
0.00
;
double
zyhHb
=
0.00
;
double
rjyh
=
0.00
;
double
rjyhTb
=
0.00
;
double
rjyhHb
=
0.00
;
double
dsyh
=
0.00
;
double
dsyhTb
=
0.00
;
double
dsyhHb
=
0.00
;
String
startDate
=
statisticsParam
.
getStartDate
();
String
endDate
=
statisticsParam
.
getEndDate
();
String
startDateTb
=
DateUtils
.
getTbDate
(
startDate
);
String
endDateTb
=
DateUtils
.
getTbDate
(
endDate
);
String
startDateHb
=
DateUtils
.
getHbDate
(
startDate
);
String
endDateHb
=
DateUtils
.
getHbDate
(
endDate
);
String
yjField
=
"PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ,YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"
;
String
dataView3a24
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
yjField
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
String
dataView2119
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
String
dataView3a24tb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
yjField
,
statisticsParam
.
getDepartId
(),
startDateTb
,
endDateTb
);
String
dataView2119tb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDateTb
,
endDateTb
);
String
dataView3a24hb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
yjField
,
statisticsParam
.
getDepartId
(),
startDateHb
,
endDateHb
);
String
dataView2119hb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDateHb
,
endDateHb
);
Map
<
String
,
Object
>
map
=
factoryCenterMapper
.
getYhData
(
startDate
,
endDate
,
statisticsParam
.
getDepartId
(),
dataView3a24
,
dataView2119
);
if
(
map
!=
null
){
zyh
=
Double
.
parseDouble
(
map
.
get
(
"zyh"
).
toString
());
rjyh
=
Double
.
parseDouble
(
map
.
get
(
"rjyh"
).
toString
());
dsyh
=
Double
.
parseDouble
(
map
.
get
(
"dsyh"
).
toString
());
}
resMap
.
put
(
"zyh"
,
zyh
);
resMap
.
put
(
"rjyh"
,
rjyh
);
resMap
.
put
(
"dsyh"
,
dsyh
);
Map
<
String
,
Object
>
maptb
=
factoryCenterMapper
.
getYhData
(
startDateTb
,
endDateTb
,
statisticsParam
.
getDepartId
(),
dataView3a24tb
,
dataView2119tb
);
if
(
maptb
!=
null
){
zyhTb
=
Double
.
parseDouble
(
maptb
.
get
(
"zyh"
).
toString
());
rjyhTb
=
Double
.
parseDouble
(
maptb
.
get
(
"rjyh"
).
toString
());
dsyhTb
=
Double
.
parseDouble
(
maptb
.
get
(
"dsyh"
).
toString
());
zyhTb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
zyh
-
zyhTb
)/
zyhTb
));
rjyhTb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
rjyh
-
rjyhTb
)/
rjyhTb
));
dsyhTb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
dsyh
-
dsyhTb
)/
dsyhTb
));
}
resMap
.
put
(
"zyh_tb"
,
zyhTb
);
resMap
.
put
(
"rjyh_tb"
,
rjyhTb
);
resMap
.
put
(
"dsyh_tb"
,
dsyhTb
);
Map
<
String
,
Object
>
maphb
=
factoryCenterMapper
.
getYhData
(
startDateHb
,
endDateHb
,
statisticsParam
.
getDepartId
(),
dataView3a24hb
,
dataView2119hb
);
if
(
maphb
!=
null
){
zyhHb
=
Double
.
parseDouble
(
maphb
.
get
(
"zyh"
).
toString
());
rjyhHb
=
Double
.
parseDouble
(
maphb
.
get
(
"rjyh"
).
toString
());
dsyhHb
=
Double
.
parseDouble
(
maphb
.
get
(
"dsyh"
).
toString
());
zyhHb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
zyh
-
zyhHb
)/
zyhHb
));
rjyhHb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
rjyh
-
rjyhHb
)/
rjyhHb
));
dsyhHb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
dsyh
-
dsyhHb
)/
dsyhHb
));
}
resMap
.
put
(
"zyh_hb"
,
zyhHb
);
resMap
.
put
(
"rjyh_hb"
,
rjyhHb
);
resMap
.
put
(
"dsyh_hb"
,
dsyhHb
);
return
resMap
;
}
@Override
public
Map
<
String
,
Object
>
getDhData
(
StatisticsParam
statisticsParam
)
{
Map
<
String
,
Object
>
resMap
=
new
HashMap
<>();
double
zdh
=
0.00
;
double
zdhTb
=
0.00
;
double
zdhHb
=
0.00
;
double
rjdh
=
0.00
;
double
rjdhTb
=
0.00
;
double
rjdhHb
=
0.00
;
double
dsdh
=
0.00
;
double
dsdhTb
=
0.00
;
double
dsdhHb
=
0.00
;
String
startDate
=
statisticsParam
.
getStartDate
();
String
endDate
=
statisticsParam
.
getEndDate
();
String
startDateTb
=
DateUtils
.
getTbDate
(
startDate
);
String
endDateTb
=
DateUtils
.
getTbDate
(
endDate
);
String
startDateHb
=
DateUtils
.
getHbDate
(
startDate
);
String
endDateHb
=
DateUtils
.
getHbDate
(
endDate
);
String
dataView3a24
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
"DLHJ"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
String
dataView2119
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
String
dataView3a24tb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
"DLHJ"
,
statisticsParam
.
getDepartId
(),
startDateTb
,
endDateTb
);
String
dataView2119tb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDateTb
,
endDateTb
);
String
dataView3a24hb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
"DLHJ"
,
statisticsParam
.
getDepartId
(),
startDateHb
,
endDateHb
);
String
dataView2119hb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDateHb
,
endDateHb
);
Map
<
String
,
Object
>
map
=
factoryCenterMapper
.
getDhData
(
startDate
,
endDate
,
statisticsParam
.
getDepartId
(),
dataView3a24
,
dataView2119
);
if
(
map
!=
null
){
zdh
=
Double
.
parseDouble
(
map
.
get
(
"zdh"
).
toString
());
rjdh
=
Double
.
parseDouble
(
map
.
get
(
"rjdh"
).
toString
());
dsdh
=
Double
.
parseDouble
(
map
.
get
(
"dsdh"
).
toString
());
}
resMap
.
put
(
"zdh"
,
zdh
);
resMap
.
put
(
"rjdh"
,
rjdh
);
resMap
.
put
(
"dsdh"
,
dsdh
);
Map
<
String
,
Object
>
maptb
=
factoryCenterMapper
.
getDhData
(
startDateTb
,
endDateTb
,
statisticsParam
.
getDepartId
(),
dataView3a24tb
,
dataView2119tb
);
if
(
maptb
!=
null
){
zdhTb
=
Double
.
parseDouble
(
maptb
.
get
(
"zdh"
).
toString
());
rjdhTb
=
Double
.
parseDouble
(
maptb
.
get
(
"rjdh"
).
toString
());
dsdhTb
=
Double
.
parseDouble
(
maptb
.
get
(
"dsdh"
).
toString
());
zdhTb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
zdh
-
zdhTb
)/
zdhTb
));
rjdhTb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
rjdh
-
rjdhTb
)/
rjdhTb
));
dsdhTb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
dsdh
-
dsdhTb
)/
dsdhTb
));
}
resMap
.
put
(
"zdh_tb"
,
zdhTb
);
resMap
.
put
(
"rjdh_tb"
,
rjdhTb
);
resMap
.
put
(
"dsdh_tb"
,
dsdhTb
);
Map
<
String
,
Object
>
maphb
=
factoryCenterMapper
.
getDhData
(
startDateHb
,
endDateHb
,
statisticsParam
.
getDepartId
(),
dataView3a24hb
,
dataView2119hb
);
if
(
maphb
!=
null
){
zdhHb
=
Double
.
parseDouble
(
maphb
.
get
(
"zdh"
).
toString
());
rjdhHb
=
Double
.
parseDouble
(
maphb
.
get
(
"rjdh"
).
toString
());
dsdhHb
=
Double
.
parseDouble
(
maphb
.
get
(
"dsdh"
).
toString
());
zdhHb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
zdh
-
zdhHb
)/
zdhHb
));
rjdhHb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
rjdh
-
rjdhHb
)/
rjdhHb
));
dsdhHb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
dsdh
-
dsdhHb
)/
dsdhHb
));
}
resMap
.
put
(
"zdh_hb"
,
zdhHb
);
resMap
.
put
(
"rjdh_hb"
,
rjdhHb
);
resMap
.
put
(
"dsdh_hb"
,
dsdhHb
);
return
resMap
;
}
@Override
public
Map
<
String
,
Object
>
getSlData
(
StatisticsParam
statisticsParam
)
{
Map
<
String
,
Object
>
resMap
=
new
HashMap
<>();
double
clsl
=
0.00
;
double
clslTb
=
0.00
;
double
clslHb
=
0.00
;
double
rjclsl
=
0.00
;
double
rjclslTb
=
0.00
;
double
rjclslHb
=
0.00
;
double
sjgm
=
0.00
;
double
sjgmTb
=
0.00
;
double
sjgmHb
=
0.00
;
String
startDate
=
statisticsParam
.
getStartDate
();
String
endDate
=
statisticsParam
.
getEndDate
();
String
startDateTb
=
DateUtils
.
getTbDate
(
startDate
);
String
endDateTb
=
DateUtils
.
getTbDate
(
endDate
);
String
startDateHb
=
DateUtils
.
getHbDate
(
startDate
);
String
endDateHb
=
DateUtils
.
getHbDate
(
endDate
);
String
dataView2119
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
String
dataView2119tb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDateTb
,
endDateTb
);
String
dataView2119hb
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDateHb
,
endDateHb
);
Map
<
String
,
Object
>
map
=
factoryCenterMapper
.
getSlData
(
startDate
,
endDate
,
statisticsParam
.
getDepartId
(),
dataView2119
);
if
(
map
!=
null
){
clsl
=
Double
.
parseDouble
(
map
.
get
(
"clsl"
).
toString
());
rjclsl
=
Double
.
parseDouble
(
map
.
get
(
"rjclsl"
).
toString
());
sjgm
=
Double
.
parseDouble
(
map
.
get
(
"sjgm"
).
toString
());
}
resMap
.
put
(
"clsl"
,
clsl
);
resMap
.
put
(
"rjclsl"
,
rjclsl
);
resMap
.
put
(
"sjgm"
,
sjgm
);
Map
<
String
,
Object
>
maptb
=
factoryCenterMapper
.
getSlData
(
startDateTb
,
endDateTb
,
statisticsParam
.
getDepartId
(),
dataView2119tb
);
if
(
maptb
!=
null
){
clslTb
=
Double
.
parseDouble
(
maptb
.
get
(
"clsl"
).
toString
());
rjclslTb
=
Double
.
parseDouble
(
maptb
.
get
(
"rjclsl"
).
toString
());
clslTb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
clsl
-
clslTb
)/
clslTb
));
rjclslTb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
rjclsl
-
rjclslTb
)/
rjclslTb
));
}
resMap
.
put
(
"clsl_tb"
,
clslTb
);
resMap
.
put
(
"rjclsl_tb"
,
rjclslTb
);
resMap
.
put
(
"sjgm_tb"
,
sjgmTb
);
Map
<
String
,
Object
>
maphb
=
factoryCenterMapper
.
getSlData
(
startDateHb
,
endDateHb
,
statisticsParam
.
getDepartId
(),
dataView2119hb
);
if
(
maphb
!=
null
){
clslHb
=
Double
.
parseDouble
(
maphb
.
get
(
"clsl"
).
toString
());
rjclslHb
=
Double
.
parseDouble
(
maphb
.
get
(
"rjclsl"
).
toString
());
clslHb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
clsl
-
clslHb
)/
clslHb
));
rjclslHb
=
Double
.
parseDouble
(
df
.
format
(
100
*(
rjclsl
-
rjclslHb
)/
rjclslHb
));
}
resMap
.
put
(
"clsl_hb"
,
clslHb
);
resMap
.
put
(
"rjclsl_hb"
,
rjclslHb
);
resMap
.
put
(
"sjgm_hb"
,
sjgmHb
);
return
resMap
;
}
@Override
public
Map
<
String
,
Object
>
getWsDhTj
(
StatisticsParam
statisticsParam
)
{
Map
<
String
,
Object
>
resMap
=
new
HashMap
<>();
int
low
=
0
;
int
normal
=
0
;
int
up
=
0
;
int
upper
=
0
;
String
startDate
=
statisticsParam
.
getStartDate
();
String
endDate
=
statisticsParam
.
getEndDate
();
String
dataView3a24
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view3a24
,
"DLHJ"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
String
dataView2119
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view2119
,
"CSL"
,
statisticsParam
.
getDepartId
(),
startDate
,
endDate
);
List
<
Map
<
String
,
Object
>>
list
=
factoryCenterMapper
.
getDsdhListGroupByDepart
(
startDate
,
endDate
,
statisticsParam
.
getDepartId
(),
dataView3a24
,
dataView2119
);
resMap
=
getDhData
(
statisticsParam
);
if
(
list
.
size
()>
0
){
for
(
Map
<
String
,
Object
>
dsdhMap
:
list
)
{
if
(
dsdhMap
.
get
(
"dsdh"
)!=
null
){
double
dsdh
=
Double
.
parseDouble
(
dsdhMap
.
get
(
"dsdh"
).
toString
());
if
(
dsdh
<
0.4
){
low
++;
}
else
if
(
dsdh
<
0.5
&&
dsdh
>=
0.4
){
normal
++;
}
else
if
(
dsdh
<
0.7
&&
dsdh
>=
0.5
){
up
++;
}
else
{
upper
++;
}
}
else
{
low
++;
}
}
}
resMap
.
put
(
"low"
,
low
);
//<0.4
resMap
.
put
(
"normal"
,
normal
);
//0.4-0.5
resMap
.
put
(
"up"
,
up
);
//0.5-0.7
resMap
.
put
(
"upper"
,
upper
);
//>0.7
return
resMap
;
}
/**
* 获取时间之间的月份
* @param start
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/entity/ReportTargetConfig.java
查看文件 @
5e86423
package
com
.
skua
.
modules
.
report
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.skua.core.aspect.annotation.Dict
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -46,6 +44,92 @@ public class ReportTargetConfig {
@Excel
(
name
=
"药量目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"药量目标"
)
private
String
targetDrug
;
/**PAC(液)目标*/
@Excel
(
name
=
"PAC(液)目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"PAC(液)目标"
)
private
String
targetPacyt
;
/**PAC(固)目标*/
@Excel
(
name
=
"PAC(固)目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"PAC(固)目标"
)
private
String
targetPacgt
;
/**NaClO目标*/
@Excel
(
name
=
"NaClO目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"NaClO目标"
)
private
String
targetNaclo
;
/**水处理PAM(-)目标*/
@Excel
(
name
=
"水处理PAM(-)目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"水处理PAM(-)目标"
)
private
String
targetSclpamf
;
/**水处理PAM(+)目标*/
@Excel
(
name
=
"水处理PAM(+)目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"水处理PAM(+)目标"
)
private
String
targetSclpamz
;
/**污脱PAM乳剂目标*/
@Excel
(
name
=
"污脱PAM乳剂目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"污脱PAM乳剂目标"
)
private
String
targetPamrj
;
/**污脱PAM(-)目标*/
@Excel
(
name
=
"污脱PAM(-)目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"污脱PAM(-)目标"
)
private
String
targetPamf
;
/**污脱PAM(+)目标*/
@Excel
(
name
=
"污脱PAM(+)目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"污脱PAM(+)目标"
)
private
String
targetPamz
;
/**PFS目标*/
@Excel
(
name
=
"PFS目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"PFS目标"
)
private
String
targetPfs
;
/**复合铁盐目标*/
@Excel
(
name
=
"复合铁盐目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"复合铁盐目标"
)
private
String
targetFhty
;
/**乳液絮凝剂目标*/
@Excel
(
name
=
"乳液絮凝剂目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"乳液絮凝剂目标"
)
private
String
targetRyxnj
;
/**益维磷目标*/
@Excel
(
name
=
"益维磷目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"益维磷目标"
)
private
String
targetYwl
;
/**高效除磷剂目标*/
@Excel
(
name
=
"高效除磷剂目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"高效除磷剂目标"
)
private
String
targetGxclj
;
/**CH₃COONa目标*/
@Excel
(
name
=
"CH₃COONa目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"CH₃COONa目标"
)
private
String
targetCh3coona
;
/**活性炭目标*/
@Excel
(
name
=
"活性炭目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"活性炭目标"
)
private
String
targetHxt
;
/**FeCl3目标*/
@Excel
(
name
=
"FeCl3目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"FeCl3目标"
)
private
String
targetFecl3
;
/**石灰目标*/
@Excel
(
name
=
"石灰目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"石灰目标"
)
private
String
targetSh
;
/**CH3COOH目标*/
@Excel
(
name
=
"CH3COOH目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"CH3COOH目标"
)
private
String
targetCh3cooh
;
/**FeSO4固目标*/
@Excel
(
name
=
"FeSO4固目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"FeSO4固目标"
)
private
String
targetFeso4g
;
/**FeSO4液目标*/
@Excel
(
name
=
"FeSO4液目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"FeSO4液目标"
)
private
String
targetFeso4y
;
/**H2O2目标*/
@Excel
(
name
=
"H2O2目标"
,
width
=
15
)
@ApiModelProperty
(
value
=
"H2O2目标"
)
private
String
targetH2o2
;
/**所属厂区*/
@Excel
(
name
=
"所属厂区"
,
width
=
15
)
@Dict
(
dictTable
=
"sys_depart"
,
dicCode
=
"id"
,
dicText
=
"depart_name"
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论