Commit 0897f6b5 authored by afe's avatar afe

2017年10月29提交内容

--实现预警与隐患维护的协查单预览与下发
parent 708f30ca
This diff is collapsed.
...@@ -136,11 +136,13 @@ public class WorkingOrderCreateController { ...@@ -136,11 +136,13 @@ public class WorkingOrderCreateController {
String picname = ""; String picname = "";
String eventsubcheck = ""; String eventsubcheck = "";
String eventkindcheck = ""; String eventkindcheck = "";
String alarmMsg;
//协查单生成页面 //协查单生成页面
@RequestMapping(method = RequestMethod.GET) @RequestMapping(method = RequestMethod.GET)
public String WorkingOrderCreate(@RequestParam(value = "warningId") String warningIds, Map model, public String WorkingOrderCreate(@RequestParam(value = "warningId") String warningIds,@RequestParam(value = "msg") String msg, Map model,
ServletRequest request, HttpSession session) { ServletRequest request, HttpSession session) {
alarmMsg = msg;
warningIdTwo = warningIds; warningIdTwo = warningIds;
String[] warningid = warningIds.split(","); String[] warningid = warningIds.split(",");
List<String> wid = changeStrToList(warningid); List<String> wid = changeStrToList(warningid);
...@@ -697,6 +699,8 @@ public class WorkingOrderCreateController { ...@@ -697,6 +699,8 @@ public class WorkingOrderCreateController {
int year = cal.get(Calendar.YEAR);//获取年份 int year = cal.get(Calendar.YEAR);//获取年份
int month = cal.get(Calendar.MONTH) + 1;//获取月份 int month = cal.get(Calendar.MONTH) + 1;//获取月份
System.out.println("@@@@@@@@@@@@@@@@@@@@"+alarmMsg);
String [] alarmMsgArr = alarmMsg.split("|");
String[] warningids = warningIdTwo.split(",|,"); String[] warningids = warningIdTwo.split(",|,");
List<String> ids = changeStrToList(warningids); List<String> ids = changeStrToList(warningids);
List<XcdWarningInfoView> xcdWarningInfoViews = xcdWarningInfoViewDao.findByWarningIdIn(ids); List<XcdWarningInfoView> xcdWarningInfoViews = xcdWarningInfoViewDao.findByWarningIdIn(ids);
...@@ -929,21 +933,21 @@ public class WorkingOrderCreateController { ...@@ -929,21 +933,21 @@ public class WorkingOrderCreateController {
} }
} }
} else { //隐患,去特定的目录取图片,隐患图片放在linux下/home/pentaho/picture目录中 } else { //隐患,去特定的目录取图片,隐患图片放在linux下/home/pentaho/picture目录中
if (xcdWarningInfoViews.get(i).getRiskPictureFileName() != null // if (xcdWarningInfoViews.get(i).getRiskPictureFileName() != null
&& !xcdWarningInfoViews.get(i).getRiskPictureFileName().equals("")) { // && !xcdWarningInfoViews.get(i).getRiskPictureFileName().equals("")) {
String imgFile = "/home/pentaho/picture" // String imgFile = "/home/pentaho/picture"
+ xcdWarningInfoViews.get(i).getRiskPictureFileName().trim(); // + xcdWarningInfoViews.get(i).getRiskPictureFileName().trim();
File file = null; // File file = null;
try { // try {
file = new File(imgFile); // file = new File(imgFile);
} catch (Exception e) { // } catch (Exception e) {
logger.warn(imgFile + "下无此图片!"); // logger.warn(imgFile + "下无此图片!");
} // }
if (file != null) { // if (file != null) {
byte[] bytes = ExportWordUtil.convertImageToByteArray(file); // byte[] bytes = ExportWordUtil.convertImageToByteArray(file);
ExportWordUtil.addImageToPackage(wordMLPackage, bytes); // ExportWordUtil.addImageToPackage(wordMLPackage, bytes);
} // }
} // }
} }
ExportWordUtil.addLineBreak(wordMLPackage, factory); ExportWordUtil.addLineBreak(wordMLPackage, factory);
......
...@@ -411,8 +411,8 @@ public class WorkingOrderManageControll { ...@@ -411,8 +411,8 @@ public class WorkingOrderManageControll {
catch (IOException ex1) { catch (IOException ex1) {
ex1.printStackTrace(); ex1.printStackTrace();
}finally{ }finally{
out.close(); out.close();
} }
} }
......
...@@ -139,7 +139,10 @@ ...@@ -139,7 +139,10 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="${ctx}/MonitorOperation/WorkingOrderManage">预警和隐患维护</a></li> <li><a href="${ctx}/MonitorOperation/WorkingOrderManage">预警和隐患维护</a></li>
<li><a href="${ctx}/MonitorOperation/WarnAnalysis">告警统计</a></li> <li><a href="${ctx}/MonitorOperation/WarnAnalysis">告警统计</a></li>
<li><a href="${ctx}/MonitorOperation/WarnAnalysisDetail">告警明细</a></li> <li><a href="${ctx}/MonitorOperation/WarnAnalysisDetail">告警明细</a></li>
<%--create by hubin 2017-10-26 功能未实现 --%>
<li><a href="${ctx}/">内部协查单管理</a></li>
</ul> </ul>
</li> </li>
</shiro:hasPermission> </shiro:hasPermission>
......
<%@tag pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%--数据类型 --%>
<div id="model_dataType" class="slide-menu-option">
<div class="slide-select">
<label >数据类型:</label><br/>
<select class="slide-menu-select" id="relStatus" name="relStatus">
<option value="业务量类" title="业务量类" selected><a href="#">业务量类</a></option>
<option value="时长类" title="时长类" ><a href="#">时长类</a></option>
<option value="百分比类" title="百分比类" ><a href="#">百分比类</a></option>
</select>
</div>
</div>
</script>
\ No newline at end of file
<%@tag pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!-- 协查单管理页面中的告警关联协查单的状态 -->
<div id="ws3" class="slide-menu-option">
<label>告警是否过滤</label> <!-- <div class="slide-select"> -->
<select class="slide-menu-select" id="relStatus" name="relStatus">
<option value="是" title="是" ><a href="#">是</a></option>
<option value="否" title="否" selected><a href="#">否</a></option>
</select>
<!-- </div> -->
</div>
<script type="text/javascript">
// function getStatus(){
// return $("#relStatus").val();
// }
// function getStatusName(){
//
// return $("#relStatus").find("option:selected").attr("title");
// }
// function StatusReset(){
// $("#relStatus").val("0,1,2,3");
// }
</script>
\ No newline at end of file
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
<option value="未确认" title="未确认"><a href="#">未确认</a></option> <option value="未确认" title="未确认"><a href="#">未确认</a></option>
<option value="已确认" title="已确认"><a href="#">已确认</a></option> <option value="已确认" title="已确认"><a href="#">已确认</a></option>
<option value="已关联协查单" title="已关联协查单"><a href="#">已关联协查单</a></option> <option value="已关联协查单" title="已关联协查单"><a href="#">已关联协查单</a></option>
</select> </select>
<!-- </div> --> <!-- </div> -->
</div> </div>
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
<tags:FXJM_modelResult_DataModelTypeTag/> <tags:FXJM_modelResult_DataModelTypeTag/>
<tags:FXJM_Status/> <tags:FXJM_Status/>
<tags:FXJM_TitleSearch/> <tags:FXJM_TitleSearch/>
<tags:ModelDataType/>
<!-- <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>
......
...@@ -248,8 +248,7 @@ ...@@ -248,8 +248,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-3 col-sm-9"> <div class="col-sm-offset-3 col-sm-9">
<input type="button" id="confirmId" class="btn btn-primary" value="确认"> <input type="button" id="confirmId" class="btn btn-primary" value="确认">
0
<input type="button" id="back" class="btn btn-warning" value="返回"> <input type="button" id="back" class="btn btn-warning" value="返回">
<input type="button" id="createInsideWorkingOrder" class="btn btn-success" value="生成内部协查单"> <input type="button" id="createInsideWorkingOrder" class="btn btn-success" value="生成内部协查单">
......
...@@ -5,18 +5,28 @@ ...@@ -5,18 +5,28 @@
<div class="table-header">任务列表 <div class="table-header">任务列表
<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-primary 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('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-primary 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-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="deleteTask();">删除</button> <button class="btn-sm btn btn-warning 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--%>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="">模型预览</button>
</div> </div>
</div> </div>
<table class="table table-hover table-striped"> <table class="table table-hover table-striped">
<thead> <thead>
<tr> <tr>
<th>选择</th> <th>选择</th>
<th>任务代码</th>
<%--2017-10-26 create by afe--%>
<%--<th>任务代码</th>--%>
<th>省份</th>
<th>渠道</th>
<th>业务名称</th>
<th>数据类型</th>
<th>任务名称</th> <th>任务名称</th>
<th>任务类型</th> <th>任务类型</th>
<th>任务绑定信息</th> <th>任务绑定信息</th>
......
...@@ -133,10 +133,10 @@ function modelResultDetailTable(){ ...@@ -133,10 +133,10 @@ function modelResultDetailTable(){
header[4] = ["模型执行脚本名称","modelScriptName","12%","15"]; header[4] = ["模型执行脚本名称","modelScriptName","12%","15"];
header[5] = ["模型类别","dataModelTypeName","10%",""]; header[5] = ["模型类别","dataModelTypeName","10%",""];
header[6] = ["部署服务器","serverName","8%",""]; header[6] = ["部署服务器","serverName","8%",""];
//header[7] = ["模型运行频度分钟数","cycleMinutes","12%",""]; header[7] = ["数据类型","cycleMinutes","12%",""];
header[7] = ["模型发布时间","modelPublishTime","15%",""]; header[8] = ["模型发布时间","modelPublishTime","15%",""];
header[8] = ["模型修改时间","modelUpdateTime","15%",""]; header[9] = ["模型修改时间","modelUpdateTime","15%",""];
header[9] = ["参数","modelParameter","9%",""]; header[10] = ["参数","modelParameter","9%",""];
window.pagging = new table_pagging({limit:12,tableId:'modelResultTable',header:header}); window.pagging = new table_pagging({limit:12,tableId:'modelResultTable',header:header});
pagging.pagging(jsonData); pagging.pagging(jsonData);
......
var ids = new Array();//存放选中了的ID号 var ids = [];//存放选中了的ID号
ids = [];
var warlen; var warlen;
//格式化日期 //格式化日期
function Format(){ function Format(){
this.jsjava_class="jsjava.text.Format"; this.jsjava_class="jsjava.text.Format";
...@@ -294,11 +295,11 @@ table_pagging.prototype = { ...@@ -294,11 +295,11 @@ table_pagging.prototype = {
var tdTitle = ""; var tdTitle = "";
if (this.header[k][1]) { if (this.header[k][1]) {
var reg = /\%\{([\d\w.]+)\}\%/g; var reg = /\%\{([\d\w.]+)\}\%/g;
if (k != 0) { if (k !== 0) {
if (result = reg.exec(this.header[k][1])) { if (result = reg.exec(this.header[k][1])) {
// var result = reg.exec(this.header[k][1]); // var result = reg.exec(this.header[k][1]);
var context = this.header[k][1]; var context = this.header[k][1];
while (reg.lastIndex != 0) { while (reg.lastIndex !== 0) {
var value = this.getData( var value = this.getData(
this.objectlist[i], result[1]); this.objectlist[i], result[1]);
context = context.replace( context = context.replace(
...@@ -309,27 +310,27 @@ table_pagging.prototype = { ...@@ -309,27 +310,27 @@ table_pagging.prototype = {
} else { } else {
tdContext = this.getData(this.objectlist[i],this.header[k][1]); tdContext = this.getData(this.objectlist[i],this.header[k][1]);
if(tdContext==null){ if(tdContext===null){
tdContext = "&nbsp;"; tdContext = "&nbsp;";
} }
//add by eric 2014-04-29 21:42 由预警和隐患列表链接到告警明细相关页面 //add by eric 2014-04-29 21:42 由预警和隐患列表链接到告警明细相关页面
if(k==1){ if(k===1){
tdContext="<a href='javascript:;' onclick='batchOpenDialog("+i tdContext="<a href='javascript:;' onclick='batchOpenDialog("+i
+")' alt='"+i+"'>"+this.getData(this.objectlist[i],this.header[k][1])+"</a>"; +")' alt='"+i+"'>"+this.getData(this.objectlist[i],this.header[k][1])+"</a>";
} }
if(k==11){ if(k===11){
if(tdContext!="&nbsp;"){ if(tdContext!=="&nbsp;"){
tdContext = df.format(new Date(tdContext)); tdContext = df.format(new Date(tdContext));
} }
}else if(k==12){ }else if(k===12){
if(tdContext!="&nbsp;"){ if(tdContext!=="&nbsp;"){
tdContext = df.format(new Date(tdContext)); tdContext = df.format(new Date(tdContext));
} }
}else if(k==15){ }else if(k===15){
if(tdContext=="已确认"){ if(tdContext==="已确认"){
tr.className="green-tr"; tr.className="green-tr";
}else if(tdContext=="已关联协查单"){ }else if(tdContext==="已关联协查单"){
tr.className="blue-tr"; tr.className="blue-tr";
}else{ }else{
tr.className="white-tr"; tr.className="white-tr";
...@@ -341,7 +342,7 @@ table_pagging.prototype = { ...@@ -341,7 +342,7 @@ table_pagging.prototype = {
tdContext="<input type='checkbox' name='cbox"+i+"' class='cbox1' onclick='javascript:checkChoose(this);'/>"+"<span style='display:none'>"+i+"</span>"; tdContext="<input type='checkbox' name='cbox"+i+"' class='cbox1' onclick='javascript:checkChoose(this);'/>"+"<span style='display:none'>"+i+"</span>";
for ( var t = 0; t < ids.length; t++) { for ( var t = 0; t < ids.length; t++) {
if (ids[t] == this.getData(this.objectlist[i], this.header[1][1])){ if (ids[t] === this.getData(this.objectlist[i], this.header[1][1])){
tdContext="<input type='checkbox' name='cbox"+i+"' class='cbox1' checked onclick='javascript:checkChoose(this);'/>"+"<span style='display:none'>"+i+"</span>"; tdContext="<input type='checkbox' name='cbox"+i+"' class='cbox1' checked onclick='javascript:checkChoose(this);'/>"+"<span style='display:none'>"+i+"</span>";
break; break;
} }
......
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