李建辉 6 months ago
parent abac41c543
commit 670784ab29

@ -11,9 +11,15 @@
</category> </category>
<command <command
categoryId="com.langtech.plm.project.ProjectECRHandler" categoryId="com.langtech.plm.project.CalculateHandler"
name="计算材料定额" name="计算材料定额"
id="com.langtech.plm.project.ProjectECRHandler"> id="com.langtech.plm.project.CalculateHandler">
</command>
<command
categoryId="com.langtech.plm.bg.QDRWHandler"
name="变更任务分配表启动任务"
id="com.langtech.plm.bg.QDRWHandler">
</command> </command>
<command <command
@ -44,7 +50,7 @@
</command> </command>
<command <command
categoryId="com.langtech.plm.template.TemplateHandler" categoryId="com.langtech.plm.template.TemplateHandler"
name="插入模板" name="生成工序卡"
id="com.langtech.plm.template.TemplateHandler"> id="com.langtech.plm.template.TemplateHandler">
</command> </command>
@ -57,14 +63,18 @@
<extension <extension
point="org.eclipse.ui.handlers"> point="org.eclipse.ui.handlers">
<handler
class="com.langtech.plm.bg.QDRWHandler"
commandId="com.langtech.plm.bg.QDRWHandler">
</handler>
<handler <handler
class="com.langtech.plm.bg.RWFPHandler" class="com.langtech.plm.bg.RWFPHandler"
commandId="com.langtech.plm.bg.RWFPHandler"> commandId="com.langtech.plm.bg.RWFPHandler">
</handler> </handler>
<handler <handler
class="com.langtech.plm.project.ProjectECRHandler" class="com.langtech.plm.project.CalculateHandler"
commandId="com.langtech.plm.project.ProjectECRHandler"> commandId="com.langtech.plm.project.CalculateHandler">
</handler> </handler>
@ -100,24 +110,16 @@
locationURI="menu:org.eclipse.ui.main.menu?after=additions"> locationURI="menu:org.eclipse.ui.main.menu?after=additions">
<menu <menu
id="com.langtech.plm.performancemanagement.menus.sampleMenu" id="com.langtech.plm.performancemanagement.menus.sampleMenu"
label="二开菜单" label="设计管理"
mnemonic="M"> mnemonic="M">
<command <command
commandId="com.langtech.plm.synchronize.SynchronizeHandler" commandId="com.langtech.plm.synchronize.SynchronizeHandler"
id="com.langtech.plm.synchronize.SynchronizeHandler" id="com.langtech.plm.synchronize.SynchronizeHandler"
mnemonic="S"> mnemonic="S">
</command> </command>
<command
commandId="com.langtech.plm.template.TemplateHandler"
id="com.langtech.plm.template.TemplateHandler"
mnemonic="S">
</command>
<command
commandId="com.langtech.plm.project.ProjectECRHandler"
id="com.langtech.plm.project.ProjectECRHandler"
mnemonic="S">
</command>
</menu> </menu>
@ -131,6 +133,12 @@
id="com.langtech.plm.bg.RWFPHandler" id="com.langtech.plm.bg.RWFPHandler"
mnemonic="S"> mnemonic="S">
</command> </command>
<command
commandId="com.langtech.plm.bg.QDRWHandler"
id="com.langtech.plm.bg.QDRWHandler"
mnemonic="S">
</command>
</menu> </menu>
@ -151,14 +159,30 @@
mnemonic="S"> mnemonic="S">
</command> </command>
<command
</menu>
</menuContribution>
<menuContribution locationURI="menu:cn.net.connor.std.processedit.mainmenu?after=additions">
<command
commandId="com.langtech.plm.mpart.MpartHandler" commandId="com.langtech.plm.mpart.MpartHandler"
id="com.langtech.plm.mpart.MpartHandler" id="com.langtech.plm.mpart.MpartHandler"
mnemonic="S"> mnemonic="S">
</command> </command>
</menu> <command
</menuContribution> commandId="com.langtech.plm.project.CalculateHandler"
id="com.langtech.plm.project.CalculateHandler"
mnemonic="S">
</command>
<command
commandId="com.langtech.plm.template.TemplateHandler"
id="com.langtech.plm.template.TemplateHandler"
mnemonic="S">
</command>
</menuContribution>
<menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=additions"> <menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=additions">
<command <command

