main
熊朝柱 2 weeks ago
commit 16b25d0753

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/dom4j-2.1.1.jar"/>
<classpathentry kind="lib" path="lib/hutool-all-5.8.25.jar"/>
<classpathentry kind="lib" path="lib/ojdbc8.jar"/>
<classpathentry kind="lib" path="lib/swingx-1.6.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.connor.jd.DtoE</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

@ -0,0 +1,23 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: DtoE
Bundle-SymbolicName: com.connor.jd.DtoE;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: CONNOR
Require-Bundle: org.eclipse.ui,
com.teamcenter.rac.kernel;bundle-version="13000.1.0",
com.teamcenter.rac.util;bundle-version="13000.1.0",
com.teamcenter.rac.common;bundle-version="13000.1.0",
com.teamcenter.rac.aifrcp;bundle-version="13000.1.0",
org.eclipse.core.runtime;bundle-version="3.15.100",
TcSoaStructureManagementLoose;bundle-version="13000.1.0",
org.apache.poi.39;bundle-version="3.9.0"
Automatic-Module-Name: com.connor.jd.DtoE
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.teamcenter.rac.kernel
Export-Package: com.connor.ml.tcm.outfile.ML_01
Bundle-ClassPath: lib/hutool-all-5.8.25.jar,
lib/mssql-jdbc-7.0.0.jre8.jar,
lib/ojdbc8.jar,
lib/swingx-1.6.1.jar,
.

@ -0,0 +1,11 @@
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
icons/,\
lib/hutool-all-5.8.25.jar,\
lib/mssql-jdbc-7.0.0.jre8.jar,\
lib/ojdbc8.jar,\
lib/swingx-1.6.1.jar
src.includes = lib/

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.ui.commands">
<command name="DBOM转EBOM" categoryId="com.connor.ml.tcm.outfile.commands.category" id="DBOMtoEBOM"> </command>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler class="com.connor.ml.tcm.outfile.ML_01.DbomTransitionToEbomHandler" commandId="DBOMtoEBOM"> </handler>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="menu:com.connor.plm.test.menus.sampleMenu?after=additions">
<command commandId="DBOMtoEBOM" style="push"/>
</menuContribution>
</extension>
</plugin>

@ -0,0 +1,34 @@
package com.connor.ml.tcm.outfile.ML_01;
public class BomValBean {
private String bl_czbh;
private String bl_jdjz;
private String bl_quantity;
public String getBl_quantity() {
return bl_quantity;
}
public void setBl_quantity(String bl_quantity) {
this.bl_quantity = bl_quantity;
}
public String getBl_czbh() {
return bl_czbh;
}
public void setBl_czbh(String bl_czbh) {
this.bl_czbh = bl_czbh;
}
public String getBl_jdjz() {
return bl_jdjz;
}
public void setBl_jdjz(String bl_jdjz) {
this.bl_jdjz = bl_jdjz;
}
@Override
public String toString() {
return "BomValBean [bl_czbh=" + bl_czbh + ", bl_jdjz=" + bl_jdjz + ", bl_quantity=" + bl_quantity + "]";
}
}

