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
423d333e
Commit
423d333e
authored
Mar 14, 2024
by
yukang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
e014097f
aaf75274
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
20 deletions
+79
-20
CommonConstant.java
.../java/com/baosight/hpjx/core/constant/CommonConstant.java
+0
-10
ServiceHPBI002.java
.../java/com/baosight/hpjx/hp/bi/service/ServiceHPBI002.java
+74
-4
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+1
-1
ServiceHPSC002A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
+1
-1
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+1
-1
HPSC008.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC008.xml
+1
-1
HPXS002.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS002.xml
+1
-2
No files found.
src/main/java/com/baosight/hpjx/core/constant/CommonConstant.java
View file @
423d333e
...
...
@@ -71,14 +71,4 @@ public class CommonConstant {
// ROOT
public
static
final
String
ROOT
=
"root"
;
}
public
static
class
ProjectEnv
{
public
static
final
String
RUN
=
"run"
;
public
static
final
String
DEV
=
"dev"
;
}
}
src/main/java/com/baosight/hpjx/hp/bi/service/ServiceHPBI002.java
View file @
423d333e
...
...
@@ -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
*
* @param inInfo
...
...
@@ -657,16 +728,15 @@ public class ServiceHPBI002 extends ServiceBase {
Map
result1
=
(
Map
)
result
.
get
(
"49badd3044f04d3e8b89b1d0b7d3ff0e"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"
appEname,date,unitCover
"
;
String
json
=
"
ORG_ID,ORG_CNAME
"
;
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"
));
datalist
.
add
(
obj
.
get
(
"ORG_ID"
));
datalist
.
add
(
obj
.
get
(
"ORG_CNAME"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
423d333e
...
...
@@ -786,7 +786,7 @@ public class ServiceHPSC002 extends ServiceBase {
String
realPath
=
hpds002
.
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
View file @
423d333e
...
...
@@ -149,7 +149,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
String
realPath
=
list
.
get
(
0
).
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
423d333e
...
...
@@ -330,7 +330,7 @@ public class ServiceHPSC006 extends ServiceBase {
String
realPath
=
hpds002
.
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC008.xml
View file @
423d333e
...
...
@@ -122,7 +122,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID a
sc
CREATED_TIME de
sc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS002.xml
View file @
423d333e
...
...
@@ -127,8 +127,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
A.COMPANY_CODE asc,
A.CREATED_TIME asc
A.CREATED_TIME desc
</isEmpty>
</dynamic>
</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