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