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
9b4e2a5d
Commit
9b4e2a5d
authored
Jun 20, 2024
by
13420
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产驾驶舱大屏
parent
b5fbc749
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
143 additions
and
0 deletions
+143
-0
ServiceHGBI002.java
.../java/com/baosight/hggp/hg/bi/service/ServiceHGBI002.java
+143
-0
No files found.
src/main/java/com/baosight/hggp/hg/bi/service/ServiceHGBI002.java
View file @
9b4e2a5d
...
...
@@ -520,6 +520,149 @@ public class ServiceHGBI002 extends ServiceBase {
return
outInfo
;
}
/**
* 近7日综合产量 45d33e71262840babc0d60c0a01863d0
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱1"
,
operType
=
"查询"
,
operDesc
=
"近7日综合产量"
)
public
EiInfo
queryZHCLInfo
(
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"
,
"45d33e71262840babc0d60c0a01863d0"
);
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
(
"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
(
"45d33e71262840babc0d60c0a01863d0"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
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
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
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
;
}
/**
* 工序综合产量 4f5cb7ea6eb646d98aa0b1c79bf5c224
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱1"
,
operType
=
"查询"
,
operDesc
=
"工序综合产量"
)
public
EiInfo
queryGroupCLnfo
(
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"
,
"4f5cb7ea6eb646d98aa0b1c79bf5c224"
);
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
(
"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
(
"4f5cb7ea6eb646d98aa0b1c79bf5c224"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
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
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
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
;
}
/**
* 查询报屏模块show21
*
* @param inInfo
...
...
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