|
@@ -4,6 +4,7 @@ import com.google.common.collect.Maps;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
@@ -31,6 +32,7 @@ public class QCCatalogue {
|
|
if (outputInfo.getResult().get(className) != null) {
|
|
if (outputInfo.getResult().get(className) != null) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ precondExecute(inputInfo, outputInfo);
|
|
try {
|
|
try {
|
|
start(inputInfo, outputInfo);
|
|
start(inputInfo, outputInfo);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -55,4 +57,22 @@ public class QCCatalogue {
|
|
info = "";
|
|
info = "";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //前置条件运行
|
|
|
|
+ private void precondExecute(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
|
+ Map<String, String> catalogueMap = inputInfo.getInputCatalogueMap().get(className);
|
|
|
|
+ if (catalogueMap == null) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ String precond = catalogueMap.get("precond");
|
|
|
|
+ if (StringUtil.isBlank(precond)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ for (String i : precond.split(",")) {
|
|
|
|
+ QCCatalogue qCCatalogue = CatalogueUtil.qcCatalogueMap.get(i);
|
|
|
|
+ if (qCCatalogue != null) {
|
|
|
|
+ qCCatalogue.execute(inputInfo, outputInfo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|