Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
7b82037b
Commit
7b82037b
authored
Aug 22, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业务代码新增判断兼容算法返回数据错误
parent
fbcf9da9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+22
-22
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
7b82037b
...
@@ -216,9 +216,9 @@ public class CommonServiceImpl {
...
@@ -216,9 +216,9 @@ public class CommonServiceImpl {
logger
.
info
(
"------------------------------------------风机::开始调用工况变量区间划分算法----------------------------------------"
);
logger
.
info
(
"------------------------------------------风机::开始调用工况变量区间划分算法----------------------------------------"
);
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
realParams
.
put
(
gkqjhfkey
,
params
);
realParams
.
put
(
gkqjhfkey
,
params
);
String
re
ps
onse
=
HttpUtil
.
createPost
(
baseUrl
+
gkqjhfurlfan
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
String
re
sp
onse
=
HttpUtil
.
createPost
(
baseUrl
+
gkqjhfurlfan
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
if
(
re
psonse
.
contains
(
"\"status\":200
"
))
{
if
(
re
sponse
.
contains
(
"\"status\":200"
)&&
response
.
contains
(
"rows"
)&&
response
.
contains
(
"rows
"
))
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
re
ps
onse
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
re
sp
onse
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONArray
rows
=
(
JSONArray
)
result1
.
get
(
"rows"
);
JSONArray
rows
=
(
JSONArray
)
result1
.
get
(
"rows"
);
...
@@ -232,7 +232,7 @@ public class CommonServiceImpl {
...
@@ -232,7 +232,7 @@ public class CommonServiceImpl {
logger
.
info
(
"------------------------------------------风机::工况变量区间划分更新业务表成功----------------------------------------"
);
logger
.
info
(
"------------------------------------------风机::工况变量区间划分更新业务表成功----------------------------------------"
);
}
}
try
{
try
{
logger
.
info
(
re
ps
onse
);
logger
.
info
(
re
sp
onse
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
logger
.
info
(
"------------------------------------------风机::调用工况变量区间划分算法结束----------------------------------------"
);
logger
.
info
(
"------------------------------------------风机::调用工况变量区间划分算法结束----------------------------------------"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -260,9 +260,9 @@ public class CommonServiceImpl {
...
@@ -260,9 +260,9 @@ public class CommonServiceImpl {
logger
.
info
(
"------------------------------------------光伏::开始调用工况变量区间划分算法----------------------------------------"
);
logger
.
info
(
"------------------------------------------光伏::开始调用工况变量区间划分算法----------------------------------------"
);
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
realParams
.
put
(
gkqjhfkey
,
params
);
realParams
.
put
(
gkqjhfkey
,
params
);
String
re
ps
onse
=
HttpUtil
.
createPost
(
baseUrl
+
gkqjhfurlpv
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
String
re
sp
onse
=
HttpUtil
.
createPost
(
baseUrl
+
gkqjhfurlpv
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
if
(
re
psonse
.
contains
(
"\"status\":200
"
))
{
if
(
re
sponse
.
contains
(
"\"status\":200"
)&&
response
.
contains
(
"rows
"
))
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
re
ps
onse
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
re
sp
onse
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONArray
rows
=
(
JSONArray
)
result1
.
get
(
"rows"
);
JSONArray
rows
=
(
JSONArray
)
result1
.
get
(
"rows"
);
...
@@ -276,7 +276,7 @@ public class CommonServiceImpl {
...
@@ -276,7 +276,7 @@ public class CommonServiceImpl {
logger
.
info
(
"------------------------------------------风机::工况变量区间划分更新业务表成功----------------------------------------"
);
logger
.
info
(
"------------------------------------------风机::工况变量区间划分更新业务表成功----------------------------------------"
);
}
}
try
{
try
{
logger
.
info
(
re
ps
onse
);
logger
.
info
(
re
sp
onse
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
logger
.
info
(
"------------------------------------------光伏::调用工况变量区间划分算法结束----------------------------------------"
);
logger
.
info
(
"------------------------------------------光伏::调用工况变量区间划分算法结束----------------------------------------"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -405,9 +405,9 @@ public class CommonServiceImpl {
...
@@ -405,9 +405,9 @@ public class CommonServiceImpl {
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
realParams
.
put
(
gkxgxfxkey
,
requestParams
);
realParams
.
put
(
gkxgxfxkey
,
requestParams
);
logger
.
info
(
"------------------------------风机相关性------------分析变量与工况变量相关性分析算参数---------------------------------------"
+
JSON
.
toJSONString
(
realParams
));
logger
.
info
(
"------------------------------风机相关性------------分析变量与工况变量相关性分析算参数---------------------------------------"
+
JSON
.
toJSONString
(
realParams
));
String
re
ps
onse
=
HttpUtil
.
createPost
(
baseUrl
+
gkxgxfxurlfan
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
String
re
sp
onse
=
HttpUtil
.
createPost
(
baseUrl
+
gkxgxfxurlfan
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
if
(
re
psonse
.
contains
(
"\"status\":200
"
))
{
if
(
re
sponse
.
contains
(
"\"status\":200"
)&&
response
.
contains
(
"rows
"
))
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
re
ps
onse
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
re
sp
onse
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONArray
rows
=
(
JSONArray
)
result1
.
get
(
"rows"
);
JSONArray
rows
=
(
JSONArray
)
result1
.
get
(
"rows"
);
...
@@ -417,7 +417,7 @@ public class CommonServiceImpl {
...
@@ -417,7 +417,7 @@ public class CommonServiceImpl {
logger
.
info
(
"------------------------------------------风机相关性::相关性更新业务表成功----------------------------------------"
);
logger
.
info
(
"------------------------------------------风机相关性::相关性更新业务表成功----------------------------------------"
);
}
}
try
{
try
{
logger
.
info
(
"response-------------"
+
re
ps
onse
);
logger
.
info
(
"response-------------"
+
re
sp
onse
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
logger
.
info
(
"----------------------------风机相关性--------------分析变量与工况变量相关性分析算法结束----------------------------------------"
);
logger
.
info
(
"----------------------------风机相关性--------------分析变量与工况变量相关性分析算法结束----------------------------------------"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -459,9 +459,9 @@ public class CommonServiceImpl {
...
@@ -459,9 +459,9 @@ public class CommonServiceImpl {
logger
.
info
(
"---------------------------------光伏相关性---------分析变量与工况变量相关性分析算法开始----------------------------------------"
);
logger
.
info
(
"---------------------------------光伏相关性---------分析变量与工况变量相关性分析算法开始----------------------------------------"
);
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
realParams
.
put
(
gkxgxfxkey
,
requestParams
);
realParams
.
put
(
gkxgxfxkey
,
requestParams
);
String
re
ps
onse
=
HttpUtil
.
createPost
(
baseUrl
+
gkxgxfxurlpv
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
String
re
sp
onse
=
HttpUtil
.
createPost
(
baseUrl
+
gkxgxfxurlpv
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
if
(
re
psonse
.
contains
(
"\"status\":200
"
))
{
if
(
re
sponse
.
contains
(
"\"status\":200"
)&&
response
.
contains
(
"rows
"
))
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
re
ps
onse
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
re
sp
onse
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONArray
rows
=
(
JSONArray
)
result1
.
get
(
"rows"
);
JSONArray
rows
=
(
JSONArray
)
result1
.
get
(
"rows"
);
...
@@ -471,7 +471,7 @@ public class CommonServiceImpl {
...
@@ -471,7 +471,7 @@ public class CommonServiceImpl {
logger
.
info
(
"------------------------------------------风机相关性::相关性更新业务表成功----------------------------------------"
);
logger
.
info
(
"------------------------------------------风机相关性::相关性更新业务表成功----------------------------------------"
);
}
}
try
{
try
{
logger
.
info
(
"response----光伏相关性---------"
+
re
ps
onse
);
logger
.
info
(
"response----光伏相关性---------"
+
re
sp
onse
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
logger
.
info
(
"----------------------------------光伏相关性--------分析变量与工况变量相关性分析算法结束----------------------------------------"
);
logger
.
info
(
"----------------------------------光伏相关性--------分析变量与工况变量相关性分析算法结束----------------------------------------"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -659,7 +659,7 @@ public class CommonServiceImpl {
...
@@ -659,7 +659,7 @@ public class CommonServiceImpl {
realParams
.
put
(
gkzxzjskey2
,
requestParams
);
realParams
.
put
(
gkzxzjskey2
,
requestParams
);
logger
.
info
(
"------------------------------风机中心值------请求参数---------------------------------------"
+
JSON
.
toJSONString
(
realParams
));
logger
.
info
(
"------------------------------风机中心值------请求参数---------------------------------------"
+
JSON
.
toJSONString
(
realParams
));
String
response
=
HttpUtil
.
createPost
(
baseUrl
+
gkzxzjsurlfan
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
String
response
=
HttpUtil
.
createPost
(
baseUrl
+
gkzxzjsurlfan
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
if
(
response
.
contains
(
"\"status\":200"
))
{
if
(
response
.
contains
(
"\"status\":200"
)
&&
response
.
contains
(
"rows"
)
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
response
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
response
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
...
@@ -696,7 +696,7 @@ public class CommonServiceImpl {
...
@@ -696,7 +696,7 @@ public class CommonServiceImpl {
}
}
try
{
try
{
logger
.
info
(
"------------------风机中心值--re
ps
onse: "
+
response
);
logger
.
info
(
"------------------风机中心值--re
sp
onse: "
+
response
);
TimeUnit
.
SECONDS
.
sleep
(
zxzsleepTime
);
TimeUnit
.
SECONDS
.
sleep
(
zxzsleepTime
);
logger
.
info
(
"-----------------------------------风机中心值-------调用中心值计算算法结束----------------------------------------"
);
logger
.
info
(
"-----------------------------------风机中心值-------调用中心值计算算法结束----------------------------------------"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -800,7 +800,7 @@ public class CommonServiceImpl {
...
@@ -800,7 +800,7 @@ public class CommonServiceImpl {
realParams
.
put
(
gkzxzjskey1
,
values
);
realParams
.
put
(
gkzxzjskey1
,
values
);
realParams
.
put
(
gkzxzjskey2
,
requestParams
);
realParams
.
put
(
gkzxzjskey2
,
requestParams
);
String
response
=
HttpUtil
.
createPost
(
baseUrl
+
gkzxzjsurlpv
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
String
response
=
HttpUtil
.
createPost
(
baseUrl
+
gkzxzjsurlpv
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
if
(
response
.
contains
(
"\"status\":200"
))
{
if
(
response
.
contains
(
"\"status\":200"
)
&&
response
.
contains
(
"rows"
)
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
response
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
response
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result
=
(
JSONObject
)
jsonObject
.
get
(
"result"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
JSONObject
result1
=
(
JSONObject
)
result
.
get
(
"result1"
);
...
@@ -836,7 +836,7 @@ public class CommonServiceImpl {
...
@@ -836,7 +836,7 @@ public class CommonServiceImpl {
logger
.
info
(
"------------------------------------------光伏中心值::中心值更新业务表成功----------------------------------------"
);
logger
.
info
(
"------------------------------------------光伏中心值::中心值更新业务表成功----------------------------------------"
);
}
}
try
{
try
{
logger
.
info
(
"-------------光伏中心值-------re
ps
onse: "
+
response
);
logger
.
info
(
"-------------光伏中心值-------re
sp
onse: "
+
response
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
TimeUnit
.
SECONDS
.
sleep
(
sleepTime
);
logger
.
info
(
"-----------------------------------光伏中心值-------调用中心值计算算法结束----------------------------------------"
);
logger
.
info
(
"-----------------------------------光伏中心值-------调用中心值计算算法结束----------------------------------------"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -1027,7 +1027,7 @@ public class CommonServiceImpl {
...
@@ -1027,7 +1027,7 @@ public class CommonServiceImpl {
}
}
try
{
try
{
logger
.
info
(
"--------------------re
ps
onse: "
+
response
);
logger
.
info
(
"--------------------re
sp
onse: "
+
response
);
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
@@ -1153,7 +1153,7 @@ public class CommonServiceImpl {
...
@@ -1153,7 +1153,7 @@ public class CommonServiceImpl {
}
}
try
{
try
{
logger
.
info
(
"--------------------re
ps
onse: "
+
response
);
logger
.
info
(
"--------------------re
sp
onse: "
+
response
);
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment