Commit 0e2565e1 authored by 莫林毅's avatar 莫林毅

修改bug .

parent 609f982d
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.hp.cmsz.entity;
import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
/**
*ccolap.KPI_ASSOCIATION_ANALYSIS_v对应的实体类
*
* @author Molinyi
*
*/
public class AssociateDiagosisDetail implements Serializable {
private static final long serialVersionUID = 1L;
private BigInteger associationId;
private Timestamp warnBeginTime;
private Timestamp warnEndTime;
private BigInteger provinceId;
private String provinceName;
private char associationType;
private String associationDesc;
private BigInteger warningNum;
public BigInteger getAssociationId() {
return associationId;
}
public void setAssociationId(BigInteger associationId) {
this.associationId = associationId;
}
public Timestamp getWarnBeginTime() {
return warnBeginTime;
}
public void setWarnBeginTime(Timestamp warnBeginTime) {
this.warnBeginTime = warnBeginTime;
}
public Timestamp getWarnEndTime() {
return warnEndTime;
}
public void setWarnEndTime(Timestamp warnEndTime) {
this.warnEndTime = warnEndTime;
}
public BigInteger getProvinceId() {
return provinceId;
}
public void setProvinceId(BigInteger provinceId) {
this.provinceId = provinceId;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public char getAssociationType() {
return associationType;
}
public void setAssociationType(char associationType) {
this.associationType = associationType;
}
public String getAssociationDesc() {
return associationDesc;
}
public void setAssociationDesc(String associationDesc) {
this.associationDesc = associationDesc;
}
public BigInteger getWarningNum() {
return warningNum;
}
public void setWarningNum(BigInteger warningNum) {
this.warningNum = warningNum;
}
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.AssociateDiagosisDetail;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import java.sql.Timestamp;
import java.util.List;
public interface AssociateDiagosisDetailDao {
//@Query(" from AssociateDiagosisDetail detail where detail.warnBeginTime ")
//public List<AssociateDiagosisDetail> findLastDiagosisDetail(Timestamp lastMonthCurrentTime);
/* public List<AssociateDiagosisDetail>findByWarnBeginTimeGreaterThanEqual(Timestamp lastMonthCurrentTime);
@Query("from AssociateDiagosisDetail detail where detail.associationType =:type and detail.provinceId in (:proviceId) and detail.warnBeginTime >= :beginTime and detail.warnEndTime <= :endTime")
public List<AssociateDiagosisDetail> findByBeginToEndTimeAndAssociationTypeAndProvinceId(@Param(value = "beginTime") Timestamp beginTime,
@Param(value = "endTime")Timestamp endTime,
@Param(value = "type")String type,
@Param(value = "proviceId")List<Long> proviceIdList);
*/
}
...@@ -25,6 +25,9 @@ public interface BusinessDao extends JpaSpecificationExecutor<Business>, ...@@ -25,6 +25,9 @@ public interface BusinessDao extends JpaSpecificationExecutor<Business>,
@Query("from Business business where business.isActive = 'Y' and business.businessId >= 0 order by business.businessId") @Query("from Business business where business.isActive = 'Y' and business.businessId >= 0 order by business.businessId")
List<Business> findAllBusiness(); List<Business> findAllBusiness();
/*@Query(" from Business business where business.isActive = 'Y' and business.businessId >= 0 order by business.businessId")
public List<Business> findAllBusiness();*/
//加入isActive=N || add by August 2014-3-27 //加入isActive=N || add by August 2014-3-27
@Query("select business.businessId, business.businessName from Business business where business.isActive = 'Y' and business.businessId >= 0 order by business.businessId") @Query("select business.businessId, business.businessName from Business business where business.isActive = 'Y' and business.businessId >= 0 order by business.businessId")
List<Object[]> findAllBusinessIdAndBusinessName(); List<Object[]> findAllBusinessIdAndBusinessName();
...@@ -76,5 +79,7 @@ public interface BusinessDao extends JpaSpecificationExecutor<Business>, ...@@ -76,5 +79,7 @@ public interface BusinessDao extends JpaSpecificationExecutor<Business>,
@Query("select business from Business business where business.isActive = :isActived and business.channelDataSourceMapId in (:channelDataSourceMapIdList)") @Query("select business from Business business where business.isActive = :isActived and business.channelDataSourceMapId in (:channelDataSourceMapIdList)")
public List<Business> findBusinessListBychannelDataSourceMapIdListAndIsActived(@Param(value = "channelDataSourceMapIdList") List<Long>channelDataSourceMapIdList,@Param(value = "isActived") String isActived); public List<Business> findBusinessListBychannelDataSourceMapIdListAndIsActived(@Param(value = "channelDataSourceMapIdList") List<Long>channelDataSourceMapIdList,@Param(value = "isActived") String isActived);
} }
package com.hp.cmsz.service.monitoroperation;
import com.hp.cmsz.entity.AssociateDiagosisDetail;
import com.hp.cmsz.repository.DimAssociationAnaInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.hp.cmsz.repository.AssociateDiagosisDetailDao;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
@Service
@Transactional(readOnly = true)
public class AssociateDiagosisDetailService {
/* @Autowired
private AssociateDiagosisDetailDao associateDiagosisDetailDao;*/
@Autowired
private DimAssociationAnaInfoDao dimAssociationAnaInfoDao;
/*
public List<AssociateDiagosisDetail> findLastDiagosisDetail() {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd:HH:mm:ss");
Calendar calendar = Calendar.getInstance();
System.out.println(format.format(calendar.getTime()));
calendar.add(Calendar.MONTH, -1);
System.out.println(format.format(calendar.getTime()));
List<AssociateDiagosisDetail> list = associateDiagosisDetailDao.findByWarnBeginTimeGreaterThanEqual(new Timestamp(calendar.getTimeInMillis()));
System.out.println(list);
return null;// associateDiagosisDetailDao.findByWarnBeginTimeGreaterThanEqual(new Timestamp(calendar.getTimeInMillis()));
}
public List<AssociateDiagosisDetail> findByBeginToEndTimeAndAssociationTypeAndProvinceId(Timestamp beginTime, Timestamp endTime,
String type,List<Long> proviceIdList) {
return associateDiagosisDetailDao.findByBeginToEndTimeAndAssociationTypeAndProvinceId(beginTime, endTime, type, proviceIdList);
}
*/
public List<Object[]> findAssociateDiagosisDetailByWarnTimeBeginAndEnd( String warnBeginTime, String warnEndTime){
return dimAssociationAnaInfoDao.findAssociateDiagosisDetailByWarnTimeBeginAndEnd(warnBeginTime, warnEndTime);
}
public List<Object[]> findLastMathAssociateDiagosisDetailByWarnTimeBegin( String warnBeginTime){
Calendar calendar=Calendar.getInstance();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String warnEndTime= format.format(calendar.getTime());
return dimAssociationAnaInfoDao.findAssociateDiagosisDetailByWarnTimeBeginAndEnd(warnBeginTime, warnEndTime);
}
public List<Object[]> findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList(String warnBeginTime, String warnEndTime, char dimension, List<Long> provincelist){
return dimAssociationAnaInfoDao.findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList(warnBeginTime, warnEndTime,dimension,provincelist);
}
public Object[] findDetailByAssociationIdAndWarnBeginToEndTime(String beginTime,String endTime,Long associationId){
return dimAssociationAnaInfoDao.findDetailByAssociationIdAndWarnBeginToEndTime(beginTime,endTime,associationId);
}
}
...@@ -208,9 +208,9 @@ public class ModelMaintainController { ...@@ -208,9 +208,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);
} }*/
} }
} }
} }
......
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2017/12/9 0009
Time: 下午 3:29
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
<title>全网监控智能分析平台</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script src="${ctx}/static/artDialog4.1.7/artDialog.source.js?skin=default"></script>
<script src="${ctx}/static/artDialog4.1.7/plugins/iframeTools.source.js"></script>
<script type="text/javascript" src="${ctx}/static/js/associatediagosisdetail.js"></script>
</head>
<body>
<div>
<div class="container">
<ol class="breadcrumb">
<li><a href="${ctx}/index">首页</a></li>
<li>监控运营</li>
<li class="active">告警关联诊断</li>
</ol>
</div>
</div>
<div id="main-container main-tab-container">
<div id="content" class="container">
<div class="section">
<div class="tab-content">
<div class="tab-pane fade in active" id="detail">
<div class="row me-row">
<div id="slidePushMenus2" class="cbp-spmenu-push">
<div class="main col-xs-12">
<!-- <table id="mainm2" class="mainm" onclick="hideMenu('showLeftPush2','slidePushMenus2')"></table> -->
<div id="mainm2" class="mainm"></div>
<div class="content clearfix">
<div class="row">
<div class="col-xs-12">
<table class='table table-vertical'>
<tr>
<td><label>开始时间:</label>aa${detail.warnBeginTime}</td>
<td><label>结束时间:</label>aa${detail.warnEndTime}</td>
</tr>
<tr>
<td><label>省份:</label>aa${detail.provinceName}</td>
<td><label>类型:</label>aa${detail.associationType}</td>
<c:choose >
<c:when test="${detail.associationType == 'c'}">
业务
</c:when>
<c:when test="${detail.associationType == 'y'}">
渠道
</c:when>
<c:otherwise>
未知
</c:otherwise>
</c:choose>
</tr>
<tr>
<td><label>名称:</label>aa${detail.associationDesc}</td>
<td><label>告警个数:</label>aa${detail.warningNum}</td>
</tr>
<tr>
<td><label>异常程度:</label>aa${detail.warnBeginTime}</td>
<td><label>指标告警明细:</label>"aa${detail.warnBeginTime}</td>
</tr>
</table>
<br>
<table class='table table-vertical'>
<tr>
<th>开始时间</th>
<th>结束时间</th>
<th>省份</th>
<th>类型</th>
<th>名称</th>
<th>告警个数</th>
<th>异常程度</th>
<th>指标告警明细</th>
</tr>
<c:forEach items="detailList" var="item">
<tr>
<td>${item.}</td>
<td>${item.}</td>
<td>${item.}</td>
<td>${item.}</td>
<td>${item.}</td>
<td>${item.}</td>
<td>${item.}</td>
<td>${item.}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<form action="#" method="get" id="listForm"></form>
<input type="hidden" id="gzfxDetail" name="gzfxDetail" value='${gzfxDetailInfos}' />
<%-- <input type="hidden" id="listDimKpi" name="listDimKpi" value='${listDimKpi}' />--%><%-- 所有指标--%>
<input type="hidden" id="provinceAll" name="provinceAll" value='${provinces}' />
<input type="hidden" id="indicatorsAll" name="indicatorsAll" value='${indicatorsAll}' />
<input type="hidden" id="anaInfoSelected" name="anaInfoSelected" value='' />
</div>
</div>
</div>
</div>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment