|
|
@@ -15,6 +15,7 @@ import com.shkpr.service.warncore.dbdao.tables.OrdWarnPlanInfoTable;
|
|
|
import com.shkpr.service.warncore.dbdao.tables.OrdWarnPlanRulesTable;
|
|
|
import com.shkpr.service.warncore.dto.*;
|
|
|
import com.shkpr.service.warncore.globalmgr.AsyncTaskQueueMgr;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
@@ -95,11 +96,15 @@ public class TimerCheckWarnPlanMgr {
|
|
|
|
|
|
if (oItem.getStatus() != CommFieldStatus.ENABLE
|
|
|
|| oItem.getFrequency() <= 0
|
|
|
+ || oItem.getMinStarts() < 0
|
|
|
|| !frequencyUnit.equals(oItem.getFrequencyUnit())
|
|
|
|| oItem.getFrequency() > curTmForCompare
|
|
|
|| (curTmForCompare%oItem.getFrequency() != 0))
|
|
|
continue;
|
|
|
|
|
|
+ if (OrdWarnOwnerSrc.ZONE.equals(oItem.getOwnerSrc()) && StringUtils.isEmpty(oItem.getOwnerId()))
|
|
|
+ continue;
|
|
|
+
|
|
|
//if (DoPeriodUnit.HOUR.equals(oItem.getDoPeriodUnit())){
|
|
|
if (oItem.getCycleTriggerUpperTimes() >= 0){
|
|
|
if (oItem.getCycleTriggerUpperTimes() == 0)
|
|
|
@@ -157,6 +162,11 @@ public class TimerCheckWarnPlanMgr {
|
|
|
step = "Warn plan info invalid";
|
|
|
break;
|
|
|
}
|
|
|
+ if (OrdWarnOwnerSrc.ZONE.equals(planDetail.getOwnerSrc()) && StringUtils.isEmpty(planDetail.getOwnerId())){
|
|
|
+ code = ResponseCode.RESULT_BAD;
|
|
|
+ step = "Owner of warn plan is invalid";
|
|
|
+ break;
|
|
|
+ }
|
|
|
infoDb.clear();
|
|
|
List<Map<String, Object>> rulesDb = getWarnPlanRuleDBService().batchQueryWithsEx("", ""
|
|
|
, new HashMap<String, Object>(){{put(OrdWarnPlanRulesTable.R_INFO.PLAN_ID, planWillDo.getPlanId());}}
|