diff --git a/src/cn/com/origin/autocode/newitem/generatcode/NewCodeItemDialog.java b/src/cn/com/origin/autocode/newitem/generatcode/NewCodeItemDialog.java index 03c4498..27800a6 100644 --- a/src/cn/com/origin/autocode/newitem/generatcode/NewCodeItemDialog.java +++ b/src/cn/com/origin/autocode/newitem/generatcode/NewCodeItemDialog.java @@ -135,6 +135,7 @@ public class NewCodeItemDialog extends Dialog { //是否为文档 private boolean isDoc = false; private String leftMostCodeRuleNameString = ""; + private String docTypeValue = ""; // 表单类型中英文对照 private SashForm sashFormCodeView; private CTabItem codeTreeCTab; @@ -660,8 +661,8 @@ public class NewCodeItemDialog extends Dialog { //20250425新增 将最左侧选中的编码规则名称写入到最右侧的文档类别中 String currentPropName = cnProp.getDisplayName();//当前遍历的对象or分类属性名称 System.out.println("当前创建的UI组件Label名称="+currentPropName); - if(currentPropName != null && currentPropName.equals("文档类别") && leftMostCodeRuleNameString != null && !leftMostCodeRuleNameString.equals("")){ - System.out.println("“文档类别”匹配成功!属性值设置为最左侧选中编码名称="+leftMostCodeRuleNameString); + if(currentPropName != null && currentPropName.equals("文档类型") && docTypeValue != null && !docTypeValue.equals("")){ + System.out.println("“文档类别”匹配成功!属性值设置为最左侧选中编码名称="+docTypeValue); isDocType = true; } @@ -674,7 +675,7 @@ public class NewCodeItemDialog extends Dialog { final Text text = CreateCompositeUtil.createNewText(objPropComposite, cnProp.getDefaultValue()); // text.setText(cnProp.getDefaultValue()); if (isDocType){ - text.setText(leftMostCodeRuleNameString); + text.setText(docTypeValue); }else { text.setText(cnProp.getDefaultValue()); } @@ -683,7 +684,7 @@ public class NewCodeItemDialog extends Dialog { final Text text = CreateCompositeUtil.createNewText(objPropComposite, cnProp.getDefaultValue()); // text.setText("0"); if (isDocType){ - text.setText(leftMostCodeRuleNameString); + text.setText(docTypeValue); }else { text.setText("0"); } @@ -699,7 +700,7 @@ public class NewCodeItemDialog extends Dialog { final Text text = CreateCompositeUtil.createNewText(objPropComposite, cnProp.getDefaultValue()); // text.setText("0"); if (isDocType){ - text.setText(leftMostCodeRuleNameString); + text.setText(docTypeValue); }else { text.setText("0"); } @@ -722,7 +723,7 @@ public class NewCodeItemDialog extends Dialog { new String[] { "true", "false" }); // new // comb.setText(cnProp.getDefaultValue()); // Combo(propTable, if (isDocType){ - comb.setText(leftMostCodeRuleNameString); + comb.setText(docTypeValue); }else { comb.setText(cnProp.getDefaultValue()); } @@ -1692,9 +1693,7 @@ public class NewCodeItemDialog extends Dialog { System.out.println("第二部分: " + secondPart); if (firstPart.equals(leftMostCodeRuleNameString)) { //将此secondPart填入最右侧区域中的属性“文档类别”下 - - - + docTypeValue = secondPart; break; }else { continue; @@ -1703,12 +1702,6 @@ public class NewCodeItemDialog extends Dialog { } else { System.out.println("字符串中未找到 = 符号。"); } - - - - - - } } } @@ -3227,8 +3220,15 @@ public class NewCodeItemDialog extends Dialog { // } //20250425 新增:文档创建后,根据 ID=编码规则名称 带出数据集模板 - if (newComp != null){ + if (newComp != null && isDoc){ + if (leftMostCodeRuleNameString != null && !leftMostCodeRuleNameString.isEmpty()){ + //1.调用查询,获取版本对象,下载数据集到本地 + + + //2.将本地数据集上传到新建版本对象中 + + } } if (targetObject != null) {