@ -468,15 +468,21 @@ public class MpartDialog extends JFrame implements ActionListener {
//设置 ly6_homemadeStatus //设置 ly6_homemadeStatus
mRev.setProperty("ly6_homemadeStatus", "自制"); mRev.setProperty("ly6_homemadeStatus", "自制");
String personId = tm_part.getValueAt(i, 8).toString(); String personId = tm_part.getValueAt(i, 8).toString();
System.out.println("personId========"+personId); String[] split = personId.split("_");
mRev.setProperty("ly6_assignUser", personId == null || personId.isEmpty() ? "" : personId); System.out.println("personId========"+split[1]);
mRev.setProperty("ly6_assignUser", split[1] == null || split[1].isEmpty() ? "" : split[1]);
// 添加流程 // 添加流程
if (workflowTemplate != null || !workflowTemplate.isEmpty()) { if (workflowTemplate != null || !workflowTemplate.isEmpty()) {
CreateProcess(session, item, workflowTemplate); CreateProcess(session, mRev, workflowTemplate);
} }
// 把对象放到管理文件夹下 // 把对象放到管理文件夹下
rev.add("LY6_relatedMPart", item); rev.add("LY6_relatedMPart", item);
TCComponent[] relatedComponents = rev.getRelatedComponents("TC_Is_Represented_By");
for (int j = 0; j < relatedComponents.length; j++) {
relatedComponents[j].add("representation_for",mRev);
}
item.getLatestItemRevision().refresh(); item.getLatestItemRevision().refresh();
} else { } else {
AIFComponentContext[] children = topLine.getChildren(); AIFComponentContext[] children = topLine.getChildren();
@ -711,12 +717,17 @@ public class MpartDialog extends JFrame implements ActionListener {
//设置 ly6_homemadeStatus //设置 ly6_homemadeStatus
mRev.setProperty("ly6_homemadeStatus", "自制"); mRev.setProperty("ly6_homemadeStatus", "自制");
String personId = tm_part.getValueAt(i, 8).toString(); String personId = tm_part.getValueAt(i, 8).toString();
System.out.println("personId========"+personId); String[] split = personId.split("_");
mRev.setProperty("ly6_assignUser", personId == null || personId.isEmpty() ? "" : personId); System.out.println("personId========"+split[1]);
mRev.setProperty("ly6_assignUser", split[1] == null || split[1].isEmpty() ? "" : split[1]);
// 把对象放到管理文件夹下 // 把对象放到管理文件夹下
rev.add("LY6_relatedMPart", item); rev.add("LY6_relatedMPart", item);
TCComponent[] relatedComponents = rev.getRelatedComponents("TC_Is_Represented_By");
for (int j = 0; j < relatedComponents.length; j++) {
relatedComponents[j].add("representation_for",mRev);
}
item.getLatestItemRevision().refresh(); item.getLatestItemRevision().refresh();
// 搭建mBOM // 搭建mBOM
TCComponentBOMWindowType viewType = (TCComponentBOMWindowType) session TCComponentBOMWindowType viewType = (TCComponentBOMWindowType) session
@ -747,7 +758,7 @@ public class MpartDialog extends JFrame implements ActionListener {
view.close(); view.close();
// 添加流程 // 添加流程
if (workflowTemplate != null || !workflowTemplate.isEmpty()) { if (workflowTemplate != null || !workflowTemplate.isEmpty()) {
CreateProcess(session, item, workflowTemplate); CreateProcess(session, mRev, workflowTemplate);
} }
} }
@ -795,7 +806,7 @@ public class MpartDialog extends JFrame implements ActionListener {
//System.out.println("Select User: " + user + "group===" + group); //System.out.println("Select User: " + user + "group===" + group);
String userName = ""; String userName = "";
try { try {
userName = user.getUserName(); userName = user.getUserName()+"_"+user.getUserId();
} catch (TCException e1) { } catch (TCException e1) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
MessageBox.post("请选择用户!", "提示 ", MessageBox.INFORMATION); MessageBox.post("请选择用户!", "提示 ", MessageBox.INFORMATION);

Loading…
Cancel
Save