Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
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
platform
hg-smart
Commits
7bea233c
Commit
7bea233c
authored
Jun 21, 2024
by
13420
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产驾驶舱大屏
parent
1f33ff6d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
7 deletions
+76
-7
ServiceHGBI002.java
.../java/com/baosight/hggp/hg/bi/service/ServiceHGBI002.java
+76
-7
No files found.
src/main/java/com/baosight/hggp/hg/bi/service/ServiceHGBI002.java
View file @
7bea233c
...
@@ -519,6 +519,7 @@ public class ServiceHGBI002 extends ServiceBase {
...
@@ -519,6 +519,7 @@ public class ServiceHGBI002 extends ServiceBase {
outInfo
.
set
(
"result"
,
list2
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
return
outInfo
;
}
}
/**
/**
* 近7日综合产量 45d33e71262840babc0d60c0a01863d0
* 近7日综合产量 45d33e71262840babc0d60c0a01863d0
*
*
...
@@ -568,16 +569,84 @@ public class ServiceHGBI002 extends ServiceBase {
...
@@ -568,16 +569,84 @@ public class ServiceHGBI002 extends ServiceBase {
Map
result1
=
(
Map
)
result
.
get
(
"45d33e71262840babc0d60c0a01863d0"
);
Map
result1
=
(
Map
)
result
.
get
(
"45d33e71262840babc0d60c0a01863d0"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"
appEname,
date,unitCover"
;
String
json
=
"date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
list1
.
forEach
(
obj
->
{
// 处理obj
// 处理obj
List
datalist
=
new
ArrayList
();
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
datalist
.
add
(
obj
.
get
(
"RCL"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 工序日产量 4af343c61a1742a49a9a0bb11111cbd5
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"工序日产量"
)
public
EiInfo
queryXXCLInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
JSONObject
paramsObj
=
null
;
if
(
jsonObject
.
get
(
"params"
)
instanceof
String
)
{
paramsObj
=
JSON
.
parseObject
((
String
)
jsonObject
.
get
(
"params"
));
}
else
{
paramsObj
=
(
JSONObject
)
jsonObject
.
get
(
"params"
);
}
String
dateStr
=
paramsObj
.
getString
(
"date"
).
replace
(
"-"
,
""
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"4af343c61a1742a49a9a0bb11111cbd5"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
companycode
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
companycode
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"companycode"
,
companycode
);
params
.
put
(
"date"
,
dateStr
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"4af343c61a1742a49a9a0bb11111cbd5"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"SERIES,RCL"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"RCL"
));
tempArr
.
add
(
datalist
);
tempArr
.
add
(
datalist
);
});
});
JSONArray
ids
=
new
JSONArray
();
JSONArray
ids
=
new
JSONArray
();
...
@@ -615,7 +684,7 @@ public class ServiceHGBI002 extends ServiceBase {
...
@@ -615,7 +684,7 @@ public class ServiceHGBI002 extends ServiceBase {
String
serviceId
=
"S_BE_XP_17"
;
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"4
f5cb7ea6eb646d98aa0b1c79bf5c224
"
);
map
.
put
(
"uuid"
,
"4
af343c61a1742a49a9a0bb11111cbd5
"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
//获取公司代码
...
@@ -636,7 +705,7 @@ public class ServiceHGBI002 extends ServiceBase {
...
@@ -636,7 +705,7 @@ public class ServiceHGBI002 extends ServiceBase {
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"4
f5cb7ea6eb646d98aa0b1c79bf5c224
"
);
Map
result1
=
(
Map
)
result
.
get
(
"4
af343c61a1742a49a9a0bb11111cbd5
"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
String
json
=
"appEname,date,unitCover"
;
...
@@ -648,7 +717,7 @@ public class ServiceHGBI002 extends ServiceBase {
...
@@ -648,7 +717,7 @@ public class ServiceHGBI002 extends ServiceBase {
List
datalist
=
new
ArrayList
();
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"
VALUE
"
));
datalist
.
add
(
obj
.
get
(
"
RCL
"
));
tempArr
.
add
(
datalist
);
tempArr
.
add
(
datalist
);
});
});
JSONArray
ids
=
new
JSONArray
();
JSONArray
ids
=
new
JSONArray
();
...
@@ -705,7 +774,7 @@ public class ServiceHGBI002 extends ServiceBase {
...
@@ -705,7 +774,7 @@ public class ServiceHGBI002 extends ServiceBase {
List
datalist
=
new
ArrayList
();
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"
VALUE
"
));
datalist
.
add
(
obj
.
get
(
"
RCL
"
));
tempArr
.
add
(
datalist
);
tempArr
.
add
(
datalist
);
});
});
JSONArray
ids
=
new
JSONArray
();
JSONArray
ids
=
new
JSONArray
();
...
...
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