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
ef2804da
Commit
ef2804da
authored
Dec 23, 2017
by
胡斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能分析平台备份提交
parent
c5255ca4
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
190 additions
and
73 deletions
+190
-73
APPEWarningDetail.java
src/main/java/com/hp/cmsz/entity/APPEWarningDetail.java
+9
-0
DimAssociationAnaInfoDao.java
...java/com/hp/cmsz/repository/DimAssociationAnaInfoDao.java
+52
-5
AssociateDiagosisDetailService.java
...vice/monitoroperation/AssociateDiagosisDetailService.java
+10
-3
TaskManageController.java
...va/com/hp/cmsz/web/commonmanage/TaskManageController.java
+44
-42
ModelMaintainController.java
.../com/hp/cmsz/web/modelmanage/ModelMaintainController.java
+42
-2
AssociateDiagosisDetailController.java
...b/monitoroperation/AssociateDiagosisDetailController.java
+2
-4
GZFX__Dimension_Province_detail_associateDiagosisDetail.tag
...FX__Dimension_Province_detail_associateDiagosisDetail.tag
+3
-2
ModelResult.jsp
src/main/webapp/WEB-INF/views/ModelManage/ModelResult.jsp
+14
-5
AssociateDiagosisDetail.jsp
...EB-INF/views/MonitorOperation/AssociateDiagosisDetail.jsp
+1
-1
ModelMonitorHome.jsp
...main/webapp/WEB-INF/views/TaskManage/ModelMonitorHome.jsp
+1
-1
RunTaskList.jsp
src/main/webapp/WEB-INF/views/TaskManage/RunTaskList.jsp
+5
-2
RunTaskListTable.jsp
...main/webapp/WEB-INF/views/TaskManage/RunTaskListTable.jsp
+4
-4
associatediagosisdetail.js
src/main/webapp/static/js/associatediagosisdetail.js
+2
-2
modelResultDetailTable.js
src/main/webapp/static/js/modelResultDetailTable.js
+1
-0
No files found.
src/main/java/com/hp/cmsz/entity/APPEWarningDetail.java
View file @
ef2804da
...
@@ -26,6 +26,7 @@ public class APPEWarningDetail {
...
@@ -26,6 +26,7 @@ public class APPEWarningDetail {
private
String
warn2Val
;
private
String
warn2Val
;
private
String
warn3Val
;
private
String
warn3Val
;
private
String
fileAddress
;
private
String
fileAddress
;
private
String
attr4
;
private
List
<
EWarningCalcResult
>
eWarningCalcResult
;
private
List
<
EWarningCalcResult
>
eWarningCalcResult
;
...
@@ -165,6 +166,14 @@ public class APPEWarningDetail {
...
@@ -165,6 +166,14 @@ public class APPEWarningDetail {
this
.
fileAddress
=
fileAddress
;
this
.
fileAddress
=
fileAddress
;
}
}
public
String
getAttr4
()
{
return
attr4
;
}
public
void
setAttr4
(
String
attr4
)
{
this
.
attr4
=
attr4
;
}
@Transient
@Transient
public
List
<
EWarningCalcResult
>
geteWarningCalcResult
()
{
public
List
<
EWarningCalcResult
>
geteWarningCalcResult
()
{
return
eWarningCalcResult
;
return
eWarningCalcResult
;
...
...
src/main/java/com/hp/cmsz/repository/DimAssociationAnaInfoDao.java
View file @
ef2804da
...
@@ -78,7 +78,7 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
...
@@ -78,7 +78,7 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
" ON "
+
" ON "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
"
WHERE
"
+
"
AND
"
+
" OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') "
+
" OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" GROUP BY "
+
" GROUP BY "
+
...
@@ -144,7 +144,52 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
...
@@ -144,7 +144,52 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
" ON "
+
" ON "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
" WHERE "
+
" AND "
+
" OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" GROUP BY "
+
" ASSOCIATION_ID, "
+
" D.PROVINCE_ID, "
+
" ASSOCIATION_TYPE , "
+
" ASSOCIATION_DESC, "
+
" d.PROVINCE_NAME, "
+
" WARNING_BEGIN_TIME, "
+
" WARNING_END_TIME "
,
nativeQuery
=
true
)
public
List
<
Object
[]>
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
String
warnBeginTime
,
String
warnEndTime
,
String
dimension
,
List
<
Long
>
provincelist
);
@Query
(
value
=
"SELECT"
+
" ASSOCIATION_ID AS associationId , "
+
" D.PROVINCE_ID AS provinceId, "
+
" ASSOCIATION_TYPE AS associationType , "
+
" ASSOCIATION_DESC AS associationDesc, "
+
" d.PROVINCE_NAME AS provinceName, "
+
" WARNING_BEGIN_TIME AS warningBeginTime ,"
+
" WARNING_END_TIME AS warningEndTime ,"
+
" COUNT(E.KPI_ID) AS warningNum "
+
" FROM "
+
" ( "
+
" SELECT "
+
" A.ASSOCIATION_ID, "
+
" C.PROVINCE_ID, "
+
" A.ASSOCIATION_DESC, "
+
" A.ASSOCIATION_TYPE, "
+
" B.KPI_ID, "
+
" C.PROVINCE_NAME, "
+
" TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') AS WARNING_BEGIN_TIME, "
+
" TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') AS WARNING_END_TIME "
+
" FROM "
+
" CCOLAP.DIM_ASSOCIATION_ANALYSIS_INFO_T A, CCOLAP.DIM_KPI_ASSOCIATION_RELATED_INFO_T B , "
+
" CCOLAP.DIM_PROVINCE_INFO_T C "
+
"WHERE "
+
" A.ASSOCIATION_ID=B.ASSOCIATION_ID and C.PROVINCE_ID in(?3)) D "
+
" LEFT JOIN "
+
" CCOLAP.xcd_warning_detail_info_v E "
+
" ON "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
" AND "
+
" OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') "
+
" OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" GROUP BY "
+
" GROUP BY "
+
...
@@ -156,7 +201,9 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
...
@@ -156,7 +201,9 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
" WARNING_BEGIN_TIME, "
+
" WARNING_BEGIN_TIME, "
+
" WARNING_END_TIME "
" WARNING_END_TIME "
,
nativeQuery
=
true
)
,
nativeQuery
=
true
)
public
List
<
Object
[]>
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
String
warnBeginTime
,
String
warnEndTime
,
char
dimension
,
List
<
Long
>
provincelist
);
public
List
<
Object
[]>
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndProvinceList
(
String
warnBeginTime
,
String
warnEndTime
,
List
<
Long
>
provincelist
);
@Query
(
value
=
"SELECT ASSOCIATION_ID, D.PROVINCE_ID, ASSOCIATION_TYPE ,ASSOCIATION_DESC, PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME,"
+
@Query
(
value
=
"SELECT ASSOCIATION_ID, D.PROVINCE_ID, ASSOCIATION_TYPE ,ASSOCIATION_DESC, PROVINCE_NAME, WARNING_BEGIN_TIME, WARNING_END_TIME,"
+
...
@@ -248,7 +295,7 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
...
@@ -248,7 +295,7 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
" ON "
+
" ON "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
"
WHERE
"
+
"
AND
"
+
" OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') "
+
" OCCUR_TIME >=TO_TIMESTAMP(?1,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" AND ASSOCIATION_ID= ?3"
+
" AND ASSOCIATION_ID= ?3"
+
...
@@ -301,7 +348,7 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
...
@@ -301,7 +348,7 @@ public interface DimAssociationAnaInfoDao extends JpaSpecificationExecutor<DimAs
" ON "
+
" ON "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" D.PROVINCE_ID=E.PROVINCE_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
" AND D.KPI_ID =E.KPI_ID "
+
"
WHERE
"
+
"
AND
"
+
" OCCUR_TIME >=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" OCCUR_TIME >=TO_TIMESTAMP(?2,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?3,'YYYY-MM-DD HH24:MI:SS') "
+
" AND OCCUR_TIME <=TO_TIMESTAMP(?3,'YYYY-MM-DD HH24:MI:SS') "
+
" GROUP BY "
+
" GROUP BY "
+
...
...
src/main/java/com/hp/cmsz/service/monitoroperation/AssociateDiagosisDetailService.java
View file @
ef2804da
...
@@ -6,6 +6,7 @@ import com.hp.cmsz.entity.AssociateDiagosisWarningDetail;
...
@@ -6,6 +6,7 @@ import com.hp.cmsz.entity.AssociateDiagosisWarningDetail;
import
com.hp.cmsz.entity.XcdWarningInfoView
;
import
com.hp.cmsz.entity.XcdWarningInfoView
;
import
com.hp.cmsz.repository.DimAssociationAnaInfoDao
;
import
com.hp.cmsz.repository.DimAssociationAnaInfoDao
;
import
com.hp.cmsz.repository.XcdWarningInfoViewDao
;
import
com.hp.cmsz.repository.XcdWarningInfoViewDao
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -88,10 +89,16 @@ public class AssociateDiagosisDetailService {
...
@@ -88,10 +89,16 @@ public class AssociateDiagosisDetailService {
// return dimAssociationAnaInfoDao.findAssociateDiagosisDetailByWarnTimeBeginAndEnd(warnBeginTime, warnEndTime);
// return dimAssociationAnaInfoDao.findAssociateDiagosisDetailByWarnTimeBeginAndEnd(warnBeginTime, warnEndTime);
}
}
public
List
<
AssociateDiagosisDetail
>
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
String
warnBeginTime
,
String
warnEndTime
,
char
dimension
,
List
<
Long
>
provincelist
){
public
List
<
AssociateDiagosisDetail
>
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
String
warnBeginTime
,
String
warnEndTime
,
String
dimension
,
List
<
Long
>
provincelist
){
List
<
Object
[]>
list
=
dimAssociationAnaInfoDao
.
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
warnBeginTime
,
warnEndTime
,
dimension
,
provincelist
);
List
<
AssociateDiagosisDetail
>
diagosisDetails
=
new
ArrayList
<
AssociateDiagosisDetail
>();
List
<
Object
[]>
list
=
null
;
if
(
StringUtils
.
isNotEmpty
(
dimension
)){
list
=
dimAssociationAnaInfoDao
.
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
warnBeginTime
,
warnEndTime
,
dimension
,
provincelist
);
}
else
{
list
=
dimAssociationAnaInfoDao
.
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndProvinceList
(
warnBeginTime
,
warnEndTime
,
provincelist
);
}
List
<
AssociateDiagosisDetail
>
diagosisDetails
=
new
ArrayList
<
AssociateDiagosisDetail
>();
if
(
null
!=
list
){
if
(
null
!=
list
){
for
(
Object
[]
objects
:
list
)
{
for
(
Object
[]
objects
:
list
)
{
AssociateDiagosisDetail
detail
=
new
AssociateDiagosisDetail
();
AssociateDiagosisDetail
detail
=
new
AssociateDiagosisDetail
();
...
...
src/main/java/com/hp/cmsz/web/commonmanage/TaskManageController.java
View file @
ef2804da
...
@@ -343,46 +343,45 @@ public class TaskManageController {
...
@@ -343,46 +343,45 @@ public class TaskManageController {
RunTask
rt
=
runTaskService
.
getRunTask
(
Long
.
parseLong
(
id
));
RunTask
rt
=
runTaskService
.
getRunTask
(
Long
.
parseLong
(
id
));
String
path
=
modelSavePath
+
"/"
+
rt
.
getDataModelView
().
getModelScriptName
()+
" "
+
id
+
" 1 "
+
previewId
;
String
path
=
modelSavePath
+
"/"
+
rt
.
getDataModelView
().
getModelScriptName
()+
" "
+
id
+
" 1 "
+
previewId
;
// String path ="d:\\rscript\\a.r";
// try {
// Runtime run = Runtime.getRuntime();// 返回与当前 Java 应用程序相关的运行时对象
// try {
// String cmds = "Rscript "+path; // 注意:对字符串中路径\进行转义
// Process p = run.exec(cmds);// 启动另一个进程来执行命令
// InputStream is = p.getInputStream();
// BufferedReader reader = new BufferedReader(new InputStreamReader(is));
// String line = null;
// //[1] "13500001"
// StringBuffer context = new StringBuffer();
// while ((line = reader.readLine()) != null){
// System.out.println(line);
// context.append(line);
// }
//
// System.out.println("context:"+context);
// int i = context.indexOf("EWARNING_DETAIL_ID:");
// String k = context.substring(i+19,context.length()-1);
//
// p.waitFor();
// is.close();
// reader.close();
// p.destroy();
// app = aPPEWarningDetailDao.findByEwarningDetailId(Long.parseLong(k));
//
// app.seteWarningCalcResult(eWarningCalcResultDao.findByEwarningDetailId(app.getEwarningDetailId()));
//
//
// } catch (Exception e) {
// e.printStackTrace();
// }
// }catch (Exception e){
// System.out.println("错误:"+e.toString());
// }
System
.
out
.
println
(
path
);
try
{
app
=
aPPEWarningDetailDao
.
findByEwarningDetailId
(
Long
.
parseLong
(
"13500001"
));
Runtime
run
=
Runtime
.
getRuntime
();
// 返回与当前 Java 应用程序相关的运行时对象
try
{
String
cmds
=
"Rscript "
+
path
;
// 注意:对字符串中路径\进行转义
Process
p
=
run
.
exec
(
cmds
);
// 启动另一个进程来执行命令
InputStream
is
=
p
.
getInputStream
();
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
is
));
String
line
=
null
;
//[1] "13500001"
StringBuffer
context
=
new
StringBuffer
();
while
((
line
=
reader
.
readLine
())
!=
null
){
System
.
out
.
println
(
line
);
context
.
append
(
line
);
}
System
.
out
.
println
(
"context:"
+
context
);
int
i
=
context
.
indexOf
(
"EWARNING_DETAIL_ID:"
);
String
k
=
context
.
substring
(
i
+
19
,
context
.
length
()-
1
);
p
.
waitFor
();
is
.
close
();
reader
.
close
();
p
.
destroy
();
app
=
aPPEWarningDetailDao
.
findByEwarningDetailId
(
Long
.
parseLong
(
k
));
app
.
seteWarningCalcResult
(
eWarningCalcResultDao
.
findByEwarningDetailId
(
app
.
getEwarningDetailId
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
catch
(
Exception
e
){
System
.
out
.
println
(
"错误:"
+
e
.
toString
());
}
app
.
seteWarningCalcResult
(
eWarningCalcResultDao
.
findByEwarningDetailId
(
app
.
getEwarningDetailId
()));
// app = aPPEWarningDetailDao.findByEwarningDetailId(Long.parseLong("13500001"));
//
// app.seteWarningCalcResult(eWarningCalcResultDao.findByEwarningDetailId(app.getEwarningDetailId()));
return
app
;
return
app
;
...
@@ -419,18 +418,20 @@ public class TaskManageController {
...
@@ -419,18 +418,20 @@ public class TaskManageController {
public
String
ImgDisplay
(
Map
model
)
throws
ParseException
{
public
String
ImgDisplay
(
Map
model
)
throws
ParseException
{
return
PageURLController
.
RunTaskImgDisplay
;
return
PageURLController
.
RunTaskImgDisplay
;
}
}
//根据任务id获取模型参数
@RequestMapping
(
value
=
"/getParameterByTaskId*"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getParameterByTaskId*"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
List
<
ModelParameter
>
getParameter
(
String
taskId
,
Map
model
)
throws
ParseException
{
public
List
<
ModelParameter
>
getParameter
(
String
taskId
,
Map
model
)
throws
ParseException
{
List
<
ModelParameter
>
mpl
=
modelParameterDao
.
findByTaskIdAndIfSystemDefault
(
Long
.
parseLong
(
taskId
),
1L
);
List
<
ModelParameter
>
mpl
=
modelParameterDao
.
findByTaskIdAndIfSystemDefault
(
Long
.
parseLong
(
taskId
),
1L
);
return
mpl
;
return
mpl
;
}
}
//更改模型预览的临时参数
@RequestMapping
(
value
=
"/updateParameter*"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/updateParameter*"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
String
updateParameter
(
String
parameterId
,
String
parameterVal
,
Map
model
)
throws
ParseException
{
public
String
updateParameter
(
String
parameterId
,
String
parameterVal
,
Map
model
)
throws
ParseException
{
String
[]
paramIdArr
=
null
;
String
[]
paramIdArr
=
null
;
String
[]
paramValArr
=
null
;
String
[]
paramValArr
=
null
;
if
(
","
.
contains
(
parameterId
)){
if
(
parameterId
.
contains
(
","
)){
paramIdArr
=
parameterId
.
split
(
","
);
paramIdArr
=
parameterId
.
split
(
","
);
paramValArr
=
parameterVal
.
split
(
","
);
paramValArr
=
parameterVal
.
split
(
","
);
}
else
{
}
else
{
...
@@ -439,8 +440,10 @@ public class TaskManageController {
...
@@ -439,8 +440,10 @@ public class TaskManageController {
paramValArr
=
new
String
[]{
parameterVal
};
paramValArr
=
new
String
[]{
parameterVal
};
}
}
}
}
List
<
Long
>
paramIdList
=
new
ArrayList
<
Long
>();
List
<
Long
>
paramIdList
=
new
ArrayList
<
Long
>();
for
(
String
aParamIdArr
:
paramIdArr
)
{
for
(
String
aParamIdArr
:
paramIdArr
)
{
System
.
out
.
println
(
aParamIdArr
);
paramIdList
.
add
(
Long
.
parseLong
(
aParamIdArr
));
paramIdList
.
add
(
Long
.
parseLong
(
aParamIdArr
));
}
}
...
@@ -455,13 +458,10 @@ public class TaskManageController {
...
@@ -455,13 +458,10 @@ public class TaskManageController {
pp
.
setParameterValue
(
paramValArr
[
i
]);
pp
.
setParameterValue
(
paramValArr
[
i
]);
pp
.
setParameterCode
(
mpL
.
get
(
i
).
getParameterCode
());
pp
.
setParameterCode
(
mpL
.
get
(
i
).
getParameterCode
());
pp
.
setParameterSourceId
(
t
);
pp
.
setParameterSourceId
(
t
);
// assert paramValArr != null;
// mpL.get(i).setParameterValue();
previewParameterDao
.
save
(
pp
);
previewParameterDao
.
save
(
pp
);
}
}
}
}
}
}
// modelParameterDao.save(mpL);
return
"success?"
+
t
;
return
"success?"
+
t
;
}
}
...
@@ -469,4 +469,5 @@ public class TaskManageController {
...
@@ -469,4 +469,5 @@ public class TaskManageController {
}
}
\ No newline at end of file
src/main/java/com/hp/cmsz/web/modelmanage/ModelMaintainController.java
View file @
ef2804da
...
@@ -17,6 +17,7 @@ import java.util.Map;
...
@@ -17,6 +17,7 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.xml.crypto.Data
;
import
org.apache.commons.fileupload.FileItem
;
import
org.apache.commons.fileupload.FileItem
;
import
org.apache.commons.fileupload.disk.DiskFileItemFactory
;
import
org.apache.commons.fileupload.disk.DiskFileItemFactory
;
...
@@ -208,9 +209,9 @@ public class ModelMaintainController {
...
@@ -208,9 +209,9 @@ public class ModelMaintainController {
if
(!
modelExeScriptName
.
trim
().
equals
(
""
)){
if
(!
modelExeScriptName
.
trim
().
equals
(
""
)){
dataModel
.
setModelScriptName
(
modelExeScriptName
);
dataModel
.
setModelScriptName
(
modelExeScriptName
);
File
file
=
new
File
(
modelSavePath
,
modelExeScriptName
);
File
file
=
new
File
(
modelSavePath
,
modelExeScriptName
);
/*
if(!file.exists()){
if
(!
file
.
exists
()){
fm
.
write
(
file
);
fm
.
write
(
file
);
}
*/
}
}
}
}
}
}
}
...
@@ -318,4 +319,43 @@ public class ModelMaintainController {
...
@@ -318,4 +319,43 @@ public class ModelMaintainController {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
//下载模型
@RequestMapping
(
value
=
"/modelDownload*"
,
method
=
RequestMethod
.
POST
)
public
void
modelDownload
(
@RequestParam
(
"modelId"
)
String
modelId
,
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
response
.
setContentType
(
"application/octet-stream"
);
DataModel
dm
=
dataModelDao
.
findByDataModelId
(
Long
.
parseLong
(
modelId
));
String
fileName
=
dm
.
getModelScriptName
();
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
fileName
);
String
modelSavePath
=
systemParameterDao
.
findByParameterName
(
"MODEL_SCRIPT_FILE_DIR"
).
get
(
0
).
getParameterValue
();
fileName
=
modelSavePath
+
"/"
+
fileName
;
// fileName = "D:\\Untitled-3.txt";
File
file
=
new
File
(
fileName
);
response
.
setContentLength
((
int
)
file
.
length
());
FileInputStream
fis
=
null
;
try
{
fis
=
new
FileInputStream
(
file
);
byte
[]
buffer
=
new
byte
[
128
];
int
count
=
0
;
while
((
count
=
fis
.
read
(
buffer
))
>
0
)
{
response
.
getOutputStream
().
write
(
buffer
,
0
,
count
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
response
.
getOutputStream
().
flush
();
response
.
getOutputStream
().
close
();
fis
.
close
();
}
}
}
}
src/main/java/com/hp/cmsz/web/monitoroperation/AssociateDiagosisDetailController.java
View file @
ef2804da
...
@@ -116,7 +116,7 @@ public class AssociateDiagosisDetailController {
...
@@ -116,7 +116,7 @@ public class AssociateDiagosisDetailController {
@RequestParam
(
value
=
"detailProvince"
,
defaultValue
=
""
)
String
detailProvince
)
{
@RequestParam
(
value
=
"detailProvince"
,
defaultValue
=
""
)
String
detailProvince
)
{
String
str
=
""
;
String
str
=
""
;
if
(
detailtime
.
equalsIgnoreCase
(
""
)
if
(
detailtime
.
equalsIgnoreCase
(
""
)
||
dimension
.
equalsIgnoreCase
(
""
)
||
detailProvince
.
equalsIgnoreCase
(
""
))
{
||
detailProvince
.
equalsIgnoreCase
(
""
))
{
return
str
;
return
str
;
}
}
String
[]
provinceStr
=
detailProvince
.
split
(
","
);
String
[]
provinceStr
=
detailProvince
.
split
(
","
);
...
@@ -128,12 +128,10 @@ public class AssociateDiagosisDetailController {
...
@@ -128,12 +128,10 @@ public class AssociateDiagosisDetailController {
warnBeginTime
.
replaceAll
(
"%"
,
" "
);
warnBeginTime
.
replaceAll
(
"%"
,
" "
);
warnEndTime
=
times
[
1
];
warnEndTime
=
times
[
1
];
warnEndTime
.
replaceAll
(
"%"
,
" "
);
warnEndTime
.
replaceAll
(
"%"
,
" "
);
char
dimensionc
=
'd'
;
try
{
try
{
for
(
String
s
:
provinceStr
)
{
for
(
String
s
:
provinceStr
)
{
provinceList
.
add
(
Long
.
parseLong
(
s
));
provinceList
.
add
(
Long
.
parseLong
(
s
));
}
}
dimensionc
=
dimension
.
charAt
(
0
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
format
.
parse
(
warnBeginTime
);
format
.
parse
(
warnBeginTime
);
format
.
parse
(
warnEndTime
);
format
.
parse
(
warnEndTime
);
...
@@ -143,7 +141,7 @@ public class AssociateDiagosisDetailController {
...
@@ -143,7 +141,7 @@ public class AssociateDiagosisDetailController {
return
str
;
return
str
;
}
}
List
<
AssociateDiagosisDetail
>
diagosisDetails
=
associateDiagosisDetailService
.
List
<
AssociateDiagosisDetail
>
diagosisDetails
=
associateDiagosisDetailService
.
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
warnBeginTime
,
warnEndTime
,
dimension
c
,
provinceList
);
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList
(
warnBeginTime
,
warnEndTime
,
dimension
,
provinceList
);
Gson
gson
=
new
Gson
();
Gson
gson
=
new
Gson
();
return
gson
.
toJson
(
diagosisDetails
);
return
gson
.
toJson
(
diagosisDetails
);
...
...
src/main/webapp/WEB-INF/tags/GZFX__Dimension_Province_detail_associateDiagosisDetail.tag
View file @
ef2804da
...
@@ -23,8 +23,9 @@
...
@@ -23,8 +23,9 @@
<div class="slide-select">
<div class="slide-select">
<label for="">关联维度:</label>
<label for="">关联维度:</label>
<select name="xcdStatus" id="xcdStatusSelect" class="slide-menu-select" onChange="judge=false;">
<select name="xcdStatus" id="xcdStatusSelect" class="slide-menu-select" onChange="judge=false;">
<option value="c">业务</option>
<option value="" selected>全部</option>
<option value="y" selected>渠道</option>
<option value="y">业务</option>
<option value="c" >渠道</option>
<%--<c:forEach var="workingOrderStatus" items="${workingOrderStatusList}">
<%--<c:forEach var="workingOrderStatus" items="${workingOrderStatusList}">
<option value="${workingOrderStatus}" id="xcdStatus">
<option value="${workingOrderStatus}" id="xcdStatus">
${workingOrderStatus}
${workingOrderStatus}
...
...
src/main/webapp/WEB-INF/views/ModelManage/ModelResult.jsp
View file @
ef2804da
...
@@ -45,8 +45,6 @@
...
@@ -45,8 +45,6 @@
<tags:FXJM
_Status
/>
<tags:FXJM
_Status
/>
<tags:ModelDataType/>
<tags:ModelDataType/>
<tags:FXJM
_TitleSearch
/>
<tags:FXJM
_TitleSearch
/>
<!-- <tags:FXJM_modelResult_DeployedServerTag/> -->
<!-- <tags:FXJM_modelResult_DeployedServerTag/> -->
<button
id=
"submit"
class=
"btn btn-primary"
onclick=
"modelResultSubmit()"
>
提交
</button>
<button
id=
"submit"
class=
"btn btn-primary"
onclick=
"modelResultSubmit()"
>
提交
</button>
<button
id=
"disable"
class=
"btn btn-warning"
onclick=
"modelResultReset()"
>
重置
</button>
<button
id=
"disable"
class=
"btn btn-warning"
onclick=
"modelResultReset()"
>
重置
</button>
...
@@ -80,6 +78,7 @@
...
@@ -80,6 +78,7 @@
模型查询结果
模型查询结果
<shiro:hasAnyRoles
name=
"admin,dataAnalysis,businessAnalysis"
>
<shiro:hasAnyRoles
name=
"admin,dataAnalysis,businessAnalysis"
>
<div
id=
"time_div"
style=
"top: -6px;float: right;height: 0px;position: relative;"
>
<div
id=
"time_div"
style=
"top: -6px;float: right;height: 0px;position: relative;"
>
<button
class=
"btn-sm btn btn-info btn-sm btn-group btn-group-cog"
id=
"ModelDownload"
onclick=
"modelDownload()"
disabled
>
模型下载
</button>
<button
class=
"btn-sm btn btn-primary btn-sm btn-group btn-group-cog"
id=
"updateModel"
disabled
>
修改模型
</button>
<button
class=
"btn-sm btn btn-primary btn-sm btn-group btn-group-cog"
id=
"updateModel"
disabled
>
修改模型
</button>
<button
class=
"btn-sm btn btn-primary btn-sm btn-group btn-group-cog"
id=
"createModel"
>
新建模型
</button>
<button
class=
"btn-sm btn btn-primary btn-sm btn-group btn-group-cog"
id=
"createModel"
>
新建模型
</button>
</div>
</div>
...
@@ -103,8 +102,9 @@
...
@@ -103,8 +102,9 @@
<script
type=
"text/javascript"
src=
"${ctx}/static/js/modelResultDetailTable.js"
></script>
<script
type=
"text/javascript"
src=
"${ctx}/static/js/modelResultDetailTable.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
initDate
();
initDate
();
var
receiveModelPageNum
=
"${modelPageNum}"
;
var
receiveModelPageNum
=
"${modelPageNum}"
;
modelResultDetailTable
();
modelResultDetailTable
();
if
(
receiveModelPageNum
!=
1
){
if
(
receiveModelPageNum
!=
1
){
...
@@ -182,6 +182,7 @@
...
@@ -182,6 +182,7 @@
modelResultDetailTable
();
modelResultDetailTable
();
modelId
=
""
;
modelId
=
""
;
$
(
"#updateModel"
).
attr
(
"disabled"
,
true
);
$
(
"#updateModel"
).
attr
(
"disabled"
,
true
);
$
(
"#ModelDownload"
).
attr
(
"disabled"
,
true
);
toggleMenu
(
'slidePushMenus2'
);
//隐藏筛选项
toggleMenu
(
'slidePushMenus2'
);
//隐藏筛选项
updateTag
(
true
);
updateTag
(
true
);
}
}
...
@@ -207,6 +208,7 @@
...
@@ -207,6 +208,7 @@
modelResultDetailTable
();
modelResultDetailTable
();
modelId
=
""
;
modelId
=
""
;
$
(
"#updateModel"
).
attr
(
"disabled"
,
true
);
$
(
"#updateModel"
).
attr
(
"disabled"
,
true
);
$
(
"#ModelDownload"
).
attr
(
"disabled"
,
true
);
toggleMenu
(
'slidePushMenus2'
);
//隐藏筛选项
toggleMenu
(
'slidePushMenus2'
);
//隐藏筛选项
updateTag
(
true
);
updateTag
(
true
);
}
}
...
@@ -238,7 +240,14 @@
...
@@ -238,7 +240,14 @@
}
}
}
}
}
}
function
modelDownload
()
{
var
url
=
"${ctx}/ModelManage/ModelMaintain/modelDownload"
;
var
form
=
$
(
"<form></form>"
).
attr
(
"action"
,
url
).
attr
(
"method"
,
"POST"
);
form
.
append
(
$
(
"<input/>"
).
attr
(
"type"
,
"hidden"
).
attr
(
"name"
,
"modelId"
).
attr
(
"value"
,
modelId
));
form
.
appendTo
(
'body'
).
submit
().
remove
();
}
//更新按钮点击
//更新按钮点击
$
(
"#updateModel"
).
click
(
function
(){
$
(
"#updateModel"
).
click
(
function
(){
var
pageNum
=
$
(
"#goPageNo"
).
val
();
var
pageNum
=
$
(
"#goPageNo"
).
val
();
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/AssociateDiagosisDetail.jsp
View file @
ef2804da
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
${diagosisDetails}
</div>
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
...
...
src/main/webapp/WEB-INF/views/TaskManage/ModelMonitorHome.jsp
View file @
ef2804da
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td>模型评价</td>"
+
" <td>模型评价</td>"
+
" <td colspan='6' align='center'>"
+
data
.
evaluationResult
+
"</td>"
+
" <td colspan='6' align='center'>"
+
removeNull
(
data
.
attr4
)
+
"</td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td colspan='8' align='center'>图表展示</td>"
+
" <td colspan='8' align='center'>图表展示</td>"
+
...
...
src/main/webapp/WEB-INF/views/TaskManage/RunTaskList.jsp
View file @
ef2804da
...
@@ -153,7 +153,6 @@ taskName = "自定义任务";
...
@@ -153,7 +153,6 @@ taskName = "自定义任务";
}
}
})
})
}
}
function
changeParameter
()
{
function
changeParameter
()
{
var
paramId
=
""
;
var
paramId
=
""
;
var
paramVal
=
""
;
var
paramVal
=
""
;
...
@@ -200,9 +199,13 @@ taskName = "自定义任务";
...
@@ -200,9 +199,13 @@ taskName = "自定义任务";
function
choseTask
(){
function
choseTask
(){
$
(
"#ModelPreview"
).
attr
(
"disabled"
,
false
);
$
(
"#ModelPreview"
).
attr
(
"disabled"
,
false
);
$
(
"#
parameterChange
"
).
attr
(
"disabled"
,
false
);
$
(
"#
ModelDownload
"
).
attr
(
"disabled"
,
false
);
}
}
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
queryResult
(
1
);
queryResult
(
1
);
});
});
...
...
src/main/webapp/WEB-INF/views/TaskManage/RunTaskListTable.jsp
View file @
ef2804da
...
@@ -7,13 +7,13 @@
...
@@ -7,13 +7,13 @@
<div id="time_div" style="top: -6px;float: right;height: 0px;position: relative;">
<div id="time_div" style="top: -6px;float: right;height: 0px;position: relative;">
<button class="btn-sm btn btn-success btn-sm btn-group btn-group-cog" onclick="changeTaskStatus('1')">运行</button>
<button class="btn-sm btn btn-success btn-sm btn-group btn-group-cog" onclick="changeTaskStatus('1')">运行</button>
<button class="btn-sm btn btn-
primary
btn-sm btn-group btn-group-cog" onclick="changeTaskStatus('2')">暂停</button>
<button class="btn-sm btn btn-
info
btn-sm btn-group btn-group-cog" onclick="changeTaskStatus('2')">暂停</button>
<button class="btn-sm btn btn-
primary
btn-sm btn-group btn-group-cog" onclick="editTask();">修改</button>
<button class="btn-sm btn btn-
warning
btn-sm btn-group btn-group-cog" onclick="editTask();">修改</button>
<button class="btn-sm btn btn-
warning
btn-sm btn-group btn-group-cog" onclick="deleteTask();">删除</button>
<button class="btn-sm btn btn-
danger
btn-sm btn-group btn-group-cog" onclick="deleteTask();">删除</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="addTask();">新建</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="addTask();">新建</button>
<%--create by afe 2017-10-26--%>
<%--create by afe 2017-10-26--%>
<c:if test="${runTask.defaultTaskType == '1' || runTask.defaultTaskType == '5' }">
<c:if test="${runTask.defaultTaskType == '1' || runTask.defaultTaskType == '5' }">
<button class="btn-sm btn btn-
primary
btn-sm btn-group btn-group-cog" id="ModelPreview" onclick="preview()" disabled>模型预览</button>
<button class="btn-sm btn btn-
success
btn-sm btn-group btn-group-cog" id="ModelPreview" onclick="preview()" disabled>模型预览</button>
</c:if>
</c:if>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/static/js/associatediagosisdetail.js
View file @
ef2804da
...
@@ -186,10 +186,10 @@ table_pagging.prototype={
...
@@ -186,10 +186,10 @@ table_pagging.prototype={
}
else
if
(
k
==
2
){
}
else
if
(
k
==
2
){
tdContext
=
this
.
getData
(
this
.
objectlist
[
i
],
this
.
header
[
k
][
1
]);
tdContext
=
this
.
getData
(
this
.
objectlist
[
i
],
this
.
header
[
k
][
1
]);
if
(
tdContext
==
'c'
){
if
(
tdContext
==
'c'
){
tdContext
=
"
业务
"
;
tdContext
=
"
渠道
"
;
}
}
if
(
tdContext
==
'y'
){
if
(
tdContext
==
'y'
){
tdContext
=
"
渠道
"
;
tdContext
=
"
业务
"
;
}
}
}
}
else
if
(
k
==
7
){
else
if
(
k
==
7
){
...
...
src/main/webapp/static/js/modelResultDetailTable.js
View file @
ef2804da
...
@@ -577,6 +577,7 @@ function radioChoose(clickObj){
...
@@ -577,6 +577,7 @@ function radioChoose(clickObj){
//alert(clickObj);
//alert(clickObj);
//alert(clickObj.nextSibling.innerHTML);
//alert(clickObj.nextSibling.innerHTML);
$
(
"#updateModel"
).
attr
(
"disabled"
,
false
);
$
(
"#updateModel"
).
attr
(
"disabled"
,
false
);
$
(
"#ModelDownload"
).
attr
(
"disabled"
,
false
);
modelId
=
parseInt
(
obj
[
parseInt
(
clickObj
.
nextSibling
.
innerHTML
)].
dataModelId
);
modelId
=
parseInt
(
obj
[
parseInt
(
clickObj
.
nextSibling
.
innerHTML
)].
dataModelId
);
}
}
...
...
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