@ -0,0 +1,483 @@
package com.connor.ml.tcm.outfile.ML_01;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode;
import com.connor.ml.tcm.outfile.bean.NodeBean;
import com.teamcenter.rac.aif.AbstractAIFCommand;
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
import com.teamcenter.rac.kernel.TCAccessControlService;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCComponentBOMLine;
import com.teamcenter.rac.kernel.TCComponentItem;
import com.teamcenter.rac.kernel.TCComponentItemRevision;
import com.teamcenter.rac.kernel.TCProperty;
import com.teamcenter.rac.kernel.TCSession;
import com.teamcenter.rac.util.MessageBox;
public class DbomTransitionToEbomCommand extends AbstractAIFCommand {
private InterfaceAIFComponent comp;
private TCSession session;
private TCComponentBOMLine bomLine = null;
static ArrayList<String> preList = new ArrayList<String>();
private TCAccessControlService acs;
private TCComponent[] user;
private String[] props;
public DbomTransitionToEbomCommand(InterfaceAIFComponent comp, TCSession session) {
// Auto-generated constructor stub
this.comp = comp;
this.session = session;
}
private List<String> ebomList;
@Override
public void executeModal() throws Exception {
// Auto-generated method stub
// TCComponentType compType = session.getTypeComponent("ML8_Washing");
// String[] allProperties=compType.getPropertyNames();//获取类所有属性
//TCProperty[] allProperties=compType.getPropertyNames();//获取类所有属性
acs = session.getTCAccessControlService();
user = new TCComponent[]{ session.getUser(), session.getGroup(), session.getRole() };
//获取选中的对象
if(!(comp instanceof TCComponentBOMLine))
{
MessageBox.post("请在结构管理器中选中BOMLine对象", "错误", MessageBox.ERROR);
return;
}
//System.out.println("11111111111");
bomLine = (TCComponentBOMLine) comp;
//判断对象类型
TCComponentItem item = bomLine.getItem();
// boolean isTypeof=false;
String[] prefValues = session.getPreferenceService().getStringValues("Pma0_Part_Design_Type");
String[] ebomType = session.getPreferenceService().getStringValues("Pma0_EBOM_Type");
ebomList = Arrays.asList(ebomType);
System.out.println("ebomList==>"+ebomList);
List<String> dtypeList = new ArrayList<String>();
Map<String,String> DETypeMap = new HashMap<String,String>();
for(String pref : prefValues) {
String[] split = pref.split(",");
String etypeString = split[0];
String dtypeString = split[1];
DETypeMap.put(dtypeString.replaceAll("DesignType:", ""), etypeString.replaceAll("PartType:", ""));
dtypeList.add(dtypeString.replaceAll("DesignType:", ""));
preList.add(dtypeString.replaceAll("DesignType:", ""));
// if(pref.equals(item.getType())) {
// isTypeof = true;
// }
}
System.out.println(item.getType()+"dtypeList==>"+dtypeList.toString());
if(!dtypeList.contains(item.getType())) {
MessageBox.post("请选中设计对象", "提示", 2);
return;
}
//lidy20240923界面中BOM属性列的显示做成可配置配置属性为BOMline属性的真实值
String[] options = session.getPreferenceService().getStringValues("Pma0_Table_Columns");
// if(options == null || options.length == 0) {
// MessageBox.post("首选项配置不正确", "提示", 2);
// return;
// }
String[] header = new String[options.length + 5];
props = new String[options.length];
header[0] = "DBOM对象";
header[1] = "对应父节点";
header[2] = "EBOM对象";
header[3] = "发布状态";
header[4] = "选中";
for(int i = 0; i < options.length; i++) {
String[] split = options[i].split("=");
header[i + 5] = split[0];
props[i] = split[1];
}
new Thread() {
@Override
public void run() {
ProcessBarDialog progress = new ProcessBarDialog("正在加载BOM转换页面...");
progress.open();
try {
DefaultMutableTreeTableNode node = getBomPropertyToNode(session, bomLine);
progress.close();
// DbomTransitionToEbomDialog dialog =
new DbomTransitionToEbomDialog(comp, session, node, preList, progress, header);
} catch (Exception e) {
// Auto-generated catch block
e.printStackTrace();
progress.close();
}
}
}.start();
// super.executeModal();
}
// private Map<TCComponentItemRevision, List<BomValBean>> bomValMap = new HashMap<TCComponentItemRevision, List<BomValBean>>();
/**
*
*
* @param topBomline
private void packAll(TCComponentBOMLine topBomline) throws Exception {
TCComponentBOMLine[] bomlines = new TCComponentBOMLine[1];
bomlines[0] = topBomline;
StructureService structureService = StructureService.getService(session.getSoaConnection());
// ServiceData serviceData =
structureService.packOrUnpack(bomlines, 2);
// serviceDat
// TCServiceExceptionUtils.validateServiceException(serviceData);
}*/
/**
* BOM
* @throws TCException
*/
private DefaultMutableTreeTableNode getBomPropertyToNode(TCSession session, TCComponentBOMLine topBomLine)
throws Exception {
// Auto-generated method stub
NodeBean nodeBean = new NodeBean();
//对象ID
nodeBean.setDbom("顶层");
nodeBean.setEbom("");
// nodeBean.setEbomId("");
nodeBean.setNum("");
nodeBean.setLabel("");
nodeBean.setRefreshStatus("");
nodeBean.setParentString("");
DefaultMutableTreeTableNode rootNode = new DefaultMutableTreeTableNode(nodeBean);
//获取BOM
try {
//getRepresentationPropertysToNode(topBomLine, rootNode, "");
getBomPropertysToNode(topBomLine, rootNode, "",null);
return rootNode;
} catch (Exception e) {
// : handle exception
e.printStackTrace();
}
return null;
}
/***
*
* @param bomLine
* @param rootNode
* @param parentID
* @throws TCException
*/
private Boolean getRepresentationPropertysToNode(TCComponentBOMLine bomLine, DefaultMutableTreeTableNode rootNode)
throws Exception {
// , String parentID,String quantity,String blJz) throws Exception {
Boolean jxZk = false;
TCComponentItemRevision itemRevision = bomLine.getItemRevision();
//刷新表示关系
//TCComponent referenceProperty = itemRevision.getReferenceProperty("representation_for");
//referenceProperty.refresh();
//获取表示关系下的对象
itemRevision.refresh();
TCComponent[] tcComponents = itemRevision.getReferenceListProperty("representation_for");
for (TCComponent tcComponent : tcComponents) {
TCProperty refreshStatusProperty = tcComponent.getTCProperty("release_status_list");
TCComponent[] refreshStatus = refreshStatusProperty.getReferenceValueArray();
TCProperty processProperty = tcComponent.getTCProperty("process_stage_list");
TCComponent[] processStage = processProperty.getReferenceValueArray();
NodeBean nodeBean = new NodeBean();
String stringProperty = tcComponent.getStringProperty("object_string");
nodeBean.setDbom("");
nodeBean.setEbom(stringProperty);
// nodeBean.setEbomId(tcComponent.getStringProperty("item_id"));
// nodeBean.setEbomDesc(tcComponent.getStringProperty("object_desc"));
nodeBean.setNum(bomLine.getStringProperty("bl_quantity"));
nodeBean.setBom(bomLine);
for(int i = 0; i < props.length; i++) {
System.out.println("setValueAt" + (i + 5) + "==" + props[i] + "==" + bomLine.getProperty(props[i]));
nodeBean.setValueAt(i + 5, tcComponent.getProperty(props[i]));//TODO lidy20240925D转E需要显示的属性调整成物料版本属性
}
nodeBean.setTcComponent(tcComponent);
nodeBean.setpRev(itemRevision);
nodeBean.setLabel("0");
// nodeBean.setBl_plmxml_abs_xform(bomLine.getProperty("bl_plmxml_occ_xform"));
if(refreshStatus.length > 0) {
StringBuffer stringBuffer = new StringBuffer();
//添加发布状态
for (int i = 0; i < refreshStatus.length; i++) {
stringBuffer.append(refreshStatus[i].toString());
if(i < refreshStatus.length - 1) {
stringBuffer.append(",");
}
}
nodeBean.setRefreshStatus(stringBuffer.toString());
}else if(processStage.length > 0) {
nodeBean.setRefreshStatus("流程中");
}else {
nodeBean.setRefreshStatus("");
}
nodeBean.setParentString(itemRevision.getStringProperty("object_string"));
DefaultMutableTreeTableNode node = new DefaultMutableTreeTableNode(nodeBean);
rootNode.add(node);
if(tcComponents.length == 1) {
if(getTopRefresh(node)) {
nodeBean.setLabel("0");
}else {
nodeBean.setLabel("1");
}
}
// String property = tcComponent.getProperty("j6_processtype");
if(!acs.checkAccessorsPrivilege(user, tcComponent, "WRITE")){ // || stringProperty.contains("55")
System.out.println(stringProperty + "=====stringProperty");
// jxZk = false;
// }else if(property!=null && (property.equals("外购件") || property.equals("外协件"))) {
// jxZk = false;
}else {
//一图多物的情况,只要对一个物具有写权限,就允许展开下级
jxZk = true;
}
}
return jxZk;
}
/***
*
* @param node
* @return
*/
private static boolean getTopRefresh(DefaultMutableTreeTableNode node) {
boolean result = false;
//判断上层是否勾选已发布的对象
DefaultMutableTreeTableNode parentNode = (DefaultMutableTreeTableNode) node.getParent();
if(parentNode != null) {
DefaultMutableTreeTableNode rootNode = (DefaultMutableTreeTableNode) parentNode.getParent();
if(rootNode != null) {
for (int i = 0; i < rootNode.getChildCount();) {
DefaultMutableTreeTableNode childNode = (DefaultMutableTreeTableNode) rootNode.getChildAt(i);
NodeBean childBean = (NodeBean) childNode.getUserObject();
if(childBean.getLabel().equals("1") && childBean.getRefreshStatus().indexOf("发布") >= 0) {
//MessageBox.post("上层["+childBean.getEbom()+"]已勾选发布的对象,下层不允许勾选!", "错误", MessageBox.ERROR);
return true;
}
else {
return getTopRefresh(childNode);
}
}
}
}
return result;
}
/**
* BOM
* @param bomLine
* @param bomPropertyList
* @param parentID
*/
private void getBomPropertysToNode(TCComponentBOMLine bomLine, DefaultMutableTreeTableNode rootNode,
String parentID, TCComponentBOMLine pLine) {
try {
NodeBean nodeBean = new NodeBean();
String itemType = bomLine.getStringProperty("bl_item_object_type");
System.out.println(itemType);
// if(bomLine.getStringProperty("bl_item_object_type").equals("LD6_3Ddesign")) {
// return;
// }
nodeBean.setDbom(bomLine.getStringProperty("bl_item_object_string"));
nodeBean.setNum(bomLine.getStringProperty("bl_quantity"));
nodeBean.setEbom("");
// nodeBean.setEbomId("");
for(int i = 0; i < props.length; i++) {
nodeBean.setValueAt(i + 5, bomLine.getProperty(props[i]));
}
if(preList.contains(itemType)) {
nodeBean.setLabel("3");
}else {
nodeBean.setLabel("");
}
nodeBean.setRev(bomLine.getItemRevision());
nodeBean.setRefreshStatus("");
nodeBean.setParentString("");
nodeBean.setBom(bomLine);
String type = bomLine.getItem().getType();
if(ebomList.contains(type) || "EDAComp".equals(itemType) || "J6_ZX".equals(itemType) ) {
nodeBean.setpRev(pLine.getItemRevision());
nodeBean.setRootNode(rootNode);
nodeBean.setIsTw(true);
}
// nodeBean.setBl_plmxml_abs_xform(bomLine.getProperty("bl_plmxml_abs_xform"));
DefaultMutableTreeTableNode node = new DefaultMutableTreeTableNode(nodeBean);
rootNode.add(node);
getPackMessage(nodeBean, bomLine);
Boolean jxZk = getRepresentationPropertysToNode(bomLine, node);//, bomLine.getStringProperty("bl_item_item_id"),
// bomLine.getStringProperty("bl_quantity"), bomLine.getProperty("bl_plmxml_occ_xform"));
if(jxZk && bomLine.getChildren().length > 0) {//TODO
AIFComponentContext aif[] = bomLine.getChildren();
for (int i = 0; i < aif.length; i++) {
TCComponentBOMLine subline = (TCComponentBOMLine) aif[i].getComponent();
if(subline.getLogicalProperty("bl_is_occ_suppressed"))//lidy20240925抑制的事例不应在D转E功能中被转化出来
continue;
getBomPropertysToNode(subline, node, bomLine.getStringProperty("bl_item_item_id"), bomLine);
}
}
} catch (Exception e) {
// Auto-generated catch block
e.printStackTrace();
}
}
private void getPackMessage(NodeBean nodeBean, TCComponentBOMLine bomLine) {
// Auto-generated method stub
try {
Map<TCComponentItemRevision, List<BomValBean>> bomValMap = new HashMap<TCComponentItemRevision, List<BomValBean>>();
AIFComponentContext[] children = bomLine.getChildren();
// boolean hasPack = false;
// unpack
for (int i = 0; i < children.length; i++) {
TCComponentBOMLine cLine = (TCComponentBOMLine) children[i].getComponent();
System.out.println(cLine + " 是否打包:" + cLine.isPacked());
if (cLine.isPacked()) {
String bl_quantity2 = cLine.getStringProperty("bl_quantity");
if(bl_quantity2.isEmpty()) {
bl_quantity2 = "1";
}
BigDecimal bigDecimal2 = new BigDecimal(bl_quantity2);
TCComponentBOMLine[] packedLines = cLine.getPackedLines();
for(TCComponentBOMLine ccLine : packedLines) {
// TCComponentBOMLine cLine = (TCComponentBOMLine) children2[i].getComponent();
TCComponentItemRevision itemRevision = ccLine.getItemRevision();
String bl_sequence_no = ccLine.getStringProperty("bl_sequence_no");
String bl_plmxml_abs_xform = ccLine.getStringProperty("bl_plmxml_abs_xform");//bl_plmxml_occ_xform
String bl_quantity = ccLine.getStringProperty("bl_quantity");
if(bl_quantity.isEmpty()) {
bl_quantity = "1";
}
bigDecimal2 = bigDecimal2.subtract(new BigDecimal(bl_quantity));
BomValBean bean = new BomValBean();
bean.setBl_czbh(bl_sequence_no);
bean.setBl_jdjz(bl_plmxml_abs_xform);
bean.setBl_quantity(bl_quantity);
if(bomValMap.containsKey(itemRevision)) {
List<BomValBean> list = bomValMap.get(itemRevision);
list.add(bean);
}else {
List<BomValBean> list = new ArrayList<BomValBean>();
list.add(bean);
bomValMap.put(itemRevision, list);
}
}
cLine.unpack();
cLine.refresh();
TCComponentItemRevision itemRevision = cLine.getItemRevision();
String bl_sequence_no = cLine.getStringProperty("bl_sequence_no");
String bl_plmxml_abs_xform = cLine.getStringProperty("bl_plmxml_abs_xform");
BomValBean bean = new BomValBean();
bean.setBl_czbh(bl_sequence_no);
bean.setBl_jdjz(bl_plmxml_abs_xform);
bean.setBl_quantity(bigDecimal2.toString());
if(bomValMap.containsKey(itemRevision)) {
List<BomValBean> list = bomValMap.get(itemRevision);
list.add(bean);
}else {
List<BomValBean> list = new ArrayList<BomValBean>();
list.add(bean);
bomValMap.put(itemRevision, list);
}
cLine.pack();
}else {
// TCComponentBOMLine cLine = (TCComponentBOMLine) children[i].getComponent();
TCComponentItemRevision itemRevision = cLine.getItemRevision();
String bl_sequence_no = cLine.getStringProperty("bl_sequence_no");
String bl_plmxml_abs_xform = cLine.getStringProperty("bl_plmxml_abs_xform");
String bl_quantity = cLine.getStringProperty("bl_quantity");
BomValBean bean = new BomValBean();
bean.setBl_czbh(bl_sequence_no);
bean.setBl_jdjz(bl_plmxml_abs_xform);
bean.setBl_quantity(bl_quantity);
if(bomValMap.containsKey(itemRevision)) {
List<BomValBean> list = bomValMap.get(itemRevision);
list.add(bean);
}else {
List<BomValBean> list = new ArrayList<BomValBean>();
list.add(bean);
bomValMap.put(itemRevision, list);
}
}
}
// AIFComponentContext[] children2 = null;
// if (hasPack) {
// bomLine.refresh();
// children2 = bomLine.getChildren();
// for(int i = 0; i < children2.length; i++) {
// TCComponentBOMLine cLine = (TCComponentBOMLine) children2[i].getComponent();
// TCComponentItemRevision itemRevision = cLine.getItemRevision();
// String bl_sequence_no = cLine.getStringProperty("bl_sequence_no");
// String bl_plmxml_abs_xform = cLine.getStringProperty("bl_plmxml_abs_xform");
// String bl_quantity = cLine.getStringProperty("bl_quantity");
// BomValBean bean = new BomValBean();
// bean.setBl_czbh(bl_sequence_no);
// bean.setBl_jdjz(bl_plmxml_abs_xform);
// bean.setBl_quantity(bl_quantity);
// if(bomValMap.containsKey(itemRevision)) {
// List<BomValBean> list = bomValMap.get(itemRevision);
// list.add(bean);
// }else {
// List<BomValBean> list = new ArrayList<BomValBean>();
// list.add(bean);
// bomValMap.put(itemRevision, list);
// }
// }
// }else {
// for(int i = 0; i < children.length; i++) {
// TCComponentBOMLine cLine = (TCComponentBOMLine) children[i].getComponent();
// TCComponentItemRevision itemRevision = cLine.getItemRevision();
// String bl_sequence_no = cLine.getStringProperty("bl_sequence_no");
// String bl_plmxml_abs_xform = cLine.getStringProperty("bl_plmxml_abs_xform");
// String bl_quantity = cLine.getStringProperty("bl_quantity");
// BomValBean bean = new BomValBean();
// bean.setBl_czbh(bl_sequence_no);
// bean.setBl_jdjz(bl_plmxml_abs_xform);
// bean.setBl_quantity(bl_quantity);
// if(bomValMap.containsKey(itemRevision)) {
// List<BomValBean> list = bomValMap.get(itemRevision);
// list.add(bean);
// }else {
// List<BomValBean> list = new ArrayList<BomValBean>();
// list.add(bean);
// bomValMap.put(itemRevision, list);
// }
// }
// }
nodeBean.setBomValMap(bomValMap);
// try {
// if(hasPack) {
// packAll(bomLine);
// bomLine.refresh();
// }
// } catch (Exception e1) {
// // Auto-generated catch block
// e1.printStackTrace();
// }
}catch (Exception e) {
// : handle exception
e.printStackTrace();
}
}
}

