|
|
|
@ -3,7 +3,6 @@ package com.connor.chint.sap2.util;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.rmi.RemoteException;
|
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.Comparator;
|
|
|
|
@ -52,10 +51,7 @@ import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentItemType;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentListOfValues;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentMEProcessRevision;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentQuery;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentQueryType;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentRevisionRule;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentType;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentUser;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCException;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCProperty;
|
|
|
|
@ -251,7 +247,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
Map<String, ExpandPSData[]> bomLineTree2 = BomToSapUtil.getBomLineTreeNodeSOA(componentbomline);
|
|
|
|
@ -930,7 +926,7 @@ public class SAPUtil {
|
|
|
|
|
|
|
|
|
|
// 事业部发易发通知
|
|
|
|
|
public static void sendWLQGAM8(String ban, TCComponent project, TCSession session,
|
|
|
|
|
List<TCComponentItemRevision> revs, String design_user, String logPath) throws Exception {
|
|
|
|
|
List<TCComponentItemRevision> revs, String design_user, String logPath, String target) throws Exception {
|
|
|
|
|
long time0 = System.currentTimeMillis();
|
|
|
|
|
String groupID = SAPUtil.getGroupID(session);
|
|
|
|
|
String[] prefs = ChintPreferenceUtil.getPreferences(ChintPreferenceUtil.CHINT_Notify, session);
|
|
|
|
@ -976,9 +972,11 @@ public class SAPUtil {
|
|
|
|
|
});
|
|
|
|
|
List<String> isSend = new ArrayList<>();
|
|
|
|
|
String object_string = "";
|
|
|
|
|
String name = "";
|
|
|
|
|
String zt2_WBSNo = "";
|
|
|
|
|
if (project != null) {
|
|
|
|
|
object_string = project.getProperty("object_string");
|
|
|
|
|
name = project.getProperty("object_name");
|
|
|
|
|
zt2_WBSNo = project.getProperty("zt2_WBSNo");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1007,8 +1005,16 @@ public class SAPUtil {
|
|
|
|
|
|
|
|
|
|
if (KUtil.isEmpty(ban)) {
|
|
|
|
|
if (map_type_users.size() == 0) {
|
|
|
|
|
mess.append(object_string).append(" 的 ").append(" 物料提前请购单已传递到SAP,请及时处理! WBS:");
|
|
|
|
|
mess.append(zt2_WBSNo).append(";设计员:").append(design_user).append("。");
|
|
|
|
|
if(groupID.equals("M060")) {//TODO
|
|
|
|
|
mess.append(zt2_WBSNo).append("-").append(name).append("的").append(target).append("BOM已成功传到SAP系统,产成品信息为:");
|
|
|
|
|
for(TCComponentItemRevision rev : revs) {
|
|
|
|
|
mess.append(rev.getProperty("object_string")).append(";");
|
|
|
|
|
}
|
|
|
|
|
mess.deleteCharAt(mess.length() - 1).append("。");
|
|
|
|
|
}else {
|
|
|
|
|
mess.append(object_string).append(" 的 ").append(" 物料提前请购单已传递到SAP,请及时处理! WBS:");
|
|
|
|
|
mess.append(zt2_WBSNo).append(";设计员:").append(design_user).append("。");
|
|
|
|
|
}
|
|
|
|
|
userIDs.append(user_else.get(0));
|
|
|
|
|
} else {
|
|
|
|
|
Map<String, String> user_message = new HashMap<String, String>();
|
|
|
|
@ -1291,7 +1297,7 @@ public class SAPUtil {
|
|
|
|
|
throws Exception {
|
|
|
|
|
double res = 0;
|
|
|
|
|
double dw = rev.getDoubleProperty("zt2_DesignWeight");
|
|
|
|
|
// TODO
|
|
|
|
|
//
|
|
|
|
|
String lylStr = KUtil.getICSProperty(material, codeMark, "材料利用率");
|
|
|
|
|
double lyl = -1;
|
|
|
|
|
System.out.println("计算组件用量:" + dw + "/" + lylStr);
|
|
|
|
@ -1315,7 +1321,7 @@ public class SAPUtil {
|
|
|
|
|
throws Exception {
|
|
|
|
|
double res = 0;
|
|
|
|
|
double dw = rev.getDoubleProperty("zt2_DesignWeight");
|
|
|
|
|
// TODO
|
|
|
|
|
//
|
|
|
|
|
String lylStr = KUtil.getICSProperty(material, codeMark, "材料利用率");
|
|
|
|
|
double lyl = -1;
|
|
|
|
|
System.out.println("计算组件用量:" + dw + "/" + lylStr);
|
|
|
|
@ -1340,7 +1346,7 @@ public class SAPUtil {
|
|
|
|
|
if (KUtil.isEmpty(zt2_MaterialNorm))
|
|
|
|
|
return String.format("%.3f", res);
|
|
|
|
|
double dw = Double.parseDouble(zt2_MaterialNorm);
|
|
|
|
|
// TODO
|
|
|
|
|
//
|
|
|
|
|
String lylStr = KUtil.getICSProperty(material, codeMark, "材料利用率");
|
|
|
|
|
double lyl = -1;
|
|
|
|
|
System.out.println("计算组件用量:" + dw + "/" + lylStr);
|
|
|
|
@ -1366,7 +1372,7 @@ public class SAPUtil {
|
|
|
|
|
|
|
|
|
|
// System.out.println("zt2_zt2_DesignWeight=["+zt2_zt2_DesignWeight+"]");
|
|
|
|
|
double dw = Double.parseDouble(zt2_zt2_DesignWeight);
|
|
|
|
|
// TODO
|
|
|
|
|
//
|
|
|
|
|
// String lylStr = "";
|
|
|
|
|
// if(codeMark.contains("DB")) {
|
|
|
|
|
//
|
|
|
|
@ -1399,7 +1405,7 @@ public class SAPUtil {
|
|
|
|
|
|
|
|
|
|
// System.out.println("zt2_zt2_DesignWeight=["+zt2_zt2_DesignWeight+"]");
|
|
|
|
|
double dw = Double.parseDouble(zt2_zt2_DesignWeight);
|
|
|
|
|
// TODO
|
|
|
|
|
//
|
|
|
|
|
String lylStr = "";
|
|
|
|
|
if(codeMark.contains("DB")) {
|
|
|
|
|
|
|
|
|
@ -1427,7 +1433,7 @@ public class SAPUtil {
|
|
|
|
|
throws Exception {
|
|
|
|
|
double res = 0;
|
|
|
|
|
double dw = Double.parseDouble(zt2_zt2_DesignWeight);
|
|
|
|
|
// TODO
|
|
|
|
|
//
|
|
|
|
|
String lylStr = KUtil.getICSProperty(material, codeMark, "材料利用率");
|
|
|
|
|
double lyl = -1;
|
|
|
|
|
System.out.println("计算组件用量:" + dw + "/" + lylStr);
|
|
|
|
@ -1641,12 +1647,12 @@ public class SAPUtil {
|
|
|
|
|
bean.setGroupID(groupId);
|
|
|
|
|
Map<String,String> codeMap = new HashMap<String,String>();
|
|
|
|
|
Map<String,String> folderMap = new HashMap<String,String>();
|
|
|
|
|
for(String pref:prefs) { //M033|Y|:9900000135|低压柜方案编码申请-固定单元|电气设计;9900000608|低压柜方案编码申请-抽屉单元|电气设计
|
|
|
|
|
for(String pref : prefs) { //M033|Y|:9900000135|低压柜方案编码申请-固定单元|电气设计;9900000608|低压柜方案编码申请-抽屉单元|电气设计
|
|
|
|
|
String[] split = pref.split(":");
|
|
|
|
|
|
|
|
|
|
String grpmes = split[0];
|
|
|
|
|
String[] split2 = grpmes.split("\\|");
|
|
|
|
|
System.out.println("groupID==>"+split2[0]+"bean"+groupId+"aaa"+split2[0]);
|
|
|
|
|
System.out.println("groupID==>" + split2[0] + "bean" + groupId + "aaa" + split2[0]);
|
|
|
|
|
if(split2[0].equals(groupId)) {
|
|
|
|
|
if(split2[1].equals("Y")) {
|
|
|
|
|
bean.setY(true);
|
|
|
|
@ -1655,10 +1661,10 @@ public class SAPUtil {
|
|
|
|
|
}
|
|
|
|
|
String codemes = split[1];
|
|
|
|
|
String[] codes = codemes.split(";");
|
|
|
|
|
System.out.println("codemes==>"+codemes);
|
|
|
|
|
for(String code:codes) {
|
|
|
|
|
System.out.println("codemes==>" + codemes);
|
|
|
|
|
for(String code : codes) {
|
|
|
|
|
String[] split3 = code.split("\\|");
|
|
|
|
|
if(split3.length==3) {
|
|
|
|
|
if(split3.length == 3) {
|
|
|
|
|
folderMap.put(split3[1], split3[2]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1712,7 +1718,7 @@ public class SAPUtil {
|
|
|
|
|
try {
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(itemR.getItem(), itemR, null, null);
|
|
|
|
|
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
@ -1774,21 +1780,21 @@ public class SAPUtil {
|
|
|
|
|
* Collections.sort(materials, new Comparator<InterfaceAIFComponent>() {
|
|
|
|
|
*
|
|
|
|
|
* @Override public int compare(InterfaceAIFComponent o1, InterfaceAIFComponent
|
|
|
|
|
* o2) { // TODO Auto-generated method stub
|
|
|
|
|
* o2) { // Auto-generated method stub
|
|
|
|
|
*
|
|
|
|
|
* try { String zt2_MaterialNo1 = o1.getProperty("zt2_MaterialNo"); String
|
|
|
|
|
* zt2_MaterialNo2 = o2.getProperty("zt2_MaterialNo");
|
|
|
|
|
* if(zt2_MaterialNo1.startsWith("3")) { return -1; }else
|
|
|
|
|
* if(zt2_MaterialNo2.startsWith("3")) { return 1; }
|
|
|
|
|
*
|
|
|
|
|
* } catch (Exception e) { // TODO Auto-generated catch block
|
|
|
|
|
* } catch (Exception e) { // Auto-generated catch block
|
|
|
|
|
* e.printStackTrace(); } return 0; }
|
|
|
|
|
*
|
|
|
|
|
* }); for(int i=0;i<size;i++) { if(KUtil.isTCM((TCComponent) materials.get(i)))
|
|
|
|
|
* { return (TCComponentItemRevision) materials.get(i); } } } else {
|
|
|
|
|
* sb.append("缺少物料编码[找不到与通用件规格相匹配的物料];"); return null; } } if(parts.size()==1) {
|
|
|
|
|
* return parts.get(0); }else { sb.append("\n图纸["+comp+"]存在一图多料"); return
|
|
|
|
|
* parts.get(0); } //return pRev; } catch (Exception e) { // TODO Auto-generated
|
|
|
|
|
* parts.get(0); } //return pRev; } catch (Exception e) { // Auto-generated
|
|
|
|
|
* catch block e.printStackTrace(); } return null; }
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
@ -1860,7 +1866,7 @@ public class SAPUtil {
|
|
|
|
|
Collections.sort(list, new Comparator<Map.Entry<Integer, List<FlowBean>>>() {
|
|
|
|
|
@Override
|
|
|
|
|
public int compare(Entry<Integer, List<FlowBean>> o1, Entry<Integer, List<FlowBean>> o2) {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
// Auto-generated method stub
|
|
|
|
|
return o2.getKey().intValue() - o1.getKey().intValue();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -2174,7 +2180,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurZYZZSAP(componentbomline, partRev, partRev.getItem(), isStruct, session, level, groupName,
|
|
|
|
@ -2425,7 +2431,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurDYZZSAP(componentbomline, partRev, partRev.getItem(), isStruct, session, groupName, now,
|
|
|
|
@ -3093,7 +3099,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurDYGGSAP(componentbomline, partRev, partRev, gy_meops, needTCM_meops, session, groupName,
|
|
|
|
@ -3248,16 +3254,17 @@ public class SAPUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 指定对象指定所有者
|
|
|
|
|
@SuppressWarnings("deprecation")
|
|
|
|
|
public static void changeOwner(TCComponent comp, TCComponentUser user) throws TCException {
|
|
|
|
|
TCComponentUser o_user = (TCComponentUser) comp.getRelatedComponent("owning_user");
|
|
|
|
|
TCComponentGroup group = (TCComponentGroup) user.getRelatedComponent("default_group");
|
|
|
|
|
if (o_user != null && o_user.equals(user)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
comp.lock();
|
|
|
|
|
// comp.lock();
|
|
|
|
|
comp.changeOwner(user, group);
|
|
|
|
|
comp.save();
|
|
|
|
|
comp.unlock();
|
|
|
|
|
// comp.unlock();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3703,9 +3710,9 @@ public class SAPUtil {
|
|
|
|
|
zt2_MaterialMark);
|
|
|
|
|
materials.put(zt2_MaterialMark, yclBean);
|
|
|
|
|
TCComponentItemType itemType = (TCComponentItemType) session.getTypeService().getTypeComponent("Item");
|
|
|
|
|
TCComponentItem item = itemType.find(materialno);
|
|
|
|
|
if(item!=null) {
|
|
|
|
|
comp = item.getLatestItemRevision();
|
|
|
|
|
TCComponentItem[] item = itemType.findItems(materialno);
|
|
|
|
|
if(item != null && item.length > 0) {
|
|
|
|
|
comp = item[0].getLatestItemRevision();
|
|
|
|
|
by_materials.put(zt2_MaterialMark,comp);
|
|
|
|
|
}else {
|
|
|
|
|
errMessage.append("tc中查询不到[ID]为[" + materialno + "]的原材料;");
|
|
|
|
@ -3741,8 +3748,8 @@ public class SAPUtil {
|
|
|
|
|
// return (TCComponentItemRevision) comp;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
} catch (TCException e) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// Auto-generated catch block
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
errMessage.append(e.getMessage());
|
|
|
|
|
}
|
|
|
|
@ -3750,7 +3757,7 @@ public class SAPUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据材料标记获得物料
|
|
|
|
|
@SuppressWarnings("deprecation")
|
|
|
|
|
// @SuppressWarnings("deprecation")
|
|
|
|
|
public static TCComponentItemRevision getClassPart(TCComponentItemRevision rev, TCSession session,
|
|
|
|
|
String codeRemark, int icsId, Map<String, TCComponentItemRevision> by_materials, StringBuffer errMessage, Map<String, YCLMaterialBean> materials) throws Exception {
|
|
|
|
|
try {
|
|
|
|
@ -3761,7 +3768,7 @@ public class SAPUtil {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
System.out.println("zt2_MaterialMark=[" + zt2_MaterialMark + "]");
|
|
|
|
|
YCLMaterialBean yclBean = null;
|
|
|
|
|
// YCLMaterialBean yclBean = null;
|
|
|
|
|
// String ycl_MatertialNo = "";
|
|
|
|
|
// if (by_materials.containsKey(zt2_MaterialMark)) {
|
|
|
|
|
// yclBean = materials.get(zt2_MaterialMark);
|
|
|
|
@ -3826,8 +3833,8 @@ public class SAPUtil {
|
|
|
|
|
return (TCComponentItemRevision) comp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (TCException e) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// Auto-generated catch block
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
errMessage.append(e.getMessage());
|
|
|
|
|
}
|
|
|
|
@ -3910,7 +3917,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurZYKGSAP(componentbomline, partRev, partRev.getItem(), session, level, groupName, now,
|
|
|
|
@ -4083,7 +4090,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurBYBJSAP(componentbomline, partRev, partRev, gy_meops, needTCM_meops, session, groupName,
|
|
|
|
@ -4403,7 +4410,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurBYZZSAP(componentbomline, partRev, partRev, gy_meops, needTCM_meops, session, groupName,
|
|
|
|
@ -4694,7 +4701,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurZYGGSAP(componentbomline, partRev, partRev, gy_meops, needTCM_meops, session, groupName,
|
|
|
|
@ -4953,7 +4960,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurZYGGSAPNoProc(componentbomline, partRev, partRev, gy_meops, needTCM_meops, session, groupName,
|
|
|
|
@ -5190,7 +5197,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurGYZZSAP(componentbomline, partRev, partRev, gy_meops, needTCM_meops, session, groupName,
|
|
|
|
@ -5348,7 +5355,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
|
|
|
|
|
win.setWindowTopLine(meop.getItem(), meop, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
@ -5412,7 +5419,7 @@ public class SAPUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
// Auto-generated catch block
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
@ -5426,7 +5433,7 @@ public class SAPUtil {
|
|
|
|
|
// try {
|
|
|
|
|
// rev = (TCComponentMEProcessRevision) session.stringToComponent(stringValue.replaceAll(groupId+":", ""));
|
|
|
|
|
// } catch (TCException e) {
|
|
|
|
|
// // TODO Auto-generated catch block
|
|
|
|
|
// // Auto-generated catch block
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
@ -5537,7 +5544,7 @@ public class SAPUtil {
|
|
|
|
|
TCComponentBOMWindowType bomWinType;
|
|
|
|
|
bomWinType = (TCComponentBOMWindowType) session.getTypeComponent("BOMWindow");
|
|
|
|
|
TCComponentBOMWindow win = bomWinType.create(null);
|
|
|
|
|
win.lock();
|
|
|
|
|
// win.lock();
|
|
|
|
|
win.setWindowTopLine(partRev.getItem(), partRev, null, null);
|
|
|
|
|
TCComponentBOMLine componentbomline = win.getTopBOMLine();
|
|
|
|
|
SAPUtil.recurGYZZSAP(componentbomline, partRev, partRev, gy_meops, needTCM_meops, session,
|
|
|
|
@ -5788,7 +5795,7 @@ public class SAPUtil {
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(100);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
// Auto-generated catch block
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
app = AIFUtility.getCurrentApplication();
|
|
|
|
|