Commit 570fb597 authored by 莫林毅's avatar 莫林毅

监控运营 -> 告警关联诊断 '详情' 跳转 页面

增加 ‘协查单’和‘变更单’ table
parent c64707e7
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -42,5 +42,14 @@ public interface XcdChangeOrderDao extends JpaSpecificationExecutor<XcdChangeOrd
//根据告警id得到变更单信息 Add by Charmy
@Query(value="select change_order_code , change_order_title , change_start_time, change_end_time from xcd_change_order_info_t cross join (select occur_time,warning_id,cast(parameter_value as number) parameter_value,province_id from gjfx_warning_info_t, dim_system_parameter_info_t where warning_id=:warningID and parameter_name='CHANGE_ORDER_SEARCH_HOURS') gjfx_warning_info_t where (change_start_time>occur_time-parameter_value/24 and change_start_time<occur_time+parameter_value/24 or change_end_time>occur_time-parameter_value/24 and change_end_time<occur_time+parameter_value/24) and gjfx_warning_info_t.province_id=xcd_change_order_info_t.province_id order by change_end_time desc",nativeQuery=true)
List<Object[]> findByWarningId(@Param("warningID")String warningID);
List<Object[]> findByWarningId(@Param("warningID")String warningID);
@Query(value = "select t.* from ccolap.XCD_CHANGE_ORDER_INFO_T t" +
" where CHANGE_START_TIME>= ?1 " +
" and CHANGE_END_TIME<= ?2 " +
"and PROVINCE_ID = ?3 "
,nativeQuery = true)
List<XcdChangeOrder> findXcdChangeOrderListByChangeStartTimeAndChangeEndTimeAndProvinceId(
Date changeStartTime,Date changeEndTime,Long provinceId);
}
......@@ -136,4 +136,7 @@ public interface XcdDetailInfoViewDao extends PagingAndSortingRepository<XcdDet
List<XcdDetailInfoView> findWorkingOrderIdDistinctByProviderIdInAndDataSourceIdInAndChannelIdInAndProvinceIdInAndWorkingOrderIdIsNullAndRelevantFailureIdIsNullOrderByEventHappenTimeDesc(List<Long> provider,List<Long> datasource,List<Long> channel,List<Long> province);
//根据协查单编号查找协查单,协查单明细展示
List <XcdDetailInfoView> findByWorkingOrderCode(String xcdCode);//加List <XcdDetailInfoView>是为了防止数据有问题,例如一个协查单编号对应几条协查单记录,但是在实际环境中一个协查单编号只对应一条记录
}
......@@ -120,7 +120,16 @@ public interface XcdWorkingOrderInfoDao extends PagingAndSortingRepository<XcdW
@Modifying
@Query(value="delete from XCD_WORKING_ORDER_INFO_T where WORKING_ORDER_ID = ?1",nativeQuery=true)
void deleteByWorkingOrderId(Long xcdId);
@Query(value = "select a.* from ccolap.XCD_WORKING_ORDER_INFO_T a ,ccolap.DIM_PROVINCE_INFO_T b " +
" where WORKING_ORDER_CODE is not null and EVENT_HAPPEN_TIME>= ?1 " +
" and BUSINESS_RECOVERY_TIME<= ?2 " +
" and a.prov_code=b.province_code " +
" and b.province_id= ?3",nativeQuery = true)
List<XcdWorkingOrderInfo> findXcdWorkingOrderInfoByEventHappenTimeAndBusinessRecoveryTimeAndProvinceId(
Date eventHappenTime,Date businessRecoveryTime,Long provinceId );
......
......@@ -31,6 +31,7 @@ import java.text.SimpleDateFormat;
import java.util.*;
import com.hp.cmsz.service.monitoroperation.AssociateDiagosisDetailService;
import sun.org.mozilla.javascript.internal.EcmaError;
import sun.rmi.transport.ObjectTable;
/**
......@@ -84,6 +85,14 @@ public class AssociateDiagosisDetailController {
@Autowired
private XcdWarningInfoViewDao xcdWarningInfoViewDao;
@Autowired
private XcdDetailInfoViewDao xcdDetailInfoViewDao;
@Autowired
private XcdChangeOrderDao xcdChangeOrderDao;
/*@Autowired
private XcdWorkingOrderInfoDao xcdWorkingOrderInfoDao;*/
@RequestMapping("")
public String lis(Map model, ServletRequest request, HttpSession session)
......@@ -151,7 +160,7 @@ public class AssociateDiagosisDetailController {
@RequestParam(value = "warningNum", defaultValue = "") String warningNum,
@RequestParam(value = "beginTime", defaultValue = "") String beginTime,
@RequestParam(value = "endTime", defaultValue = "") String endTime,
Map map) {
Map map) throws Exception {
map.put("associationId", associationId);
......@@ -177,6 +186,18 @@ public class AssociateDiagosisDetailController {
adwdl = associateDiagosisDetailService.
findDetailByBeginTimeAndEndTimeAndAssociationIdAndProvinceId(beginTime, endTime, associationIdL, provinceId);
Date eventHappenTime=strToDate(beginTime);
Date businessRecoveryTime=strToDate(endTime);
getNewDate(eventHappenTime,-2*60);
getNewDate(businessRecoveryTime,2*60);
List<XcdWorkingOrderInfo> xcdWorkingOrderInfos=xcdWorkingOrderInfoDao.
findXcdWorkingOrderInfoByEventHappenTimeAndBusinessRecoveryTimeAndProvinceId(eventHappenTime,businessRecoveryTime,provinceId);
List<XcdChangeOrder> xcdChangeOrders=xcdChangeOrderDao.
findXcdChangeOrderListByChangeStartTimeAndChangeEndTimeAndProvinceId(eventHappenTime,businessRecoveryTime,provinceId);
System.out.println("xcdChangeOrders len ="+xcdChangeOrders.size());
System.out.println("xcdWorkingOrderInfos len ="+xcdWorkingOrderInfos.size());
map.put("xcdWorkingOrderInfos",xcdWorkingOrderInfos);
map.put("xcdChangeOrders",xcdChangeOrders);
}
......@@ -348,7 +369,9 @@ public class AssociateDiagosisDetailController {
throw new Exception("日期格式不对");
}
return d;
}
public static void getNewDate(Date date,int minutes){
date.setTime(date.getTime()+minutes*60000);
}
......
......@@ -242,6 +242,7 @@ th{
dataType : 'text',
beforeSend: function(data) {},
success: function(data) {
$("#wadt").val(data);
warnAnalysisDetailTable();
toggleMenu('slidePushMenus2');//隐藏筛选项
......
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