熊朝柱 4 months ago
commit 314a620d9b

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/ojdbc8.jar"/>
<classpathentry kind="lib" path="lib/mssql-jdbc-7.0.0.jre8.jar"/>
<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/swingx-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/poi-4.0.1.jar"/>
<classpathentry kind="lib" path="lib/dom4j-2.1.1.jar"/>
<classpathentry kind="lib" path="lib/poi-examples-3.7-20101029.jar"/>
<classpathentry kind="lib" path="lib/poi-ooxml-3.7-20101029.jar"/>
<classpathentry kind="lib" path="lib/poi-ooxml-schemas-3.7-20101029.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxBlameSettings">
<option name="version" value="2" />
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_22" default="true" project-jdk-name="openjdk-22" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.connor.jd</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,8 @@
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.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

@ -0,0 +1,22 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Jd
Bundle-SymbolicName: com.connor.jd;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
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: lib/ojdbc8.jar,
.,
lib/swingx-1.6.1.jar,
lib/mssql-jdbc-7.0.0.jre8.jar
Export-Package: com.connor.processAttributeModification
Import-Package: com.teamcenter.rac.kernel

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

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.

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.commands">
<category
id="test.commands.category"
name="Sample Category">
</category>
<command
categoryId="test.commands.category"
name="图号申请"
id="DrawingNoApplyHandler">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.connor.jingdiao.handlers.DrawingNoApplyHandler"
commandId="DrawingNoApplyHandler">
</handler>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="test.commands.sampleCommand"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
contextId="org.eclipse.ui.contexts.window"
sequence="M1+6">
</key>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu?after=additions">
<menu
id="com.connor.jingdiao.menus"
label="精雕菜单"
mnemonic="M">
<command
commandId="DrawingNoApplyHandler"
mnemonic="S">
</command>
</menu>
</menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar
id="test.toolbars.sampleToolbar">
<command
id="test.toolbars.sampleCommand"
commandId="test.commands.sampleCommand"
icon="icons/sample.png"
tooltip="Say hello world">
</command>
</toolbar>
</menuContribution>
</extension>
</plugin>

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.ui.commands">
<command name="查询物料库存信息" id="erpIntegrationHandler"/>
<command name="派生中间件" id="deriveCenterHandler"/>
<command name="派生MBOM产品" id="deriveMBOMHandler"/>
<command name="图号申请" id="DrawingNoApplyHandler"/>
<!-- <command name="申请物料编码" id="WlbmApplyHandler"/> -->
<command id="CodeApplyHandler" name="物料编码申请"/>
<command name="DBOM转EBOM" categoryId="com.connor.ml.tcm.outfile.commands.category" id="DBOMtoEBOM"> </command>
<command name="依据设计创建物料" id="DesignToPartHandler"/>
<command name="标准化审核" id="StandardHandler"/>
<command name="编辑节点属性" id="ProcessAttriChangeHandler"/>
<command name="用户登录设置" id="LoginIPSetHandler"/>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler class="com.connor.jingdiao.handlers.DrawingNoApplyHandler" commandId="DrawingNoApplyHandler"/>
<!-- <handler class="com.connor.jingdiao.handlers.WlbmApplyHandler" commandId="WlbmApplyHandler"/> -->
<handler class="com.connor.ml.tcm.outfile.ML_01.DbomTransitionToEbomHandler" commandId="DBOMtoEBOM"> </handler>
<handler commandId="CodeApplyHandler" class="com.connor.jingdiao.handlers.CodeApplyHandler"/>
<handler commandId="DesignToPartHandler" class="com.connor.jingdiao.handlers.DesignToPartHandler"/>
<handler commandId="StandardHandler" class="com.connor.jingdiao.handlers.StandardHandler"/>
<handler commandId="ProcessAttriChangeHandler" class="com.connor.processAttributeModification.ProcessAttriChangeHandler"/>
<handler commandId="LoginIPSetHandler" class="com.connor.jingdiao.handlers.LoginIPSetHandler"/>
<handler class="com.connor.jd.erp.erpIntegrationHandler" commandId="erpIntegrationHandler"/>
<handler class="com.connor.jd.derive.deriveCenterHandler" commandId="deriveCenterHandler"/>
<handler class="com.connor.jd.derive.deriveMBOMHandler" commandId="deriveMBOMHandler"/>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="menu:com.connor.plm.test.menus.sampleMenu?after=additions">
<command commandId="DrawingNoApplyHandler" style="push"> </command>
<command commandId="DesignToPartHandler" style="push"> </command>
<!-- <command commandId="WlbmApplyHandler" style="push">
</command>
BOM转换 -->
<command commandId="DBOMtoEBOM" style="push"/>
<command commandId="CodeApplyHandler" style="push"> </command>
<command commandId="StandardHandler" style="push"> </command>
<command commandId="ProcessAttriChangeHandler" style="push"> </command>
<command commandId="erpIntegrationHandler" style="push"> </command>
<command commandId="deriveCenterHandler" style="push"> </command>
<command commandId="deriveMBOMHandler" style="push"> </command>
<command commandId="LoginIPSetHandler" style="push"> </command>
</menuContribution>
<!--menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=additions">
<menu id="com.connor.jingdiao.menus" label="精雕菜单">
<command commandId="DrawingNoApplyHandler" mnemonic="S">
</command>
</menu>
</menuContribution-->
</extension>
</plugin>

@ -0,0 +1,65 @@
package com.connor.jd.derive;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import com.connor.jd.erp.erpIntegrationOpertaion;
import com.teamcenter.rac.aif.AbstractAIFApplication;
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
import com.teamcenter.rac.aifrcp.AIFUtility;
import com.teamcenter.rac.common.lov.testingservice.LOVTestingService;
import com.teamcenter.rac.kernel.TCComponentItemRevision;
import com.teamcenter.rac.kernel.TCException;
import com.teamcenter.rac.kernel.TCSession;
import com.teamcenter.rac.util.MessageBox;
public class deriveCenterHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
// TODO Auto-generated method stub
// 获取当前系统活动
AbstractAIFApplication app = AIFUtility.getCurrentApplication();
TCSession session = (TCSession) app.getSession();
// 获取tc当前选择的操作
InterfaceAIFComponent target = app.getTargetComponent();
if (target instanceof TCComponentItemRevision) {
try {
String[] value = session.getPreferenceService().getStringValues("JD_SERIVECENT");
List<String> list = new ArrayList<>(Arrays.asList(value));
List<String> typeList = new ArrayList<>(Arrays.asList(value));
Map<String, String> typeMap = new HashMap<String, String>();
for(String string : list) {
System.out.println("首选项配置属性:"+string);
System.out.println("开始分割属性");
String[] split = string.split("-");
typeList.add(split[0]);
typeMap.put(split[0], split[1]);
}
String stringProperty = ((TCComponentItemRevision) target).getItem().getStringProperty("object_type");
System.out.println("选中对象item类型"+stringProperty);
if (typeList.contains(((TCComponentItemRevision) target).getItem().getStringProperty("object_type"))) {
String createType = typeMap.get(stringProperty);
TCComponentItemRevision f = (TCComponentItemRevision) target;
deriveOpertion operation = new deriveOpertion(session, f, 1,createType);
session.queueOperation(operation);
} else {
MessageBox.post("请选择中间件版本执行操作", "提示", MessageBox.INFORMATION);
return null;
}
} catch (TCException e) {
e.printStackTrace();
}
}
return null;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save