|
|
|
@ -3654,7 +3654,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
continue; |
|
|
|
} |
|
|
|
fillSplitRuleMatchResult(resultMap, rule, child); |
|
|
|
fillSplitRuleMetricData(resultMap, metricContext); |
|
|
|
fillSplitRuleMetricData(resultMap, metricContext, child); |
|
|
|
saveSplitRuleMatchedData(inData, String.valueOf(resultMap.get("action")), child, metricContext); |
|
|
|
return resultMap; |
|
|
|
} |
|
|
|
@ -4079,13 +4079,16 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
resultMap.put("conditionNo", condition.getConditionNo()); |
|
|
|
resultMap.put("triggerEvent", triggerEvent); |
|
|
|
resultMap.put("forceType", forceType); |
|
|
|
resultMap.put("relationField", condition.getRelationField()); |
|
|
|
resultMap.put("compareSymbol", condition.getCompareSymbol()); |
|
|
|
resultMap.put("conditionParam", condition.getConditionParam()); |
|
|
|
resultMap.put("warningLevel", condition.getWarningLevel()); |
|
|
|
resultMap.put("responsibilityDept", condition.getResponsibilityDept()); |
|
|
|
|
|
|
|
if ("异常代码".equals(triggerEvent)) { |
|
|
|
resultMap.put("action", ACTION_OPEN_DEFECT); |
|
|
|
resultMap.put("lockPage", "N"); |
|
|
|
resultMap.put("message", "触发提示规则,本次操作完成后将打开【报告不良】。"); |
|
|
|
resultMap.put("message", "触发【异常代码】提示规则,请确认是否继续执行当前操作。"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -4097,7 +4100,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
} else { |
|
|
|
resultMap.put("action", ACTION_OPEN_DOWNTIME); |
|
|
|
resultMap.put("lockPage", "N"); |
|
|
|
resultMap.put("message", "触发提示规则,本次操作完成后将打开【异常停机】。"); |
|
|
|
resultMap.put("message", "触发【异常单】提示规则,请确认是否继续执行当前操作。"); |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -4235,13 +4238,17 @@ public class ScheduleServiceImpl implements ScheduleService { |
|
|
|
scheduleTodoMessageMapper.insertTodoMessage(entity); |
|
|
|
} |
|
|
|
|
|
|
|
private void fillSplitRuleMetricData(Map<String, Object> resultMap, SplitRollMetricContext metricContext) { |
|
|
|
private void fillSplitRuleMetricData(Map<String, Object> resultMap, |
|
|
|
SplitRollMetricContext metricContext, |
|
|
|
SysSceneExceptionRuleConditionEntity condition) { |
|
|
|
if (metricContext == null) { |
|
|
|
return; |
|
|
|
} |
|
|
|
resultMap.put("matchedRollIndex", metricContext.rollIndex); |
|
|
|
resultMap.put("matchedDefectRate", getMetricValue(metricContext, "不良率")); |
|
|
|
resultMap.put("matchedTotalQty", getMetricValue(metricContext, "总数")); |
|
|
|
String relationField = condition == null ? null : StringUtils.trimWhitespace(condition.getRelationField()); |
|
|
|
resultMap.put("matchedConditionValue", getMetricValue(metricContext, relationField)); |
|
|
|
resultMap.put("lockedTime", DateUtil.getStringDate(new Date(), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
} |
|
|
|
|
|
|
|
|