@ -0,0 +1,30 @@
package com.connor.ml.tcm.outfile.ML_01;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import com.teamcenter.rac.aif.AbstractAIFApplication;
import com.teamcenter.rac.aifrcp.AIFUtility;
import com.teamcenter.rac.kernel.TCSession;
public class DbomTransitionToEbomHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
// TODO Auto-generated method stub
AbstractAIFApplication app = AIFUtility.getCurrentApplication();
TCSession session = (TCSession) app.getSession();
try {
DbomTransitionToEbomCommand command = new DbomTransitionToEbomCommand(app.getTargetComponent(),session);
command.executeModal();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
}

@ -0,0 +1,93 @@
package com.connor.ml.tcm.outfile.ML_01;
import java.awt.event.MouseEvent;
import java.util.List;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import org.jdesktop.swingx.JXTreeTable;
import com.connor.ml.tcm.outfile.bean.NodeBean;
public class JTreeTable extends JXTreeTable {
/**
*
*/
private static final long serialVersionUID = 1L;
private List<Integer> isNotEditableRow;
//CheckBoxCellEditor checkBoxCellEditor = new CheckBoxCellEditor(this);
private TableCellCheckboxRenderer checkboxRenderer = new TableCellCheckboxRenderer(this);
public List<Integer> getIsNotEditableRow() {
return isNotEditableRow;
}
public void setIsNotEditableRow(List<Integer> isNotEditableRow) {
this.isNotEditableRow = isNotEditableRow;
}
public JTreeTable(JTreeTableModel testTreeTableModel) {
// Auto-generated constructor stub
super(testTreeTableModel);
}
@Override
public boolean isCellEditable(int arg0, int arg1) {
// Auto-generated method stub
return true;//super.isCellEditable(arg0, arg1);
}
@Override
public TableCellEditor getCellEditor(int row, int column) {
// Auto-generated method stub
//if(isNotEditableRow.contains(row) && column == 2)
return cellEditor;
//return super.getCellEditor(row, column);
}
public String getToolTipText(MouseEvent e) {
int row = this.rowAtPoint(e.getPoint());
int col = this.columnAtPoint(e.getPoint());
String tiptextString = null;
if (row > -1 && col > -1) {
Object value = this.getValueAt(row, col);
if (null != value && !"".equals(value))
tiptextString = value.toString();// 技륫鞫刻데禱목코휭
}
return tiptextString;
}
@Override
public TableCellRenderer getCellRenderer(int row, int column) {
// Auto-generated method stub
Object val = getValueAt(row, NodeBean.LABEL);
if(column == NodeBean.LABEL && val != null && (val.equals("0") || val.equals("1")))
{
return checkboxRenderer;
}
else
{
return super.getCellRenderer(row, column);
}
}
// 茶꾜죗
public void HiddenCell(int column) {
TableColumn tc = this.getTableHeader().getColumnModel()
.getColumn(column);
tc.setMaxWidth(0);
tc.setPreferredWidth(0);
tc.setWidth(0);
tc.setMinWidth(0);
this.getTableHeader().getColumnModel().getColumn(column).setMaxWidth(0);
this.getTableHeader().getColumnModel().getColumn(column).setMinWidth(0);
}
}

