|
|
|
@ -107,7 +107,7 @@ public class NewProductTestForm extends AbstractRendering {
|
|
|
|
|
int[][] propLocation1 = { { 0, 1 }, { 0, 3 }, { 1, 1 }, { 1, 3 }, { 2, 1 }, { 2, 3 }, { 3, 1 }, { 3, 3 },
|
|
|
|
|
{ 4, 1 }, { 4, 3 }, { 5, 1 }, { 5, 3 } };
|
|
|
|
|
for (int i = 0; i < propArr.length; i++) {
|
|
|
|
|
modelList1.add(new ModelValue(propArr[i], true, propLocation1[0][1], propLocation1[0][1], true));
|
|
|
|
|
modelList1.add(new ModelValue(propArr[i], true, propLocation1[i][0], propLocation1[i][1], true));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
initModel(model1, modelList1);
|
|
|
|
@ -325,6 +325,7 @@ public class NewProductTestForm extends AbstractRendering {
|
|
|
|
|
objStr = "0";
|
|
|
|
|
}
|
|
|
|
|
int num = Integer.parseInt(objStr);
|
|
|
|
|
System.out.println("值:" + num);
|
|
|
|
|
if (num < 0) {
|
|
|
|
|
System.out.println("计算区域只能输入自然数或\"/\"");
|
|
|
|
|
MessageBox.post("计算区域只能输入自然数或\"/\"", "错误", MessageBox.ERROR);
|
|
|
|
@ -352,21 +353,22 @@ public class NewProductTestForm extends AbstractRendering {
|
|
|
|
|
}
|
|
|
|
|
table.setValueAt(sum, table.getRowCount() - 1, col);
|
|
|
|
|
double sum1 = Double
|
|
|
|
|
.parseDouble((sumObj = table.getValueAt(table.getRowCount() - 1, 4)) == null ? "0"
|
|
|
|
|
: sumObj.toString().trim());
|
|
|
|
|
.parseDouble(((sumObj = table.getValueAt(table.getRowCount() - 1, 4)) == null
|
|
|
|
|
|| "".equals(sumObj.toString().trim())) ? "0" : sumObj.toString().trim());
|
|
|
|
|
double sum2 = Double
|
|
|
|
|
.parseDouble((sumObj = table.getValueAt(table.getRowCount() - 1, 5)) == null ? "0"
|
|
|
|
|
: sumObj.toString().trim());
|
|
|
|
|
.parseDouble(((sumObj = table.getValueAt(table.getRowCount() - 1, 5)) == null
|
|
|
|
|
|| "".equals(sumObj.toString().trim())) ? "0" : sumObj.toString().trim());
|
|
|
|
|
double sum3 = Double
|
|
|
|
|
.parseDouble((sumObj = table.getValueAt(table.getRowCount() - 1, 6)) == null ? "0"
|
|
|
|
|
: sumObj.toString().trim());
|
|
|
|
|
.parseDouble(((sumObj = table.getValueAt(table.getRowCount() - 1, 6)) == null
|
|
|
|
|
|| "".equals(sumObj.toString().trim())) ? "0" : sumObj.toString().trim());
|
|
|
|
|
double sum4 = Double
|
|
|
|
|
.parseDouble((sumObj = table.getValueAt(table.getRowCount() - 1, 7)) == null ? "0"
|
|
|
|
|
: sumObj.toString().trim());
|
|
|
|
|
.parseDouble(((sumObj = table.getValueAt(table.getRowCount() - 1, 7)) == null
|
|
|
|
|
|| "".equals(sumObj.toString().trim())) ? "0" : sumObj.toString().trim());
|
|
|
|
|
table.setValueAt(sum1 + sum2 + sum3 + sum4, table.getRowCount() - 1, 3);
|
|
|
|
|
table2.revalidate();
|
|
|
|
|
table2.repaint();
|
|
|
|
|
} catch (NumberFormatException e1) {
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
System.out.println("计算区域只能输入自然数或\"/\"");
|
|
|
|
|
MessageBox.post("计算区域只能输入自然数或\"/\"", "错误", MessageBox.ERROR);
|
|
|
|
|
obj = "/";
|
|
|
|
@ -518,7 +520,7 @@ public class NewProductTestForm extends AbstractRendering {
|
|
|
|
|
try {
|
|
|
|
|
AIFComponentContext[] comps = form.whereReferenced();
|
|
|
|
|
StringBuilder msg = new StringBuilder();
|
|
|
|
|
A1: for (AIFComponentContext aif : comps) {
|
|
|
|
|
for (AIFComponentContext aif : comps) {
|
|
|
|
|
System.out.println("ref type:" + aif.getComponent().getType());
|
|
|
|
|
if ("JD2_GTXPCSXQDRevision".equals(aif.getComponent().getType())) {
|
|
|
|
|
TCComponentItemRevision rev = (TCComponentItemRevision) aif.getComponent();
|
|
|
|
@ -531,9 +533,9 @@ public class NewProductTestForm extends AbstractRendering {
|
|
|
|
|
String ownner = form.getTCProperty("owning_user").getUIFValue();
|
|
|
|
|
for (int i = 0; i < 4; i++) {
|
|
|
|
|
if (exist.contains(jieduan[i])) {
|
|
|
|
|
System.out.println("已存在阶段\"" + jieduan[i] + "\"测试计划,请检查!");
|
|
|
|
|
MessageBox.post("已存在阶段\"" + jieduan[i] + "\"测试计划,请检查!", "错误", MessageBox.ERROR);
|
|
|
|
|
break A1;
|
|
|
|
|
System.out.println("\"" + jieduan[i] + "阶段\"测试计划已创建");
|
|
|
|
|
msg.append("\"" + jieduan[i] + "阶段\"测试计划已创建\n");
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
Object obj;
|
|
|
|
|
Object temp;
|
|
|
|
@ -569,7 +571,7 @@ public class NewProductTestForm extends AbstractRendering {
|
|
|
|
|
System.out.println(Arrays.deepToString(dataArr));
|
|
|
|
|
TCTableUtil.setTableRows(form1, "jd2_csjhtable", "JD2_CSJHTABLE", colNames2,
|
|
|
|
|
dataArr);
|
|
|
|
|
msg.append(jieduan[i] + "阶段测试计划创建成功\n");
|
|
|
|
|
msg.append("\"" + jieduan[i] + "阶段\"测试计划创建成功\n");
|
|
|
|
|
}
|
|
|
|
|
colData.clear();
|
|
|
|
|
}
|
|
|
|
|