no message

This commit is contained in:
2024-02-24 23:06:49 +03:00
parent 0092b708d3
commit 037518a085
15 changed files with 125 additions and 234 deletions

View File

@@ -3,8 +3,9 @@ import Common.Constants;
import Common.Database.DBObject;
import Common.Utils.Utils;
import GlobalData.Tasks.TaskState;
import TestingSystem.SAPFOR.Json.SapforVersionState;
import TestingSystem.SAPFOR.Json.SapforVersion_json;
import TestingSystem.SAPFOR.SapforTasksPackage.UI.SapforPackageTreeNode;
import TestingSystem.SAPFOR.SapforTasksPackage.UI.SapforTaskNode;
import TestingSystem.SAPFOR.SapforTasksPackage.UI.VersionSummary;
import Visual_DVM_2021.Passes.PassCode_2021;
import com.google.gson.annotations.Expose;
@@ -35,8 +36,6 @@ public class SapforTask extends DBObject {
@Expose
public String codes = "";
@Expose
public TaskState state = TaskState.Inactive;
@Expose
public long StartDate = 0; //дата начала выполнения
@Expose
public long ChangeDate = 0;//дата окончания выполнения
@@ -51,13 +50,14 @@ public class SapforTask extends DBObject {
@Description("IGNORE")
@Expose
public Vector<SapforVersion_json> variants = new Vector<>();
//----------
//-------------------------------------------------
@Expose
public TaskState state = TaskState.Inactive;
@Description("IGNORE")
public MatchState match = MatchState.NotMatch;
// MatchState.Unknown;
//-----------
public MatchState matchState = MatchState.Unknown; //для сравнения. в обычном режиме всегда Unknown!
//--------------------------------------------------
public String getUniqueKey() {
return group_description + "_" + test_description + "_" +sapfor_configuration_id;
return group_description + "_" + test_description + "_" + sapfor_configuration_id;
}
public String getSummary() {
Vector<String> lines = new Vector<>();
@@ -77,26 +77,24 @@ public class SapforTask extends DBObject {
//--
for (SapforVersion_json version_json : versions) {
version_json.task = this;
// System.out.println(version_json.version);
// System.out.println(version_json.version);
//-
child = new VersionSummary(version_json, version_json.init(configurationRoot));
version_json.init(configurationRoot);
child = new VersionSummary(version_json);
if (parent == null) {
root = child;
parent = child;
} else {
// if (!child.state.equals(SapforVersionState.Empty)) {
parent.add(child);
parent = child;
// }
parent.add(child);
parent = child;
}
//-
}
if (parent != null) {
for (SapforVersion_json version_json : variants) {
version_json.task = this;
// if (!child.state.equals(SapforVersionState.Empty)) {
parent.add(new VersionSummary(version_json, version_json.init(configurationRoot)));
// }
version_json.init(configurationRoot);
parent.add(new VersionSummary(version_json));
}
}
//--
@@ -119,7 +117,7 @@ public class SapforTask extends DBObject {
super.SynchronizeFields(object);
SapforTask t = (SapforTask) object;
id = t.id;
set_id= t.set_id;
set_id = t.set_id;
sapfor_configuration_id = t.sapfor_configuration_id;
sapfortaskspackage_id = t.sapfortaskspackage_id;
//-
@@ -141,12 +139,6 @@ public class SapforTask extends DBObject {
}
return String.join("", versionsLines);
}
/*
@Override
public boolean isVisible() {
return Current.HasSapforTasksPackage() && Current.getSapforTasksPackage().id == this.sapfortaskspackage_id;
}
*/
public LinkedHashMap<String, SapforVersion_json> getSortedVersions() {
LinkedHashMap<String, SapforVersion_json> res = new LinkedHashMap<>();
for (SapforVersion_json version_json : versions)
@@ -185,8 +177,8 @@ public class SapforTask extends DBObject {
return;
}
}
match = MatchState.Match;
task2.match = MatchState.Match;
matchState = MatchState.Match;
task2.matchState = MatchState.Match;
}
}
public Date getStartDate() {
@@ -198,14 +190,14 @@ public class SapforTask extends DBObject {
@Override
public String toString() {
return
"группа "+Utils.Brackets(group_description)+" тест "+Utils.Brackets(test_description)+" конфигурация "+Utils.Brackets(sapfor_configuration_id);
// getUniqueKey();
"группа " + Utils.Brackets(group_description) + " тест " + Utils.Brackets(test_description) + " конфигурация " + Utils.Brackets(sapfor_configuration_id);
// getUniqueKey();
}
public String getPassesInfo(){
public String getPassesInfo() {
String res = "";
String [] data = codes.split(" ");
String[] data = codes.split(" ");
Vector<String> strings = new Vector<>();
for (String code_s: data){
for (String code_s : data) {
PassCode_2021 code = PassCode_2021.valueOf(code_s);
strings.add(Utils.Brackets(code.getDescription()));
}
@@ -213,12 +205,13 @@ public class SapforTask extends DBObject {
}
//---
public DefaultMutableTreeNode getNode(File configurationRoot) {
DefaultMutableTreeNode res = new DefaultMutableTreeNode(this);
DefaultMutableTreeNode flags_info = new DefaultMutableTreeNode("флаги: "+this.flags);
DefaultMutableTreeNode passes_info = new DefaultMutableTreeNode("проходы: "+getPassesInfo());
SapforPackageTreeNode res = new SapforTaskNode(this);
//-
int total_versions_count = versions.size()+variants.size();
DefaultMutableTreeNode versions_info = new DefaultMutableTreeNode("версии: "+total_versions_count);
DefaultMutableTreeNode flags_info = new DefaultMutableTreeNode("флаги: " + this.flags);
DefaultMutableTreeNode passes_info = new DefaultMutableTreeNode("проходы: " + getPassesInfo());
//-
int total_versions_count = versions.size() + variants.size();
DefaultMutableTreeNode versions_info = new DefaultMutableTreeNode("версии: " + total_versions_count);
versions_info.add(getVersionsTree(configurationRoot));
//--
res.add(flags_info);