@ -0,0 +1,130 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.connor.ml.tcm.outfile.ML_01;
import java.util.List;
import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode;
import org.jdesktop.swingx.treetable.DefaultTreeTableModel;
import org.jdesktop.swingx.treetable.TreeTableNode;
import com.connor.ml.tcm.outfile.bean.NodeBean;
/**
*
* @author vearn
*/
public class JTreeTableModel extends DefaultTreeTableModel {
private String[] _names = { "DBOM对象", "EBOM对象","选中", "EBOMID", "物料描述","数量","发布状态","对应父节点"};
private List<Integer> isNotEditableRow;
public JTreeTableModel(TreeTableNode node, String[] names) {
super(node);
_names = names;
}
public List<Integer> getIsNotEditableRow() {
return isNotEditableRow;
}
public void setIsNotEditableRow(List<Integer> isNotEditableRow) {
this.isNotEditableRow = isNotEditableRow;
}
/**
*
*/
@Override
public int getColumnCount() {
return _names.length;
}
/**
*
*/
@Override
public String getColumnName(int column) {
return _names[column];
}
/**
* Object
*/
@Override
public Object getValueAt(Object node, int column) {
Object value = null;
if (node instanceof DefaultMutableTreeTableNode) {
DefaultMutableTreeTableNode mutableNode = (DefaultMutableTreeTableNode) node;
Object o = mutableNode.getUserObject();
if (o != null && o instanceof NodeBean) {
NodeBean bean = (NodeBean) o;
value = bean.getValueAt(column);
if(column == NodeBean.LABEL && value.equals("3")) {
value = "";
}
// if(column > 4)
// System.out.println("getValueAt" + column + "==" + value);
/*switch (column) {
case 0:
value = bean.getDbom();
break;
case 1:
value = bean.getEbom();
break;
case 2:
value = bean.getLabel();
if(value.equals("3")) {
value = "";
}
break;
case 3:
value = bean.getEbomId();
break;
case 4:
value = bean.getEbomDesc();
break;
case 5:
value = bean.getNum();
break;
case 6:
value = bean.getRefreshStatus();
break;
case 7:
value = bean.getParentString();
break;
}*/
}
}
return value;
}
/**
*
*
* @param the node (i.e. row) for which editing is to be determined
* @param the column for which editing is to be determined
* @return false
*/
@Override
public boolean isCellEditable(Object node, int column) {
//if(column == 5)
//{
return true;
//}
//else
//{
// return false;
//}
}
}

@ -0,0 +1,53 @@
package com.connor.ml.tcm.outfile.ML_01;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Dimension;
import java.util.TimerTask;
import java.util.Timer;
import javax.swing.*;
public class ProcessBarDialog extends JFrame {
private JProgressBar progressBar = new JProgressBar();
private Box box = Box.createVerticalBox();
private Box box2 = Box.createHorizontalBox();
private String name;
public ProcessBarDialog(String name) {
this.name = name;
}
public void open() {
this.setTitle("加载中...");
//需要用进程调用
setBounds(200, 200, 300, 100);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setLocationRelativeTo(null);
progressBar.setIndeterminate(true);// 设置进度条的样式为不确定的进度条样式(进度条来回滚动)false为确定的进度条样式(即进度条从头到尾显示)
progressBar.setStringPainted(true);// 设置进度条显示提示信息
progressBar.setString(name);// 设置提示信息
progressBar.setPreferredSize(new Dimension(300, 100));
box2.add(progressBar);
box.add(box2);
add(box);
this.setAlwaysOnTop(true);
setVisible(true);
}
public void close() {
this.dispose();
}
}

@ -0,0 +1,76 @@
package com.connor.ml.tcm.outfile.ML_01;
import java.awt.Component;
import java.util.List;
import javax.swing.JCheckBox;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.EventListenerList;
import javax.swing.table.TableCellRenderer;
public class TableCellCheckboxRenderer extends JCheckBox implements
TableCellRenderer {
/**
*
*/
private static final long serialVersionUID = 1L;
private List<Integer> processRows;
protected EventListenerList listenerList = new EventListenerList();
protected ChangeEvent changeEvent = new ChangeEvent(this);
//private TestTreeTableModel tableModel;
public List<Integer> getProcessRows() {
return processRows;
}
public void setProcessRows(List<Integer> processRows) {
this.processRows = processRows;
}
public TableCellCheckboxRenderer(final JTreeTable table) {
}
@Override
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
// TODO Auto-generated method stub
this.setHorizontalAlignment(SwingConstants.CENTER);// ±íÍ·±êÇ©¾çÖÐ
this.setBorderPainted(true);
if(value != null)
{
// if(value.toString().equals("1"))
// {
// if(table.getColumnName(column).equals("¸ÄÖÆ") && hasFocus)
// {
// if(table.getValueAt(row, column + 1).toString().equals("1"))
// {
// table.setValueAt(0, row, column + 1);
// }
// }
// else if(table.getColumnName(column).equals("ɾ³ý") && hasFocus)
// {
// if(table.getValueAt(row, column - 1).toString().equals("1"))
// {
// table.setValueAt(0, row, column - 1);
// }
// }
// }
// if(value.toString().equals("1"))
// {
// System.out.println(value.toString().equals("1") + "====");
// }
this.setSelected(value.toString().equals("1"));
}
else
{
this.setSelected(false);
}
return this;
}
}

@ -0,0 +1,8 @@
package com.connor.ml.tcm.outfile.ML_01;
public class Test {
public static void main(String[] args) {
String s = "11111112-32222222-4444";
System.out.println(s.substring(0, s.indexOf("-")));
}
}

@ -0,0 +1,165 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.connor.ml.tcm.outfile.bean;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode;
import com.connor.ml.tcm.outfile.ML_01.BomValBean;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCComponentBOMLine;
import com.teamcenter.rac.kernel.TCComponentItemRevision;
/**
*
* @author vearn
*/
public class NodeBean {
private String dbom;//对象ID
private String ebom;//对象名称
// private String ebomId;//对象名称
// private String ebomDesc;//物料描述
private String num;//数量
private String label;//对象名称
private String refreshStatus;//发布状态
private String parentString;//对应父节点
// private String bl_plmxml_abs_xform ;//绝对变换矩阵
private TCComponentItemRevision pRev;//对应父节点
private TCComponentItemRevision rev;//对应父节点
private TCComponent tcComponent;
private Boolean isTw = false;
private DefaultMutableTreeTableNode rootNode;
private Map<TCComponentItemRevision, List<BomValBean>> bomValMap = new HashMap<TCComponentItemRevision, List<BomValBean>>();
public static int DBOM = 0;
public static int PARENT = 1;
public static int EBOM = 2;
public static int STATUS = 3;
public static int LABEL = 4;
private HashMap<Integer, String> values = new HashMap<>();
private TCComponentBOMLine bomLine;
public Boolean getIsTw() {
return isTw;
}
public DefaultMutableTreeTableNode getRootNode() {
return rootNode;
}
public void setRootNode(DefaultMutableTreeTableNode rootNode) {
this.rootNode = rootNode;
}
public void setIsTw(Boolean isTw) {
this.isTw = isTw;
}
public TCComponent getTcComponent() {
return tcComponent;
}
public void setTcComponent(TCComponent tcComponent) {
this.tcComponent = tcComponent;
}
public TCComponentItemRevision getRev() {
return rev;
}
public void setRev(TCComponentItemRevision rev) {
this.rev = rev;
}
public TCComponentItemRevision getpRev() {
return pRev;
}
public Map<TCComponentItemRevision, List<BomValBean>> getBomValMap() {
return bomValMap;
}
public void setBomValMap(Map<TCComponentItemRevision, List<BomValBean>> bomValMap) {
this.bomValMap = bomValMap;
}
public void setpRev(TCComponentItemRevision pRev) {
this.pRev = pRev;
}
// public String getBl_plmxml_abs_xform() {
// return bl_plmxml_abs_xform;
// }
// public void setBl_plmxml_abs_xform(String bl_plmxml_abs_xform) {
// this.bl_plmxml_abs_xform = bl_plmxml_abs_xform;
// }
public String getDbom() {//0
return dbom;
}
public void setDbom(String dbom) {//0
this.dbom = dbom;
setValueAt(DBOM, dbom);
}
public String getEbom() {//1
return ebom;
}
public void setEbom(String ebom) {//1
this.ebom = ebom;
setValueAt(EBOM, ebom);
}
public String getLabel() {//2
return label;
}
public void setLabel(String label) {//2
this.label = label;
setValueAt(LABEL, label);
}
// public String getEbomId() {//3
// return ebomId;
// }
// public void setEbomId(String ebomId) {//3
// this.ebomId = ebomId;
// }
// public String getEbomDesc() {//4
// return ebomDesc;
// }
// public void setEbomDesc(String ebomDesc) {//4
// this.ebomDesc = ebomDesc;
// }
public String getNum() {//5
return num;
}
public void setNum(String num) {//5
this.num = num;
}
public String getRefreshStatus() {//6
return refreshStatus;
}
public void setRefreshStatus(String refreshStatus) {//6
this.refreshStatus = refreshStatus;
setValueAt(STATUS, refreshStatus);
}
public String getParentString() {//7
return parentString;
}
public void setParentString(String parentString) {//7
this.parentString = parentString;
setValueAt(PARENT, parentString);
}
public String getValueAt(int i) {
if(values.containsKey(i))
return values.get(i);
return "";
}
public void setValueAt(int i, String val) {
values.put(i, val);
}
public TCComponentBOMLine getBom() {
return bomLine;
}
public void setBom(TCComponentBOMLine bomLine) {
this.bomLine = bomLine;
}
public String toString() {
return dbom + "--" + ebom;
}
}

