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
98880f94
Commit
98880f94
authored
May 21, 2018
by
莫林毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 监控运营/协查单管理/协查单明细
修改 '分析报告' 字段 2 监控运营/协查单管理/定制分析 修改前台搜索项&修改后台SQL
parent
d16b3545
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
406 additions
and
104 deletions
+406
-104
DimKpiDao.java
src/main/java/com/hp/cmsz/repository/DimKpiDao.java
+29
-19
WorkingOrderCustomAnalysisService.java
...e/monitoroperation/WorkingOrderCustomAnalysisService.java
+44
-0
WorkingOrderCustomAnalysisController.java
...onitoroperation/WorkingOrderCustomAnalysisController.java
+50
-0
header.jsp
src/main/webapp/WEB-INF/layouts/header.jsp
+1
-0
GZFX_CustomAnalyis_Business.tag
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Business.tag
+1
-1
GZFX_CustomAnalyis_Chinnel.tag
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Chinnel.tag
+96
-19
GZFX_CustomAnalyis_Datasource.tag
...ain/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Datasource.tag
+97
-53
GZFX_CustomAnalyis_Kpi.tag
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Kpi.tag
+29
-0
GZFX_CustomAnalyis_Province.tag
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Province.tag
+2
-2
GZFX_CustomAnalyis_Time.tag
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Time.tag
+28
-2
CustomAnalysis.jsp
.../webapp/WEB-INF/views/MonitorOperation/CustomAnalysis.jsp
+6
-0
WorkingOrderReasult.jsp
...pp/WEB-INF/views/MonitorOperation/WorkingOrderReasult.jsp
+14
-7
xcdResultTable.js
src/main/webapp/static/js/xcdResultTable.js
+9
-1
No files found.
src/main/java/com/hp/cmsz/repository/DimKpiDao.java
View file @
98880f94
...
...
@@ -12,34 +12,44 @@ import org.springframework.data.repository.query.Param;
import
com.hp.cmsz.entity.DimKpi
;
public
interface
DimKpiDao
extends
JpaSpecificationExecutor
<
DimKpi
>,
PagingAndSortingRepository
<
DimKpi
,
Long
>
{
PagingAndSortingRepository
<
DimKpi
,
Long
>
{
List
<
DimKpi
>
findAllByIsActiveAndBusnameId
(
String
active
,
Long
businessId
);
List
<
DimKpi
>
findAllByIsActiveAndBusnameId
(
String
active
,
Long
businessId
);
//通过kpiTypeId查找数据采集频率
@Query
(
"select dk.calCycle from DimKpi dk where dk.kpiTypeId = :kpiTypeId"
)
List
<
String
>
findCayCycleByKpiTypeIdIn
(
@Param
(
"kpiTypeId"
)
Long
kpiTypeId
);
//通过kpiTypeId查找数据采集频率
@Query
(
"select dk.calCycle from DimKpi dk where dk.kpiTypeId = :kpiTypeId"
)
List
<
String
>
findCayCycleByKpiTypeIdIn
(
@Param
(
"kpiTypeId"
)
Long
kpiTypeId
);
//通过kpiTypeId修改数据采集频率
@Modifying
@Query
(
"update from DimKpi dk set dk.calCycle=:calCycle where dk.kpiTypeId=:kpiTypeId"
)
void
updateDimKpiByKpiTypeId
(
@Param
(
"calCycle"
)
String
calCycle
,
@Param
(
"kpiTypeId"
)
Long
kpiTypeId
);
//通过kpiTypeId修改数据采集频率
@Modifying
@Query
(
"update from DimKpi dk set dk.calCycle=:calCycle where dk.kpiTypeId=:kpiTypeId"
)
void
updateDimKpiByKpiTypeId
(
@Param
(
"calCycle"
)
String
calCycle
,
@Param
(
"kpiTypeId"
)
Long
kpiTypeId
);
@Query
(
"select dimKpi from DimKpi dimKpi"
)
List
<
DimKpi
>
findAllDimKpi
();
@Query
(
"select dimKpi from DimKpi dimKpi"
)
List
<
DimKpi
>
findAllDimKpi
();
@Query
(
"select dimKpi from DimKpi dimKpi where dimKpi.busnameId in (:busnameIdList)"
)
public
List
<
DimKpi
>
findDimKpiListBybusnameIdList
(
@Param
(
value
=
"busnameIdList"
)
List
<
Long
>
busnameIdList
);
@Query
(
"select dimKpi from DimKpi dimKpi where dimKpi.busnameId in (:busnameIdList)"
)
public
List
<
DimKpi
>
findDimKpiListBybusnameIdList
(
@Param
(
value
=
"busnameIdList"
)
List
<
Long
>
busnameIdList
);
//本语句 所对应的表非 本实体类对应的表 [临时加]
@Query
(
value
=
"select kpi_name,kpi_id from dim_kpi_info_t where business_id in (:busnameIdList) and IS_ACTIVE= :isActive "
,
nativeQuery
=
true
)
public
List
<
Object
[]>
findDimKpiListBybusnameIdList2
(
@Param
(
value
=
"busnameIdList"
)
List
<
Long
>
busnameIdList
,
@Param
(
value
=
"isActive"
)
String
isActive
);
//本语句 所对应的表非 本实体类对应的表 [临时加]
@Query
(
value
=
"select kpi_name,kpi_id from dim_kpi_info_t where business_id in (:busnameIdList) and IS_ACTIVE= :isActive "
,
nativeQuery
=
true
)
public
List
<
Object
[]>
findDimKpiListBybusnameIdList2
(
@Param
(
value
=
"busnameIdList"
)
List
<
Long
>
busnameIdList
,
@Param
(
value
=
"isActive"
)
String
isActive
);
@Query
(
"select dimKpi from DimKpi dimKpi where dimKpi.kpiId in (:kpiIdList)"
)
public
List
<
DimKpi
>
findDimKpiListBykpiIdList
(
@Param
(
value
=
"kpiIdList"
)
List
<
Long
>
kpiIdList
);
//本语句 所对应的表非 本实体类对应的表 [临时加] 2018/05/20 新加
@Query
(
value
=
"select kpi_name,kpi_id from dim_kpi_info_t where business_id in "
+
"(select business_id from dim_business_info_t where business_id in"
+
"( select distinct business_id from etl.run_task_t a ) and IS_ACTIVE= :isActive and "
+
"CHANNEL_DATA_SOURCE_MAP_ID in (:channelDataSourceMapIdList)) and IS_ACTIVE= :isActive "
+
"and kpi_id in(select distinct kpi_id from etl.run_task_t a where kpi_id is not null and valid_flg=1) "
,
nativeQuery
=
true
)
public
List
<
Object
[]>
findDimKpiListByChannelDataSourceMapIdList
(
@Param
(
value
=
"channelDataSourceMapIdList"
)
List
<
Long
>
channelDataSourceMapIdList
,
@Param
(
value
=
"isActive"
)
String
isActive
);
@Query
(
"select dimKpi from DimKpi dimKpi where dimKpi.kpiId in (:kpiIdList)"
)
public
List
<
DimKpi
>
findDimKpiListBykpiIdList
(
@Param
(
value
=
"kpiIdList"
)
List
<
Long
>
kpiIdList
);
}
src/main/java/com/hp/cmsz/service/monitoroperation/WorkingOrderCustomAnalysisService.java
View file @
98880f94
...
...
@@ -75,4 +75,48 @@ public class WorkingOrderCustomAnalysisService {
return
list1
;
}
public
List
<
Map
<
String
,
Object
>>
getDimKpiListByDataSourceIdListAndChinnalIdList
(
List
<
Long
>
dataSourceIdList
,
List
<
Long
>
chinnalIdList
,
String
isActive
){
/**
*@编写人: m01
*@编写时间: 2018/5/20 0020 下午 8:18
*@描述: 新的kpi 查找方法 sql改变了
*@参数: [dataSourceIdList, chinnalIdList, isActive]
*@参数类型:
*@参数描述:
*@返回值:
*@返回类型:
*@返回值描述:
*@修改人: 暂无
*@修改时间: 2018/5/20 0020 下午 8:18
*@备注:
**/
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
Object
[]>
list
=
new
ArrayList
<
Object
[]>();
//先查找DataSourceMapId 再根据dataSourceMapId 查找kpi
List
<
Long
>
longList
=
new
ArrayList
<
Long
>();
List
<
Object
>
objectList
=
channelDataSourceMapDao
.
findChannelDataSourceMapIdByChannelIdListAndDataSourceIdList
(
dataSourceIdList
,
chinnalIdList
);
if
(
objectList
==
null
||
objectList
.
size
()
<
1
)
{
}
else
{
for
(
Object
o
:
objectList
)
{
longList
.
add
((
Long
)
o
);
}
}
if
(
longList
.
size
()
!=
0
){
list
=
dimKpiDao
.
findDimKpiListByChannelDataSourceMapIdList
(
longList
,
"Y"
);
for
(
Object
[]
objects
:
list
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"kpiName"
,
objects
[
0
]);
map
.
put
(
"kpiId"
,
objects
[
1
]);
System
.
out
.
println
(
objects
[
0
]+
" "
+
objects
[
1
]);
result
.
add
(
map
);
}
System
.
out
.
println
(
"result "
+
result
.
size
());
return
result
;
}
else
{
return
result
;
}
}
}
src/main/java/com/hp/cmsz/web/monitoroperation/WorkingOrderCustomAnalysisController.java
View file @
98880f94
...
...
@@ -518,6 +518,56 @@ public class WorkingOrderCustomAnalysisController {
}
@RequestMapping
(
"/getDimKpiListByDataSourceIdListAndChinnalIdList/{dataSourceIdStr}/{chinnalIdStr}"
)
@ResponseBody
public
List
<
Map
<
String
,
Object
>>
getDimKpiListByDataSourceIdListAndChinnalIdList
(
@PathVariable
(
value
=
"dataSourceIdStr"
)
String
dataSourceIdStr
,
@PathVariable
(
value
=
"chinnalIdStr"
)
String
chinnalIdStr
)
{
/**
*@编写人: m01
*@编写时间: 2018/5/20 0020 下午 8:16
*@描述:
*@参数: [dataSourceIdStr, chinnalIdStr]
*@参数类型:
*@参数描述:
*@返回值:
*@返回类型:
*@返回值描述:
*@修改人: 暂无
*@修改时间: 2018/5/20 0020 下午 8:16
*@备注:
**/
System
.
out
.
println
(
"dataSourceIdStr ="
+
dataSourceIdStr
);
System
.
out
.
println
(
"chinnalIdStr ="
+
chinnalIdStr
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<
Map
<
String
,
Object
>>();
String
str
=
""
;
if
(
""
.
equalsIgnoreCase
(
dataSourceIdStr
)||
""
.
equalsIgnoreCase
(
chinnalIdStr
))
{
return
list
;
}
String
[]
dataSourceIdArr
=
dataSourceIdStr
.
split
(
"-"
);
List
<
Long
>
dataSourceIdList
=
new
CopyOnWriteArrayList
<
Long
>();
for
(
int
i
=
0
;
i
<
dataSourceIdArr
.
length
;
i
++)
{
dataSourceIdList
.
add
(
Long
.
parseLong
(
dataSourceIdArr
[
i
]));
}
String
[]
chinnalIdArr
=
chinnalIdStr
.
split
(
"-"
);
List
<
Long
>
chinnalIdList
=
new
CopyOnWriteArrayList
<
Long
>();
for
(
int
i
=
0
;
i
<
chinnalIdArr
.
length
;
i
++)
{
chinnalIdList
.
add
(
Long
.
parseLong
(
chinnalIdArr
[
i
]));
}
list
=
workingOrderCustomAnalysisService
.
getDimKpiListByDataSourceIdListAndChinnalIdList
(
dataSourceIdList
,
chinnalIdList
,
"Y"
);
return
list
;
}
@RequestMapping
(
"/getDimKpiListByBusinessIdList/{businessIdList}"
)
@ResponseBody
public
List
<
Map
<
String
,
Object
>>
getDimKpiListByBusinessIdList
(
...
...
src/main/webapp/WEB-INF/layouts/header.jsp
View file @
98880f94
...
...
@@ -188,6 +188,7 @@
<ul class="dropdown-menu">
<li><a href="${ctx}/MonitorOperation/WorkingOrderAnalysis">协查单统计</a></li>
<li><a href="${ctx}/MonitorOperation/WorkingOrderReasult">协查单明细</a></li>
<li><a href="${ctx}/MonitorOperation/CustomAnalysis">定制分析</a></li>
</ul>
</li>
</shiro:hasPermission>
...
...
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Business.tag
View file @
98880f94
<%@tag pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div id="business_div" class="slide-menu-option">
<div id="business_div" class="slide-menu-option"
style="display: none;"
>
<label for="">业务</label>
<div id ="allBusiness_div" class="checkbox-inline">
<label>
...
...
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Chinnel.tag
View file @
98880f94
...
...
@@ -5,15 +5,56 @@
<label id="labelChannel" for="">渠道</label>
<div class="checkbox-inline">
<label>
<input type="checkbox" name="allChannel" id="allChannel"> 全选
<input type="checkbox" name="allChannel" id="allChannel"
> 全选
</label>
</div>
<div>
<c:forEach var="channel" items="${channelList}">
<div class="checkbox-inline">
<input type="checkbox" name="channel"
title="${channel.channelName}" value="${channel.channelId}">${channel.channelName}
</div>
<c:choose>
<c:when test="${channel.channelName =='网厅'}">
<div class="checkbox-inline">
<input type="checkbox" name="channel"
title="${channel.channelName}" value="${channel.channelId}" >${channel.channelName}
</div>
</c:when>
<c:when test="${channel.channelName =='IVR'}">
<div class="checkbox-inline">
<input type="checkbox" name="channel"
title="${channel.channelName}" value="${channel.channelId}" >${channel.channelName}
</div>
</c:when>
<c:when test="${channel.channelName =='平台'}">
<div class="checkbox-inline">
<input type="checkbox" name="channel"
title="${channel.channelName}" value="${channel.channelId}" >${channel.channelName}
</div>
</c:when>
<c:when test="${channel.channelName =='实体厅'}">
<div class="checkbox-inline">
<input type="checkbox" name="channel"
title="${channel.channelName}" value="${channel.channelId}" >${channel.channelName}
</div>
</c:when>
<c:when test="${channel.channelName =='WAP'}">
<div class="checkbox-inline">
<input type="checkbox" name="channel"
title="${channel.channelName}" value="${channel.channelId}" >${channel.channelName}
</div>
</c:when>
<c:when test="${channel.channelName =='短厅'}">
<div class="checkbox-inline">
<input type="checkbox" name="channel"
title="${channel.channelName}" value="${channel.channelId}" >${channel.channelName}
</div>
</c:when>
<c:when test="${channel.channelName =='所有渠道'}">
<div class="checkbox-inline">
<input type="checkbox" name="channel"
title="${channel.channelName}" value="${channel.channelId}" >${channel.channelName}
</div>
</c:when>
</c:choose>
</c:forEach>
</div>
</div>
...
...
@@ -26,24 +67,30 @@
$('input[name="channel"]').prop('checked',true);
getBusinessByDatasource();
// getBusinessByDatasource();
getKpiByDatasource();
}else{
$('input[name="channel"]').prop('checked',false);
getBusinessByDatasource();
// getBusinessByDatasource();
getKpiByDatasource();
}
});
// 渠道 复选框
$('input[name="channel"]').on('click',function () {
cancelselectbusinessandkpi();
if($(this).prop('checked')){
$(this).prop('checked',true);
getBusinessByDatasource();
console.log(1);
/* if($(this).prop('checked')){
//$(this).prop('checked',true);
console.log(22);
// getBusinessByDatasource();
getKpiByDatasource();
}else{
console.log(3);
$(this).prop('checked',false);
getBusinessByDatasource();
}
// getBusinessByDatasource();
getKpiByDatasource();
}*/
var isAll=true;
$('input[name="channel"]').each(function () {
if(!$(this).prop('checked')){
...
...
@@ -55,6 +102,7 @@
}else{
$('input[name="allChannel"]').prop('checked',false);
}
getKpiByDatasource();
});
...
...
@@ -63,8 +111,8 @@
function initChannel(){
$('input[name="allChannel"]').prop('checked',
fals
e);
$('input[name="channel"]').prop('checked',
fals
e);
$('input[name="allChannel"]').prop('checked',
tru
e);
$('input[name="channel"]').prop('checked',
tru
e);
}
function getSelectedChannels(){
var channelArray=new Array();
...
...
@@ -76,7 +124,36 @@
return channelArray;
}
// 联合 数据来源查找 指标
function getKpiByDatasource(){
initBusiness();
initKpi();
var selectedChannelsArr = getSelectedChannels();
if (selectedChannelsArr.length === 0) {
return;
}
var selectedChannelStr = selectedChannelsArr.join("-");
var selectedDataSourceArr = getSelectedDataSources();
if (selectedDataSourceArr.length === 0) {
return;
}
var selectedDataSourceStr = selectedDataSourceArr.join('-');
var url = "${ctx}/MonitorOperation/CustomAnalysis/getDimKpiListByDataSourceIdListAndChinnalIdList/" + selectedDataSourceStr + "/" + selectedChannelStr;
$.ajax({
url: url,
type: 'GET',
dataType: 'json',
timeout: 3000,
cache: false,
error: solveDataSourceError,
success: useDataSourceDataToKpi
});
}
// 联合 数据来源查找 业务
function getBusinessByDatasource(){
...
...
@@ -93,8 +170,8 @@
if (selectedChannelsArr.length ===0){return;}
var selectedChannelStr=selectedChannelsArr.join("-");
// alert("selectedDataSourceStr "+selectedDataSourceStr);
// alert("selectedChannelStr "+selectedChannelStr);
var url = "${ctx}/MonitorOperation/CustomAnalysis/getBusinessByChannelIdListAndDataSourceIdList/"+selectedDataSourceStr+"/"+selectedChannelStr;
$.ajax({
...
...
@@ -109,11 +186,11 @@
}
function solveDataSourceError() {
initChannel();//初始化 渠道
initBusiness();//初始化 业务
//
initBusiness();//初始化 业务
initKpi();//初始化 指标
}
function useDataSourceData(data){
// alert(data);
loadBusiness(data);
}
</script>
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Datasource.tag
View file @
98880f94
<%@tag pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<div
class="slide-menu-option">
<div class="slide-menu-option">
<label for="">数据来源</label>
<div class="checkbox-inline">
<label> <input type="checkbox" name="allDataSource" id="allDataSource"
> 全选
checked
> 全选
</label>
</div>
<div
>
<div>
<c:forEach var="datasource" items="${datasourceList}">
<div class="checkbox-inline">
<label>
<input type="checkbox" name="datasource" class="datasource"
title="${datasource.dataSourceName}" value="${datasource.dataSourceId}"
>${datasource.dataSourceName}
</label>
</div>
<c:if test="${datasource.dataSourceName =='关键指标直采'}">
<div class="checkbox-inline">
<label>
<input type="checkbox" name="datasource" class="datasource" checked
title="${datasource.dataSourceName}" value="${datasource.dataSourceId}"
>${datasource.dataSourceName}
</label>
</div>
</c:if>
</c:forEach>
</div>
...
...
@@ -26,26 +29,28 @@
$('input[name="allDataSource"]').on('click', function () {
cancelselectbusinessandkpi();
if ($(this).prop("checked")) {
$("input[name='datasource']").prop("checked",true);
$("input[name='datasource']").prop("checked",
true);
getBusinessByChannel();
// getBusinessByChannel();
getKpiByChannel();
} else {
$("input[name='datasource']").prop("checked",false);
$("input[name='datasource']").prop("checked",
false);
// alert('getBusinessByChannel all 2');
getBusinessByChannel();
// getBusinessByChannel();
getKpiByChannel();
}
});
// 资源 复选框
$("input[name='datasource']").on('click', function () {
cancelselectbusinessandkpi();
if ($(this).prop("checked")) {
$(this).prop("checked",true);
get
Business
ByChannel();
$(this).prop("checked",
true);
// getBusinessByChannel();
get
Kpi
ByChannel();
} else {
$(this).prop("checked",false);
get
Business
ByChannel();
$(this).prop("checked",
false);
// getBusinessByChannel();
get
Kpi
ByChannel();
}
var clickFlag = true;//是否全部选中
...
...
@@ -55,48 +60,79 @@
}
});
if (clickFlag) {
$('input[name="allDataSource"]').prop("checked",true);
$('input[name="allDataSource"]').prop("checked",
true);
} else {
$('input[name="allDataSource"]').prop("checked",false);
$('input[name="allDataSource"]').prop("checked",
false);
}
});
// 初始化
function initDataSource(){
$('input[name="allDataSource"]').prop("checked",false);
$('input[name="datasource"]').prop("checked",false);
function initDataSource()
{
$('input[name="allDataSource"]').prop("checked",
false);
$('input[name="datasource"]').prop("checked",
false);
}
function getSelectedDataSources(){
var dataSourceArray
=
new Array();
$("input[name='datasource']").each(function
()
{
if
($(this).prop('checked'))
{
function getSelectedDataSources()
{
var dataSourceArray
=
new Array();
$("input[name='datasource']").each(function
()
{
if
($(this).prop('checked'))
{
dataSourceArray.push($(this).val());
}
});
return dataSourceArray;
}
// 联合 渠道查找指标
function getKpiByChannel() {
initBusiness();
initKpi();
var selectedChannelsArr = getSelectedChannels();
if (selectedChannelsArr.length === 0) {
return;
}
var selectedChannelStr = selectedChannelsArr.join("-");
var selectedDataSourceArr = getSelectedDataSources();
if (selectedDataSourceArr.length === 0) {
return;
}
var selectedDataSourceStr = selectedDataSourceArr.join('-');
var url = "${ctx}/MonitorOperation/CustomAnalysis/getDimKpiListByDataSourceIdListAndChinnalIdList/" + selectedDataSourceStr + "/" + selectedChannelStr;
$.ajax({
url: url,
type: 'GET',
dataType: 'json',
timeout: 3000,
cache: false,
error: solveDataSourceError,
success: useDataSourceDataToKpi
});
}
// 联合 渠道查找 业务
function getBusinessByChannel(){
function getBusinessByChannel()
{
// 清空 业务 和指标
initBusiness();
initKpi();
var selectedChannelsArr=getSelectedChannels();
// alert("selectedChannelsArr.length ="+selectedChannelsArr.length );
if (selectedChannelsArr.length ===0){return;}
var selectedChannelStr=selectedChannelsArr.join("-");
var selectedChannelsArr = getSelectedChannels();
if (selectedChannelsArr.length === 0) {
return;
}
var selectedChannelStr = selectedChannelsArr.join("-");
var selectedDataSourceArr=getSelectedDataSources();
// alert("selectedDataSourceArr.length ="+selectedDataSourceArr.length);
if (selectedDataSourceArr.length ===0){return;}
var selectedDataSourceStr=selectedDataSourceArr.join('-');
// alert("selectedDataSourceStr "+selectedDataSourceStr);
// alert("selectedChannelStr "+selectedChannelStr);
var selectedDataSourceArr = getSelectedDataSources();
if (selectedDataSourceArr.length === 0) {
return;
}
var selectedDataSourceStr = selectedDataSourceArr.join('-');
var url = "${ctx}/MonitorOperation/CustomAnalysis/getBusinessByChannelIdListAndDataSourceIdList/"
+selectedDataSourceStr+"/"+
selectedChannelStr;
var url = "${ctx}/MonitorOperation/CustomAnalysis/getBusinessByChannelIdListAndDataSourceIdList/"
+ selectedDataSourceStr + "/" +
selectedChannelStr;
$.ajax({
url: url,
type: 'GET',
...
...
@@ -108,25 +144,33 @@
});
}
function solveDataSourceError(){//若果请求 错误 就初始化 数据来源请求框
function solveDataSourceError() {//若果请求 错误 就初始化 数据来源请求框
initDataSource();
initKpi();//初始化指标
}
function useDataSourceData(data){//将业务数据 显示到界面上
// alert(data);
function useDataSourceData(data) {//将业务数据 显示到界面上
loadBusiness(data);
}
function loadBusiness(data){
function loadBusiness(data) {
$("#businessList_div").empty();//清除 已显示的业务
var content
=
"";
for (var key in data){
var businessId
=
data[key].businessId;
var businessName
=
data[key].businessName;
var contentChild
=
"<div class='checkbox-inline'>" +
"<label><input type='checkbox' class='businessStats' title='"
+businessName+"' value='"+businessId+"' name='businesss' onclick='businessClick(this)'>"+businessName
+ "</label></div>";
content
=content+
contentChild;
var content
=
"";
for (var key in data)
{
var businessId
=
data[key].businessId;
var businessName
=
data[key].businessName;
var contentChild
=
"<div class='checkbox-inline'>" +
"<label><input type='checkbox' class='businessStats' title='"
+ businessName + "' value='" + businessId + "' name='businesss' onclick='businessClick(this)'>" + businessName
+ "</label></div>";
content
= content +
contentChild;
}
if
(content !=='')
{
if
(content !== '')
{
$("#allBusiness_div").show();
}
$("#businessList_div").append(content);
...
...
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Kpi.tag
View file @
98880f94
...
...
@@ -114,4 +114,33 @@
}
function useDataSourceDataToKpi(data) {//将KPI数据显示到界面上
showKpiByDataSourceAndChinnel(data);
}
// 2018/05/20 通过datasourceId和chinnelId 显示KPI
function showKpiByDataSourceAndChinnel(data) {
$("#kpiList_div").empty();
var content = "";
for (var key in data) {
var kpiName = data[key].kpiName;
var kpiId = data[key].kpiId;
var contentChild = "<div class='checkbox-inline'>" +
"<label><input type='checkbox' class='businessStats' title='" + kpiName + "' value='" + kpiId + "' name='kpi' onclick='kpiClick(this)'>" + kpiName + "</label></div>";
content = content + contentChild;
}
if (content !== '') {
$("#allKpi_div").show();//显示全选
}
$("#kpiList_div").append(content);
}
</script>
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Province.tag
View file @
98880f94
...
...
@@ -24,11 +24,11 @@
//全选和不全选所有的省
$('input[name="allProvince"]').on('click', function () {
if ($("#allProvince").prop("checked")) {//已全选
alert("1");
$('input[name="province"]').prop("checked", true);
} else {
alert("122");
$('input[name="province"]').prop("checked", false);
}
});
...
...
src/main/webapp/WEB-INF/tags/GZFX_CustomAnalyis_Time.tag
View file @
98880f94
...
...
@@ -47,6 +47,30 @@
return (clock);
}
function GetDateStr(AddDayCount) {
var dd = new Date();
dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期
var y = dd.getFullYear();
var m = dd.getMonth()+1;//获取当前月份的日期
var d = dd.getDate();
var hh = dd.getHours(); //时
var mm = dd.getMinutes(); //分
if (m < 10){
m = "0"+m;
}
if (d < 10){
d = "0"+d;
}
if (hh < 10){
hh = "0"+hh;
}
if (mm < 10){
mm = "0"+mm;
}
return y+"-"+m+"-"+d+" "+hh+":"+mm+":00";
}
function initEndTimeStats() {
var date = new Date();
var daysInMonth = new Array([0], [31], [28], [31], [30], [31], [30], [31], [31], [30], [31], [30], [31]);
...
...
@@ -92,9 +116,11 @@
//初始化时间控件的默认值,需要在页面加载时调用此初始化方法
function initDateStats() {
$("#timeStats #d1Stats").val(initEndTimeStats());
// $("#d1Stats").val(initEndTimeStats());
$("#d1Stats").val(GetDateStr(-1));
$("#timeStats #d2Stats").val(initStartTimeStats());
//$("#d2Stats").val(initStartTimeStats());
$("#d2Stats").val(GetDateStr(0));
}
//获取选取的时间段,返回结果为字符串数组
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/CustomAnalysis.jsp
View file @
98880f94
...
...
@@ -186,12 +186,18 @@
<script
type=
"text/javascript"
src=
"${ctx}/static/js/dygraph-extra.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
initDateStats
();
//初始化时间
initChannel
();
//初始化渠道
initBusiness
();
//业务
initKpi
();
//指标
$
(
"#businessList_div"
).
empty
();
//清空 业务
$
(
"#allBusiness"
).
prop
(
"checked"
,
false
);
//取消选择 ‘全选’
$
(
"#kpiList_div"
).
empty
();
//清空
$
(
"#allKpi_div"
).
prop
(
"checked"
,
false
);
//取消全选
console
.
log
(
"1-"
);
getKpiByDatasource
();
//获取指标
console
.
log
(
"12-"
);
})
</script>
<script
type=
"text/javascript"
>
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/WorkingOrderReasult.jsp
View file @
98880f94
...
...
@@ -52,6 +52,7 @@
seajs.use('
${ctx}/static/artDialog/src/dialog',function(dialog) {
var d = dialog({
title : '更新协查单',
...
...
@@ -279,7 +280,13 @@
<td>${xcdWorkingOrderInfo.actualCompletionTime}</td>
<td>${xcdWorkingOrderInfo.ifClosed}</td>
<td>${xcdWorkingOrderInfo.occurReason}</td>
<td>${xcdWorkingOrderInfo.resolvingStatus}</td>
<c:if test="${xcdWorkingOrderInfo.ifReportFile == '0'}">
<td>无</td>
</c:if>
<c:if test="${xcdWorkingOrderInfo.ifReportFile == '1'}">
<td>有</td>
</c:if>
</tr>
...
...
@@ -494,13 +501,13 @@ $(function () {
//数据来源标签
$
(
'#DataSourceTag'
).
text
(
'数据来源'
).
append
(
$
(
"<span class='badge'></span>"
).
text
(
getStatsDataSourceCheckedValues
().
length
)).
attr
(
'data-original-title'
,
getStatsDataSourceCheckedTitles
()).
tooltip
();
reportStr
=
report
;
var
reportText
=
''
;
if
(
reportStr
===
'1'
)
{
reportText
=
'有'
;
}
else
if
(
reportStr
===
'0'
)
{
reportText
=
'无'
;
var
reportText
=
''
;
if
(
reportStr
===
'1'
)
{
reportText
=
'有'
;
}
else
if
(
reportStr
===
'0'
)
{
reportText
=
'无'
;
}
if
(
reportText
!==
''
)
{
if
(
reportText
!==
''
)
{
$
(
'#reportsTag'
).
text
(
'分析报告'
).
append
(
$
(
"<span class='badge'></span>"
).
text
(
1
)).
attr
(
'data-original-title'
,
reportText
).
tooltip
();
}
...
...
src/main/webapp/static/js/xcdResultTable.js
View file @
98880f94
...
...
@@ -147,7 +147,7 @@ function xcdFindTable(){
header
[
9
]
=
[
"原因子类一"
,
"woReasonSubTypeOne"
,
"7%"
,
""
];
header
[
10
]
=
[
"原因子类二"
,
"woReasonSubTypeTwo"
,
"7%"
,
""
];
header
[
11
]
=
[
"解决方案"
,
"proposedResolution"
,
"9%"
,
"20"
];
header
[
12
]
=
[
"分析报告"
,
"
proposedResolution
"
,
"9%"
,
"20"
];
header
[
12
]
=
[
"分析报告"
,
"
ifReportFile
"
,
"9%"
,
"20"
];
// header[12]=["详细","","4%",""];
window
.
pagging
=
new
table_pagging
({
limit
:
12
,
tableId
:
'xcdResultTable'
,
header
:
header
});
...
...
@@ -327,6 +327,14 @@ table_pagging.prototype = {
tdContext
=
df
.
format
(
new
Date
(
tdContext
));
}
}
if
(
k
==
12
){
if
(
tdContext
===
'1'
){
tdContext
=
'有'
;
}
if
(
tdContext
===
'0'
){
tdContext
=
'无'
;
}
}
}
}
else
{
tdContext
=
this
.
header
[
k
][
1
]
+
"<span style='display:none'>"
+
i
+
"</span>"
;
...
...
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