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
445fbf80
Commit
445fbf80
authored
Dec 18, 2017
by
胡斌
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/liuna'
# Conflicts: # .idea/workspace.xml
parents
1c6e4772
793255b1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
166 additions
and
77 deletions
+166
-77
TSWB_YZDetailDataDao.class
build/com/hp/cmsz/repository/TSWB_YZDetailDataDao.class
+0
-0
TSWBAnalysisService.class
...hp/cmsz/service/analysissupport/TSWBAnalysisService.class
+0
-0
QualityRuleOperationDetail.java
...n/java/com/hp/cmsz/entity/QualityRuleOperationDetail.java
+24
-0
QualityRuleReportInfoDao.java
...java/com/hp/cmsz/repository/QualityRuleReportInfoDao.java
+4
-1
TSWB_YZDetailDataDao.java
...ain/java/com/hp/cmsz/repository/TSWB_YZDetailDataDao.java
+1
-1
QualityRuleInfoService.java
.../cmsz/service/analysissupport/QualityRuleInfoService.java
+1
-0
QualityRuleReportInfoService.java
...service/analysissupport/QualityRuleReportInfoService.java
+26
-2
QualityRuleService.java
...m/hp/cmsz/service/analysissupport/QualityRuleService.java
+18
-0
TSWBAnalysisService.java
.../hp/cmsz/service/analysissupport/TSWBAnalysisService.java
+2
-2
QualityRuleMaintainController.java
...sz/web/analysissupport/QualityRuleMaintainController.java
+6
-9
QualityRuleReportController.java
...cmsz/web/analysissupport/QualityRuleReportController.java
+16
-14
ReportOperationTable.jsp
...pp/WEB-INF/views/AnalysisSupport/ReportOperationTable.jsp
+39
-0
RuleOperationTable.jsp
...bapp/WEB-INF/views/AnalysisSupport/RuleOperationTable.jsp
+2
-2
ruleReportDetailTable.js
src/main/webapp/static/js/ruleReportDetailTable.js
+27
-46
No files found.
build/com/hp/cmsz/repository/TSWB_YZDetailDataDao.class
View file @
445fbf80
No preview for this file type
build/com/hp/cmsz/service/analysissupport/TSWBAnalysisService.class
View file @
445fbf80
No preview for this file type
src/main/java/com/hp/cmsz/entity/QualityRuleOperationDetail.java
View file @
445fbf80
...
@@ -185,4 +185,28 @@ public class QualityRuleOperationDetail {
...
@@ -185,4 +185,28 @@ public class QualityRuleOperationDetail {
public
void
setWarningNum
(
Long
warningNum
)
{
public
void
setWarningNum
(
Long
warningNum
)
{
this
.
warningNum
=
warningNum
;
this
.
warningNum
=
warningNum
;
}
}
@Override
public
String
toString
()
{
return
"QualityRuleOperationDetail{"
+
"qualityRuleId="
+
qualityRuleId
+
", kpiId="
+
kpiId
+
", businessId="
+
businessId
+
", channelId="
+
channelId
+
", dataSourceId="
+
dataSourceId
+
", provinceId="
+
provinceId
+
", kpiMonitorRunTime="
+
kpiMonitorRunTime
+
", businessTime="
+
businessTime
+
", kpiName='"
+
kpiName
+
'\''
+
", kpiCode='"
+
kpiCode
+
'\''
+
", businessName='"
+
businessName
+
'\''
+
", channelName='"
+
channelName
+
'\''
+
", dataSourceName='"
+
dataSourceName
+
'\''
+
", provinceName='"
+
provinceName
+
'\''
+
", warningType='"
+
warningType
+
'\''
+
", ifFilter="
+
ifFilter
+
", warningReason='"
+
warningReason
+
'\''
+
", warningNum="
+
warningNum
+
'}'
;
}
}
}
src/main/java/com/hp/cmsz/repository/QualityRuleReportInfoDao.java
View file @
445fbf80
...
@@ -2,6 +2,8 @@ package com.hp.cmsz.repository;
...
@@ -2,6 +2,8 @@ package com.hp.cmsz.repository;
import
com.hp.cmsz.entity.QualityRuleOperationDetail
;
import
com.hp.cmsz.entity.QualityRuleOperationDetail
;
import
com.hp.cmsz.entity.QualityRuleReport
;
import
com.hp.cmsz.entity.QualityRuleReport
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
...
@@ -10,5 +12,6 @@ import java.util.List;
...
@@ -10,5 +12,6 @@ import java.util.List;
public
interface
QualityRuleReportInfoDao
extends
JpaSpecificationExecutor
<
QualityRuleOperationDetail
>,
public
interface
QualityRuleReportInfoDao
extends
JpaSpecificationExecutor
<
QualityRuleOperationDetail
>,
PagingAndSortingRepository
<
QualityRuleOperationDetail
,
Long
>
{
PagingAndSortingRepository
<
QualityRuleOperationDetail
,
Long
>
{
List
<
QualityRuleOperationDetail
>
findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
);
Page
<
QualityRuleOperationDetail
>
findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
,
Pageable
pageable
);
}
}
src/main/java/com/hp/cmsz/repository/TSWB_YZDetailDataDao.java
View file @
445fbf80
...
@@ -12,7 +12,7 @@ import org.springframework.data.repository.PagingAndSortingRepository;
...
@@ -12,7 +12,7 @@ import org.springframework.data.repository.PagingAndSortingRepository;
public
interface
TSWB_YZDetailDataDao
extends
JpaSpecificationExecutor
<
TSWB_YZDetailData
>,
public
interface
TSWB_YZDetailDataDao
extends
JpaSpecificationExecutor
<
TSWB_YZDetailData
>,
PagingAndSortingRepository
<
TSWB_YZDetailData
,
Long
>
{
PagingAndSortingRepository
<
TSWB_YZDetailData
,
Long
>
{
Page
<
TSWB_YZDetailData
>
findBy
Process
ingTime
(
String
month
,
Pageable
pageable
);
Page
<
TSWB_YZDetailData
>
findBy
Fil
ingTime
(
String
month
,
Pageable
pageable
);
}
}
src/main/java/com/hp/cmsz/service/analysissupport/QualityRuleInfoService.java
View file @
445fbf80
...
@@ -52,6 +52,7 @@ public class QualityRuleInfoService {
...
@@ -52,6 +52,7 @@ public class QualityRuleInfoService {
public
List
<
QualityRuleReport
>
findBy
(
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
){
public
List
<
QualityRuleReport
>
findBy
(
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
){
return
qualityRuleInfoDao
.
findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
provinceId
,
kpiId
,
startTime
,
endTime
);
return
qualityRuleInfoDao
.
findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
provinceId
,
kpiId
,
startTime
,
endTime
);
}
}
/**
/**
* 创建分页请求.
* 创建分页请求.
*/
*/
...
...
src/main/java/com/hp/cmsz/service/analysissupport/QualityRuleReportInfoService.java
View file @
445fbf80
package
com
.
hp
.
cmsz
.
service
.
analysissupport
;
package
com
.
hp
.
cmsz
.
service
.
analysissupport
;
import
com.hp.cmsz.entity.QualityRuleInfo
;
import
com.hp.cmsz.entity.QualityRuleOperationDetail
;
import
com.hp.cmsz.entity.QualityRuleOperationDetail
;
import
com.hp.cmsz.entity.QualityRuleReport
;
import
com.hp.cmsz.entity.QualityRuleReport
;
import
com.hp.cmsz.repository.QualityRuleReportInfoDao
;
import
com.hp.cmsz.repository.QualityRuleReportInfoDao
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.persistence.EntityManager
;
import
javax.persistence.PersistenceContext
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
@Service
@Service
@Transactional
@Transactional
public
class
QualityRuleReportInfoService
{
public
class
QualityRuleReportInfoService
{
@Autowired
@Autowired
private
QualityRuleReportInfoDao
qualityRuleReportInfoDao
;
private
QualityRuleReportInfoDao
qualityRuleReportInfoDao
;
public
List
<
QualityRuleOperationDetail
>
findBy
(
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
){
@PersistenceContext
return
qualityRuleReportInfoDao
.
findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
provinceId
,
kpiId
,
startTime
,
endTime
);
EntityManager
em
;
public
Page
<
QualityRuleOperationDetail
>
findBy
(
QualityRuleOperationDetail
qualityRuleOperationDetail
,
int
pageNumber
,
int
pageSize
,
String
sortType
,
Long
provinceId
,
Long
kpiId
,
Timestamp
startTime
,
Timestamp
endTime
){
PageRequest
pageRequest
=
buildPageRequest
(
pageNumber
,
pageSize
,
sortType
,
"qualityRuleId"
);
return
qualityRuleReportInfoDao
.
findByProvinceIdAndKpiIdAndBusinessTimeBetweenOrderByBusinessTimeDescProvinceIdDescWarningNumAsc
(
provinceId
,
kpiId
,
startTime
,
endTime
,
pageRequest
);
}
/**
* 创建分页请求.
*/
private
PageRequest
buildPageRequest
(
int
pageNumber
,
int
pagzSize
,
String
sortType
,
String
sortFiled
)
{
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
sortFiled
);
return
new
PageRequest
(
pageNumber
-
1
,
pagzSize
,
sort
);
}
public
List
getData
(
String
jhql
)
{
List
dataList
=
em
.
createNativeQuery
(
jhql
).
getResultList
();
em
.
close
();
return
dataList
;
}
}
}
}
src/main/java/com/hp/cmsz/service/analysissupport/QualityRuleService.java
View file @
445fbf80
package
com
.
hp
.
cmsz
.
service
.
analysissupport
;
package
com
.
hp
.
cmsz
.
service
.
analysissupport
;
import
com.hp.cmsz.entity.QualityRule
;
import
com.hp.cmsz.repository.QualityRuleDao
;
import
com.hp.cmsz.repository.QualityRuleDao
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.persistence.EntityManager
;
import
javax.persistence.PersistenceContext
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
...
@@ -17,9 +20,24 @@ import java.util.List;
...
@@ -17,9 +20,24 @@ import java.util.List;
@Transactional
@Transactional
public
class
QualityRuleService
{
public
class
QualityRuleService
{
@PersistenceContext
protected
EntityManager
em
;
@Autowired
@Autowired
private
QualityRuleDao
qualityRuleDao
;
private
QualityRuleDao
qualityRuleDao
;
//批量插入
@Transactional
public
void
insertIntoRule
(
List
<
QualityRule
>
qualityRules
){
for
(
int
i
=
0
;
i
<
qualityRules
.
size
();
i
++)
{
em
.
persist
(
qualityRules
.
get
(
i
));
if
(
i
%
100
==
0
)
{
em
.
flush
();
em
.
clear
();
}
}
}
//根据质量规则ID删除质量规则
//根据质量规则ID删除质量规则
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
public
void
deleteByQualityRuleId
(
List
<
Long
>
qualityRuleId
){
public
void
deleteByQualityRuleId
(
List
<
Long
>
qualityRuleId
){
...
...
src/main/java/com/hp/cmsz/service/analysissupport/TSWBAnalysisService.java
View file @
445fbf80
...
@@ -98,11 +98,11 @@ public class TSWBAnalysisService {
...
@@ -98,11 +98,11 @@ public class TSWBAnalysisService {
Date
endTime
)
{
Date
endTime
)
{
List
<
SearchFilter
>
filterList
=
new
ArrayList
<
SearchFilter
>();
List
<
SearchFilter
>
filterList
=
new
ArrayList
<
SearchFilter
>();
if
(
startTime
!=
null
)
{
if
(
startTime
!=
null
)
{
filterList
.
add
(
new
SearchFilter
(
"
process
ingTime"
,
SearchFilter
.
Operator
.
GTE
,
startTime
));
filterList
.
add
(
new
SearchFilter
(
"
fil
ingTime"
,
SearchFilter
.
Operator
.
GTE
,
startTime
));
}
}
if
(
endTime
!=
null
)
{
if
(
endTime
!=
null
)
{
filterList
.
add
(
new
SearchFilter
(
"
process
ingTime"
,
SearchFilter
.
Operator
.
LTE
,
endTime
));
filterList
.
add
(
new
SearchFilter
(
"
fil
ingTime"
,
SearchFilter
.
Operator
.
LTE
,
endTime
));
}
}
Specification
<
TSWB_YZDetailData
>
spec
=
DynamicSpecifications
.
bySearchFilter
(
filterList
,
TSWB_YZDetailData
.
class
);
Specification
<
TSWB_YZDetailData
>
spec
=
DynamicSpecifications
.
bySearchFilter
(
filterList
,
TSWB_YZDetailData
.
class
);
return
spec
;
return
spec
;
...
...
src/main/java/com/hp/cmsz/web/analysissupport/QualityRuleMaintainController.java
View file @
445fbf80
...
@@ -260,22 +260,18 @@ public class QualityRuleMaintainController {
...
@@ -260,22 +260,18 @@ public class QualityRuleMaintainController {
@RequestParam
(
value
=
"frequencyValue"
)
String
frequencyValue
,
@RequestParam
(
value
=
"frequencyValue"
)
String
frequencyValue
,
@RequestParam
(
value
=
"businessTime"
)
String
businessTime
,
@RequestParam
(
value
=
"businessTime"
)
String
businessTime
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
ParseException
{
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
ParseException
{
System
.
out
.
println
(
"frequencyType:"
+
frequencyType
+
"kpiMonitorTimeValue:"
+
frequencyValue
);
SimpleDateFormat
sd
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sd
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
Long
>
provinceIdList
=
new
ArrayList
<
Long
>();
List
<
Long
>
provinceIdList
=
new
ArrayList
<
Long
>();
for
(
int
i
=
0
;
i
<
province
.
split
(
","
).
length
;
i
++){
for
(
int
i
=
0
;
i
<
province
.
split
(
","
).
length
;
i
++){
provinceIdList
.
add
(
Long
.
parseLong
(
province
.
split
(
","
)[
i
]));
provinceIdList
.
add
(
Long
.
parseLong
(
province
.
split
(
","
)[
i
]));
}
}
List
<
Long
>
businessIdList
=
new
ArrayList
<
Long
>();
for
(
int
i
=
0
;
i
<
business
.
split
(
","
).
length
;
i
++){
businessIdList
.
add
(
Long
.
parseLong
(
business
.
split
(
","
)[
i
]));
}
List
<
Long
>
kpiIdList
=
new
ArrayList
<
Long
>();
List
<
Long
>
kpiIdList
=
new
ArrayList
<
Long
>();
for
(
int
i
=
0
;
i
<
kpi
.
split
(
","
).
length
;
i
++){
for
(
int
i
=
0
;
i
<
kpi
.
split
(
","
).
length
;
i
++){
kpiIdList
.
add
(
Long
.
parseLong
(
kpi
.
split
(
","
)[
i
]));
kpiIdList
.
add
(
Long
.
parseLong
(
kpi
.
split
(
","
)[
i
]));
}
}
List
<
QualityRule
>
qualityRuleList
=
new
ArrayList
<
QualityRule
>();
for
(
int
j
=
0
;
j
<
provinceIdList
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
provinceIdList
.
size
();
j
++)
{
for
(
int
l
=
0
;
l
<
kpiIdList
.
size
();
l
++){
for
(
int
l
=
0
;
l
<
kpiIdList
.
size
();
l
++){
QualityRule
qualityRule
=
new
QualityRule
();
QualityRule
qualityRule
=
new
QualityRule
();
...
@@ -312,17 +308,18 @@ public class QualityRuleMaintainController {
...
@@ -312,17 +308,18 @@ public class QualityRuleMaintainController {
qualityRule
.
setRuleUpdateTime
(
Timestamp
.
valueOf
(
sd
.
format
(
new
Date
())));
qualityRule
.
setRuleUpdateTime
(
Timestamp
.
valueOf
(
sd
.
format
(
new
Date
())));
qualityRule
.
setRuleValidFlag
(
"1"
);
qualityRule
.
setRuleValidFlag
(
"1"
);
qualityRule
.
setIfSystemValue
(
"1"
);
qualityRule
.
setIfSystemValue
(
"1"
);
qualityRuleDao
.
save
(
qualityRule
);
cmszOperationLogService
.
createLog
(
"增加"
,
"新建质量模型"
,
""
);
cmszOperationLogService
.
createLog
(
"增加"
,
"新建质量模型"
,
"quality_rule_warehouse_info_t. QUALITY_RULE_ID="
+
qualityRule
.
getQualityRuleId
().
toString
());
Long
qualityRuleId
=
qualityRule
.
getQualityRuleId
();
Long
qualityRuleId
=
qualityRule
.
getQualityRuleId
();
if
(!
qualityRuleIdList
.
isEmpty
()){
if
(!
qualityRuleIdList
.
isEmpty
()){
accuracyRuleService
.
updateAccuracyRuleByAccuracyRuleIds
(
qualityRuleId
,
qualityRuleIdList
);
accuracyRuleService
.
updateAccuracyRuleByAccuracyRuleIds
(
qualityRuleId
,
qualityRuleIdList
);
qualityRuleIdList
.
clear
();
qualityRuleIdList
.
clear
();
}
}
qualityRuleList
.
add
(
qualityRule
);
}
}
}
}
qualityRuleService
.
insertIntoRule
(
qualityRuleList
);
return
"redirect:/AnalysisSupport/QualityRuleResult"
;
return
"redirect:/AnalysisSupport/QualityRuleResult"
;
}
}
}
}
src/main/java/com/hp/cmsz/web/analysissupport/QualityRuleReportController.java
View file @
445fbf80
...
@@ -14,11 +14,14 @@ import com.hp.cmsz.service.analysissupport.QualityRuleReportInfoService;
...
@@ -14,11 +14,14 @@ import com.hp.cmsz.service.analysissupport.QualityRuleReportInfoService;
import
com.hp.cmsz.service.analysissupport.QualityRuleReportService
;
import
com.hp.cmsz.service.analysissupport.QualityRuleReportService
;
import
com.hp.cmsz.web.PageURLController
;
import
com.hp.cmsz.web.PageURLController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.util.HtmlUtils
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -162,31 +165,30 @@ public class QualityRuleReportController {
...
@@ -162,31 +165,30 @@ public class QualityRuleReportController {
}
}
//查看数据质量运营内容
//查看数据质量运营内容
@RequestMapping
(
value
=
"/findOperation*"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/findOperationFrame"
)
@ResponseBody
public
ModelAndView
findQuality
(
public
void
findQuality
(
@RequestParam
(
value
=
"provinceId"
)
String
provinceId
,
@RequestParam
(
value
=
"provinceId"
)
String
provinceId
,
@RequestParam
(
value
=
"kpiId"
)
String
kpiId
,
@RequestParam
(
value
=
"kpiId"
)
String
kpiId
,
@RequestParam
(
value
=
"reportSumStartTime"
)
String
reportSumStartTime
,
@RequestParam
(
value
=
"reportSumStartTime"
)
String
reportSumStartTime
,
@RequestParam
(
value
=
"reportSumEndTime"
)
String
reportSumEndTime
,
@RequestParam
(
value
=
"reportSumEndTime"
)
String
reportSumEndTime
,
@RequestParam
(
value
=
"sortType"
,
defaultValue
=
"parameterId"
)
String
sortType
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
pageNumber
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"30"
)
int
pageSize
,
HttpServletResponse
response
)
throws
ParseException
{
HttpServletResponse
response
)
throws
ParseException
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"AnalysisSupport/ReportOperationTable"
);
QualityRuleOperationDetail
qualityRuleOperationDetail
=
new
QualityRuleOperationDetail
();
Long
province
=
Long
.
parseLong
(
provinceId
);
Long
province
=
Long
.
parseLong
(
provinceId
);
Long
kpi
=
Long
.
parseLong
(
kpiId
);
Long
kpi
=
Long
.
parseLong
(
kpiId
);
Timestamp
startTime
=
Timestamp
.
valueOf
(
reportSumStartTime
);
Timestamp
startTime
=
Timestamp
.
valueOf
(
reportSumStartTime
);
Timestamp
endTime
=
Timestamp
.
valueOf
(
reportSumEndTime
);
Timestamp
endTime
=
Timestamp
.
valueOf
(
reportSumEndTime
);
List
<
QualityRuleOperationDetail
>
qualityRuleReportList
=
qualityRuleReportInfoService
.
findBy
(
province
,
kpi
,
startTime
,
endTime
);
sortType
=
HtmlUtils
.
htmlEscape
(
sortType
);
Page
<
QualityRuleOperationDetail
>
qualityRuleOperationDetailPage
=
qualityRuleReportInfoService
.
findBy
(
qualityRuleOperationDetail
,
pageNumber
,
pageSize
,
sortType
,
province
,
kpi
,
startTime
,
endTime
);
modelAndView
.
addObject
(
"qualityRuleOperationDetailPage"
,
qualityRuleOperationDetailPage
);
modelAndView
.
addObject
(
"pageSize"
,
pageSize
);
modelAndView
.
addObject
(
"sortType"
,
sortType
);
cmszOperationLogService
.
createLog
(
"查询"
,
"数据质量规则运营"
,
"查询数据质量运营明细"
);
cmszOperationLogService
.
createLog
(
"查询"
,
"数据质量规则运营"
,
"查询数据质量运营明细"
);
Gson
gson
=
new
Gson
();
response
.
setContentType
(
"text/Xml;charset=gbk"
);
PrintWriter
out
=
null
;
try
{
return
modelAndView
;
out
=
response
.
getWriter
();
out
.
println
(
gson
.
toJson
(
qualityRuleReportList
));
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
}
}
}
src/main/webapp/WEB-INF/views/AnalysisSupport/ReportOperationTable.jsp
0 → 100644
View file @
445fbf80
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<table class="table table-hover table-striped">
<thead>
<tr>
<th width="6.4%">省份</th>
<th width="6.4%">数据来源</th>
<th width="6.4%">渠道</th>
<th width="6.4%">业务</th>
<th width="6.4%">指标名称</th>
<th width="6.4%">指标编码</th>
<th width="6.4%">告警类型</th>
<th width="6.4%">告警原因</th>
<th width="6.4%">指标监控范围</th>
<th width="6.4%">指标采集时间</th>
</tr>
</thead>
<tbody>
<c:forEach items="${qualityRuleOperationDetailPage.content}" var="qualityRuleOperationDetail">
<tr>
<td>${qualityRuleOperationDetail.provinceName} </td>
<td>${qualityRuleOperationDetail.dataSourceName}</td>
<td>${qualityRuleOperationDetail.channelName}</td>
<td>${qualityRuleOperationDetail.businessName}</td>
<td>${qualityRuleOperationDetail.kpiName}</td>
<td>${qualityRuleOperationDetail.kpiCode}</td>
<td>${qualityRuleOperationDetail.warningType}</td>
<td>${qualityRuleOperationDetail.warningReason}</td>
<td><fmt:formatDate value="${qualityRuleOperationDetail.kpiMonitorRunTime}" pattern="yyyy-MM-dd hh:mm:ss" /> </td>
<td><fmt:formatDate value="${qualityRuleOperationDetail.businessTime}" pattern="yyyy-MM-dd hh:mm:ss" /></td>
</tr>
</c:forEach>
</tbody>
</table>
<tags:paging page="${qualityRuleOperationDetailPage}" paginationSize="${pageSize}" />
src/main/webapp/WEB-INF/views/AnalysisSupport/RuleOperationTable.jsp
View file @
445fbf80
...
@@ -38,8 +38,8 @@
...
@@ -38,8 +38,8 @@
<td>${qualityRuleInfo.kpiCode}</td>
<td>${qualityRuleInfo.kpiCode}</td>
<td>${qualityRuleInfo.warningType}</td>
<td>${qualityRuleInfo.warningType}</td>
<td>${qualityRuleInfo.warningReason}</td>
<td>${qualityRuleInfo.warningReason}</td>
<td>
${qualityRuleInfo.kpiMonitorRunTime}
</td>
<td>
<fmt:formatDate value="${qualityRuleInfo.kpiMonitorRunTime}" pattern="yyyy-MM-dd hh:mm:ss" />
</td>
<td>
${qualityRuleInfo.businessTime}
</td>
<td>
<fmt:formatDate value="${qualityRuleInfo.businessTime}" pattern="yyyy-MM-dd hh:mm:ss" />
</td>
<%--<td>--%>
<%--<td>--%>
<%--<c:if test="${qualityRuleInfo.ifFilter == '1'}">无过滤规则</c:if>--%>
<%--<c:if test="${qualityRuleInfo.ifFilter == '1'}">无过滤规则</c:if>--%>
<%--<c:if test="${qualityRuleInfo.ifFilter == '0'}">过滤</c:if>--%>
<%--<c:if test="${qualityRuleInfo.ifFilter == '0'}">过滤</c:if>--%>
...
...
src/main/webapp/static/js/ruleReportDetailTable.js
View file @
445fbf80
...
@@ -331,7 +331,6 @@ table_pagging.prototype = {
...
@@ -331,7 +331,6 @@ table_pagging.prototype = {
}
}
if
(
k
==
1
){
if
(
k
==
1
){
console
.
log
(
this
.
objectlist
[
i
])
tdContext
=
"<a href='javascript:;' onclick='selectOperation(
\"
"
+
this
.
getData
(
this
.
objectlist
[
i
],
"provinceId"
)
+
"
\"
,
\"
"
+
this
.
getData
(
this
.
objectlist
[
i
],
"kpiId"
)
+
"
\"
,
\"
"
+
this
.
getData
(
this
.
objectlist
[
i
],
"reportSumStartTime"
)
+
"
\"
,
\"
"
+
this
.
getData
(
this
.
objectlist
[
i
],
"reportSumEndTime"
)
+
"
\"
)'>"
+
this
.
getData
(
this
.
objectlist
[
i
],
this
.
header
[
k
][
1
])
+
"</a>"
;
tdContext
=
"<a href='javascript:;' onclick='selectOperation(
\"
"
+
this
.
getData
(
this
.
objectlist
[
i
],
"provinceId"
)
+
"
\"
,
\"
"
+
this
.
getData
(
this
.
objectlist
[
i
],
"kpiId"
)
+
"
\"
,
\"
"
+
this
.
getData
(
this
.
objectlist
[
i
],
"reportSumStartTime"
)
+
"
\"
,
\"
"
+
this
.
getData
(
this
.
objectlist
[
i
],
"reportSumEndTime"
)
+
"
\"
)'>"
+
this
.
getData
(
this
.
objectlist
[
i
],
this
.
header
[
k
][
1
])
+
"</a>"
;
}
}
...
@@ -531,56 +530,39 @@ table_pagging.prototype = {
...
@@ -531,56 +530,39 @@ table_pagging.prototype = {
}
}
};
};
var
province
=
null
;
var
kpi
=
null
;
var
startTime
=
null
;
var
endTime
=
null
;
function
queryOperation
(
page
,
provinceId
,
kpiId
,
reportSumStartTime
,
reportSumEndTime
)
{
province
=
provinceId
;
kpi
=
kpiId
;
startTime
=
reportSumStartTime
;
endTime
=
reportSumEndTime
;
$
.
ajax
({
type
:
'post'
,
'url'
:
'QualityRuleReport/findOperationFrame'
,
data
:
"page="
+
page
+
"&provinceId="
+
provinceId
+
"&kpiId="
+
kpiId
+
"&reportSumStartTime="
+
df
.
format
(
new
Date
(
reportSumStartTime
))
+
"&reportSumEndTime="
+
df
.
format
(
new
Date
(
reportSumEndTime
)),
success
:
function
(
data
)
{
$
(
"#dataForm"
).
html
(
data
);
}
});
}
function
queryResult
(
page
)
{
queryOperation
(
page
,
province
,
kpi
,
startTime
,
endTime
);
}
//查看数据质量运营
//查看数据质量运营
function
selectOperation
(
provinceId
,
kpiId
,
reportSumStartTime
,
reportSumEndTime
){
function
selectOperation
(
provinceId
,
kpiId
,
reportSumStartTime
,
reportSumEndTime
){
$
.
dialog
({
$
.
dialog
({
title
:
"数据质量运营明细"
,
title
:
"数据质量运营明细"
,
content
:
"<div id='ruleList'>"
+
content
:
"<div style='width: 800px; height: 500px;overflow-y: scroll' id='dataForm'></div>"
,
"<div style='height: 500px;overflow-y: scroll;' class='col-xs-12'><div class='panel panel-default'><div class='panel-heading'></div><div class='panel-body'> <table style='height: 600px;' class='table table-hover table-striped'> <thead> <tr> <th width=''>省份</th> <th width=''>数据来源</th> <th width=''>渠道</th> <th width=''>业务</th> <th width=''>指标名称</th> <th width=''>指标编码</th> <th width=''>告警类型</th> <th width=''>告警原因</th> <th width=''>指标监控范围</th> <th width=''>指标采集时间</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div>"
+
"</div>"
,
lock
:
true
,
lock
:
true
,
width
:
800
,
width
:
800
,
height
:
500
,
initialize
:
function
()
{
initialize
:
function
(){
queryOperation
(
1
,
provinceId
,
kpiId
,
reportSumStartTime
,
reportSumEndTime
);
$
.
ajax
({
type
:
'GET'
,
contentType
:
'application/json'
,
url
:
"/AnalysisSupport/QualityRuleReport/findOperation?provinceId="
+
provinceId
+
"&kpiId="
+
kpiId
+
"&reportSumStartTime="
+
df
.
format
(
new
Date
(
reportSumStartTime
))
+
"&reportSumEndTime="
+
df
.
format
(
new
Date
(
reportSumEndTime
)),
dataType
:
'text'
,
beforeSend
:
function
(
data
)
{
},
success
:
function
(
data
)
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
]
==
'
\
"'
)
{
data
=
data
.
replace
(
'
\
"'
,
'
\'
'
);
}
}
data
=
eval
(
"("
+
data
+
")"
);
if
(
data
!=
null
&&
data
!=
""
)
{
var
ruleTbody
=
$
(
'#ruleList tbody'
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
kpiMonitorRunTime
!=
null
)
{
data
[
i
].
kpiMonitorRunTime
=
df
.
format
(
new
Date
(
data
[
i
].
kpiMonitorRunTime
));
}
if
(
data
[
i
].
businessTime
!=
null
)
{
data
[
i
].
businessTime
=
df
.
format
(
new
Date
(
data
[
i
].
businessTime
));
}
ruleTbody
.
append
(
$
(
"<tr></tr>"
)
.
append
(
"<td>"
+
data
[
i
].
provinceName
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
dataSourceName
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
channelName
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
businessName
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
kpiName
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
kpiCode
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
warningType
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
warningReason
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
kpiMonitorRunTime
+
"</td>"
)
.
append
(
"<td>"
+
data
[
i
].
businessTime
+
"</td>"
));
}
}
}
});
}
}
});
});
}
}
\ No newline at end of file
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