@ -0,0 +1,299 @@
package com.connor.ml.tcm.outfile.util;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.KeyStroke;
/**
* Adapter JTables Excel
* JTables Excel
*/
public class Adapter implements ActionListener {
private String rowstring, value;
private Clipboard system;
private StringSelection stsel;
private JTable jTable1;
private List<List<Object>> selectValue = new ArrayList<List<Object>>();
/**
* Excel JTable JTable
*/
public Adapter(JTable myJTable) {
jTable1 = myJTable;
KeyStroke copy = KeyStroke.getKeyStroke(KeyEvent.VK_C,
ActionEvent.CTRL_MASK, false);
// 确定复制按键用户可以对其进行修改
// 以实现其它按键组合的复制功能。
KeyStroke paste = KeyStroke.getKeyStroke(KeyEvent.VK_V,
ActionEvent.CTRL_MASK, false);
// 确定粘贴按键用户可以对其进行修改
// 以实现其它按键组合的复制功能。
jTable1.registerKeyboardAction(this, "Copy", copy,
JComponent.WHEN_FOCUSED);
jTable1.registerKeyboardAction(this, "Paste", paste,
JComponent.WHEN_FOCUSED);
system = Toolkit.getDefaultToolkit().getSystemClipboard();
}
/**
*
*/
public JTable getJTable() {
return jTable1;
}
public void setJTable(JTable jTable1) {
this.jTable1 = jTable1;
}
/**
* ActionCommands
* JTable
*/
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().compareTo("Copy") == 0) {
StringBuffer sbf = new StringBuffer();
selectValue.clear();
// 检查以确保我们仅选择了单元格的
// 相邻块
int numcols = jTable1.getSelectedColumnCount();
int numrows = jTable1.getSelectedRowCount();
int[] rowsselected = jTable1.getSelectedRows();
int[] colsselected = jTable1.getSelectedColumns();
// if (!((numrows - 1 == rowsselected[rowsselected.length - 1]
// - rowsselected[0] && numrows == rowsselected.length) && (numcols - 1 == colsselected[colsselected.length - 1]
// - colsselected[0] && numcols == colsselected.length))) {
// JOptionPane.showMessageDialog(null, "Invalid Copy Selection",
// "Invalid Copy Selection", JOptionPane.ERROR_MESSAGE);
//
// return;
// }
for (int i=0;i<numrows;i++)
{
for (int j=0;j<numcols;j++)
{
if(jTable1.getValueAt(rowsselected[i],colsselected[j]) != null && jTable1.getValueAt(rowsselected[i],colsselected[j]).toString().indexOf("\n") >= 0)
{
sbf.append("\"");
sbf.append(jTable1.getValueAt(rowsselected[i],colsselected[j]));
sbf.append("\"");
}
else if(jTable1.getValueAt(rowsselected[i],colsselected[j]) == null)
{
sbf.append("");
}
else
{
sbf.append(jTable1.getValueAt(rowsselected[i],colsselected[j]));
}
if (j<numcols-1)
{
sbf.append("\t".toString());
}
}
sbf.append("\n".toString());
}
stsel = new StringSelection(sbf.toString().trim());
system = Toolkit.getDefaultToolkit().getSystemClipboard();
system.setContents(stsel,stsel);
}
if (e.getActionCommand().compareTo("Paste") == 0) {
System.out.println("Trying to Paste");
//int startRow = (jTable1.getSelectedRows())[0];
//int startCol = (jTable1.getSelectedColumns())[0];
try {
String trstring= (String)(system.getContents(this).getTransferData(DataFlavor.stringFlavor));
System.out.println("String is:"+trstring);
String[] values = trstring.split("\"");
StringBuffer sb = new StringBuffer();
//替换Excel中的换行符
for (int i = 0; i < values.length; i++) {
System.out.println(i+values[i]);
if(i % 2 ==0 && values[i].indexOf("\n") >= 0)
{
sb.append(values[i].replace("\n", " $"));
}
else
{
sb.append(values[i]);
}
//System.out.println(i+s[i]);
}
System.out.println("sb======"+sb.toString());
String copyValue = sb.toString();
String[] st1=copyValue.split("\\$"); //new StringTokenizer(sb.toString(),"$".toString());
int[] rows = jTable1.getSelectedRows();
int[] columns = jTable1.getSelectedColumns();
int startRow = rows[0];
int startCol = columns[0];
if(rows.length ==1 )
{
for(int i=0;i<st1.length;i++)
{
rowstring=st1[i];
System.out.println("rowstring============"+rowstring);
if(rowstring.indexOf("\t") >= 0)
{
String[] cellValue = rowstring.split("\t");
for(int j=0;j<cellValue.length;j++)
{
value=(String)cellValue[j];
System.out.println("value============"+value);
if (startRow+i< jTable1.getRowCount() &&
startCol+j < jTable1.getColumnCount()-1)
{
jTable1.setValueAt(value.trim(),startRow+i,startCol+j);
}
System.out.println("Putting "+ value+"atrow="+startRow+i+"column="+startCol+j);
}
}
else
{
jTable1.setValueAt(rowstring.trim(),startRow+i,startCol);
}
}
}
else if(rows.length > 1 )
{
//如果选择行大于复制行//选中行除以复制行
if(rows.length > st1.length)
{
// int num = rows.length / st1.length;
for (int i = 0; i < rows.length; i++) {
//for (int j = 0; j < num; j++) {
//for (int j2 = 0; j2 < st1.length; j2++) {
rowstring=st1[(i+st1.length)%st1.length];
System.out.println("rowstring============"+rowstring);
if(rowstring.indexOf("\t") >= 0)
{
String[] cellValue = rowstring.split("\t");
for (int k = 0; k < cellValue.length; k++) {
value=(String)cellValue[k];
System.out.println("value============"+value);
jTable1.setValueAt(value.trim(),rows[i],startCol+k);
System.out.println("Putting "+ value+"atrow="+startRow+i+"column="+startCol+k);
}
}
else
{
jTable1.setValueAt(rowstring.trim(),rows[i],startCol);
}
//}
//}
}
}
else //写入选中行内容
{
for(int i=0;i<st1.length;i++)
{
rowstring=st1[i];
System.out.println("rowstring============"+rowstring);
if(rowstring.indexOf("\t") >= 0)
{
String[] cellValue = rowstring.split("\t");
for(int j=0;j<cellValue.length;j++)
{
value=(String)cellValue[j];
System.out.println("value============"+value);
if (startRow+i< jTable1.getRowCount() &&
startCol+j< jTable1.getColumnCount()-1)
{
jTable1.setValueAt(value.trim(),startRow+i,startCol+j);
}
System.out.println("Putting "+ value+"atrow="+startRow+i+"column="+startCol+j);
}
}
else
{
jTable1.setValueAt(rowstring.trim(),startRow+i,startCol);
}
}
}
}
if(columns.length > st1[0].split("\t").length) //如果选中列数大于复制列数
{
System.out.println("========================================================================");
if(rows.length > st1.length)
{
for (int i = 0; i < rows.length; i++) {
for (int j = 0; j < columns.length; j++) {
rowstring=st1[(i+st1.length)%st1.length];
System.out.println("rowstring============"+rowstring);
if(rowstring.indexOf("\t") >= 0)
{
String[] cellValue = rowstring.split("\t");
for (int k = 0; k < cellValue.length; k++) {
value=(String)cellValue[(j+cellValue.length)%cellValue.length];
System.out.println("value============"+value);
jTable1.setValueAt(value.trim(),rows[i],columns[j]);
System.out.println("Putting "+ value+"atrow="+startRow+i+"column="+startCol+k);
}
}
else
{
jTable1.setValueAt(rowstring.trim(),rows[i],columns[j]);
}
}
}
}
else
{
for (int i = 0; i < st1.length; i++) {
for (int j = 0; j < columns.length; j++) {
rowstring=st1[(i+st1.length)%st1.length];
System.out.println("rowstring============"+rowstring);
if(rowstring.indexOf("\t") >= 0)
{
String[] cellValue = rowstring.split("\t");
for (int k = 0; k < cellValue.length; k++) {
value=(String)cellValue[(j+cellValue.length)%cellValue.length];
System.out.println("value============"+value);
jTable1.setValueAt(value.trim(),startRow+i,columns[j]);
System.out.println("Putting "+ value+"atrow="+startRow+i+"column="+startCol+k);
}
}
else
{
jTable1.setValueAt(rowstring.trim(),startRow+i,columns[j]);
}
}
}
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
}

@ -0,0 +1,171 @@
package com.connor.ml.tcm.outfile.util;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.List;
import java.util.Vector;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JTextField;
@SuppressWarnings({ "serial", "rawtypes", "unchecked" })
public class JAutoCompleteComboBox extends JComboBox {
private AutoCompleter completer;
private String propName;
public JAutoCompleteComboBox() {
super();
addCompleter();
}
public JAutoCompleteComboBox(ComboBoxModel cm) {
super(cm);
addCompleter();
}
public JAutoCompleteComboBox(Object[] items) {
super(items);
addCompleter();
}
public JAutoCompleteComboBox(List v) {
super((Vector) v);
addCompleter();
}
public String getPropName() {
return propName;
}
public void setPropName(String propName) {
this.propName = propName;
}
private void addCompleter() {
setEditable(true);
completer = new AutoCompleter(this);
}
public void autoComplete(String str) {
this.completer.autoComplete(str, str.length());
}
public String getText() {
return ((JTextField) getEditor().getEditorComponent()).getText();
}
public void setText(String text) {
((JTextField) getEditor().getEditorComponent()).setText(text);
}
public boolean containsItem(String itemString) {
for (int i = 0; i < this.getModel().getSize(); i++) {
String _item = " " + this.getModel().getElementAt(i);
if (_item.equals(itemString))
return true;
}
return false;
}
}
@SuppressWarnings({"rawtypes"})
class AutoCompleter implements KeyListener, ItemListener {
private JComboBox owner = null;
private JTextField editor = null;
private ComboBoxModel model = null;
public AutoCompleter(JComboBox comboBox) {
owner = comboBox;
editor = (JTextField) comboBox.getEditor().getEditorComponent();
editor.addKeyListener(this);
model = comboBox.getModel();
owner.addItemListener(this);
}
public void keyTyped(KeyEvent e) {
}
public void keyPressed(KeyEvent e) {
}
@SuppressWarnings("unused")
public void keyReleased(KeyEvent e) {
char ch = e.getKeyChar();
// if (ch == KeyEvent.CHAR_UNDEFINED || Character.isISOControl(ch)
// || ch == KeyEvent.VK_DELETE)
// return;
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
int caretPosition = editor.getCaretPosition();
String str = editor.getText();
if (str.length() == 0)
return;
autoComplete(str, caretPosition);
}
}
@SuppressWarnings({ "unchecked", "unused" })
protected void autoComplete(String strf, int caretPosition) {
Object[] opts;
opts = getMatchingOptions(strf.substring(0, caretPosition));
if (owner != null) {
model = new DefaultComboBoxModel(opts);
owner.setModel(model);
}
if (opts.length > 0) {
String str = opts[0].toString();
editor.setCaretPosition(caretPosition);
if (owner != null) {
try {
owner.showPopup();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
}
@SuppressWarnings("unchecked")
protected Object[] getMatchingOptions(String str) {
List v = new Vector();
List v1 = new Vector();
// v.add(str);
for (int k = 0; k < model.getSize(); k++) {
Object itemObj = model.getElementAt(k);
if (itemObj != null) {
String item = itemObj.toString().toLowerCase();
if (item.indexOf((str.toLowerCase())) > -1)
v.add(model.getElementAt(k));
else
v1.add(model.getElementAt(k));
} else
v1.add(model.getElementAt(k));
}
for (int i = 0; i < v1.size(); i++) {
v.add(v1.get(i));
}
// if (v.isEmpty())
return v.toArray();
}
public void itemStateChanged(ItemEvent event) {
if (event.getStateChange() == ItemEvent.SELECTED) {
int caretPosition = editor.getCaretPosition();
if (caretPosition != -1) {
try {
editor.moveCaretPosition(caretPosition);
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
}
}
}
}
}

@ -0,0 +1,868 @@
package com.connor.ml.tcm.outfile.util;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import javax.swing.JOptionPane;
import com.teamcenter.rac.aif.AbstractAIFApplication;
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
import com.teamcenter.rac.aifrcp.AIFUtility;
import com.teamcenter.rac.kernel.ListOfValuesInfo;
import com.teamcenter.rac.kernel.TCClassificationService;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCComponentDataset;
import com.teamcenter.rac.kernel.TCComponentDatasetType;
import com.teamcenter.rac.kernel.TCComponentFolder;
import com.teamcenter.rac.kernel.TCComponentICO;
import com.teamcenter.rac.kernel.TCComponentItem;
import com.teamcenter.rac.kernel.TCComponentItemRevision;
import com.teamcenter.rac.kernel.TCComponentItemType;
import com.teamcenter.rac.kernel.TCComponentListOfValues;
import com.teamcenter.rac.kernel.TCComponentListOfValuesType;
import com.teamcenter.rac.kernel.TCComponentProcess;
import com.teamcenter.rac.kernel.TCComponentProcessType;
import com.teamcenter.rac.kernel.TCComponentTaskTemplate;
import com.teamcenter.rac.kernel.TCComponentTaskTemplateType;
import com.teamcenter.rac.kernel.TCComponentTcFile;
import com.teamcenter.rac.kernel.TCComponentType;
import com.teamcenter.rac.kernel.TCException;
import com.teamcenter.rac.kernel.TCPreferenceService;
import com.teamcenter.rac.kernel.TCProperty;
import com.teamcenter.rac.kernel.TCSession;
import com.teamcenter.rac.kernel.TCUserService;
import com.teamcenter.rac.kernel.ics.ICSKeyLov;
import com.teamcenter.rac.kernel.ics.ICSProperty;
import com.teamcenter.rac.kernel.ics.ICSPropertyDescription;
import com.teamcenter.rac.kernel.ics.ICSSearchResult;
import com.teamcenter.rac.util.MessageBox;
//import com.teamcenter.services.rac.core.DataManagementService;
//import net.sf.json.JSONArray;
//import net.sf.json.JSONObject;
public class MethodUtil {
private static final String SEP1 = ",";
/**
* BOM
*
* @param session session
* @param process
* @param processUser
* @param arctic
* @throws TCException
*/
public static void sendBom(TCSession session, TCComponentItemRevision itemRevision) throws TCException {
TCUserService userservice = session.getUserService();
Object[] obj = new Object[1];
obj[0] = itemRevision;
userservice.call("Super_Bom_Appent_Data", obj);
}
/**
* ID
*
* @param oldItemID ID
* @return ID
*/
public static String getRuleItemID(TCSession session, String oldItemID) {
// String[] oldItemIDs = oldItemID.split("-");
DecimalFormat df = new DecimalFormat("000");
// String newID = oldItemIDs[0] + "-" + oldItemIDs[1] + "-001";
String newID = oldItemID + "-001";
// String idTemp =
TCComponentItemType tccomponentitemtype;
try {
tccomponentitemtype = (TCComponentItemType) (session.getTypeComponent("Item"));
tccomponentitemtype.getNewID();
int i = 1;
while (tccomponentitemtype.find(newID) != null) {
i++;
// newID = oldItemIDs[0] + "-" + oldItemIDs[1] + "-"+ df.format(i);
newID = oldItemID + "-" + df.format(i);
}
} catch (TCException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return newID;
}
/**
* ListString
*
* @param list :List
* @return String
*/
public static String ListToString(List<?> list) {
StringBuffer sb = new StringBuffer();
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
if (list.get(i) == null || list.get(i) == "") {
continue;
}
// 如果值是list类型则调用自己
if (list.get(i) instanceof List) {
sb.append(ListToString((List<?>) list.get(i)));
sb.append(SEP1);
} else {
sb.append(list.get(i));
sb.append(SEP1);
}
}
}
return sb.toString();
}
// // 获取组的lov值
// public static String getGroupLov(TCSession session, String lovName, String key) {
// try {
// // 获取lov
// TCComponentListOfValues rtlistOfValues = TCLOVUtil.findLOVByName(session, "TM2_GROUP");
// ListOfValuesInfo rtlistOfValuesInfo = rtlistOfValues.getListOfValues();
// String[] groupName = rtlistOfValuesInfo.getStringListOfValues();
// String[] groupDisplayName = rtlistOfValuesInfo.getLOVDisplayValues();
// for (int i = 0; i < groupName.length; i++) {
// if (groupName[i].equals(key)) {
// return groupDisplayName[i];
// }
//
// }
// } catch (TCException e) {
// MessageBox.post("获取组的LOV错误请联系系统管理员", "错误!", MessageBox.ERROR);
// e.printStackTrace();
// }
// return "";
// }
/**
*
* @param session session
* @param fileName
* @param Filetype
* @return
*/
public static File getFile(TCSession session,String fileName,String Filetype) {
// TODO Auto-generated method stub
try {
TCPreferenceService service = session.getPreferenceService();
String[] modelFiles = service.getStringValues("ML_Doc_Teamplate");
if (modelFiles == null)
{
System.out.println("未找到首选项");
return null;
}
String itemId = "";
for (int i = 0; i < modelFiles.length; i++) {
if(modelFiles[i].split(":")[0].equals(fileName))
{
itemId = modelFiles[i].split(":")[1];
}
}
TCComponentItemType itemType = (TCComponentItemType) session.getTypeComponent("Item");
TCComponentItem fileItem = itemType.find(itemId);
TCComponentDataset dat = null;
TCComponentItemRevision fileItemLastRev = getLastItemRevision(fileItem);
TCComponent[] comps = fileItemLastRev.getReferenceListProperty("IMAN_specification");
System.out.println("count =" + comps == null ? "null"
: comps.length);
// 遍历TC_Attaches关系下的所有对象
for (TCComponent compt : comps) {
// 获取对象类型
String type = compt.getType();
System.out.println(" TYPE = " + type);
// 判断类型
if (type.equals(type)) {
dat = (TCComponentDataset)compt;
}
}
TCComponentTcFile[] tcFile = dat.getTcFiles();
if(tcFile != null && tcFile.length == 0)
{
System.out.println("未找到配置文件");
}
else
{
return tcFile[0].getFmsFile();
}
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
return null;
}
/**
*
*
* @param item
* @return
*/
public static TCComponentItemRevision getLastItemRevision(TCComponentItem item) {
// TODO Auto-generated method stub
try {
TCComponentItemRevision[] items = item.getReleasedItemRevisions();
int revId = 0;
TCComponentItemRevision itemRevision = null;
for (int i = 0; i < items.length; i++) {
String revisionId = items[i].getStringProperty("item_revision_id");
if (letterToNumber(revisionId) >= revId) {
itemRevision = items[i];
revId = letterToNumber(revisionId);
}
}
return itemRevision;
} catch (TCException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
// 字母转数字 A-Z 1-26
public static int letterToNumber(String letter) {
int length = letter.length();
int num = 0;
int number = 0;
for (int i = 0; i < length; i++) {
char ch = letter.charAt(length - i - 1);
num = (int) (ch - 'A' + 1);
num *= Math.pow(26, i);
number += num;
}
return number;
}
/**
* LOVLOV
*
* @param tcsession
* @param s
* @return
*/
/**
* LOV KeyLOV
*
* @param tcsession
* @param s
* @return
*/
public static String findLovValueByKey(TCSession tcsession, String s, String key) {
TCComponentListOfValues tccomponentlistofvalues = null;
String resultValue = null;
try {
TCComponentListOfValuesType tccomponentlistofvaluestype = (TCComponentListOfValuesType) tcsession
.getTypeComponent("ListOfValues");
TCComponentListOfValues atccomponentlistofvalues[] = tccomponentlistofvaluestype.find(s);
if (atccomponentlistofvalues != null && atccomponentlistofvalues.length > 0) {
tccomponentlistofvalues = atccomponentlistofvalues[0];
ListOfValuesInfo rtlistOfValuesInfo = tccomponentlistofvalues.getListOfValues();
String[] groupName = rtlistOfValuesInfo.getStringListOfValues();
String[] groupDisplayName = rtlistOfValuesInfo.getLOVDisplayValues();
for (int i = 0; i < groupName.length; i++) {
// resultMap.put(groupDisplayName[i],groupName[i]);
if (groupName[i].equals(key)) {
resultValue = groupDisplayName[i];
}
}
}
} catch (TCException tcexception) {
tccomponentlistofvalues = null;
}
return resultValue;
}
/**
*
*
* @param session session
* @param process
* @param processUser
* @param arctic
* @throws TCException
*/
public static void setProcess(TCSession session, TCComponentProcess process, String processUser, String arctic)
throws TCException {
TCUserService userservice = session.getUserService();
Object[] obj = new Object[3];
obj[0] = process;
obj[1] = processUser;
obj[2] = arctic;
userservice.call("DMU_Review_Process", obj);
}
/**
*
*
* @param session session
* @param process
* @param processUser
* @param arctic
* @throws TCException
*/
public static void setRemodelProcess(TCSession session, TCComponentProcess process, String processUser,
String arctic) throws TCException {
TCUserService userservice = session.getUserService();
Object[] obj = new Object[3];
obj[0] = process;
obj[1] = processUser;
obj[2] = arctic;
userservice.call("Create_Remodel_Process", obj);
}
/**
*
*
* @param prefName
* @return
*/
public static String getPrefStr(String prefName) {
AbstractAIFApplication app = AIFUtility.getCurrentApplication();
TCSession session = (TCSession) app.getSession();
TCPreferenceService service = session.getPreferenceService();
String str = service.getString(TCPreferenceService.TC_preference_site, prefName);
if (str == null) {
str = new String("");
}
return str;
}
/***
*
*
* @param session
* @param preferenceName
* @return
*/
public static String[] getPreferenceValues(String preferenceName) {
AbstractAIFApplication app = AIFUtility.getCurrentApplication();
TCSession session = (TCSession) app.getSession();
if (preferenceName == null || session == null) {
System.out.println("");
return null;
}
String[] values = null;
TCPreferenceService service = session.getPreferenceService();
values = service.getStringArray(TCPreferenceService.TC_preference_site, preferenceName);
String[] resultValues = new String[values.length];
for (int i = 0; i < values.length; i++) {
if (values[i].indexOf("\\n") >= 0) {
resultValues[i] = values[i].replace("\\n", "\n");
} else {
resultValues[i] = values[i];
}
}
return resultValues;
}
/***
*
*
* @param session
* @param preferenceName
* @return
*/
public static String getPreferenceValue(String preferenceName) {
AbstractAIFApplication app = AIFUtility.getCurrentApplication();
TCSession session = (TCSession) app.getSession();
if (preferenceName == null || session == null) {
System.out.println("");
return null;
}
TCPreferenceService service = session.getPreferenceService();
return service.getString(TCPreferenceService.TC_preference_site, preferenceName);
}
public static void setByPass(boolean val,TCSession session) {
try {
TCUserService userservice = session.getUserService();
userservice.call(val ? "CONNOR_open_bypass" : "CONNOR_close_bypass", new Object[] { "" });
System.out.println(val ? "Open Bypass" : "Close Bypass");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void openByPass(TCSession session) throws TCException {
TCUserService userservice = session.getUserService();
Object[] obj = new Object[1];
obj[0] = "origin";
userservice.call("CONNOR_open_bypass", obj);
}
public static void closeByPass(TCSession session) throws TCException {
TCUserService userservice = session.getUserService();
Object[] obj = new Object[1];
obj[0] = "origin";
userservice.call("CONNOR_close_bypass", obj);
}
public static void setProperty(TCSession session,TCComponent[] items,String propname,String propvalue) throws TCException {
TCUserService userservice = session.getUserService();
Object[] obj = new Object[3];
obj[0] = items;
obj[1] = propname;
obj[2] = propvalue;
userservice.call("connor_set_prop_value", obj);
}
/***
* webService
*
* @param codeRemark ID
* @param rev
* @param propList
*/
/***
* webService
*
* @param codeRemark UID
*/
/***
* @param matnr
* @param ddlx
* @param type
* @return id
*/
public static String getClassficationId(String matnr, String ddlx, String type) {
// String classId = "jlcs01010101";
String classId = "";
if (ddlx.equals("车身") || ddlx.equals("KD")) {
String[] values = getPreferenceValues("JL_number_to_className");
String className = null;
for (String s : values) {
String[] split = s.split("=");
if (split[0].equals(matnr)) {
className = split[1];
break;
}
}
String[] values2 = getPreferenceValues("JL_name_to_id");
// split[1]--历史split[2]--流程 split[3]--废弃
for (String t : values2) {
String[] split = t.split("=");
if (split[0].equals(className)) {
if (type.equals("历史订单")) {
classId = split[1];
} else if (type.equals("流程中订单")) {
classId = split[2];
} else if (type.equals("废弃订单")) {
classId = split[3];
}
}
}
} else if (ddlx.equals("配件")) {
classId = "jlcs01010201";
String name = matnr.substring(0, 2) + "配件";
String[] values = getPreferenceValues("JL_name_to_id");
for (String t : values) {
String[] split = t.split("=");
if (split[0].equals(name)) {
if (type.equals("历史订单")) {
classId = split[1];
} else if (type.equals("流程中订单")) {
classId = split[2];
} else if (type.equals("废弃订单")) {
classId = split[3];
}
}
}
}
return classId;
}
/**
* LOV
*
* @param icsD
* @return
*/
public static String getClassDisplayableValue(String value, ICSPropertyDescription icsD) {
String result = "";
ICSKeyLov lov1 = icsD.getFormat().getKeyLov();
if (lov1 != null) {
String[] keys = lov1.getKeys();
for (String key : keys) {
if (value.equals(key)) {
result = lov1.getValueOfKey(key);
return result;
}
}
}
return result;
}
public static boolean isDouble(String value) {
try {
Double.parseDouble(value);
return true;
} catch (Exception e) {
// TODO: handle exception
return false;
}
}
/***
*
*
* @param session session
* @param value
* @param userId ID
* @return
*/
public static boolean havePrivilege(TCSession session, String commandName, String userId) {
TCPreferenceService service = session.getPreferenceService();
String[] values = service.getStringArray(TCPreferenceService.TC_preference_site, "JL_User_Rights");
if (values == null || values.length == 0) {
MessageBox.post("请配置首选项(管理权限)!请联系管理员", "错误", MessageBox.ERROR);
return false;
}
for (String value : values) {
// value = commandName + "——" + userId
String[] split = value.split("——");
if (split[0].equals(commandName)) {
if (split.length == 1) {
return true;
} else {
if (split[1].indexOf(userId) >= 0) {
return true;
} else {
return false;
}
}
}
}
return false;
}
public static int getCount(String mainStr, String subStr) {
int minLength = mainStr.length();
int subLength = subStr.length();
int count = 0;
int index = 0;
if (minLength >= subLength) {
while ((index = mainStr.indexOf(subStr, index)) != -1) {
count++;
index += subLength;
}
return count;
}
return 0;
}
/**
*
*
* @param session
* @param item
* @param fileName
* @param tcResource
* @param isDelete
* @param isReplace
*/
public static void setExcelToItem(TCSession session, TCComponentItemRevision item,String fileName, String tcResource,
boolean isDelete,boolean isReplace) {
try {
String as1[] = { tcResource };// 文件的物理路径
String as2[] = { "excel" };
String as3[] = { "MSExcelX" };
String as4[] = { "Plain" };
TCComponentDatasetType tccomponentDatasetType = (TCComponentDatasetType) session
.getTypeComponent("Dataset");
TCComponentDataset tccomponentDataset = tccomponentDatasetType.create(fileName, "excel", "MSExcelX");
tccomponentDataset.setFiles(as1, as3, as4, as2);
//是否替換
if(isReplace)
{
AIFComponentContext[] zyzdsChildrens = item.getChildren();
TCComponentItemRevision zyzdsRev = item;
for (AIFComponentContext zyzdsChildren : zyzdsChildrens) {
if ("MSExcelX".equals(zyzdsChildren.getComponent().getType())) {
TCComponentDataset dateSet = (TCComponentDataset) zyzdsChildren.getComponent();
zyzdsRev.remove("IMAN_specification", dateSet);
dateSet.delete();
}
}
}
item.add("IMAN_specification", tccomponentDataset);
if (isDelete) {
new File(tcResource).delete();
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static Object getTCPropertyValue(TCComponent item,String propertyName)
{
Object result = "";
try {
TCProperty tcProperty = item.getTCProperty(propertyName);
if(tcProperty == null)
{
System.out.println("未获取属性:"+propertyName);
return result;
}
switch (tcProperty.getPropertyType()) {
case TCProperty.PROP_double:
result = tcProperty.getDoubleValue();
break;
case TCProperty.PROP_int:
result = tcProperty.getIntValue();
break;
case TCProperty.PROP_string:
result = tcProperty.getStringValue();
break;
case TCProperty.PROP_date:
result = tcProperty.getDateValue();
break;
default:
break;
}
} catch (TCException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}
public static void setTCPropertyValue(TCComponent item,String propertyName,Object value)
{
try {
TCProperty tcProperty = item.getTCProperty(propertyName);
switch (tcProperty.getPropertyType()) {
case TCProperty.PROP_double:
if(value instanceof Double)
{
tcProperty.setDoubleValue((double) value);
}
else
{
tcProperty.setDoubleValue(Double.parseDouble(value.toString()));
}
break;
case TCProperty.PROP_int:
if(value instanceof Integer)
{
tcProperty.setIntValue((int) value);
}
else
{
tcProperty.setIntValue(Integer.parseInt(value.toString()));
}
break;
case TCProperty.PROP_string:
tcProperty.setStringValue(value.toString());
break;
case TCProperty.PROP_date:
if(value instanceof Date)
{
tcProperty.setDateValue((Date) value);
}
else
{
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-M-dd HH:mm");
tcProperty.setDateValue(sdf.parse(value.toString()));
}
break;
default:
break;
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* ITEM
*
* @param itemList
* @return
*/
/**
*
*
* @param item
* @param name
* @return
*/
public static TCComponentFolder getParentFolder(TCComponentItem item,
String name) {
TCComponentFolder folder = null;
try {
AIFComponentContext[] comtexts = item.whereReferenced();
if (comtexts != null) {
for (int i = 0; i < comtexts.length; i++) {
if (comtexts[i].getComponent() instanceof TCComponentFolder) {
String nameT = ((TCComponentFolder) comtexts[i]
.getComponent())
.getStringProperty("object_name");
if (name.equals("工艺图纸") && nameT.equals("工艺图纸")) {
folder = (TCComponentFolder) comtexts[i]
.getComponent();
}
else if(nameT.equals(name))
{
folder = (TCComponentFolder) comtexts[i]
.getComponent();
}
}
}
}
} catch (TCException e) {
e.printStackTrace();
}
return folder;
}
/**
*
*
* @param session
* @return
*/
/**
* SOAITEM
*
* @param session
*
* @param itemID
* ID
* @param itemRev
*
* @param itemType
*
* @param itemName
*
* @param itemDesc
*
* @param unit
*
* @param itemPropMap
* ITEM
* @param itemRevPropMap
*
* @param itemRevMasterPropMap
*
*/
public static void CreateProcess(TCSession session,TCComponent target,String processName) throws TCException {
try {
TCComponentProcessType processType = (TCComponentProcessType) session.getTypeComponent("Job");
TCComponentTaskTemplateType taskTemplateType = (TCComponentTaskTemplateType) session.getTypeComponent("EPMTaskTemplate");
TCComponentTaskTemplate taskTemplate = taskTemplateType.find(processName, TCComponentTaskTemplate.PROCESS_TEMPLATE_TYPE);
if (taskTemplate == null) {
return;
}
// 创建一个流程 流程名称、描述、流程模板、目标对象、附件数
String name = target.getProperty("object_string");
processType.create(processName + "" + name, "", taskTemplate, new TCComponent[] { target }, new int[] { 1 });
} catch (TCException e) {
e.printStackTrace();
throw e;
}
}
public static void CreateProcess(TCSession session,TCComponent[] targets,int[] type,String processName) throws TCException {
try {
TCComponentProcessType processType = (TCComponentProcessType) session.getTypeComponent("Job");
TCComponentTaskTemplateType taskTemplateType = (TCComponentTaskTemplateType) session.getTypeComponent("EPMTaskTemplate");
TCComponentTaskTemplate taskTemplate = taskTemplateType.find(processName, TCComponentTaskTemplate.PROCESS_TEMPLATE_TYPE);
if (taskTemplate == null) {
return;
}
// 创建一个流程 流程名称、描述、流程模板、目标对象、附件数
String name = targets[0].getProperty("object_string");
processType.create(processName + "" + name, "", taskTemplate, targets, type);
} catch (TCException e) {
e.printStackTrace();
throw e;
}
}
/**
* EXCEL
*
* @param File excel_file
* @return List<DocDirectoryBean>
* @throws IOException
* @throws FileNotFoundException
*/
/**
* EXCEL
*
* @param File excel_file
* @return List<DocDirectoryBean>
* @throws IOException
* @throws FileNotFoundException
*/
/**
* EXCEL
*
* @param File excel_file
* @return List<DocDirectoryBean>
* @throws IOException
* @throws FileNotFoundException
*/
}
Loading…
Cancel
Save