Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
301bac2f
由
张雷
编写于
2024-10-28 10:00:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
水质分析BUG修改
1 个父辈
4d6c01ca
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
22 行删除
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/WaterAnalysisNewMapper.xml
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/WaterAnalysisNewServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/WaterAnalysisNewMapper.xml
查看文件 @
301bac2
...
...
@@ -343,7 +343,7 @@
IFNULL( a.totalCount, 0 ) AS totalCount
FROM
sys_factory_info sfi
LEFT JOIN alarm_level_standard_config alsc ON alsc.
alarm_standard_level_code
= sfi.out_level
LEFT JOIN alarm_level_standard_config alsc ON alsc.
id
= sfi.out_level
LEFT JOIN sys_depart d ON sfi.depart_id = d.id
LEFT JOIN (
SELECT
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/WaterAnalysisNewServiceImpl.java
查看文件 @
301bac2
...
...
@@ -17,18 +17,18 @@ import java.util.concurrent.atomic.AtomicReference;
@Service
public
class
WaterAnalysisNewServiceImpl
implements
WaterAnalysisNewService
{
private
static
String
REPOART_ID_HY
=
"9bffaf9187093d6e6a4390e8c56acca8"
;
private
static
String
FACTORYIDS
=
"1519193830953553920,1519200041706954752,1816759403152666624,1818214145808531456,1818214519948836864,"
+
" 1818214642204409856,1818214704200417280,1818214745841467392,1818214781186867200,1818214830096646144,1818214870622011392,"
+
" 1818214905388597248,1818214961122508800,1818215007217909760,1818215052952600576,1818215093192753152,1818215141427249152,"
+
" 1818215178001580032,1818215228744269824,1818215268359471104,1818215307165171712,1818215363477897216,1818215411217465344"
;
//
private static String FACTORYIDS = "1519193830953553920,1519200041706954752,1816759403152666624,1818214145808531456,1818214519948836864," +
//
" 1818214642204409856,1818214704200417280,1818214745841467392,1818214781186867200,1818214830096646144,1818214870622011392," +
//
" 1818214905388597248,1818214961122508800,1818215007217909760,1818215052952600576,1818215093192753152,1818215141427249152," +
//
" 1818215178001580032,1818215228744269824,1818215268359471104,1818215307165171712,1818215363477897216,1818215411217465344";
@Autowired
private
WaterAnalysisNewMapper
waterAnalysisNewMapper
;
@Override
public
Map
<
String
,
Object
>
queryTotalBySummary
(
String
time
)
{
Map
<
String
,
Object
>
result
=
Maps
.
newHashMap
();
//
String departIds = BaseContextHandler.getDeparts();
List
<
Map
<
String
,
Object
>>
facs
=
waterAnalysisNewMapper
.
queryTotalBySummary
(
time
,
FACTORYIDS
);
Long
facCount
=
waterAnalysisNewMapper
.
queryTotalCount
(
FACTORYIDS
);
String
departIds
=
BaseContextHandler
.
getDeparts
();
List
<
Map
<
String
,
Object
>>
facs
=
waterAnalysisNewMapper
.
queryTotalBySummary
(
time
,
departIds
);
Long
facCount
=
waterAnalysisNewMapper
.
queryTotalCount
(
departIds
);
Long
summaryCount
=
facCount
;
Long
noSummaryCount
=
0L
;
StringBuilder
facInfo
=
new
StringBuilder
();
...
...
@@ -67,10 +67,10 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService {
@Override
public
List
<
Map
<
String
,
Object
>>
queryFacListWaterQCL
(
String
time
)
{
// String factory
Ids = BaseContextHandler.getDeparts();
String
depart
Ids
=
BaseContextHandler
.
getDeparts
();
List
<
Map
<
String
,
Object
>>
result
=
Lists
.
newArrayList
();
String
dataViewName
=
ReportViewUtil
.
buildViewLike
(
REPOART_ID_HY
,
"CSCOD,CSTN,CSZL,CSAD,JSCOD,JSZD,JSZL,JSAD"
,
FACTORYIDS
,
time
);
List
<
Map
<
String
,
Object
>>
list
=
waterAnalysisNewMapper
.
queryAllFactoryList
(
time
,
FACTORYIDS
,
dataViewName
);
String
dataViewName
=
ReportViewUtil
.
buildViewLike
(
REPOART_ID_HY
,
"CSCOD,CSTN,CSZL,CSAD,JSCOD,JSZD,JSZL,JSAD"
,
departIds
,
time
);
List
<
Map
<
String
,
Object
>>
list
=
waterAnalysisNewMapper
.
queryAllFactoryList
(
time
,
departIds
,
dataViewName
);
if
(
list
!=
null
)
{
for
(
Map
<
String
,
Object
>
map
:
list
)
{
Double
jsCODAvgSum
=
Double
.
parseDouble
(
map
.
get
(
"jscod"
).
toString
());
...
...
@@ -110,9 +110,9 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService {
@Override
public
Map
<
String
,
Object
>
queryWaterQCL
(
String
time
)
{
Map
<
String
,
Object
>
result
=
Maps
.
newHashMap
();
// String factory
Ids = BaseContextHandler.getDeparts();
String
dataViewName
=
ReportViewUtil
.
buildViewLike
(
REPOART_ID_HY
,
"CSCOD,CSTN,CSZL,CSAD,JSCOD,JSZD,JSZL,JSAD"
,
FACTORYIDS
,
time
);
result
=
waterAnalysisNewMapper
.
queryAvgQcl
(
dataViewName
,
time
,
FACTORYIDS
);
String
depart
Ids
=
BaseContextHandler
.
getDeparts
();
String
dataViewName
=
ReportViewUtil
.
buildViewLike
(
REPOART_ID_HY
,
"CSCOD,CSTN,CSZL,CSAD,JSCOD,JSZD,JSZL,JSAD"
,
departIds
,
time
);
result
=
waterAnalysisNewMapper
.
queryAvgQcl
(
dataViewName
,
time
,
departIds
);
if
(
result
==
null
){
result
=
new
HashMap
<>();
result
.
put
(
"COD"
,
0.00
);
...
...
@@ -124,7 +124,7 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryCSAnalysis
(
String
time
)
{
// String factory
Ids = BaseContextHandler.getDeparts();
String
depart
Ids
=
BaseContextHandler
.
getDeparts
();
//获取负荷比例
List
<
DictModel
>
fhData
=
waterAnalysisNewMapper
.
queryDictItemsByCode
(
"water_analysis_proportion"
);
Double
low
=
0.0
;
...
...
@@ -143,7 +143,7 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService {
Double
finalUp
=
up
;
data
.
forEach
(
v
->
{
String
code
=
(
String
)
v
.
get
(
"id"
);
List
<
Double
>
datan
=
waterAnalysisNewMapper
.
queryAvgByCode
(
code
,
time
,
FACTORYIDS
);
List
<
Double
>
datan
=
waterAnalysisNewMapper
.
queryAvgByCode
(
code
,
time
,
departIds
);
if
(
datan
!=
null
&&
datan
.
size
()
>
0
)
{
DoubleSummaryStatistics
statistics
=
datan
.
stream
().
mapToDouble
(
Number:
:
doubleValue
).
summaryStatistics
();
//取最大值
...
...
@@ -168,18 +168,18 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService {
@Override
public
List
<
Map
<
String
,
Object
>>
queryNoSummaryList
(
String
time
)
{
Map
<
String
,
Map
<
String
,
Object
>>
tmpMap
=
Maps
.
newHashMap
();
// String factory
Ids = BaseContextHandler.getDeparts();
String
depart
Ids
=
BaseContextHandler
.
getDeparts
();
List
<
Map
<
String
,
Object
>>
facs
=
new
ArrayList
<>();
facs
=
waterAnalysisNewMapper
.
queryNewFacList
(
time
,
FACTORYIDS
);
facs
=
waterAnalysisNewMapper
.
queryNewFacList
(
time
,
departIds
);
return
facs
;
}
@Override
public
Map
<
String
,
Object
>
queryNewSummaryCount
(
String
time
)
{
// String factory
Ids = BaseContextHandler.getDeparts();
String
depart
Ids
=
BaseContextHandler
.
getDeparts
();
Map
<
String
,
Object
>
csbzCharData
=
Maps
.
newHashMap
();
//上个月DateUtils.getLastMonthOfMonth(time)
List
<
Map
<
String
,
Object
>>
maps
=
waterAnalysisNewMapper
.
queryNewSummaryCount
(
time
,
FACTORYIDS
);
List
<
Map
<
String
,
Object
>>
maps
=
waterAnalysisNewMapper
.
queryNewSummaryCount
(
time
,
departIds
);
List
<
String
>
names
=
Lists
.
newArrayList
();
List
<
Long
>
data
=
Lists
.
newArrayList
();
List
<
Long
>
max
=
Lists
.
newArrayList
();
...
...
@@ -307,8 +307,8 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryFacListBySummary
(
String
time
)
{
// String factory
Ids = BaseContextHandler.getDeparts();
List
<
Map
<
String
,
Object
>>
maps
=
waterAnalysisNewMapper
.
queryFacListBySummary
(
time
,
DateUtils
.
getDayCountOfMonth
(
time
),
FACTORYIDS
);
String
depart
Ids
=
BaseContextHandler
.
getDeparts
();
List
<
Map
<
String
,
Object
>>
maps
=
waterAnalysisNewMapper
.
queryFacListBySummary
(
time
,
DateUtils
.
getDayCountOfMonth
(
time
),
departIds
);
maps
.
forEach
(
v
->
{
Double
db
=
Double
.
parseDouble
(
String
.
valueOf
(
v
.
get
(
"db"
)));
if
(
db
<
90
)
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论