物料参照条件增加

This commit is contained in:
lj 2025-03-05 19:08:04 +08:00
parent f6270650fc
commit 596f18ae49
1 changed files with 14 additions and 72 deletions

View File

@ -83,7 +83,7 @@ public class MaterialDefaultRefModel extends AbstractRefGridTreeBigDataModel imp
}
public void reset() {
this.setRefNodeName("物料");
this.setRefNodeName("ÎïÁÏ");
this.setRootName(NCLangRes4VoTransl.getNCLangRes().getStrByID("10140mclg", "110140mclg0002"));
this.setClassFieldCode(new String[]{"code", "name", "pk_marbasclass", "pk_org"});
this.setClassJoinField("pk_marbasclass");
@ -91,8 +91,18 @@ public class MaterialDefaultRefModel extends AbstractRefGridTreeBigDataModel imp
this.setClassDefaultFieldCount(2);
this.setClassDataPower(true);
this.setClassWherePart("1 = 1");
this.setFieldCode(new String[]{"pk_org", "code", "name", "materialspec", "materialtype", "materialshortname", "materialmnecode", "graphid", "pk_measdoc"});
String[] fieldNames = new String[]{NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "2UC000-000360"), NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0002911"), NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0002908"), NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0003448"), NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0001240"), NCLangRes4VoTransl.getNCLangRes().getStrByID("10140mag", "2materia-000017"), NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0000703"), NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0001223"), NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "2UC000-000031")};
this.setFieldCode(new String[]{"pk_org", "code", "name", "materialspec", "materialtype", "materialshortname",
"materialmnecode", "graphid", "pk_measdoc", "memo"});
String[] fieldNames = new String[]{NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "2UC000-000360"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0002911"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0002908"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0003448"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0001240"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("10140mag", "2materia-000017"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0000703"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0001223"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "2UC000-000031"),
NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "2UC000-000258")};
this.setFieldName(fieldNames);
String orgFomula = "getMLCValue(\"" + OrgVO.getDefaultTableName() + "\",\"" + "name" + "\",\"" + "pk_org" + "\"," + "pk_org" + ")";
String mesFomula = "getMLCValue(\"" + MeasdocVO.getDefaultTableName() + "\",\"" + "name" + "\",\"" + "pk_measdoc" + "\"," + "pk_measdoc" + ")";
@ -119,7 +129,7 @@ public class MaterialDefaultRefModel extends AbstractRefGridTreeBigDataModel imp
}
});
this.setCommonDataTableName(MaterialVersionVO.getDefaultTableName());
this.setFilterRefNodeName(new String[]{"业务单元"});
this.setFilterRefNodeName(new String[]{"ÒµÎñµ¥Ôª"});
this.userDefRefShow.addUserDefItemFields(this);
this.resetFieldName();
this.assginSqlMap.clear();
@ -137,74 +147,6 @@ public class MaterialDefaultRefModel extends AbstractRefGridTreeBigDataModel imp
this.setSearchFieldSetting(setting);
}
// public void reset() {
// this.setRefNodeName("物料");
// this.setRootName(NCLangRes4VoTransl.getNCLangRes().getStrByID("10140mclg", "110140mclg0002"));
// this.setClassFieldCode(new String[]{"code", "name", "pk_marbasclass", "pk_org"});
// this.setClassJoinField("pk_marbasclass");
// this.setClassTableName(MarBasClassVO.getDefaultTableName());
// this.setClassDefaultFieldCount(2);
// this.setClassDataPower(true);
// this.setClassWherePart("1 = 1");
// this.setFieldCode(new String[]{"pk_org", "code", "name", "materialspec", "materialtype", "materialshortname", "materialmnecode", "graphid", "pk_measdoc"
//// , "memo"
// });
// String[] fieldNames = new String[]{NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "2UC000-000360"),
// NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0002911"),
// NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0002908"),
// NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0003448"),
// NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0001240"),
// NCLangRes4VoTransl.getNCLangRes().getStrByID("10140mag", "2materia-000017"),
// NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0000703"),
// NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "UC000-0001223"),
// NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "2UC000-000031")
//// ,NCLangRes4VoTransl.getNCLangRes().getStrByID("common", "2UC000-000258")
// };
// this.setFieldName(fieldNames);
// String orgFomula = "getMLCValue(\"" + OrgVO.getDefaultTableName() + "\",\"" + "name" + "\",\"" + "pk_org" + "\"," + "pk_org" + ")";
// String mesFomula = "getMLCValue(\"" + MeasdocVO.getDefaultTableName() + "\",\"" + "name" + "\",\"" + "pk_measdoc" + "\"," + "pk_measdoc" + ")";
// this.setFormulas(new String[][]{{"pk_org", orgFomula}, {"pk_measdoc", mesFomula}});
// this.setDefaultFieldCount(7);
// this.setHiddenFieldCode(new String[]{"pk_material", "pk_source", "pk_marbasclass"});
// this.setTableName(MaterialVersionVO.getDefaultTableName());
// this.setPkFieldCode("pk_source");
// this.setDocJoinField("pk_marbasclass");
// this.setRefCodeField("code");
// this.setRefNameField("name");
// this.setMnecode(new String[]{"materialmnecode"});
// this.setAddEnableStateWherePart(true);
// this.setOrderPart("code");
// this.setResourceID("material_v");
// this.setClassResouceID("materialbasclass");
// this.setRefMaintenanceHandler(new IRefMaintenanceHandler() {
// public String[] getFucCodes() {
// return new String[]{"10140MAG", "10140MAO"};
// }
//
// public IRefDocEdit getRefDocEdit() {
// return null;
// }
// });
// this.setCommonDataTableName(MaterialVersionVO.getDefaultTableName());
// this.setFilterRefNodeName(new String[]{"业务单元"});
// this.userDefRefShow.addUserDefItemFields(this);
// this.resetFieldName();
// this.assginSqlMap.clear();
// Map<String, String> allFields = new LinkedHashMap();
// allFields.put("pk_org", fieldNames[0]);
// allFields.put("code", fieldNames[1]);
// allFields.put("name", fieldNames[2]);
// allFields.put("materialspec", fieldNames[3]);
// allFields.put("materialtype", fieldNames[4]);
// allFields.put("materialshortname", fieldNames[5]);
// allFields.put("materialmnecode", fieldNames[6]);
// allFields.put("graphid", fieldNames[7]);
//// allFields.put("memo", fieldNames[8]);
// String[] defaultSearchFields = new String[]{"code", "name"};
// RefSearchFieldSetting setting = new RefSearchFieldSetting(this.getRefNodeName(), allFields, defaultSearchFields);
// this.setSearchFieldSetting(setting);
// }
public Vector getData() {
Vector<Vector> v = super.getData();
this.userDefRefShow.proessorData(v);