From 8366585df90701531a8f0b782a960dd403b6c5ae Mon Sep 17 00:00:00 2001 From: zouxk Date: Wed, 25 Dec 2019 11:21:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=93=81=E7=A1=AE=E8=AE=A4=E5=8D=95?= =?UTF-8?q?=EF=BC=88=E9=83=A8=E5=88=86=EF=BC=89=E3=80=81=E7=89=A9=E6=96=99?= =?UTF-8?q?=E5=9B=BE=E7=BA=B8=E5=88=86=E7=B1=BB=E5=B1=9E=E6=80=A7=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E3=80=81=E4=BF=AE=E8=AE=A2=E5=B9=B6=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- com.connor.jd.plm/.classpath | 521 +++++++++++++++++- .../org.eclipse.core.resources.prefs | 2 + com.connor.jd.plm/META-INF/MANIFEST.MF | 56 +- com.connor.jd.plm/build.properties | 18 +- com.connor.jd.plm/plugin.xml | 73 +-- .../jd/operations/ExcelImportServiceImpl.java | 203 ------- .../connor/jd/operations/ExcelOperation.java | 264 --------- .../plm/action/EditClassificationAction.java | 29 + .../jd/plm/action/WLTZReviseAction.java | 136 +++++ .../connor/jd/plm/action/package-info.java | 1 + .../plm/dialog/EditClassificationDialog.java | 221 ++++++++ .../connor/jd/plm/dialog/package-info.java | 1 + .../connor/jd/plm/dialogs/CSXWHDialog.java | 39 -- .../connor/jd/plm/dialogs/QTXJCDialog.java | 285 ---------- .../com/connor/jd/plm/form/PhotoFrame.java | 33 +- .../jd/plm/form/SampleConfirmationForm.java | 300 +++++++++- .../src/com/connor/jd/plm/form/ZPanel.java | 16 +- .../connor/jd/plm/handlers/CSXWHHandler.java | 40 -- .../jd/plm/handlers/CreateItemHandler.java | 51 +- .../handlers/EditClassificationHandler.java | 22 + .../connor/jd/plm/handlers/QTXJCHandler.java | 67 --- .../jd/plm/handlers/WLTZReviseHandler.java | 22 + .../jd/plm/handlers/Wf001ScheduleHandler.java | 105 ++++ .../com/connor/jd/plm/table/JCheckPanel.java | 20 +- .../com/connor/jd/plm/table/JRadioPanel.java | 7 +- .../com/connor/jd/plm/table/TCTableUtil.java | 80 +++ .../com/connor/jd/plm/util/package-info.java | 1 + .../com/connor/jd/plm/utils/JDMethodUtil.java | 47 -- .../teamcenter/rac/form/form_user.properties | 2 +- 29 files changed, 1552 insertions(+), 1110 deletions(-) create mode 100644 com.connor.jd.plm/.settings/org.eclipse.core.resources.prefs delete mode 100644 com.connor.jd.plm/src/com/connor/jd/operations/ExcelImportServiceImpl.java delete mode 100644 com.connor.jd.plm/src/com/connor/jd/operations/ExcelOperation.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/action/EditClassificationAction.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/action/WLTZReviseAction.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/action/package-info.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/dialog/EditClassificationDialog.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/dialog/package-info.java delete mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/dialogs/CSXWHDialog.java delete mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/dialogs/QTXJCDialog.java delete mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/handlers/CSXWHHandler.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/handlers/EditClassificationHandler.java delete mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/handlers/QTXJCHandler.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/handlers/WLTZReviseHandler.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/handlers/Wf001ScheduleHandler.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/table/TCTableUtil.java create mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/util/package-info.java delete mode 100644 com.connor.jd.plm/src/com/connor/jd/plm/utils/JDMethodUtil.java diff --git a/com.connor.jd.plm/.classpath b/com.connor.jd.plm/.classpath index f420af9..38c14ed 100644 --- a/com.connor.jd.plm/.classpath +++ b/com.connor.jd.plm/.classpath @@ -3,21 +3,510 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/com.connor.jd.plm/.settings/org.eclipse.core.resources.prefs b/com.connor.jd.plm/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..2c04b7f --- /dev/null +++ b/com.connor.jd.plm/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/com/connor/jd/plm/handlers/Wf001ScheduleHandler.java=UTF-8 diff --git a/com.connor.jd.plm/META-INF/MANIFEST.MF b/com.connor.jd.plm/META-INF/MANIFEST.MF index 7c4fa97..4671432 100644 --- a/com.connor.jd.plm/META-INF/MANIFEST.MF +++ b/com.connor.jd.plm/META-INF/MANIFEST.MF @@ -3,39 +3,33 @@ Bundle-ManifestVersion: 2 Bundle-Name: JDProject Bundle-SymbolicName: com.connor.jd.plm;singleton:=true Bundle-Version: 1.0.0.qualifier -Require-Bundle: org.eclipse.ui, - com.teamcenter.rac.common;bundle-version="12000.1.0", - com.teamcenter.rac.tcapps;bundle-version="12000.1.0", - com.teamcenter.rac.util;bundle-version="12000.1.0", - com.teamcenter.rac.aifrcp;bundle-version="12000.1.0", - com.teamcenter.rac.ui.commands;bundle-version="12000.1.0", - com.teamcenter.rac.kernel;bundle-version="12000.1.0", - com.teamcenter.rac.ui.views;bundle-version="12000.1.0", - org.eclipse.core.runtime;bundle-version="3.12.0", - org.eclipse.ui.forms;bundle-version="3.7.0" +Require-Bundle: org.eclipse.ui;bundle-version="3.111.0", + com.teamcenter.rac.common;bundle-version="12000.2.0", + com.teamcenter.rac.tcapps;bundle-version="12000.2.0", + com.teamcenter.rac.util;bundle-version="12000.2.0", + com.teamcenter.rac.aifrcp;bundle-version="12000.2.0", + com.teamcenter.rac.ui.commands;bundle-version="12000.2.0", + com.teamcenter.rac.kernel;bundle-version="12000.2.0", + com.teamcenter.rac.ui.views;bundle-version="12000.2.0", + org.eclipse.core.runtime;bundle-version="3.15.100", + org.eclipse.ui.forms;bundle-version="3.7.400", + com.teamcenter.rac.schedule;bundle-version="12000.2.0" Automatic-Module-Name: JDProject -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: com.connor.jd.operations, - com.connor.jd.plm.dialogs, +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: com.connor.jd.plm.action, + com.connor.jd.plm.dialog, com.connor.jd.plm.form, com.connor.jd.plm.handlers, com.connor.jd.plm.table, - com.connor.jd.plm.utils, + com.connor.jd.plm.util, com.teamcenter.rac.form -Bundle-ClassPath: lib/commons-codec-1.13.jar, - lib/commons-collections4-4.4.jar, - lib/commons-compress-1.19.jar, - lib/commons-logging-1.2.jar, - lib/commons-math3-3.6.1.jar, - lib/poi-4.1.1.jar, - lib/poi-examples-4.1.1.jar, - lib/poi-excelant-4.1.1.jar, - lib/poi-ooxml-4.1.1.jar, - lib/poi-ooxml-schemas-4.1.1.jar, - lib/poi-scratchpad-4.1.1.jar, - lib/xmlbeans-3.1.0.jar, - ., - lib/jfxrt.jar, - lib/jaxb-api-2.3.1.jar, - lib/jaxb-core-2.3.0.1.jar, - lib/jaxb-impl-2.3.2.jar +Import-Package: com.teamcenter.services, + com.teamcenter.services.rac, + com.teamcenter.services.rac.core, + com.teamcenter.services.rac.core._2008_06, + org.apache.commons.httpclient, + org.apache.commons.httpclient.methods, + org.apache.commons.httpclient.params +Bundle-ClassPath: ., + lib/fastjson-1.2.9.jar, + lib/hutool-all-5.0.7.jar diff --git a/com.connor.jd.plm/build.properties b/com.connor.jd.plm/build.properties index 368a476..e292ea2 100644 --- a/com.connor.jd.plm/build.properties +++ b/com.connor.jd.plm/build.properties @@ -4,19 +4,5 @@ bin.includes = plugin.xml,\ META-INF/,\ .,\ icons/,\ - lib/commons-codec-1.13.jar,\ - lib/commons-collections4-4.4.jar,\ - lib/commons-compress-1.19.jar,\ - lib/commons-logging-1.2.jar,\ - lib/commons-math3-3.6.1.jar,\ - lib/poi-4.1.1.jar,\ - lib/poi-examples-4.1.1.jar,\ - lib/poi-excelant-4.1.1.jar,\ - lib/poi-ooxml-4.1.1.jar,\ - lib/poi-ooxml-schemas-4.1.1.jar,\ - lib/poi-scratchpad-4.1.1.jar,\ - lib/xmlbeans-3.1.0.jar,\ - lib/jfxrt.jar,\ - lib/jaxb-api-2.3.1.jar,\ - lib/jaxb-core-2.3.0.1.jar,\ - lib/jaxb-impl-2.3.2.jar + lib/fastjson-1.2.9.jar,\ + lib/hutool-all-5.0.7.jar diff --git a/com.connor.jd.plm/plugin.xml b/com.connor.jd.plm/plugin.xml index 8aef2ae..ce270ae 100644 --- a/com.connor.jd.plm/plugin.xml +++ b/com.connor.jd.plm/plugin.xml @@ -14,6 +14,7 @@ + @@ -53,12 +54,12 @@ - + @@ -96,12 +97,14 @@ - + + + @@ -141,9 +144,9 @@ - - - + + + @@ -191,8 +194,7 @@ - - + @@ -233,8 +235,7 @@ - - + @@ -277,11 +278,18 @@ - + - - + + + + + + + + + @@ -305,6 +313,7 @@ + @@ -354,7 +363,6 @@ - + @@ -415,7 +424,6 @@ - + + + @@ -478,26 +489,24 @@ - - - - - - - - - - - + + + true + + + true + diff --git a/com.connor.jd.plm/src/com/connor/jd/operations/ExcelImportServiceImpl.java b/com.connor.jd.plm/src/com/connor/jd/operations/ExcelImportServiceImpl.java deleted file mode 100644 index 6aef325..0000000 --- a/com.connor.jd.plm/src/com/connor/jd/operations/ExcelImportServiceImpl.java +++ /dev/null @@ -1,203 +0,0 @@ -package com.connor.jd.operations; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; - -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.usermodel.Workbook; -import org.apache.poi.ss.util.CellRangeAddress; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; - -public class ExcelImportServiceImpl { - - public String importExcel(InputStream inputStream, String fileName) throws Exception { - - String message = "Import success"; - - boolean isE2007 = false; - // жǷexcel2007ʽ - if (fileName.endsWith("xlsx")) { - isE2007 = true; - } - - int rowIndex = 0; - try { - InputStream input = inputStream; // - Workbook wb; - // ļʽ(20032007)ʼ - if (isE2007) { - wb = new XSSFWorkbook(input); - } else { - wb = new HSSFWorkbook(input); - } - Sheet sheet = wb.getSheetAt(0); // õһ - int rowCount = sheet.getLastRowNum() + 1; - - for (int i = 1; i < rowCount; i++) { - rowIndex = i; - Row row; - - for (int j = 0; j < 26; j++) { - if (isMergedRegion(sheet, i, j)) { - System.out.print(getMergedRegionValue(sheet, i, j) + "\t"); - } else { - row = sheet.getRow(i); - System.out.print(row.getCell(j) + "\t"); - } - } - System.out.print("\n"); - } - } catch (Exception ex) { - message = "Import failed, please check the data in " + rowIndex + " rows "; - } - return message; - } - - /** - * ȡԪֵ - * - * @param cell - * @return - */ - public String getCellValue(Cell cell) { - if (cell == null) - return ""; - return cell.getStringCellValue(); - } - - /** - * ϲԪ,ȡϲ - * - * @param sheet - * @return List - */ - public List getCombineCell(Sheet sheet) { - List list = new ArrayList<>(); - // һ sheet кϲԪ - int sheetmergerCount = sheet.getNumMergedRegions(); - // еĺϲԪ - for (int i = 0; i < sheetmergerCount; i++) { - // úϲԪ񱣴list - CellRangeAddress ca = sheet.getMergedRegion(i); - list.add(ca); - } - return list; - } - - private int getRowNum(List listCombineCell, Cell cell, Sheet sheet) { - int xr = 0; - int firstC = 0; - int lastC = 0; - int firstR = 0; - int lastR = 0; - for (CellRangeAddress ca : listCombineCell) { - // úϲԪʼ, , ʼ, - firstC = ca.getFirstColumn(); - lastC = ca.getLastColumn(); - firstR = ca.getFirstRow(); - lastR = ca.getLastRow(); - if (cell.getRowIndex() >= firstR && cell.getRowIndex() <= lastR) { - if (cell.getColumnIndex() >= firstC && cell.getColumnIndex() <= lastC) { - xr = lastR; - } - } - - } - return xr; - - } - - /** - * жϵԪǷΪϲԪǵĻ򽫵Ԫֵ - * - * @param listCombineCell źϲԪlist - * @param cell ҪжϵĵԪ - * @param sheet sheet - * @return - */ - public String isCombineCell(List listCombineCell, Cell cell, Sheet sheet) throws Exception { - int firstC = 0; - int lastC = 0; - int firstR = 0; - int lastR = 0; - String cellValue = null; - for (CellRangeAddress ca : listCombineCell) { - // úϲԪʼ, , ʼ, - firstC = ca.getFirstColumn(); - lastC = ca.getLastColumn(); - firstR = ca.getFirstRow(); - lastR = ca.getLastRow(); - if (cell.getRowIndex() >= firstR && cell.getRowIndex() <= lastR) { - if (cell.getColumnIndex() >= firstC && cell.getColumnIndex() <= lastC) { - Row fRow = sheet.getRow(firstR); - Cell fCell = fRow.getCell(firstC); - cellValue = getCellValue(fCell); - break; - } - } else { - cellValue = ""; - } - } - return cellValue; - } - - /** - * ȡϲԪֵ - * - * @param sheet - * @param row - * @param column - * @return - */ - public String getMergedRegionValue(Sheet sheet, int row, int column) { - int sheetMergeCount = sheet.getNumMergedRegions(); - - for (int i = 0; i < sheetMergeCount; i++) { - CellRangeAddress ca = sheet.getMergedRegion(i); - int firstColumn = ca.getFirstColumn(); - int lastColumn = ca.getLastColumn(); - int firstRow = ca.getFirstRow(); - int lastRow = ca.getLastRow(); - - if (row >= firstRow && row <= lastRow) { - if (column >= firstColumn && column <= lastColumn) { - Row fRow = sheet.getRow(firstRow); - Cell fCell = fRow.getCell(firstColumn); - return getCellValue(fCell); - } - } - } - - return null; - } - - /** - * жָĵԪǷǺϲԪ - * - * @param sheet - * @param row ± - * @param column ± - * @return - */ - private boolean isMergedRegion(Sheet sheet, int row, int column) { - int sheetMergeCount = sheet.getNumMergedRegions(); - for (int i = 0; i < sheetMergeCount; i++) { - CellRangeAddress range = sheet.getMergedRegion(i); - int firstColumn = range.getFirstColumn(); - int lastColumn = range.getLastColumn(); - int firstRow = range.getFirstRow(); - int lastRow = range.getLastRow(); - if (row >= firstRow && row <= lastRow) { - if (column >= firstColumn && column <= lastColumn) { - return true; - } - } - } - return false; - } - -} diff --git a/com.connor.jd.plm/src/com/connor/jd/operations/ExcelOperation.java b/com.connor.jd.plm/src/com/connor/jd/operations/ExcelOperation.java deleted file mode 100644 index 3b25807..0000000 --- a/com.connor.jd.plm/src/com/connor/jd/operations/ExcelOperation.java +++ /dev/null @@ -1,264 +0,0 @@ -package com.connor.jd.operations; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.CellStyle; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.usermodel.Workbook; -import org.apache.poi.ss.util.CellRangeAddress; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; - -import com.teamcenter.rac.kernel.TCComponent; - -public class ExcelOperation { - private static final String XLS = "xls"; - private static final String XLSX = "xlsx"; - - public static void writeExcel(File file, String outpath, Map> jfw) { - if (jfw.size() == 1) { - writeoneExcel(file, outpath, jfw); - } else { - writeallExcel(file, outpath, jfw); - } - } - - public static void writeallExcel(File file, String outpath, Map> jfw) { - Workbook workbook; - try { - workbook = getworkbook(file); - System.out.println("ļ"); - Workbook newwb = getWorkbook(outpath); - Sheet newsheet = newwb.createSheet(); - Sheet sheet = workbook.getSheetAt(0); - CellStyle style = workbook.createCellStyle(); - Row row = sheet.getRow(0); - row.setRowStyle(style); - Row newrow0 = newsheet.createRow(0); - for (int i = 0; i < row.getLastCellNum(); i++) { - Cell newCell = newrow0.createCell(i); - newCell.setCellValue(row.getCell(i).getStringCellValue()); - } - List cellRangeList = getCombineCell(sheet); - for (Entry> ever : jfw.entrySet()) { - List itemList = ever.getValue(); - String sfname = ever.getKey(); - System.out.println("itemList" + itemList.size()); - for (int i = 0; i < cellRangeList.size(); i++) { - CellRangeAddress ca = cellRangeList.get(i); - int firstColumn = 0; - int firstRow = ca.getFirstRow(); - int lastRow = ca.getLastRow(); - Row fRow = sheet.getRow(firstRow); - Cell fCell = fRow.getCell(firstColumn); - String cellVelue = fCell.getStringCellValue(); - System.out.println("ϲԪ" + cellVelue); - System.out.println("ʼ" + firstRow + "" + lastRow); - if (sfname.equals(cellVelue)) { - for (int z = firstRow; z <= lastRow; z++) { - Row newRow = sheet.getRow(z); - String value = newRow.getCell(1).getStringCellValue(); - System.out.println("" + value); - for (int p = 0; p < itemList.size(); p++) { - if (itemList.get(p).getTCProperty("object_type").getDisplayableValue().equals(value)) { - TCComponent[] revlist = itemList.get(p).getTCProperty("revision_list") - .getReferenceValueArray(); - TCComponent component = null; - for (int revlength = 0; revlength < revlist.length; revlength++) { - String status = revlist[revlength].getProperty("release_status_list"); - if (!status.equals("")) { - component = revlist[revlength]; - } - } - String[] info = new String[4]; - if (component != null) { - info[0] = component.getProperty("owning_group"); - info[1] = component.getProperty("owning_user"); - info[2] = component.getProperty("creation_date"); - info[3] = component.getProperty("item_id"); - } else { - info[0] = ""; - info[1] = ""; - info[2] = ""; - info[3] = ""; - } - for (int v = 0; v < info.length; v++) { - Cell cellvalue = newRow.createCell(v + 2); - cellvalue.setCellValue(info[v]); - System.out.println("" + info[v]); - } - } - } - } - } - - } - } - FileOutputStream fos = new FileOutputStream(outpath); - workbook.write(fos); - workbook.close(); - fos.close(); - } catch (Exception e) { - } - } - - public static void writeoneExcel(File file, String outpath, Map> jfw) { - Workbook workbook; - try { - workbook = getworkbook(file); - System.out.println("ļ"); - Workbook newwb = getWorkbook(outpath); - Sheet newsheet = newwb.createSheet(); - Sheet sheet = workbook.getSheetAt(0); - CellStyle style = newwb.createCellStyle(); - Row row = sheet.getRow(0); - Row newrow0 = newsheet.createRow(0); - for (int i = 0; i < row.getLastCellNum(); i++) { - Cell oldCell = row.getCell(i); - style.cloneStyleFrom(oldCell.getCellStyle()); - - Cell newCell = newrow0.createCell(i); - newCell.setCellStyle(style); - newCell.setCellValue(oldCell.getStringCellValue()); - - } - List cellRangeList = getCombineCell(sheet); - for (Entry> ever : jfw.entrySet()) { - List itemList = ever.getValue(); - String sfname = ever.getKey(); - System.out.println("itemList" + itemList.size()); - for (int i = 0; i < cellRangeList.size(); i++) { - CellRangeAddress ca = cellRangeList.get(i); - int firstColumn = 0; - int firstRow = ca.getFirstRow(); - int lastRow = ca.getLastRow(); - Row fRow = sheet.getRow(firstRow); - Cell fCell = fRow.getCell(firstColumn); - String cellVelue = fCell.getStringCellValue(); - System.out.println("ϲԪ" + cellVelue); - System.out.println("ʼ" + firstRow + "" + lastRow); - - if (sfname.equals(cellVelue)) { - List valueList = new ArrayList(); - for (int z = firstRow; z <= lastRow; z++) { - Row oldRow = sheet.getRow(z); - String value = oldRow.getCell(1).getStringCellValue(); - - valueList.add(value); - } - - for (int j = 1; j <= lastRow - firstRow + 1; j++) { - Row newRow = newsheet.createRow(j); - Cell cell = newRow.createCell(0); - cell.setCellValue(cellVelue); - Cell cell2 = newRow.createCell(1); - cell2.setCellValue(valueList.get(j - 1)); - System.out.println("" + valueList.get(j - 1)); - for (int p = 0; p < itemList.size(); p++) { - if (itemList.get(p).getTCProperty("object_type").getDisplayableValue() - .equals(valueList.get(j - 1))) { - System.out.println( - "ͣ" + itemList.get(p).getTCProperty("object_type").getDisplayableValue()); - TCComponent[] revlist = itemList.get(p).getTCProperty("revision_list") - .getReferenceValueArray(); - TCComponent component = null; - for (int revlength = 0; revlength < revlist.length; revlength++) { - String status = revlist[revlength].getProperty("release_status_list"); - if (!status.equals("")) { - component = revlist[revlength]; - } - } - String[] info = new String[4]; - if (component != null) { - info[0] = component.getProperty("owning_group"); - info[1] = component.getProperty("owning_user"); - info[2] = component.getProperty("creation_date"); - info[3] = component.getProperty("item_id"); - } else { - info[0] = ""; - info[1] = ""; - info[2] = ""; - info[3] = ""; - } - for (int v = 0; v < info.length; v++) { - System.out.println("ʼ"); - Cell cellvalue = newRow.createCell(v + 2); - cellvalue.setCellValue(info[v]); - System.out.println("" + info[v]); - } - } - } - } - CellRangeAddress region = new CellRangeAddress(1, lastRow - firstRow + 1, 0, 0); - newsheet.addMergedRegion(region); - } - - } - } - FileOutputStream fos = new FileOutputStream(outpath); - newwb.write(fos); - newwb.close(); - fos.close(); - } catch (Exception e) { - } - } - - /** - * ϲԪ,ȡϲ - * - * @param sheet - * @return List - */ - public static List getCombineCell(Sheet sheet) { - List list = new ArrayList<>(); - // һ sheet кϲԪ - int sheetmergerCount = sheet.getNumMergedRegions(); - // еĺϲԪ - for (int i = 0; i < sheetmergerCount; i++) { - // úϲԪ񱣴list - CellRangeAddress ca = sheet.getMergedRegion(i); - list.add(ca); - } - return list; - } - - public static Workbook getWorkbook(String file) throws IOException { - Workbook workbook = null; - // FileInputStream in = new FileInputStream(file); - if (file.endsWith(XLS)) { - System.out.println("xls"); - workbook = new HSSFWorkbook(); - } else if (file.endsWith(XLSX)) { - System.out.println("xlsx"); - workbook = new XSSFWorkbook(); - } else { - System.out.println("ʽ"); - } - return workbook; - } - - public static Workbook getworkbook(File file) throws IOException { - Workbook workbook = null; - FileInputStream in = new FileInputStream(file); - if (file.getName().endsWith(XLS)) { - System.out.println("xls"); - workbook = new HSSFWorkbook(in); - } else if (file.getName().endsWith(XLSX)) { - System.out.println("xlsx"); - workbook = new XSSFWorkbook(in); - } else { - System.out.println("ʽ"); - } - in.close(); - return workbook; - } -} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/action/EditClassificationAction.java b/com.connor.jd.plm/src/com/connor/jd/plm/action/EditClassificationAction.java new file mode 100644 index 0000000..2fd400e --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/action/EditClassificationAction.java @@ -0,0 +1,29 @@ +package com.connor.jd.plm.action; + +import com.connor.jd.plm.dialog.EditClassificationDialog; +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aif.common.actions.AbstractAIFAction; +import com.teamcenter.rac.kernel.TCException; + +public class EditClassificationAction extends AbstractAIFAction { + private final AbstractAIFApplication app; + + public EditClassificationAction(AbstractAIFApplication arg0, String arg1) { + super(arg0, arg1); + // TODO Auto-generated constructor stub + this.app = arg0; + } + + @Override + public void run() { + // TODO Auto-generated method stub + try { + new EditClassificationDialog(app); + } catch (TCException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + +} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/action/WLTZReviseAction.java b/com.connor.jd.plm/src/com/connor/jd/plm/action/WLTZReviseAction.java new file mode 100644 index 0000000..ffcfac1 --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/action/WLTZReviseAction.java @@ -0,0 +1,136 @@ +package com.connor.jd.plm.action; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.alibaba.fastjson.JSONObject; +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aif.common.actions.AbstractAIFAction; +import com.teamcenter.rac.aifrcp.AIFUtility; +import com.teamcenter.rac.kernel.TCComponent; +import com.teamcenter.rac.kernel.TCComponentICO; +import com.teamcenter.rac.kernel.TCComponentItem; +import com.teamcenter.rac.kernel.TCComponentItemRevision; +import com.teamcenter.rac.kernel.TCException; +import com.teamcenter.rac.kernel.TCPreferenceService; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.kernel.ics.ICSProperty; +import com.teamcenter.rac.util.MessageBox; + +import cn.hutool.http.HttpUtil; + +public class WLTZReviseAction extends AbstractAIFAction { + private AbstractAIFApplication app; + private TCSession session; + + public WLTZReviseAction(AbstractAIFApplication arg0, String arg1) { + super(arg0, arg1); + this.app = arg0; + this.session = (TCSession) app.getSession(); + + } + + @Override + public void run() { + // TODO Auto-generated method stub + TCComponent target = (TCComponent) AIFUtility.getCurrentApplication().getTargetComponent(); + String[] allow = getPrefStrArray("jd2_wltz_Revise_allow"); + List list = Arrays.asList(allow); + for (String s : list) { + System.out.println(s); + } + if (target instanceof TCComponentItemRevision) { + try { + TCComponentItemRevision rev = (TCComponentItemRevision) target; + String type = rev.getType(); + System.out.println(type); + if (!list.contains(type)) { + MessageBox.post("ǰͲ޶ͷ࣡", "", MessageBox.ERROR); + return; + } + TCComponentItem item = rev.getItem(); + TCComponentItemRevision newRev = rev.saveAs(item.getNewRev()); + TCComponentICO ico = rev.getClassificationObjects()[0]; + ICSProperty[] oldICSProps = ico.getICSProperties(true); + int[] ids = new int[oldICSProps.length]; + String[] values = new String[oldICSProps.length]; + for (int i = 0; i < oldICSProps.length; i++) { + System.out.println(oldICSProps[i].getId() + "=====>" + oldICSProps[i].getValue()); + ids[i] = oldICSProps[i].getId(); + values[i] = oldICSProps[i].getValue(); + } + JSONObject json = new JSONObject(); + json.put("ids", ids); + json.put("values", values); + String prop = json.toString(); + prop = prop.replace("\"", "\\\""); + System.out.println("prop:" + prop); + String uid = newRev.getUid(); + System.out.println("uid:" + uid); + String cid = rev.getClassificationClass(); + System.out.println("cid:" + cid); + String server = getPrefStr("jd2_server_ip"); + if (server == null || "".equals(server)) { + MessageBox.post("δjd2_server_ipѡ", "", MessageBox.ERROR); + return; + } + String url = "http://" + server + ":8080/classification"; + Map paramMap = new HashMap(); + paramMap.put("uid", uid); + paramMap.put("cid", cid); + paramMap.put("prop", prop); + final String URL = url; + final Map PARAMMAP = paramMap; + new Thread(new Runnable() { + + @Override + public void run() { + // TODO Auto-generated method stub + HttpUtil.post(URL, PARAMMAP); + System.out.println("success"); + } + }).start(); + } catch (TCException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } else { + MessageBox.post("ǰͲ޶ͷ࣡", "", MessageBox.ERROR); + } + } + + /** + * ȡֵѡ + * + * @param prefName + * @return + */ + public String getPrefStr(String prefName) { + TCPreferenceService service = session.getPreferenceService(); + String str = service.getString(TCPreferenceService.TC_preference_site, prefName); + if (str == null) { + str = new String(""); + } + return str; + } + + /** + * ȡֵѡ + * + * @param prefName + * @return + */ + public String[] getPrefStrArray(String prefName) { + TCPreferenceService service = session.getPreferenceService(); + String[] strs = service.getStringArray(TCPreferenceService.TC_preference_site, prefName); + service.getStringValues(prefName); + service.getStringValue(prefName); + if (strs == null) { + strs = new String[] { "" }; + } + return strs; + } + +} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/action/package-info.java b/com.connor.jd.plm/src/com/connor/jd/plm/action/package-info.java new file mode 100644 index 0000000..8e74581 --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/action/package-info.java @@ -0,0 +1 @@ +package com.connor.jd.plm.action; \ No newline at end of file diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/dialog/EditClassificationDialog.java b/com.connor.jd.plm/src/com/connor/jd/plm/dialog/EditClassificationDialog.java new file mode 100644 index 0000000..2c51b6d --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/dialog/EditClassificationDialog.java @@ -0,0 +1,221 @@ +package com.connor.jd.plm.dialog; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.ScrollPane; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import javax.swing.BorderFactory; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; + +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aif.AbstractAIFDialog; +import com.teamcenter.rac.aifrcp.AIFUtility; +import com.teamcenter.rac.kernel.TCClassificationService; +import com.teamcenter.rac.kernel.TCComponent; +import com.teamcenter.rac.kernel.TCComponentICO; +import com.teamcenter.rac.kernel.TCComponentItemRevision; +import com.teamcenter.rac.kernel.TCException; +import com.teamcenter.rac.kernel.TCProperty; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.kernel.ics.ICSApplicationObject; +import com.teamcenter.rac.kernel.ics.ICSProperty; +import com.teamcenter.rac.kernel.ics.ICSPropertyDescription; +import com.teamcenter.rac.util.MessageBox; + +public class EditClassificationDialog extends AbstractAIFDialog { + + /** + * + */ + private static final long serialVersionUID = 1L; + private AbstractAIFApplication app; + private TCSession session; + private TCComponent target; + private Map propMap; + private TCClassificationService myService; + final EditClassificationDialog DIALOG = this; + + public EditClassificationDialog(AbstractAIFApplication app) throws TCException { + this.app = app; + this.session = (TCSession) app.getSession(); + this.myService = session.getClassificationService(); + this.target = (TCComponent) AIFUtility.getCurrentApplication().getTargetComponent(); + if (target instanceof TCComponentItemRevision) { + try { + initUI(); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } else { + MessageBox.post("ѡ汾", "", MessageBox.ERROR); + } + } + + private void initUI() { + this.setTitle("޸ķ"); + this.setAutoRequestFocus(true); + this.setResizable(true); + + JPanel rootPanel = new JPanel(new BorderLayout()); + rootPanel.setBorder(BorderFactory.createLineBorder(Color.black, 1)); + GridBagConstraints gbs = new GridBagConstraints(); + GridBagLayout gbl = new GridBagLayout(); + JPanel editPanel = new JPanel(gbl); + gbs.anchor = GridBagConstraints.NORTHWEST; + gbs.fill = GridBagConstraints.BOTH; + gbs.insets = new Insets(10, 20, 5, 10); + gbs.weighty = 0.2; + gbs.gridheight = 1; + + Map attr = null; + propMap = new HashMap(); + TCComponentItemRevision rev = (TCComponentItemRevision) target; + try { + if (rev.getClassificationClass() != null || !"".equals(rev.getClassificationClass())) { + try { + attr = rev.getClassificationAttributes(); + + for (Entry entry : attr.entrySet()) { + System.out.println(entry.getKey() + "===>" + entry.getValue()); + } + } catch (TCException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } else { + MessageBox.post("ǰ汾δ", "", MessageBox.ERROR); + return; + } + } catch (TCException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + if (attr != null) { + int num = 0; + JLabel[] names = new JLabel[attr.size()]; + JTextField[] values = new JTextField[attr.size()]; + for (Entry entry : attr.entrySet()) { + gbs.gridwidth = 1; + gbs.weightx = 0.4; + names[num] = new JLabel(entry.getKey() + ""); + gbl.setConstraints(names[num], gbs); + gbs.gridwidth = GridBagConstraints.REMAINDER; + gbs.weightx = 2; + values[num] = new JTextField(entry.getValue()); + propMap.put(entry.getKey(), values[num]); + gbl.setConstraints(values[num], gbs); + editPanel.add(names[num]); + editPanel.add(values[num]); + num++; + } + + JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + JButton cancelBtn = new JButton("ȡ"); + cancelBtn.addActionListener(cancel()); + JButton okBtn = new JButton("ȷ"); + okBtn.addActionListener(ok()); + buttonPanel.add(okBtn); + buttonPanel.add(cancelBtn); + + ScrollPane scroll = new ScrollPane(); + scroll.add(editPanel); + scroll.setPreferredSize(new Dimension(300, 300)); + rootPanel.add(scroll, BorderLayout.CENTER); + rootPanel.add(buttonPanel, BorderLayout.SOUTH); + this.setLayout(new BorderLayout()); + this.add(rootPanel); + this.pack(); + this.centerToScreen(); + this.showDialog(); + } + } + + private ActionListener ok() { + return new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + // TODO Auto-generated method stub + TCComponentItemRevision rev = (TCComponentItemRevision) target; + saveClassification(rev); + try { + if (rev.getProperty("object_type").equals("JD2_GTBJRevision")) { + TCProperty property = rev.getTCProperty("TC_Is_Represented_By"); + TCComponent[] comp = property.getReferenceValueArray(); + if (comp.length > 0) { + TCComponentItemRevision tzrev = (TCComponentItemRevision) comp[0]; + saveClassification(tzrev); + } + } + } catch (TCException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + DIALOG.disposeDialog(); + } + }; + } + + private ActionListener cancel() { + return new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + // TODO Auto-generated method stub + DIALOG.disposeDialog(); + } + }; + } + + private boolean saveClassification(TCComponentItemRevision rev) { + + try { + ICSApplicationObject icsAppObj = myService.newICSApplicationObject("ICM"); + TCComponentICO[] icoS = rev.getClassificationObjects(); + String classID = rev.getClassificationClass(); + if (icoS == null || icoS.length == 0) { + return false; + } + for (int i = 0; i < icoS.length; i++) { + TCComponentICO ico = icoS[i]; + ICSPropertyDescription[] desc = ico.getICSPropertyDescriptors(); + ICSProperty[] oldICSProps = ico.getICSProperties(true); + ICSProperty[] newICSProps = new ICSProperty[oldICSProps.length]; + for (int j = 0; j < oldICSProps.length; j++) { + ICSProperty icsProp = oldICSProps[j]; + // icsProp.setValue("1111"); + newICSProps[j] = new ICSProperty(icsProp.getId(), "111111"); + } + for (int j = 0; j < oldICSProps.length; j++) { + newICSProps[j].setValue(propMap.get(desc[j].getName()).getText()); + } + ico.delete(); + icsAppObj.create(myService.getTCComponentId(rev), myService.getTCComponentUid(rev)); + icsAppObj.setView(classID); + + icsAppObj.setProperties(newICSProps); + icsAppObj.save(); + } + rev.refresh(); + } catch (TCException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + return true; + } +} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/dialog/package-info.java b/com.connor.jd.plm/src/com/connor/jd/plm/dialog/package-info.java new file mode 100644 index 0000000..803ca64 --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/dialog/package-info.java @@ -0,0 +1 @@ +package com.connor.jd.plm.dialog; \ No newline at end of file diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/dialogs/CSXWHDialog.java b/com.connor.jd.plm/src/com/connor/jd/plm/dialogs/CSXWHDialog.java deleted file mode 100644 index b768822..0000000 --- a/com.connor.jd.plm/src/com/connor/jd/plm/dialogs/CSXWHDialog.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.connor.jd.plm.dialogs; - -import javax.swing.JPanel; - -import com.teamcenter.rac.aif.AbstractAIFApplication; -import com.teamcenter.rac.kernel.TCException; - -import javafx.application.Application; -import javafx.scene.Scene; -import javafx.scene.layout.Pane; -import javafx.stage.Stage; - -public class CSXWHDialog extends Application { - - private AbstractAIFApplication app; - - public CSXWHDialog() throws TCException { - - } - - private JPanel Panel; - private Object[] obj = new Object[] { "", "Ʒ", "Ŀ", "ʱ", "Ʒ", "" };// ñ - private Object[] obj2 = new Object[] { "", "", "Ŀ", "Ŀ" };// ҵ - - public void initUI() { - - } - - @Override - public void start(Stage arg0) throws Exception { - Stage primaryStage = new Stage(); - Pane root = new Pane(); - Scene scene = new Scene(root, 382, 178); - primaryStage.setScene(scene); - primaryStage.setTitle("ά"); - primaryStage.show(); - - } -} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/dialogs/QTXJCDialog.java b/com.connor.jd.plm/src/com/connor/jd/plm/dialogs/QTXJCDialog.java deleted file mode 100644 index 1d14c00..0000000 --- a/com.connor.jd.plm/src/com/connor/jd/plm/dialogs/QTXJCDialog.java +++ /dev/null @@ -1,285 +0,0 @@ -package com.connor.jd.plm.dialogs; - -import java.awt.BorderLayout; -import java.awt.Dimension; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.swing.Box; -import javax.swing.JButton; -import javax.swing.JComboBox; -import javax.swing.JFileChooser; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.filechooser.FileNameExtensionFilter; - -import com.connor.jd.operations.ExcelOperation; -import com.connor.jd.plm.utils.JDMethodUtil; -import com.teamcenter.rac.aif.AbstractAIFApplication; -import com.teamcenter.rac.aif.AbstractAIFDialog; -import com.teamcenter.rac.kernel.TCComponent; -import com.teamcenter.rac.kernel.TCComponentDataset; -import com.teamcenter.rac.kernel.TCComponentProjectSmartFolder; -import com.teamcenter.rac.kernel.TCComponentTcFile; -import com.teamcenter.rac.kernel.TCException; -import com.teamcenter.rac.kernel.TCSession; -import com.teamcenter.rac.util.ButtonLayout; -import com.teamcenter.rac.util.MessageBox; - -public class QTXJCDialog extends AbstractAIFDialog { - - private AbstractAIFApplication app; - private TCSession session; - private JLabel road = new JLabel(); - private JComboBox pjsName = new JComboBox(); - private List sfList = new ArrayList(); - private TCComponent[] com; - private String type; - - public QTXJCDialog(AbstractAIFApplication app, List sfList, TCComponent[] com, TCSession session, - String type) throws TCException { - this.app = app; - this.sfList = sfList; - this.com = com; - this.session = session; - this.type = type; - initUI(); - } - - private void initUI() { - this.setAutoRequestFocus(true); - this.setPreferredSize(new Dimension(360, 150)); - this.setResizable(false); - - JLabel pjStage = new JLabel("Ŀ׶"); - pjsName.addItem(""); - for (int i = 0; i < sfList.size(); i++) { - pjsName.addItem(sfList.get(i)); - } - JLabel roadLabel = new JLabel("·"); - - JButton open = new JButton("..."); - open.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - openBtn(); - } - }); - JButton export = new JButton(""); - export.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - exportBtn(); - } - }); - JButton out = new JButton("ȡ"); - out.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - dispose(); - } - }); - JPanel flow1 = new JPanel(); - Box b1 = Box.createHorizontalBox(); - flow1.add(b1); - // b1.add(Box.createHorizontalStrut(20)); - b1.add(pjStage); - b1.add(Box.createHorizontalStrut(50)); - b1.add(pjsName); - JPanel flow2 = new JPanel(); - Box b2 = Box.createHorizontalBox(); - flow2.add(b2); - b2.add(Box.createHorizontalStrut(20)); - b2.add(roadLabel); - b2.add(Box.createHorizontalStrut(20)); - b2.add(road); - b2.add(Box.createHorizontalStrut(80)); - b2.add(open); - JPanel btn = new JPanel(new ButtonLayout()); - btn.add(export); - btn.add(out); - JPanel center = new JPanel(new BorderLayout()); - center.add(flow1, BorderLayout.NORTH); - center.add(flow2, BorderLayout.CENTER); - center.add(btn, BorderLayout.SOUTH); - this.add(center, "Center"); - - this.pack(); - this.centerToScreen(); - this.showDialog(); - } - - String roadName = null; - - private void openBtn() { - JFileChooser chooser = new JFileChooser(); - // chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - chooser.setDialogTitle("ѡҪļ"); - // chooser.showDialog(new JLabel(), "ȷ"); - - FileNameExtensionFilter filter = new FileNameExtensionFilter("Excel(*.xlsx)", "xlsx"); - chooser.setFileFilter(filter); - chooser.showSaveDialog(null); - // File file = chooser.getSelectedFile(); - try { - if (chooser.getSelectedFile().getAbsolutePath() != null) { - String filePath = chooser.getSelectedFile().getAbsolutePath() + ".xlsx"; - roadName = filePath; - if (filePath.length() > 10) { - road.setText(filePath.substring(0, 10) + "..."); - } else { - road.setText(filePath); - } - } - - } catch (Exception e) { - } - - } - - private void exportBtn() { - String jdname = "JDJFW"; - if (roadName.equals("")) { - MessageBox.post("ûѡ񱣴·", "", MessageBox.ERROR); - } else { - System.out.println(road.getText()); - String outpath = roadName; - - System.out.println(outpath); - - File file = getExcle(jdname, type); - String sel = (String) pjsName.getSelectedItem(); - Map> jfw = new HashMap>(); - if (sel.equals("")) { - for (int i = 0; i < sfList.size(); i++) { - TCComponentProjectSmartFolder sf = (TCComponentProjectSmartFolder) com[i]; - try { - TCComponent[] psf = sf.getTCProperty("project_data").getReferenceValueArray(); - - List jfList = new ArrayList(); - for (int j = 0; j < psf.length; j++) { - // TCComponentItem jf = (TCComponentItem) psf[j]; - jfList.add(psf[j]); - } - jfw.put(sf.getProperty("object_string"), jfList); - } catch (TCException e) { - e.printStackTrace(); - } - } - } else { - for (int i = 0; i < sfList.size(); i++) { - TCComponentProjectSmartFolder sf = (TCComponentProjectSmartFolder) com[i]; - try { - if (sel.equals(sf.getProperty("object_string"))) { - TCComponent[] psf = sf.getTCProperty("project_data").getReferenceValueArray(); - List jfList = new ArrayList(); - for (int j = 0; j < psf.length; j++) { - // TCComponentItem jf = (TCComponentItem) psf[j]; - jfList.add(psf[j]); - } - jfw.put(sel, jfList); - } - } catch (TCException e) { - e.printStackTrace(); - } - } - } - ExcelOperation.writeExcel(file, outpath, jfw); - System.out.println("ɹ"); - MessageBox.post("ɹ", "Ϣ", MessageBox.INFORMATION); - dispose(); - } - } - - private File getExcle(String ssx, String type) { - File fmsFile = null; - String allpuid = JDMethodUtil.getPrefStr(ssx, session); - String[] relpuid = allpuid.split(";"); - String puid = null; - switch (type) { - case "GT": - puid = relpuid[2]; - break; - case "BL": - puid = relpuid[1]; - break; - case "BX": - puid = relpuid[0]; - break; - default: - break; - } - if (puid == null) { - MessageBox.post("ϵԱѡ", "", MessageBox.ERROR); - return null; - } - TCComponentDataset dateset = null; - try { - dateset = (TCComponentDataset) session.stringToComponent(puid); - } catch (TCException e) { - e.printStackTrace(); - } - if (dateset == null) { - MessageBox.post("δҵݼϵԱѡ", "", MessageBox.ERROR); - return null; - } - try { - TCComponentTcFile[] file = dateset.getTcFiles(); - if (file.length == 0 || file.length != 1) { - MessageBox.post("ݼûõļļ࣬飡", "", MessageBox.WARNING); - return null; - } else { - fmsFile = file[0].getFmsFile(); - } - } catch (Exception e) { - e.printStackTrace(); - } - return fmsFile; - } -// @Override -// public void start(Stage arg0) throws Exception { -// Stage primaryStage = new Stage(); -// Pane root = new Pane(); -// Label pjStage = new Label("Ŀ׶"); -// pjStage.setLayoutX(37.0); -// pjStage.setLayoutY(51.0); -// ComboBox pjsName = new ComboBox(); -// pjsName.setLayoutX(94.0); -// pjsName.setLayoutY(47.0); -// pjsName.setValue(""); -// Label roadLabel = new Label("·"); -// roadLabel.setLayoutX(37.0); -// roadLabel.setLayoutY(107.0); -// Label road = new Label(); -// road.setLayoutX(94.0); -// road.setLayoutY(107.0); -// Button open = new Button("..."); -// open.setLayoutX(190.0); -// open.setLayoutY(103.0); -// Button export = new Button(""); -// export.setLayoutX(67.0); -// export.setLayoutY(158.0); -// Button out = new Button("ȡ"); -// out.setLayoutX(169.0); -// out.setLayoutY(158.0); -// -// root.getChildren().add(pjStage); -// root.getChildren().add(pjsName); -// root.getChildren().add(roadLabel); -// root.getChildren().add(road); -// root.getChildren().add(open); -// root.getChildren().add(export); -// root.getChildren().add(out); -// -// Scene scene = new Scene(root, 290, 207); -// primaryStage.setScene(scene); -// primaryStage.setResizable(false); -// primaryStage.show(); -// } - -} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/form/PhotoFrame.java b/com.connor.jd.plm/src/com/connor/jd/plm/form/PhotoFrame.java index dba4a99..1777960 100644 --- a/com.connor.jd.plm/src/com/connor/jd/plm/form/PhotoFrame.java +++ b/com.connor.jd.plm/src/com/connor/jd/plm/form/PhotoFrame.java @@ -3,7 +3,6 @@ package com.connor.jd.plm.form; import java.awt.BorderLayout; import java.awt.Container; import java.awt.Dimension; -import java.awt.Image; import java.awt.Toolkit; import javax.swing.JFrame; @@ -21,11 +20,22 @@ public class PhotoFrame extends JFrame { public static PhotoFrame getInstance(String imgPath) { if (instance == null) { instance = new PhotoFrame(imgPath); + } else { + instance.zPanel.setImagePath(imgPath); + instance.setVisible(true); + instance.zPanel.setPreferredSize( + new Dimension(instance.zPanel.getImgWidth(), + instance.zPanel.getImgHeight())); } return instance; } private PhotoFrame(String imgPath) { + init(imgPath); + finalSetting(); + } + + private void init(String imgPath) { con = getContentPane(); zPanel = new ZPanel(); @@ -40,16 +50,10 @@ public class PhotoFrame extends JFrame { imgSp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); con.add(imgSp, BorderLayout.CENTER); - - finalSetting(); } private void finalSetting() { - setTitle("ZakiSoft ZFileRenamerV0.2"); - - Image image = Toolkit.getDefaultToolkit() - .getImage(this.getClass().getResource("/title.gif")); - setIconImage(image); + setTitle("Ԥ"); Toolkit kit = Toolkit.getDefaultToolkit(); Dimension screenSize = kit.getScreenSize(); @@ -59,10 +63,17 @@ public class PhotoFrame extends JFrame { int frameW = getWidth(); setLocation((screenWidth - frameW) / 2 - 250, (screenHeight - frameH) / 2 - 250); - setSize(500, 350); + setSize(screenWidth / 2, screenHeight / 2); setVisible(true); - setResizable(false); - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setResizable(true); + setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); } + @Override + public void dispose() { + // TODO Auto-generated method stub + super.dispose(); + System.out.println("Ԥر"); + zPanel.clear(); + } } \ No newline at end of file diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/form/SampleConfirmationForm.java b/com.connor.jd.plm/src/com/connor/jd/plm/form/SampleConfirmationForm.java index 8c9d2ac..414e1de 100644 --- a/com.connor.jd.plm/src/com/connor/jd/plm/form/SampleConfirmationForm.java +++ b/com.connor.jd.plm/src/com/connor/jd/plm/form/SampleConfirmationForm.java @@ -39,6 +39,7 @@ import com.connor.jd.plm.table.CTable; import com.connor.jd.plm.table.JCheckPanel; import com.connor.jd.plm.table.JRadioPanel; import com.connor.jd.plm.table.MyCellEditor; +import com.connor.jd.plm.table.TCTableUtil; import com.teamcenter.rac.aif.AbstractAIFApplication; import com.teamcenter.rac.aif.kernel.AIFComponentContext; import com.teamcenter.rac.aifrcp.AIFUtility; @@ -58,18 +59,30 @@ public class SampleConfirmationForm extends AbstractRendering { private CardLayout cl = new CardLayout(); private JPanel center = null; private JPopupMenu menu = new JPopupMenu(); + private JPopupMenu menu2 = new JPopupMenu(); private JPanel confirmPanel = new JPanel(); private JPanel examinePanel = new JPanel(); private CTMap model; private CTMap model2; private CTable table; private CTable table2; - private int bottom; - private int top = 13; + private int top = 13;// ͷ + private int bottom;// м䲿ֽ + private int end = 14;// β+1 + private int top2 = 4; + private int bottom2; + private int end2 = 16; + private Map prop; private Map general; private List disableEdit; - private Map prop; private Map pic; + private Map general2; + private List disableEdit2; + private JRadioPanel sysl; + private JCheckPanel mqjd; + String[] colNames = { "jd2_no", "jd2_gg", "jd2_gg1", "jd2_gc", "jd2_gc1", + "jd2_1", "jd2_2", "jd2_3", "jd2_4", "jd2_5", "jd2_6", "jd2_7", + "jd2_8", "jd2_9", "jd2_10", "jd2_min", "jd2_max", "jd2_jg" }; public SampleConfirmationForm(TCComponent arg0) throws Exception { super(arg0); @@ -105,7 +118,7 @@ public class SampleConfirmationForm extends AbstractRendering { // model = new CTMap(47, 20); - bottom = model.getRowCount() - 14; + bottom = model.getRowCount() - end; disableEdit = new ArrayList<>();// ༭ general = new HashMap();// Ҫдһ pic = new HashMap();// ͼƬ @@ -122,17 +135,25 @@ public class SampleConfirmationForm extends AbstractRendering { model.setValueAt("Ͳз", 2, 2); disableEdit.add("2,2"); general.put("jd2_bz", new int[] { 2, 14 }); + disableEdit.add("2,14"); general.put("jd2_sh", new int[] { 2, 16 }); + disableEdit.add("2,16"); general.put("jd2_pz", new int[] { 2, 18 }); + disableEdit.add("2,18"); model.setValueAt("", 4, 0); disableEdit.add("4,0"); general.put("creation_date", new int[] { 4, 2 }); + disableEdit.add("4,2"); model.setValueAt("", 4, 5); disableEdit.add("4,5"); general.put("owning_user", new int[] { 4, 7 }); + disableEdit.add("4,7"); general.put("jd2_bzrq", new int[] { 4, 14 }); + disableEdit.add("4,14"); general.put("jd2_shrq", new int[] { 4, 16 }); + disableEdit.add("4,16"); general.put("jd2_pzrq", new int[] { 4, 18 }); + disableEdit.add("4,18"); model.setValueAt("", 6, 0); disableEdit.add("6,0"); general.put("jd2_ljm", new int[] { 6, 2 }); @@ -148,8 +169,7 @@ public class SampleConfirmationForm extends AbstractRendering { general.put("jd2_wlbm", new int[] { 7, 2 }); model.setValueAt("", 7, 8); disableEdit.add("7,8"); - JRadioPanel sysl = new JRadioPanel( - new String[] { "3", "5", "10", "30" }); + sysl = new JRadioPanel(new String[] { "3", "5", "10", "30" }); model.setValueAt(sysl, 7, 10); model.setValueAt("״̬", 7, 14); disableEdit.add("7,14"); @@ -175,7 +195,7 @@ public class SampleConfirmationForm extends AbstractRendering { general.put("jd2_syyy", new int[] { 9, 10 }); model.setValueAt("Ŀǰ׶", 12, 0); disableEdit.add("12,0"); - JCheckPanel mqjd = new JCheckPanel( + mqjd = new JCheckPanel( new String[] { "DV", "PV", "PR", "SR", "ֳ", "MP" }); model.setValueAt(mqjd, 12, 2); @@ -201,7 +221,7 @@ public class SampleConfirmationForm extends AbstractRendering { disableEdit.add(top + 1 + ",18"); for (int i = top + 2; i <= bottom; i++) { - model.setValueAt(i - 1, i, 0); + model.setValueAt(i - 1 - top, i, 0); disableEdit.add(i + ",0"); model.combine(new int[] { i }, new int[] { 2, 3, 4 }); } @@ -407,7 +427,7 @@ public class SampleConfirmationForm extends AbstractRendering { table.getColumnModel().getColumn(5).setPreferredWidth(60); table.getColumnModel().getColumn(6).setPreferredWidth(60); for (int i = 7; i < model.getColumnCount() - 1; i++) { - table.getColumnModel().getColumn(i).setPreferredWidth(40); + table.getColumnModel().getColumn(i).setPreferredWidth(45); } table.getColumnModel().getColumn(model.getColumnCount() - 1) .setPreferredWidth(80); @@ -479,6 +499,7 @@ public class SampleConfirmationForm extends AbstractRendering { mqjd.setSelected(prop.get("jd2_mqjd")); } pic.put("user_data_1", new int[] { bottom + 3, 0 }); + pic.put("user_data_2", new int[] { bottom + 3, 9 }); for (Entry entry : pic.entrySet()) { if (prop.containsKey(entry.getKey())) { TCComponent comp = null; @@ -501,7 +522,7 @@ public class SampleConfirmationForm extends AbstractRendering { int col = entry.getValue()[1]; int[] arr = model.getSpan(row, col); int width = 0; - for(int i=0;i bottom) { + int num = Integer.parseInt( + model.getValueAt(bottom, 0).toString()); + model.insertRow(bottom); + model.setValueAt(num + 1, bottom, 0); + model.combine(new int[] { bottom }, + new int[] { 2, 3, 4 }); + bottom = model.getRowCount() - end; + } + model.setValueAt(tableRows[i][ii], i + top + 2, + ii > 2 ? ii + 2 : ii); + } + } + } ScrollPane confirmScrollPanel = new ScrollPane(); confirmScrollPanel.add(confirmPanel); // - JTextField text2 = new JTextField("examine"); - examinePanel.add(text2); + examinePanel.setBorder(BorderFactory.createLineBorder(Color.black, 1)); + examinePanel.setLayout(new BorderLayout()); + + model2 = new CTMap(49, 10); + bottom2 = model2.getRowCount() - end2; + model2.setValueAt("SPL No", 0, 0); + disableEdit2.add("0,0"); + model2.combine(new int[] { 0, 1, 2, 3 }, new int[] { 0 }); + model2.setValueAt(" SPEC", 0, 1); + disableEdit2.add("0,1"); + model2.combine(new int[] { 0, 1 }, new int[] { 1 }); + for (int i = 0; i < 8; i++) { + model2.setValueAt("CTQ<" + i + 1 + ">", 0, i + 2); + disableEdit2.add("0," + (i + 2)); + } + model2.setValueAt("LOW", 2, 1); + disableEdit2.add("2,1"); + model2.setValueAt("UP", 3, 1); + disableEdit2.add("3,1"); + + for (int i = top2; i <= model2.getRowCount(); i++) { + model2.setValueAt(i - top2, i, 0); + disableEdit2.add(i + ",0"); + model2.combine(new int[] { i }, new int[] { 0, 1 }); + } + model2.setValueAt("MIN", bottom + 1, 0); + model2.setValueAt("MAX", bottom + 2, 0); + model2.setValueAt("R", bottom + 3, 0); + model2.setValueAt("׼ƫ", bottom + 4, 0); + model2.setValueAt("ƽ", bottom + 5, 0); + model2.setValueAt("X,BAR-3S", bottom + 6, 0); + model2.setValueAt("X,BAR+3S", bottom + 7, 0); + model2.setValueAt("CP", bottom + 8, 0); + model2.setValueAt("Cpu", bottom + 9, 0); + model2.setValueAt("Cpl", bottom + 10, 0); + model2.setValueAt("CPK", bottom + 11, 0); + model2.setValueAt("SU Ԥⲻ", bottom + 12, 0); + model2.setValueAt("SL Ԥⲻ", bottom + 13, 0); + model2.setValueAt("Ԥⲻ(PPM)", bottom + 14, 0); + model2.setValueAt("", bottom + 15, 0); + + table2 = new CTable(model2) { + @Override + public boolean isCellEditable(int row, int col) { + if (isEditorDisable(disableEdit2, row, col)) { + return false; + } + return true; + } + }; + table2.setRowHeight(25); + table2.setBorder(BorderFactory.createLineBorder(Color.black)); + for (int i = 0; i < model.getColumnCount(); i++) { + table2.getColumnModel().getColumn(i).setPreferredWidth(80); + } + DefaultTableCellRenderer tcr2 = new DefaultTableCellRenderer() { + // д + @Override + public Component getTableCellRendererComponent(JTable table, + Object value, boolean isSelected, boolean hasFocus, int row, + int column) { + // TODO Auto-generated method stub + int maxPreferredHeight = 0; + for (int i = 0; i < table.getColumnCount(); i++) { + setText("" + table.getValueAt(row, i)); + setSize(table.getColumnModel().getColumn(column).getWidth(), + 0); + maxPreferredHeight = Math.max(maxPreferredHeight, + getPreferredSize().height); + } + setBackground(Color.white); +// if(points1.contains(new Point(row,column))) +// setForeground(new Color(0,0,255)); +// else + setForeground(Color.black); + if (isSelected) { + setBackground(new Color(0, 120, 215)); + setForeground(Color.white); + } + if (table.getRowHeight(row) != maxPreferredHeight) // Ϲæ + table.setRowHeight(row, maxPreferredHeight); + + setText(value == null ? "" : value.toString()); + return this; + } + }; + tcr2.setHorizontalAlignment(SwingConstants.CENTER); + table2.setDefaultRenderer(Object.class, tcr2); + table2.addMouseListener(rightClick2()); + examinePanel.add(table2, BorderLayout.CENTER); - // Ҽ˵ + ScrollPane examineScrollPanel = new ScrollPane(); + examineScrollPanel.add(examinePanel); + + // ȷϵҼ˵ menu.setVisible(false); JMenuItem addP; addP = new JMenuItem("ͼƬ"); @@ -549,8 +681,26 @@ public class SampleConfirmationForm extends AbstractRendering { menu.add(insertR); insertR.addActionListener(insertRow()); + // 鵥Ҽ˵ + menu2.setVisible(false); + JMenuItem addR2; + addR2 = new JMenuItem(""); + menu2.add(addR2); + addR2.addActionListener(addRow2()); + JMenuItem insertR2; + insertR2 = new JMenuItem(""); + menu2.add(insertR2); + insertR2.addActionListener(insertRow2()); + center.add("confirm", confirmScrollPanel); - center.add("examine", examinePanel); + center.add("examine", examineScrollPanel); + root.add(buttons, BorderLayout.NORTH); + root.add(center, BorderLayout.CENTER); + this.add(menu); + this.add(root, BorderLayout.CENTER); + + center.add("confirm", confirmScrollPanel); + center.add("examine", examineScrollPanel); root.add(buttons, BorderLayout.NORTH); root.add(center, BorderLayout.CENTER); this.add(menu); @@ -561,7 +711,7 @@ public class SampleConfirmationForm extends AbstractRendering { @Override public void saveRendering() { - // TODO Auto-generated method stub + // ͼƬ JLabel label = null; for (Entry entry : pic.entrySet()) { if (prop.containsKey(entry.getKey())) { @@ -576,6 +726,58 @@ public class SampleConfirmationForm extends AbstractRendering { } } + // ѡ + try { + if (prop.containsKey("jd2_sysl")) { + form.setProperty("jd2_sysl", sysl.getSelected() == null ? "" + : sysl.getSelected().getText()); + } + if (prop.containsKey("jd2_mqjd")) { + form.setProperty("jd2_mqjd", mqjd.getSelectedText() == null ? "" + : mqjd.getSelectedText()); + } + + } catch (TCException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // ͨ + for (Entry entry : general.entrySet()) { + try { + if (prop.containsKey(entry.getKey())) { + form.setProperty(entry.getKey(), + model.getValueAt(entry.getValue()[0], + entry.getValue()[1]).toString()); + } + } catch (TCException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + // + if (prop.containsKey("jd2_ypqrdtable")) { + List data = new ArrayList(); + int num = 0; + while (model.getValueAt(top + 2 + num, 1) != null + && !"".equals(model.getValueAt(top + 2 + num, 1))) { + String[] row = new String[18]; + for (int ii = 0; ii < 18; ii++) { + Object object = model.getValueAt(top + 2 + num, + ii > 2 ? ii + 2 : ii); + if (object == null) { + row[ii] = ""; + } else { + row[ii] = object.toString(); + } + System.out.println(row[ii]); + } + data.add(row); + num++; + } + String[][] dataArr = data.toArray(new String[data.size()][]); + System.out.println(Arrays.deepToString(dataArr)); + TCTableUtil.setTableRows(form, "jd2_ypqrdtable", colNames, dataArr); + } } @@ -584,7 +786,6 @@ public class SampleConfirmationForm extends AbstractRendering { @Override public void actionPerformed(ActionEvent e) { - // TODO Auto-generated method stub System.out.println("confirm"); cl.show(center, "confirm"); } @@ -618,6 +819,19 @@ public class SampleConfirmationForm extends AbstractRendering { return mouseAdapter; } + private MouseAdapter rightClick2() { + MouseAdapter mouseAdapter = new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + if (e.getButton() == MouseEvent.BUTTON3 && form.isCheckedOut() + && table2.getSelectedRow() != -1) { + menu2.show(e.getComponent(), e.getX(), e.getY()); + } + } + }; + return mouseAdapter; + } + private ActionListener addPic() { ActionListener actionListener = new ActionListener() { @@ -654,7 +868,6 @@ public class SampleConfirmationForm extends AbstractRendering { try { datasetType = (TCComponentDatasetType) session .getTypeComponent("Dataset"); - TCComponentDataset dataset = datasetType .create(file.getName(), "", "Image"); dataset.setFiles(as1, as2); @@ -706,7 +919,29 @@ public class SampleConfirmationForm extends AbstractRendering { model.insertRow(bottom); model.setValueAt(num + 1, bottom, 0); model.combine(new int[] { bottom }, new int[] { 2, 3, 4 }); - bottom = model.getRowCount() - 14; + bottom = model.getRowCount() - end; + } else { + // ʾ + } + } + }; + return actionListener; + } + + private ActionListener addRow2() { + ActionListener actionListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + // TODO Auto-generated method stub + int row = table2.getSelectedRow(); + if (row >= top2 && row <= bottom2) { + int num = Integer + .parseInt(model2.getValueAt(bottom2, 0).toString()); + model2.insertRow(bottom2); + model2.setValueAt(num + 1, bottom2, 0); + model2.combine(new int[] { bottom2 }, new int[] { 0, 1 }); + bottom2 = model2.getRowCount() - end2; } else { // ʾ } @@ -730,7 +965,31 @@ public class SampleConfirmationForm extends AbstractRendering { model.setValueAt(num + i + 1 - row, row, 0); } model.combine(new int[] { row }, new int[] { 2, 3, 4 }); - bottom = model.getRowCount() - 14; + bottom = model.getRowCount() - end; + } else { + // ʾ + } + } + }; + return actionListener; + } + + private ActionListener insertRow2() { + ActionListener actionListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + // TODO Auto-generated method stub + int row = table2.getSelectedRow(); + if (row >= top2 && row <= bottom2) { + int num = Integer + .parseInt(model2.getValueAt(row, 0).toString()); + model2.insertRow(row); + for (int i = row; i < model2.getRowCount(); i++) { + model2.setValueAt(num + i + 1 - row, row, 0); + } + model2.combine(new int[] { row }, new int[] { 0, 1 }); + bottom2 = model2.getRowCount() - end2; } else { // ʾ } @@ -744,11 +1003,12 @@ public class SampleConfirmationForm extends AbstractRendering { } private MouseAdapter showImg(String path) { + final String imagePath = path; MouseAdapter adapter = new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { - PhotoFrame.getInstance(path); + PhotoFrame.getInstance(imagePath); } } }; diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/form/ZPanel.java b/com.connor.jd.plm/src/com/connor/jd/plm/form/ZPanel.java index 041251b..ed83ffe 100644 --- a/com.connor.jd.plm/src/com/connor/jd/plm/form/ZPanel.java +++ b/com.connor.jd.plm/src/com/connor/jd/plm/form/ZPanel.java @@ -14,6 +14,7 @@ public class ZPanel extends javax.swing.JPanel { private Image image; private int imgWidth; private int imgHeight; + private FileInputStream input; public int getImgWidth() { return imgWidth; @@ -39,7 +40,8 @@ public class ZPanel extends javax.swing.JPanel { // image = Toolkit.getDefaultToolkit().getImage(imgPath); try { // ÷Ὣͼصڴ棬ӶõͼϸϢ - image = ImageIO.read(new FileInputStream(imgPath)); + input = new FileInputStream(imgPath); + image = ImageIO.read(input); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { @@ -62,4 +64,16 @@ public class ZPanel extends javax.swing.JPanel { this); g = null; } + + public void clear() { + if (input != null) { + try { + image = null; + input.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } } \ No newline at end of file diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/CSXWHHandler.java b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/CSXWHHandler.java deleted file mode 100644 index 70994ff..0000000 --- a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/CSXWHHandler.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.connor.jd.plm.handlers; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; - -import com.connor.jd.plm.dialogs.CSXWHDialog; -import com.teamcenter.rac.aif.AbstractAIFUIApplication; -import com.teamcenter.rac.aifrcp.AIFUtility; -import com.teamcenter.rac.kernel.TCSession; - -import javafx.application.Platform; -import javafx.embed.swing.JFXPanel; -import javafx.stage.Stage; - -public class CSXWHHandler extends AbstractHandler { - - @Override - public Object execute(ExecutionEvent arg0) throws ExecutionException { - AbstractAIFUIApplication app = AIFUtility.getCurrentApplication(); - TCSession session = (TCSession) app.getSession(); - new Thread(() -> { - new JFXPanel(); - Platform.setImplicitExit(false); - Platform.runLater(new Runnable() { - @Override - public void run() { - try { - CSXWHDialog csxwh = new CSXWHDialog(); - csxwh.start(new Stage()); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - }).start(); - return null; - } - -} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/CreateItemHandler.java b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/CreateItemHandler.java index 1432abc..43a878d 100644 --- a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/CreateItemHandler.java +++ b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/CreateItemHandler.java @@ -38,8 +38,7 @@ import com.teamcenter.rac.util.UIUtilities; import com.teamcenter.rac.util.wizard.extension.BaseExternalWizardDialog; import com.teamcenter.rac.util.wizard.extension.WizardExtensionHelper; -public class CreateItemHandler extends AbstractHandler - implements IExecutableExtension { +public class CreateItemHandler extends AbstractHandler implements IExecutableExtension { private TCSession session; private String name; private AbstractAIFApplication app; @@ -58,8 +57,7 @@ public class CreateItemHandler extends AbstractHandler protected NewBOModel m_boModel; @Override - public Object execute(ExecutionEvent executionevent) - throws ExecutionException { + public Object execute(ExecutionEvent executionevent) throws ExecutionException { System.out.println("ʼִ-----------"); app = AIFUtility.getCurrentApplication(); TCComponent comp = (TCComponent) app.getTargetComponent(); @@ -103,8 +101,7 @@ public class CreateItemHandler extends AbstractHandler throw new IllegalArgumentException("Event can't be null"); boolean flag = false; - if (executionevent.getParameters() != null - && executionevent.getParameters().containsKey("selection")) { + if (executionevent.getParameters() != null && executionevent.getParameters().containsKey("selection")) { Object obj = executionevent.getParameters().get("selection"); if (obj instanceof InterfaceAIFComponent[]) { selectedCmps = (InterfaceAIFComponent[]) obj; @@ -113,10 +110,8 @@ public class CreateItemHandler extends AbstractHandler } } if (!flag) { - m_currentSelection = HandlerUtil - .getCurrentSelection(executionevent); - selectedCmps = SelectionHelper - .getTargetComponents(m_currentSelection); + m_currentSelection = HandlerUtil.getCurrentSelection(executionevent); + selectedCmps = SelectionHelper.getTargetComponents(m_currentSelection); } m_boModel = getBOModel(); launchWizard(executionevent); @@ -128,13 +123,12 @@ public class CreateItemHandler extends AbstractHandler * * if (opType .equals("")) { TCComponentItemType itemType = * (TCComponentItemType) session.getTypeComponent(opType); // create: - * ID汾͡ơλ TCComponentItem item = - * itemType.create(itemType.getNewID(), itemType.getNewRev(null), opType, - * name + "", "", null); + * ID汾͡ơλ TCComponentItem item = itemType.create(itemType.getNewID(), + * itemType.getNewRev(null), opType, name + "", "", null); * * comp.add("contents", item); MessageBox.post(name + "󴴽ɹ", "ɹ", - * MessageBox.INFORMATION); } } catch (TCException e) { // TODO - * Auto-generated catch block e.printStackTrace(); } } + * MessageBox.INFORMATION); } } catch (TCException e) { // TODO Auto-generated + * catch block e.printStackTrace(); } } */ private class CreateNewBOSWTDialog implements Runnable { @@ -215,16 +209,14 @@ public class CreateItemHandler extends AbstractHandler m_type = s; } - CreateNewBOSWTDialog(Shell shell, String s, - CreateNewBOSWTDialog createnewboswtdialog) { + CreateNewBOSWTDialog(Shell shell, String s, CreateNewBOSWTDialog createnewboswtdialog) { this(shell, s); } } @Override - public void setInitializationData( - IConfigurationElement iconfigurationelement, String s, Object obj) + public void setInitializationData(IConfigurationElement iconfigurationelement, String s, Object obj) throws CoreException { } @@ -263,12 +255,10 @@ public class CreateItemHandler extends AbstractHandler protected void initWizardModel(ExecutionEvent executionevent) { boolean flag = false; Object obj = null; - ISessionService isessionservice = (ISessionService) OSGIUtil.getService( - RACUICommandsActivator.getDefault(), + ISessionService isessionservice = (ISessionService) OSGIUtil.getService(RACUICommandsActivator.getDefault(), com.teamcenter.rac.services.ISessionService.class); try { - session = (TCSession) isessionservice.getSession( - com.teamcenter.rac.kernel.TCSession.class.getName()); + session = (TCSession) isessionservice.getSession(com.teamcenter.rac.kernel.TCSession.class.getName()); } catch (Exception _ex) { session = (TCSession) AIFUtility.getDefaultSession(); } @@ -277,11 +267,9 @@ public class CreateItemHandler extends AbstractHandler m_boModel.setFrame(AIFUtility.getActiveDesktop()); if (executionevent != null) { if (executionevent.getParameters().containsKey("revisionFlag")) - flag = ((Boolean) executionevent.getParameters() - .get("revisionFlag")).booleanValue(); + flag = ((Boolean) executionevent.getParameters().get("revisionFlag")).booleanValue(); if (executionevent.getParameters().containsKey("pasteRelation")) { - String s = (String) executionevent.getParameters() - .get("pasteRelation"); + String s = (String) executionevent.getParameters().get("pasteRelation"); if (s != null) { String as[] = null; as = s.split(","); @@ -289,8 +277,7 @@ public class CreateItemHandler extends AbstractHandler m_boModel.setPreAssignedRelType(as); } } - if (executionevent.getParameters() - .containsKey("parentComponents")) { + if (executionevent.getParameters().containsKey("parentComponents")) { InterfaceAIFComponent ainterfaceaifcomponent[] = (InterfaceAIFComponent[]) executionevent .getParameters().get("parentComponents"); m_boModel.setTargetArray(ainterfaceaifcomponent); @@ -307,8 +294,7 @@ public class CreateItemHandler extends AbstractHandler m_boModel.setCurrentSelection(m_currentSelection); } - protected void readDisplayParameters(NewBOWizard newbowizard, - WizardDialog wizarddialog) { + protected void readDisplayParameters(NewBOWizard newbowizard, WizardDialog wizarddialog) { newbowizard.retrievePersistedDialogSettings(wizarddialog); } @@ -317,8 +303,7 @@ public class CreateItemHandler extends AbstractHandler try { TCTypeService service = session.getTypeService(); - TCComponentBOMWindowType winType = (TCComponentBOMWindowType) service - .getTypeComponent("BOMWindow"); + TCComponentBOMWindowType winType = (TCComponentBOMWindowType) service.getTypeComponent("BOMWindow"); window = winType.create(null); line = window.setWindowTopLine(rev.getItem(), rev, null, null); // window.close();//رգᵼBOMռãBOMİ汾ɾTC diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/EditClassificationHandler.java b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/EditClassificationHandler.java new file mode 100644 index 0000000..772372b --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/EditClassificationHandler.java @@ -0,0 +1,22 @@ +package com.connor.jd.plm.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +import com.connor.jd.plm.action.EditClassificationAction; +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aifrcp.AIFUtility; + +public class EditClassificationHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent arg0) throws ExecutionException { + // TODO Auto-generated method stub + AbstractAIFApplication app = AIFUtility.getCurrentApplication(); + EditClassificationAction action = new EditClassificationAction(app, ""); + new Thread(action).start(); + return null; + } + +} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/QTXJCHandler.java b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/QTXJCHandler.java deleted file mode 100644 index 4789dce..0000000 --- a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/QTXJCHandler.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.connor.jd.plm.handlers; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; - -import com.connor.jd.plm.dialogs.QTXJCDialog; -import com.teamcenter.rac.aif.AbstractAIFUIApplication; -import com.teamcenter.rac.aifrcp.AIFUtility; -import com.teamcenter.rac.kernel.TCComponent; -import com.teamcenter.rac.kernel.TCComponentProject; -import com.teamcenter.rac.kernel.TCComponentProjectSmartFolder; -import com.teamcenter.rac.kernel.TCException; -import com.teamcenter.rac.kernel.TCSession; -import com.teamcenter.rac.util.MessageBox; - -public class QTXJCHandler extends AbstractHandler { - - private TCComponent[] com; - - @Override - public Object execute(ExecutionEvent arg0) throws ExecutionException { - List sfList = new ArrayList(); - String name = arg0.getCommand().getId(); - String type = null; - switch (name) { - case "JDProject.menus.JD2_GTQTXJC": - type = "GT"; - break; - case "JDProject.menus.JD2_BLQTXJC": - type = "BL"; - break; - case "JDProject.menus.JD2_BXQTXJC": - type = "BX"; - break; - default: - break; - } - try { - AbstractAIFUIApplication app = AIFUtility.getCurrentApplication(); - if (app.getTargetComponent() != null && app.getTargetComponent() instanceof TCComponentProject) { - TCComponentProject project = (TCComponentProject) app.getTargetComponent(); - com = project.getTCProperty("project_data").getReferenceValueArray(); - for (int i = 0; i < com.length; i++) { - TCComponentProjectSmartFolder sf = (TCComponentProjectSmartFolder) com[i]; - sfList.add(sf.getProperty("object_string")); - } - TCSession session = (TCSession) app.getSession(); - try { - new Thread(new QTXJCDialog(app, sfList, com, session, type)).start(); - } catch (TCException e) { - e.printStackTrace(); - } - } else { - MessageBox.post("ѡĿ", "ʾ", MessageBox.INFORMATION); - } - } catch (TCException e1) { - e1.printStackTrace(); - } - - return null; - } - -} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/WLTZReviseHandler.java b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/WLTZReviseHandler.java new file mode 100644 index 0000000..2b41687 --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/WLTZReviseHandler.java @@ -0,0 +1,22 @@ +package com.connor.jd.plm.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +import com.connor.jd.plm.action.WLTZReviseAction; +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aifrcp.AIFUtility; + +public class WLTZReviseHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent arg0) throws ExecutionException { + // TODO Auto-generated method stub + AbstractAIFApplication app = AIFUtility.getCurrentApplication(); + WLTZReviseAction action = new WLTZReviseAction(app, ""); + new Thread(action).start(); + return null; + } + +} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/handlers/Wf001ScheduleHandler.java b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/Wf001ScheduleHandler.java new file mode 100644 index 0000000..41c4f68 --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/handlers/Wf001ScheduleHandler.java @@ -0,0 +1,105 @@ +package com.connor.jd.plm.handlers; + +import java.text.MessageFormat; + +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent; +import com.teamcenter.rac.aifrcp.AIFUtility; +import com.teamcenter.rac.kernel.TCComponentFolder; +import com.teamcenter.rac.kernel.TCPreferenceService; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.schedule.commands.newschedule.NewScheduleHandler; +import com.teamcenter.rac.schedule.plugin.Activator; +import com.teamcenter.rac.schedule.project.sharedUtils.TimeZoneCalUtil; +import com.teamcenter.rac.schedule.wizardpages.SchedulePageModel; +import com.teamcenter.rac.ui.commands.handlers.NewBOHandler; +import com.teamcenter.rac.util.Registry; + +public class Wf001ScheduleHandler extends NewBOHandler { + + private TCSession session; + + public Wf001ScheduleHandler() { + } + + public static SchedulePageModel getScheduleModel() { + if (scheduleModel == null) + scheduleModel = new SchedulePageModel(); + return scheduleModel; + } + + @Override + public Object execute(ExecutionEvent executionevent) throws ExecutionException { + AbstractAIFApplication app = AIFUtility.getCurrentApplication(); + session = (TCSession) app.getSession(); + InterfaceAIFComponent targetComp = app.getTargetComponent(); + if (targetComp == null) { + return null; + } + if (targetComp instanceof TCComponentFolder) { + + scheduleModel = null; + wizardId = "com.teamcenter.rac.schedule.commands.newschedule.GenericScheduleWizard"; + TCSession tcsession = (TCSession) Activator.getDefault().getSessionService().getDefaultSession(); + TCPreferenceService tcpreferenceservice = tcsession.getPreferenceService(); + String s = tcpreferenceservice.getString(4, "SiteTimeZone", "null"); + IWorkbench iworkbench = PlatformUI.getWorkbench(); + IWorkbenchWindow iworkbenchwindow = iworkbench.getActiveWorkbenchWindow(); + Shell shell = iworkbenchwindow.getShell(); + if ("null".equals(s) || s == null) { + MessageDialog.openInformation(shell, textRegistry.getString("tzNotSet.TITLE"), + textRegistry.getString("tzNotSet.MSG")); + return Boolean.valueOf(false); + } + if (!TimeZoneCalUtil.testTimeZoneID(s)) { + String s1 = textRegistry.getString("tzInvalid.MSG"); + s1 = MessageFormat.format(s1, new Object[] { s }); + MessageDialog.openInformation(shell, textRegistry.getString("tzInvalid.TITLE"), s1); + return Boolean.valueOf(false); + } else { + return super.execute(executionevent); + } +// +// } else +// + +// if (targetComp.getType().equals("TC_Project")) { +// +// CreateScheduleOperation operation = new CreateScheduleOperation(targetComp,session); +// session.queueOperation(operation); +// +// return null; +// } else { +// MessageBox.post("ÇëÑ¡ÖÐÏîĿִÐд´½¨!!", "´íÎó", MessageBox.ERROR); +// return null; + } + return null; + } + + @Override + public String getWizardTitle() { + Registry registry = Registry.getRegistry(NewScheduleHandler.class); + return registry.getString("dialog.TITLE"); + } + + private static SchedulePageModel scheduleModel = null; + private final Registry textRegistry = Registry.getRegistry("com.teamcenter.rac.schedule.schedule"); + +} + +/* + * DECOMPILATION REPORT + * + * Decompiled from: + * D:\Teamcenter_4Sh\OTW11\rac\plugins\com.teamcenter.rac.schedule_11000.2.0.jar + * Total time: 1083 ms Jad reported messages/errors: Exit status: 0 Caught + * exceptions: + */ \ No newline at end of file diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/table/JCheckPanel.java b/com.connor.jd.plm/src/com/connor/jd/plm/table/JCheckPanel.java index 6b62352..946e475 100644 --- a/com.connor.jd.plm/src/com/connor/jd/plm/table/JCheckPanel.java +++ b/com.connor.jd.plm/src/com/connor/jd/plm/table/JCheckPanel.java @@ -36,13 +36,29 @@ public class JCheckPanel extends JPanel { return list; } + public String getSelectedText() { + List list = getSelected(); + if (list.size() == 0) { + return null; + } + String str = ""; + for (JCheckBox jcb : list) { + str += jcb.getText(); + str += ","; + } + return str.substring(0, str.length() - 1); + } + public void setSelected(int index) { buttons[index].setSelected(true); } public void setSelected(String value) { - for (int i = 0; i < buttons.length; i++) { - buttons[i].setSelected(buttons[i].getText().equals(value)); + String[] arr = value.split(","); + for (int i = 0; i < arr.length; i++) { + for (int ii = 0; ii < buttons.length; ii++) { + buttons[ii].setSelected(buttons[ii].getText().equals(arr[i])); + } } } } diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/table/JRadioPanel.java b/com.connor.jd.plm/src/com/connor/jd/plm/table/JRadioPanel.java index a343b2c..9ad868a 100644 --- a/com.connor.jd.plm/src/com/connor/jd/plm/table/JRadioPanel.java +++ b/com.connor.jd.plm/src/com/connor/jd/plm/table/JRadioPanel.java @@ -26,8 +26,11 @@ public class JRadioPanel extends JPanel { } public JRadioButton getSelected() { - return (JRadioButton) buttonGroup.getSelection() - .getSelectedObjects()[0]; + if (buttonGroup.getSelection() != null) { + return (JRadioButton) buttonGroup.getSelection() + .getSelectedObjects()[0]; + } + return null; } public void setSelected(int index) { diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/table/TCTableUtil.java b/com.connor.jd.plm/src/com/connor/jd/plm/table/TCTableUtil.java new file mode 100644 index 0000000..455d04d --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/table/TCTableUtil.java @@ -0,0 +1,80 @@ +package com.connor.jd.plm.table; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.teamcenter.rac.aifrcp.AIFUtility; +import com.teamcenter.rac.kernel.TCComponent; +import com.teamcenter.rac.kernel.TCComponentForm; +import com.teamcenter.rac.kernel.TCException; +import com.teamcenter.rac.kernel.TCProperty; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.schemas.soa._2006_03.exceptions.ServiceException; +import com.teamcenter.services.rac.core.DataManagementService; +import com.teamcenter.services.rac.core._2008_06.DataManagement.CreateIn; +import com.teamcenter.services.rac.core._2008_06.DataManagement.CreateResponse; + +public class TCTableUtil { + public static String[][] getTableRows(TCComponentForm form, String prop, + String[] colNames) { + try { + TCProperty tcProperty = form.getTCProperty(prop); + TCComponent[] components = tcProperty.getReferenceValueArray(); + String[][] res = new String[components.length][colNames.length]; + for (int i = 0; i < components.length; i++) { + for (int ii = 0; ii < colNames.length; ii++) { + res[i][ii] = components[i] + .getPropertyDisplayableValue(colNames[ii]); + } + } + return res; + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return null; + } + + public static boolean setTableRows(TCComponentForm form, String prop, + String[] colNames, String[][] rows) { + List list = new ArrayList(); + DataManagementService service = DataManagementService.getService( + (TCSession) AIFUtility.getCurrentApplication().getSession()); + CreateIn ci = new CreateIn(); + ci.data.boName = "JD2_table"; + Map map = new HashMap(); + for (int i = 0; i < rows.length; i++) { + for (int ii = 0; ii < colNames.length; ii++) { + map.put(colNames[ii], rows[i][ii]); + } + System.out.println(map.size()); + ci.data.stringProps = map; + try { + CreateResponse response = service + .createObjects(new CreateIn[] { ci }); + System.out.println("CreateResponse size:" + + response.serviceData.sizeOfCreatedObjects()); + if (response.serviceData.sizeOfCreatedObjects() > 0) { + list.add(response.output[0].objects[0]); + } + } catch (ServiceException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + try { + form.getTCProperty(prop).setReferenceValueArray( + list.toArray(new TCComponent[list.size()])); + System.out.println("tableɹ"); + return true; + } catch (TCException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return false; + } + +} diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/util/package-info.java b/com.connor.jd.plm/src/com/connor/jd/plm/util/package-info.java new file mode 100644 index 0000000..0486a92 --- /dev/null +++ b/com.connor.jd.plm/src/com/connor/jd/plm/util/package-info.java @@ -0,0 +1 @@ +package com.connor.jd.plm.util; \ No newline at end of file diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/utils/JDMethodUtil.java b/com.connor.jd.plm/src/com/connor/jd/plm/utils/JDMethodUtil.java deleted file mode 100644 index 892bbd2..0000000 --- a/com.connor.jd.plm/src/com/connor/jd/plm/utils/JDMethodUtil.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.connor.jd.plm.utils; - -import com.teamcenter.rac.kernel.TCPreferenceService; -import com.teamcenter.rac.kernel.TCSession; -import com.teamcenter.rac.kernel.TCUserService; - -public class JDMethodUtil { - - public static TCPreferenceService service; - public static TCUserService userservice; - - /** - * ȡֵѡ - * - * @param prefName - * @return - */ - public static String getPrefStr(String prefName, TCSession session) { - if (service == null) { - service = session.getPreferenceService(); - } - String str = service.getString(TCPreferenceService.TC_preference_site, prefName); - if (str == null) { - str = new String(""); - } - return str; - } - - /** - * ȡֵѡ - * - * @param prefName - * @return - */ - public static String[] getPrefStrArray(String prefName, TCSession session) { - if (service == null) { - service = session.getPreferenceService(); - } - String[] strs = service.getStringArray(TCPreferenceService.TC_preference_site, prefName); - service.getStringValues(prefName); - service.getStringValue(prefName); - if (strs == null) { - strs = new String[] { "" }; - } - return strs; - } -} diff --git a/com.connor.jd.plm/src/com/teamcenter/rac/form/form_user.properties b/com.connor.jd.plm/src/com/teamcenter/rac/form/form_user.properties index 772b059..6fb45b8 100644 --- a/com.connor.jd.plm/src/com/teamcenter/rac/form/form_user.properties +++ b/com.connor.jd.plm/src/com/teamcenter/rac/form/form_user.properties @@ -1 +1 @@ -JD2ConfirmFormRevisionMaster.FORMJAVARENDERING=com.connor.jd.plm.form.SampleConfirmationForm \ No newline at end of file +JD2_GTYPQRDRevisionMaster.FORMJAVARENDERING=com.connor.jd.plm.form.SampleConfirmationForm \ No newline at end of file