Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cmszMonitorAnalysis
Project
Project
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
liuna
cmszMonitorAnalysis
Commits
be1d3a7b
Commit
be1d3a7b
authored
Mar 13, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2018年3月13日 --智能分析平台
--R文件修改路径
parent
c35ea6f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
11 deletions
+27
-11
RegularityAnalysisController.java
...sz/web/monitoroperation/RegularityAnalysisController.java
+27
-11
No files found.
src/main/java/com/hp/cmsz/web/monitoroperation/RegularityAnalysisController.java
View file @
be1d3a7b
...
...
@@ -158,8 +158,19 @@ public class RegularityAnalysisController {
System
.
out
.
println
(
"!!!!!bacTypeList:"
+
bacTypeList
.
size
());
System
.
out
.
println
(
"!!!!!providerList:"
+
providerList
.
size
());
System
.
out
.
println
(
"!!!!!analysisTypeList:"
+
analysisTypeList
.
size
());
ArrayList
<
Double
>
business
=
new
ArrayList
<
Double
>();
//所有业务
for
(
int
t
=
0
;
t
<
busList
.
size
();
t
++){
if
(
"Y"
.
equals
(
busList
.
get
(
t
).
getIsActive
())){
business
.
add
(
Double
.
parseDouble
(
String
.
valueOf
(
busList
.
get
(
t
).
getBusinessId
())));
}
}
double
[]
Dbusiness
=
new
double
[
business
.
size
()];
for
(
int
i
=
0
;
i
<
business
.
size
();
i
++)
{
Dbusiness
[
i
]
=
business
.
get
(
i
);
}
System
.
out
.
println
(
"!!!!businessList:"
+
Arrays
.
toString
(
business
.
toArray
()));
// 调用R生成图片
String
imageName
=
request
.
getSession
().
getId
()+
System
.
currentTimeMillis
()
+
".jpeg"
;
...
...
@@ -178,8 +189,9 @@ public class RegularityAnalysisController {
/* driverPath = "C:\\vertica-jdbc-7.0.1.jar";*/
s
.
eval
(
"library('YWGL')"
);
s
.
set
(
"analysisType"
,
1
);
//同省同渠道多业务
// s.eval("library('YWGL')");
s
.
eval
(
"source('/home/R/YWGL/R/text.R')"
);
s
.
set
(
"analysisType"
,
1
);
//同省同渠道多业务
double
[]
province
=
{
26
};
//贵州
s
.
set
(
"province"
,
province
);
s
.
set
(
"city"
,
-
1
);
...
...
@@ -188,13 +200,14 @@ public class RegularityAnalysisController {
double
[]
channel
=
{
4
};
//实体厅
s
.
set
(
"channel"
,
channel
);
double
[]
business
=
new
double
[
busList
.
size
()];
//所有业务
for
(
int
t
=
0
;
t
<
busList
.
size
();
t
++){
business
[
t
]
=
Double
.
parseDouble
(
String
.
valueOf
(
busList
.
get
(
t
).
getBusinessId
()));
}
//
double[] business = new double[busList.size()];//所有业务
//
for(int t = 0;t < busList.size();t++){
//
business[t] = Double.parseDouble(String.valueOf(busList.get(t).getBusinessId()));
//
}
System
.
out
.
println
(
Arrays
.
toString
(
business
));
s
.
set
(
"business"
,
business
);
s
.
set
(
"business"
,
Dbusiness
);
s
.
set
(
"kpiType"
,
1
);
s
.
set
(
"granularity"
,
-
1
);
s
.
set
(
"kpi"
,
-
1
);
...
...
@@ -230,7 +243,10 @@ public class RegularityAnalysisController {
s
.
set
(
"imagePath"
,
imagePath
);
s
.
set
(
"driverPath"
,
driverPath
);
REXP
rexp
=
s
.
eval
(
"ywgl(analysisType,province,city,bacType,datasource,channel,business,kpiType,kpi,link,granularity,start,end,dbHost,dbPort,dbName,dbUser,dbPassword,imagePath,driverPath)"
);
REXP
rexp
=
s
.
eval
(
"ywgl(analysisType,province,city,bacType,datasource,channel,"
+
"business,kpiType,kpi,link,granularity,start,end,dbHost,dbPort,dbName,dbUser,dbPassword,"
+
"imagePath,driverPath)"
);
System
.
out
.
println
(
"rexp:"
+
rexp
);
RList
rl
=
rexp
.
asList
();
System
.
out
.
println
(
"value:\n"
+
((
REXPString
)
rl
.
get
(
"value"
)).
asString
());
...
...
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