瀏覽代碼

完善部分逻辑

andyliu 1 周之前
父節點
當前提交
4a173154f3

+ 2 - 2
src/main/java/com/shkpr/service/warncore/bizhandler/TimerCheckWarnPlanMgr.java

@@ -82,7 +82,7 @@ public class TimerCheckWarnPlanMgr {
                                 || (curMinute%oItem.getFrequency() != 0))
                             continue;
 
-                        if (DoPeriodUnit.HOUR.equals(oItem.getDoPeriodUnit())){
+                        //if (DoPeriodUnit.HOUR.equals(oItem.getDoPeriodUnit())){
                             if (oItem.getCycleTriggerUpperTimes() >= 0){
                                 if (oItem.getCycleTriggerUpperTimes() == 0)
                                     continue;
@@ -94,7 +94,7 @@ public class TimerCheckWarnPlanMgr {
 
                             if (curClock < oItem.getMinStarts())
                                 continue;
-                        }
+                        //}
                         AsyncTaskQueueMgr.getInstance().postTaskData(TaskQueueDataTypeEx.ASYNC_ANALY_WARN_PLAN, new OrdWarnPlanWillDo(oItem.getUid(), oItem.getObjSrc()));
                     }
                 }

+ 2 - 1
src/main/java/com/shkpr/service/warncore/jsonbean/JPOrdWarnEventInfo.java

@@ -67,11 +67,12 @@ public class JPOrdWarnEventInfo {
         this.fromTime = thisTempStep.getFirstMatchSampleTime();
         this.toTime = thisTempStep.getLastCompareSampleTime();
         this.rules = formatRule(rules);
+
         this.limitTime = 0L;
         this.createTime = eventTime;
         this.updateTime = eventTime;
         this.uid = CommTool.genWarnEventId(eventTime, "");
-        this.title = String.format("%s--%s--%d事件", planDetail.getTitle(), this.uid.substring(5,15), RandomUtil.getDigitalRandomStr(4));
+        this.title = String.format("%s--%s--%s事件", planDetail.getTitle(), this.uid.substring(5,15), RandomUtil.getDigitalRandomStr(4));
     }
 
     private String formatRule(List<OrdWarnPlanRules> rules){