Commit bf230fa3 孙克

界面展示的服务器异常消息手动清除功能

工单监控日志去除,将错误工单文件移到error文件夹
1 个父辈 c2016255
...@@ -176,7 +176,7 @@ public class OrderFileWatch { ...@@ -176,7 +176,7 @@ public class OrderFileWatch {
} }
} }
resultFile = new File(localDir+File.separator + "sucess",backupFileName); //resultFile = new File(localDir+File.separator + "sucess",backupFileName);
} }
if(resultFile != null){ if(resultFile != null){
...@@ -299,10 +299,10 @@ public class OrderFileWatch { ...@@ -299,10 +299,10 @@ public class OrderFileWatch {
reelId = lineValues[14]; reelId = lineValues[14];
if(reelId.contains(",")){ if(reelId.contains(",")){
reelId = reelId.split(";")[0]; reelId = reelId.split(";")[0];
log.info("ReelId has more vlues, only use ["+reelId+"],ignore others."); //log.info("ReelId has more vlues, only use ["+reelId+"],ignore others.");
} }
}else{ }else{
log.warn("行[reelId="+reelId + "]的V列["+needOutStr+"]不包含TOWER,此行忽略"); //log.warn("行[reelId="+reelId + "]的V列["+needOutStr+"]不包含TOWER,此行忽略");
} }
}else{ }else{
...@@ -311,7 +311,7 @@ public class OrderFileWatch { ...@@ -311,7 +311,7 @@ public class OrderFileWatch {
} }
} }
if(reelId.isEmpty()){ if(reelId.isEmpty()){
log.warn("行[reelId="+reelId + "]中RI 为空,此行忽略"); //log.warn("行[reelId="+reelId + "]中RI 为空,此行忽略");
}else{ }else{
int num = 1; int num = 1;
LiteOrderItem item = new LiteOrderItem(); LiteOrderItem item = new LiteOrderItem();
......
...@@ -54,6 +54,8 @@ public interface ITaskService { ...@@ -54,6 +54,8 @@ public interface ITaskService {
List<DataLog> getFinishedTasks(); List<DataLog> getFinishedTasks();
void clearServerException(String cid);
Exception getServerException(String cid); Exception getServerException(String cid);
StatusBean getStatus(String cid); StatusBean getStatus(String cid);
......
...@@ -48,6 +48,15 @@ public class StatusController extends BaseController{ ...@@ -48,6 +48,15 @@ public class StatusController extends BaseController{
return getStatus(cid,request); return getStatus(cid,request);
} }
@RequestMapping(value = "/clearServerMsg")
@ResponseBody
public String clearServerMsg(@RequestParam String cid, HttpServletRequest request) {
if(!Strings.isNullOrEmpty(cid)){
taskService.clearServerException(cid);
}
return "";
}
private StatusBean getStatus(String cid, HttpServletRequest request){ private StatusBean getStatus(String cid, HttpServletRequest request){
StatusBean statusBean = taskService.getStatus(cid); StatusBean statusBean = taskService.getStatus(cid);
statusBean.setShowMsg(request.getLocale()); statusBean.setShowMsg(request.getLocale());
......
...@@ -21,8 +21,6 @@ import com.myproject.webapp.controller.webService.boxHandler.SmdXlBoxHandler; ...@@ -21,8 +21,6 @@ import com.myproject.webapp.controller.webService.boxHandler.SmdXlBoxHandler;
import com.myproject.webapp.controller.webService.boxHandler.VerticalBoxHandler; import com.myproject.webapp.controller.webService.boxHandler.VerticalBoxHandler;
import com.myproject.util.HttpHelper; import com.myproject.util.HttpHelper;
import com.myproject.util.StorageConstants; import com.myproject.util.StorageConstants;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.RandomUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -1505,6 +1503,11 @@ public class TaskService implements ITaskService { ...@@ -1505,6 +1503,11 @@ public class TaskService implements ITaskService {
} }
@Override @Override
public void clearServerException(String cid){
log.info("清理["+cid+"]的异常消息");
serverExceptions.remove(cid);
}
@Override
public Exception getServerException(String cid) { public Exception getServerException(String cid) {
return serverExceptions.get(cid); return serverExceptions.get(cid);
} }
......
...@@ -660,6 +660,11 @@ ...@@ -660,6 +660,11 @@
"999":"${status_999}" "999":"${status_999}"
}; };
clearMsg = function(){
$.get('${ctx}/service/store/clearServerMsg?cid=${show}', function (resultData) {
$("#clientMsg").html("");
});
}
function flushStatus(){ function flushStatus(){
$.get('${ctx}/service/store/status?cid=${show}', function (statusBean) { $.get('${ctx}/service/store/status?cid=${show}', function (statusBean) {
...@@ -691,14 +696,18 @@ ...@@ -691,14 +696,18 @@
}else{ }else{
var statusTxt = statusMsg["999"]; var statusTxt = statusMsg["999"];
$("#smdstatus").html("${boxStatus_label}: ["+statusTxt+"]"); $("#smdstatus").html("${boxStatus_label}: ["+statusTxt+"]");
$("#clientMsg").html(""); var msgTxt = statusBean.msg;
$("#clientMsg").html(statusBean.msg); if(msgTxt){
$("#clientMsg").html(msgTxt+"<a href='#' onclick='clearMsg();'> x </a>");
}else{
$("#clientMsg").html("");
}
//$("#clientMsg").html(statusBean.msg);
//$("#doorStatus").html("${doorStatus_label}: --"); //$("#doorStatus").html("${doorStatus_label}: --");
} }
}); });
} }
setInterval(function(){ setInterval(function(){
updateTasks("${show}"); updateTasks("${show}");
flushUsageItem(); flushUsageItem();
......
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
Copyright &copy; 2021 Neotel SMF Copyright &copy; 2021 Neotel SMF
<%--<a href="${ctx}/updateHistory.html">SMF</a>--%> <%--<a href="${ctx}/updateHistory.html">SMF</a>--%>
</div> </div>
<span class="right" style="color: #a3a3a3;">Version: 2.6.1310</span> <span class="right" style="color: #a3a3a3;">Version: 3.4.1116</span>
<div class="scroll-to-top"> <div class="scroll-to-top">
<i class="icon-arrow-up"></i> <i class="icon-arrow-up"></i>
</div> </div>
......
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!