Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
aaf75274
Commit
aaf75274
authored
Mar 14, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报屏显示优化
parent
00c46a41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
4 deletions
+74
-4
ServiceHPBI002.java
.../java/com/baosight/hpjx/hp/bi/service/ServiceHPBI002.java
+74
-4
No files found.
src/main/java/com/baosight/hpjx/hp/bi/service/ServiceHPBI002.java
View file @
aaf75274
...
@@ -473,6 +473,77 @@ public class ServiceHPBI002 extends ServiceBase {
...
@@ -473,6 +473,77 @@ public class ServiceHPBI002 extends ServiceBase {
}
}
/**
/**
* 产品项 8da92383157d4bf680ed08093590d847
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱1"
,
operType
=
"查询"
,
operDesc
=
"产品项"
)
public
EiInfo
queryBJInfo
(
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
factStr
=
paramsObj
.
getString
(
"factorycode"
);
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"
,
"8da92383157d4bf680ed08093590d847"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
companycode
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getCompanyCode
().
trim
())){
companycode
=
UserSessionUtils
.
getCompanyCode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"companycode"
,
companycode
);
params
.
put
(
"factorycode"
,
factStr
);
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
(
"8da92383157d4bf680ed08093590d847"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"DIVLIST"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
String
DIVLIST
=
"<div style=\"width: 400px; height: 50px;color:#FFFFFF;font-weight: bold;text-align: left;font-size: 24px;\">"
+
obj
.
get
(
"GROUP_NAME"
)+
"</div><div style=\"width: 400px; height: 50px;color:#FFFFFF;text-align: left;font-size: 20px;\">"
+
obj
.
get
(
"PART_NAME"
)+
"</div>"
;
List
datalist
=
new
ArrayList
();
datalist
.
add
(
DIVLIST
);
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
;
}
/**
* 近5日综合产量 df9ae382415b4c8bab00058fe4bd99f7
* 近5日综合产量 df9ae382415b4c8bab00058fe4bd99f7
*
*
* @param inInfo
* @param inInfo
...
@@ -657,16 +728,15 @@ public class ServiceHPBI002 extends ServiceBase {
...
@@ -657,16 +728,15 @@ public class ServiceHPBI002 extends ServiceBase {
Map
result1
=
(
Map
)
result
.
get
(
"49badd3044f04d3e8b89b1d0b7d3ff0e"
);
Map
result1
=
(
Map
)
result
.
get
(
"49badd3044f04d3e8b89b1d0b7d3ff0e"
);
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
=
"
ORG_ID,ORG_CNAME
"
;
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
(
"ORG_ID"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"ORG_CNAME"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
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