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
5bff806e
Commit
5bff806e
authored
Oct 27, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-27 修复生产驾驶舱显示问题,添加app驾驶舱接口
parent
1834001d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
195 additions
and
10 deletions
+195
-10
ServiceHPBI003.java
.../java/com/baosight/hpjx/hp/bi/service/ServiceHPBI003.java
+191
-8
HPBI003.xml
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI003.xml
+4
-2
No files found.
src/main/java/com/baosight/hpjx/hp/bi/service/ServiceHPBI003.java
View file @
5bff806e
...
@@ -270,12 +270,17 @@ public class ServiceHPBI003 extends ServiceBase {
...
@@ -270,12 +270,17 @@ public class ServiceHPBI003 extends ServiceBase {
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryGX"
,
params
,
0
,
100
);
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryGX"
,
params
,
0
,
100
);
Map
<
Object
,
List
<
Map
>>
mapList
=
listMap
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
map
.
get
(
"groupName"
)));
List
<
Map
>
sortList
=
listMap
.
stream
().
map
(
map
->
{
Map
map1
=
new
HashMap
();
map1
.
put
(
"sort"
,
map
.
get
(
"groupName"
));
return
map1
;
}).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Object
,
List
<
Map
>>
mapList
=
listMap
.
stream
().
sorted
(
Comparator
.
comparing
(
map
->
map
.
get
(
"groupName"
).
toString
())).
collect
(
Collectors
.
groupingBy
(
map
->
map
.
get
(
"groupName"
)));
List
<
Map
>
result
=
new
ArrayList
<>();
List
<
Map
>
result
=
new
ArrayList
<>();
for
(
Object
key:
mapList
.
keySet
()
)
{
for
(
Map
key:
sortList
)
{
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"product"
,
key
);
map
.
put
(
"product"
,
key
.
get
(
"sort"
)
);
for
(
Map
map1:
mapList
.
get
(
key
))
{
for
(
Map
map1:
mapList
.
get
(
key
.
get
(
"sort"
)
))
{
map
.
put
(
map1
.
get
(
"series"
),
map1
.
get
(
"wt"
));
map
.
put
(
map1
.
get
(
"series"
),
map1
.
get
(
"wt"
));
}
}
result
.
add
(
map
);
result
.
add
(
map
);
...
@@ -326,22 +331,29 @@ public class ServiceHPBI003 extends ServiceBase {
...
@@ -326,22 +331,29 @@ public class ServiceHPBI003 extends ServiceBase {
}
}
List
<
Map
>
result
=
new
ArrayList
<>();
List
<
Map
>
result
=
new
ArrayList
<>();
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryDayWts"
,
params
,
0
,
100
);
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryDayWts"
,
params
,
0
,
100
);
List
<
Map
>
sortList
=
listMap
.
stream
().
map
(
map
->
{
Map
map1
=
new
HashMap
();
map1
.
put
(
"sort"
,
map
.
get
(
"series"
));
return
map1
;
}).
distinct
().
collect
(
Collectors
.
toList
());
List
listMap2
=
listMap
.
stream
().
map
(
map
->
map
.
get
(
"date"
)).
sorted
().
distinct
().
collect
(
Collectors
.
toList
());
List
listMap2
=
listMap
.
stream
().
map
(
map
->
map
.
get
(
"date"
)).
sorted
().
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Object
,
List
<
Map
>>
listMap1
=
listMap
.
stream
().
collect
(
Collectors
.
groupingBy
(
m
->
m
.
get
(
"series"
)));
Map
<
Object
,
List
<
Map
>>
listMap1
=
listMap
.
stream
().
collect
(
Collectors
.
groupingBy
(
m
->
m
.
get
(
"series"
)));
for
(
Object
key:
listMap1
.
keySet
())
{
List
treeMap
=
new
ArrayList
();
for
(
Map
key:
sortList
)
{
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
key
);
treeMap
.
add
(
key
.
get
(
"sort"
));
map
.
put
(
"name"
,
key
.
get
(
"sort"
));
map
.
put
(
"type"
,
"line"
);
map
.
put
(
"type"
,
"line"
);
map
.
put
(
"stack"
,
"Total"
);
map
.
put
(
"stack"
,
"Total"
);
List
list1
=
new
ArrayList
<>();
List
list1
=
new
ArrayList
<>();
for
(
Map
map1:
listMap1
.
get
(
key
))
{
for
(
Map
map1:
listMap1
.
get
(
key
.
get
(
"sort"
)
))
{
list1
.
add
(
map1
.
get
(
"wt"
));
list1
.
add
(
map1
.
get
(
"wt"
));
}
}
map
.
put
(
"data"
,
list1
);
map
.
put
(
"data"
,
list1
);
result
.
add
(
map
);
result
.
add
(
map
);
}
}
inInfo
.
set
(
"date"
,
listMap2
);
inInfo
.
set
(
"date"
,
listMap2
);
inInfo
.
set
(
"name"
,
listMap1
.
keySet
()
);
inInfo
.
set
(
"name"
,
treeMap
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
result
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
result
);
return
inInfo
;
return
inInfo
;
}
}
...
@@ -429,4 +441,175 @@ public class ServiceHPBI003 extends ServiceBase {
...
@@ -429,4 +441,175 @@ public class ServiceHPBI003 extends ServiceBase {
inInfo
.
set
(
EiConstant
.
resultBlock
,
result
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
result
);
return
inInfo
;
return
inInfo
;
}
}
/**
* app查询日重量
* @param inInfo
* @return
*/
public
EiInfo
queryAppRCLInfo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryDayWt"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* app查询月重量
* @param inInfo
* @return
*/
public
EiInfo
queryYAppCLinfo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryMonthWt"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* app查询年重量
* @param inInfo
* @return
*/
public
EiInfo
queryAppNCLinfo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryYearWt"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* app组拼加焊综合总产量
* @param inInfo
* @return
*/
public
EiInfo
queryAppZCLinfo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryZCL"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* App查询工序产量
* @param inInfo
* @return
*/
public
EiInfo
queryAppGroupCLnfo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryGX"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* App生产项
* @param inInfo
* @return
*/
public
EiInfo
queryAppBJInfo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryProducItem"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* App主要项目进度
* @param inInfo
* @return
*/
public
EiInfo
queryAppXMinfo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryProjNameWt"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* App近5日综合产量
* @param inInfo
* @return
*/
public
EiInfo
queryAppZHCLInfo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryDayWts"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* App查询报设备状态
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"设备监控"
,
operType
=
"查询"
,
operDesc
=
"查询设备状态"
)
public
EiInfo
queryByAppSbStatus
(
EiInfo
inInfo
)
{
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
List
<
Map
>
result
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryBySbStatus"
,
params
);
inInfo
.
set
(
"result"
,
result
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
return
inInfo
;
}
/**
* App近7日设备运行时长
* @param inInfo
* @return
*/
public
EiInfo
queryAppSbYes
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"1"
,
"2"
,
"4"
));
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryBySbYes"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
/**
* app近7日设备运行时长
* @param inInfo
* @return
*/
public
EiInfo
queryAppSbNo
(
EiInfo
inInfo
){
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"3"
,
"5"
,
"6"
));
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HPBI003.queryBySbYes"
,
params
,
0
,
100
);
inInfo
.
set
(
EiConstant
.
resultBlock
,
listMap
);
return
inInfo
;
}
}
}
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI003.xml
View file @
5bff806e
...
@@ -280,7 +280,8 @@
...
@@ -280,7 +280,8 @@
select
select
SERIES as "series",
SERIES as "series",
X as "groupName",
X as "groupName",
ROUND(VALUE, 2) as "wt"
ROUND(VALUE, 2) as "wt",
SORT as "sort"
from
from
(
(
select
select
...
@@ -520,7 +521,8 @@
...
@@ -520,7 +521,8 @@
select
select
SERIES as "series",
SERIES as "series",
X as "date",
X as "date",
ROUND(VALUE, 2) as "wt"
ROUND(VALUE, 2) as "wt",
SORT as "sort"
from
from
(
(
select
select
...
...
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