|
|
@ -33,11 +33,50 @@ import com.teamcenter.services.rac.cad._2007_01.StructureManagement.ExpandPSData
|
|
|
|
//import plm.xi.com.chintelectric.DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM;
|
|
|
|
//import plm.xi.com.chintelectric.DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM;
|
|
|
|
|
|
|
|
|
|
|
|
public class BomUtilWh {
|
|
|
|
public class BomUtilWh {
|
|
|
|
|
|
|
|
public static final String DATABASE_TC = "database_tc";
|
|
|
|
|
|
|
|
public static final String logSql = "insert into CHINT_BOM_TO_SAP_DETIALS (code,batchnumber,plmsendstatus,plmsendstarttime,factory,productmaterialno,pitemid,puid,materialno,wbsno,plmstatus) VALUES (?,?,'PLM开始传递',SYSDATE,?,?,?,?,?,?,'未处理') ";
|
|
|
|
|
|
|
|
public static final String WLLIST = "WLLIST";
|
|
|
|
|
|
|
|
public static final String WLCONTENTS = "WLCONTENTS";
|
|
|
|
|
|
|
|
public static final String WH_FACOTRY = "M060";
|
|
|
|
|
|
|
|
public static final String PARENTTCID = "PARENTTCID";
|
|
|
|
|
|
|
|
public static final String PARENTWLBM = "PARENTWLBM";
|
|
|
|
|
|
|
|
public static final String SPLIT_MSG = "/";
|
|
|
|
|
|
|
|
public static final String UID = "UID";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 写入BOM头信息到DETAILS表
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param document 组织的XML信息 Element INTERGRATIONLIST 获取WLLIST WLCONTENTS 存放BOM
|
|
|
|
|
|
|
|
* @param code 传递的CODE序号
|
|
|
|
|
|
|
|
* @param productNos 产成品物料编码
|
|
|
|
|
|
|
|
* @function
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static void logXmlMsg(Document interGrationList, String code, String productNos, String batchNo,
|
|
|
|
|
|
|
|
String wbsNo, TCSession session) {
|
|
|
|
|
|
|
|
String strs[] = session.getPreferenceService().getStringValues(DATABASE_TC);
|
|
|
|
|
|
|
|
SqlUtil.getTCDataConnection(strs);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
Element rootElement = interGrationList.getRootElement();
|
|
|
|
|
|
|
|
// 物料信息
|
|
|
|
|
|
|
|
Element element = rootElement.element(WLLIST);
|
|
|
|
|
|
|
|
List<Element> elements = element.elements(WLCONTENTS);
|
|
|
|
|
|
|
|
for (Element content : elements) {
|
|
|
|
|
|
|
|
// 记录TCid UID 物料编码
|
|
|
|
|
|
|
|
String tcId = content.elementText(PARENTTCID);
|
|
|
|
|
|
|
|
String[] split = tcId.split(SPLIT_MSG);
|
|
|
|
|
|
|
|
String parentMantrNo = content.elementText(PARENTWLBM);
|
|
|
|
|
|
|
|
String uid = content.elementText(UID);
|
|
|
|
|
|
|
|
SqlUtil.write(logSql,
|
|
|
|
|
|
|
|
new String[] { code, batchNo, WH_FACOTRY, productNos, split[0], uid, parentMantrNo, wbsNo });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
SqlUtil.freeAll();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static ArrayList<String> lists2 = new ArrayList<String>(){{
|
|
|
|
private static ArrayList<String> lists2=new ArrayList<String>(){{add("PDF");add("MS WordX");add("MS ExcelX");add("MS Excel");add("MS Word");}};
|
|
|
|
add("PDF");
|
|
|
|
|
|
|
|
add("MS WordX");add("MS ExcelX");add("MS Excel");add("MS Word");
|
|
|
|
|
|
|
|
}};
|
|
|
|
|
|
|
|
// public static String getXML(String parameters){
|
|
|
|
// public static String getXML(String parameters){
|
|
|
|
// String soapXML = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" "
|
|
|
|
// String soapXML = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" "
|
|
|
|
// + "xmlns:web=\"http://webservice.core.intf.mes.xinhua.com/\"> "
|
|
|
|
// + "xmlns:web=\"http://webservice.core.intf.mes.xinhua.com/\"> "
|
|
|
@ -105,10 +144,12 @@ public class BomUtilWh {
|
|
|
|
ls.add(dsList2);
|
|
|
|
ls.add(dsList2);
|
|
|
|
return ls;
|
|
|
|
return ls;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取二级工序 BOPLIST BOPCONTENTS
|
|
|
|
// 获取二级工序 BOPLIST BOPCONTENTS
|
|
|
|
public static void getProcess(TCComponentMEProcessRevision rev, TCComponentItemRevision partRev,
|
|
|
|
public static void getProcess(TCComponentMEProcessRevision rev, TCComponentItemRevision partRev, TCSession session,
|
|
|
|
TCSession session, String now, String txtPath, String groupName,
|
|
|
|
String now, String txtPath, String groupName, Map<String, TCComponent> gy_meops,
|
|
|
|
Map<String, TCComponent> gy_meops, List<TCComponentMEProcessRevision> needTCM_meops,Element BOPLIST,Element SONLIST,Integer valueOf) throws Exception {
|
|
|
|
List<TCComponentMEProcessRevision> needTCM_meops, Element BOPLIST, Element SONLIST, Integer valueOf)
|
|
|
|
|
|
|
|
throws Exception {
|
|
|
|
String zt2_MaterialNo = partRev.getProperty("zt2_MaterialNo");
|
|
|
|
String zt2_MaterialNo = partRev.getProperty("zt2_MaterialNo");
|
|
|
|
|
|
|
|
|
|
|
|
if (KUtil.isTCM(rev))
|
|
|
|
if (KUtil.isTCM(rev))
|
|
|
@ -124,7 +165,8 @@ public class BomUtilWh {
|
|
|
|
TCComponentBOPWindowType bopWindowType = (TCComponentBOPWindowType) session.getTypeComponent("BOPWindow");
|
|
|
|
TCComponentBOPWindowType bopWindowType = (TCComponentBOPWindowType) session.getTypeComponent("BOPWindow");
|
|
|
|
TCComponentBOPWindow window = (TCComponentBOPWindow) bopWindowType.create(null);
|
|
|
|
TCComponentBOPWindow window = (TCComponentBOPWindow) bopWindowType.create(null);
|
|
|
|
TCComponentBOMLine topLine = window.setWindowTopLine(rev.getItem(), rev, null, null);
|
|
|
|
TCComponentBOMLine topLine = window.setWindowTopLine(rev.getItem(), rev, null, null);
|
|
|
|
String[] properties = rev.getProperties(new String[] {"item_id","item_revision_id","object_name","zt2_Source"} );
|
|
|
|
String[] properties = rev
|
|
|
|
|
|
|
|
.getProperties(new String[] { "item_id", "item_revision_id", "object_name", "zt2_Source" });
|
|
|
|
Element BOPCONTENTS = BOPLIST.addElement("BOPCONTENTS");
|
|
|
|
Element BOPCONTENTS = BOPLIST.addElement("BOPCONTENTS");
|
|
|
|
String boptcId = properties[0] + "/" + properties[1];
|
|
|
|
String boptcId = properties[0] + "/" + properties[1];
|
|
|
|
String bopName = properties[2];
|
|
|
|
String bopName = properties[2];
|
|
|
@ -154,7 +196,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -169,14 +212,15 @@ public class BomUtilWh {
|
|
|
|
|
|
|
|
|
|
|
|
Element KJJDLIST = BOPCONTENTS.addElement("KJJDLIST");
|
|
|
|
Element KJJDLIST = BOPCONTENTS.addElement("KJJDLIST");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readOneGx(expandPSDatas, partRev, now, bomLineTree, KJJDLIST, SONLIST, valueOf);
|
|
|
|
readOneGx(expandPSDatas, partRev, now, bomLineTree, KJJDLIST, SONLIST, valueOf);
|
|
|
|
|
|
|
|
|
|
|
|
window.closeBOPWindow();
|
|
|
|
window.closeBOPWindow();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public static void readOneGx(ExpandPSData[] expandPSDatas,TCComponentItemRevision partRev,
|
|
|
|
|
|
|
|
String now,Map<String, ExpandPSData[]> bomLineTree,Element KJJDLIST,Element SONLIST,Integer valueOf) throws Exception {
|
|
|
|
public static void readOneGx(ExpandPSData[] expandPSDatas, TCComponentItemRevision partRev, String now,
|
|
|
|
|
|
|
|
Map<String, ExpandPSData[]> bomLineTree, Element KJJDLIST, Element SONLIST, Integer valueOf)
|
|
|
|
|
|
|
|
throws Exception {
|
|
|
|
List<FlowBean> flowBeans = new ArrayList<>();
|
|
|
|
List<FlowBean> flowBeans = new ArrayList<>();
|
|
|
|
List<TCComponentBOMLine> startLines = SAPUtil.getFlowStarts(expandPSDatas);
|
|
|
|
List<TCComponentBOMLine> startLines = SAPUtil.getFlowStarts(expandPSDatas);
|
|
|
|
String p_uom = partRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase();
|
|
|
|
String p_uom = partRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase();
|
|
|
@ -221,11 +265,14 @@ public class BomUtilWh {
|
|
|
|
getGXInfo(bean, i, partRev, p_uom, now, bomLineTree, KJJDLIST, SONLIST, valueOf);
|
|
|
|
getGXInfo(bean, i, partRev, p_uom, now, bomLineTree, KJJDLIST, SONLIST, valueOf);
|
|
|
|
// ind = ind+1;
|
|
|
|
// ind = ind+1;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//getGXInfo(bean, i, partRev, p_uom, now,bomLineTree,KJJDLIST,SONLIST, valueOf);
|
|
|
|
// getGXInfo(bean, i, partRev, p_uom, now,bomLineTree,KJJDLIST,SONLIST,
|
|
|
|
|
|
|
|
// valueOf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void readTowGx(ExpandPSData[] expandPSDatas, TCComponentItemRevision partRev, String now,
|
|
|
|
public static void readTowGx(ExpandPSData[] expandPSDatas, TCComponentItemRevision partRev, String now,
|
|
|
|
Map<String, ExpandPSData[]> bomLineTree,Element OPLIST,Element SONLIST,Integer valueOf) throws Exception {
|
|
|
|
Map<String, ExpandPSData[]> bomLineTree, Element OPLIST, Element SONLIST, Integer valueOf)
|
|
|
|
|
|
|
|
throws Exception {
|
|
|
|
List<FlowBean> flowBeans = new ArrayList<>();
|
|
|
|
List<FlowBean> flowBeans = new ArrayList<>();
|
|
|
|
List<TCComponentBOMLine> startLines = SAPUtil.getFlowStarts(expandPSDatas);
|
|
|
|
List<TCComponentBOMLine> startLines = SAPUtil.getFlowStarts(expandPSDatas);
|
|
|
|
String p_uom = partRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase();
|
|
|
|
String p_uom = partRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase();
|
|
|
@ -275,10 +322,11 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 读取二级工序 并行工序无后续
|
|
|
|
// 读取二级工序 并行工序无后续
|
|
|
|
public static void getGXInfo2Comb(FlowBean bean, int index,
|
|
|
|
public static void getGXInfo2Comb(FlowBean bean, int index, TCComponentItemRevision partRev, String p_uom,
|
|
|
|
TCComponentItemRevision partRev, String p_uom, String now,Map<String, ExpandPSData[]> bomLineTree,
|
|
|
|
String now, Map<String, ExpandPSData[]> bomLineTree, Element OPLIST, Element SONLIST, Integer valueOf,
|
|
|
|
Element OPLIST,Element SONLIST,Integer valueOf,TCComponentBOMLine gxLine) throws Exception {
|
|
|
|
TCComponentBOMLine gxLine) throws Exception {
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEM item = new DT_PROCESSROUTE_S4_REQLISTITEMSITEM();
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEM item = new DT_PROCESSROUTE_S4_REQLISTITEMSITEM();
|
|
|
|
String plnal = "1";
|
|
|
|
String plnal = "1";
|
|
|
|
String plnfl = String.format("%06d", index);
|
|
|
|
String plnfl = String.format("%06d", index);
|
|
|
@ -333,9 +381,11 @@ public class BomUtilWh {
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
TCComponentItemRevision gxRev = gxLine.getItemRevision();
|
|
|
|
TCComponentItemRevision gxRev = gxLine.getItemRevision();
|
|
|
|
String[] properties2 = gxLine.getProperties(new String[] {"zt2_ControlCode","bl_ZT2_FirstOPRevision_zt2_ArtificialTime"
|
|
|
|
String[] properties2 = gxLine.getProperties(new String[] { "zt2_ControlCode",
|
|
|
|
,"bl_ZT2_FirstOPRevision_zt2_MachineTime","bl_ZT2_FirstOPRevision_zt2_ReadinessTime","bl_ZT2_FirstOPRevision_zt2_ProCycle"});
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_ArtificialTime", "bl_ZT2_FirstOPRevision_zt2_MachineTime",
|
|
|
|
String[] properties = gxRev.getProperties(new String[] {"item_id","item_revision_id","zt2_WorkCenter","object_name","zt2_ClassificationCode"});
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_ReadinessTime", "bl_ZT2_FirstOPRevision_zt2_ProCycle" });
|
|
|
|
|
|
|
|
String[] properties = gxRev.getProperties(new String[] { "item_id", "item_revision_id", "zt2_WorkCenter",
|
|
|
|
|
|
|
|
"object_name", "zt2_ClassificationCode" });
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM sub = new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM();
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM sub = new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM();
|
|
|
|
// subItems.add(sub);
|
|
|
|
// subItems.add(sub);
|
|
|
|
String kjjdId = properties[0] + "/" + properties[1];
|
|
|
|
String kjjdId = properties[0] + "/" + properties[1];
|
|
|
@ -385,14 +435,15 @@ public class BomUtilWh {
|
|
|
|
if (remark.equals("ZT2_FuLiao") || remark.equals("辅料")) {
|
|
|
|
if (remark.equals("ZT2_FuLiao") || remark.equals("辅料")) {
|
|
|
|
type = "2";
|
|
|
|
type = "2";
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
String[] properties3 = itemRevOfBOMLine.getProperties(new String[] {"item_id","item_revision_id",
|
|
|
|
String[] properties3 = itemRevOfBOMLine.getProperties(
|
|
|
|
"zt2_MaterialNo","zt2_Quantity"});
|
|
|
|
new String[] { "item_id", "item_revision_id", "zt2_MaterialNo", "zt2_Quantity" });
|
|
|
|
SONCONTENTS.addElement("TCID").setText(properties3[0] + "/" + properties3[1]);
|
|
|
|
SONCONTENTS.addElement("TCID").setText(properties3[0] + "/" + properties3[1]);
|
|
|
|
SONCONTENTS.addElement("WLBM").setText(properties3[2]);
|
|
|
|
SONCONTENTS.addElement("WLBM").setText(properties3[2]);
|
|
|
|
SONCONTENTS.addElement("DATUV").setText(now);
|
|
|
|
SONCONTENTS.addElement("DATUV").setText(now);
|
|
|
|
String zysapmenge = getZYSAPMENGE(itemRevOfBOMLine, null, bomLine, false, "1", new StringBuffer());
|
|
|
|
String zysapmenge = getZYSAPMENGE(itemRevOfBOMLine, null, bomLine, false, "1", new StringBuffer());
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUIT").setText(itemRevOfBOMLine.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(itemRevOfBOMLine.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("SORTF");
|
|
|
|
SONCONTENTS.addElement("SORTF");
|
|
|
|
valueOf = valueOf + 10;
|
|
|
|
valueOf = valueOf + 10;
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(valueOf.toString());
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(valueOf.toString());
|
|
|
@ -416,7 +467,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -449,7 +501,8 @@ public class BomUtilWh {
|
|
|
|
fileType = "xlsx";
|
|
|
|
fileType = "xlsx";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String fileUid = dataset.getUid();
|
|
|
|
String fileUid = dataset.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -461,7 +514,6 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Element OPGXZYZDSFILELIST = OPCONTENTS.addElement("OPGXZYZDSFILELIST");
|
|
|
|
Element OPGXZYZDSFILELIST = OPCONTENTS.addElement("OPGXZYZDSFILELIST");
|
|
|
|
TCComponentItem procGuidBook = (TCComponentItem) gxRev.getRelatedComponent("ZT2_ProcGuidBookRelation");
|
|
|
|
TCComponentItem procGuidBook = (TCComponentItem) gxRev.getRelatedComponent("ZT2_ProcGuidBookRelation");
|
|
|
|
System.out.println("gxRev===========>" + gxRev + "procGuidBook======>" + procGuidBook);
|
|
|
|
System.out.println("gxRev===========>" + gxRev + "procGuidBook======>" + procGuidBook);
|
|
|
@ -488,7 +540,8 @@ public class BomUtilWh {
|
|
|
|
fileType = "xlsx";
|
|
|
|
fileType = "xlsx";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String fileUid = dataset.getUid();
|
|
|
|
String fileUid = dataset.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -511,13 +564,15 @@ public class BomUtilWh {
|
|
|
|
// item.setSUBITEMS(subItems.toArray(new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM[] {}));
|
|
|
|
// item.setSUBITEMS(subItems.toArray(new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM[] {}));
|
|
|
|
// return item;
|
|
|
|
// return item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 读取质量检验项
|
|
|
|
// 读取质量检验项
|
|
|
|
public static void getZljyxInfo2(Element OPCHECKCONTENTS, TCComponentItemRevision gxRev) {
|
|
|
|
public static void getZljyxInfo2(Element OPCHECKCONTENTS, TCComponentItemRevision gxRev) {
|
|
|
|
// 质量检验项关系文件夹
|
|
|
|
// 质量检验项关系文件夹
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
TCComponent[] quantityChecks = gxRev.getRelatedComponents("ZT2_QualityCheckRelation");
|
|
|
|
TCComponent[] quantityChecks = gxRev.getRelatedComponents("ZT2_QualityCheckRelation");
|
|
|
|
if (quantityChecks.length > 0) {
|
|
|
|
if (quantityChecks.length > 0) {
|
|
|
|
String[] properties3 = gxRev.getProperties(new String[] {"item_id","item_revision_id","object_name"});
|
|
|
|
String[] properties3 = gxRev
|
|
|
|
|
|
|
|
.getProperties(new String[] { "item_id", "item_revision_id", "object_name" });
|
|
|
|
OPCHECKCONTENTS.addElement("PARENTTCID").setText(properties3[0] + "/" + properties3[1]);
|
|
|
|
OPCHECKCONTENTS.addElement("PARENTTCID").setText(properties3[0] + "/" + properties3[1]);
|
|
|
|
OPCHECKCONTENTS.addElement("PARENTNAME").setText(properties3[2]);
|
|
|
|
OPCHECKCONTENTS.addElement("PARENTNAME").setText(properties3[2]);
|
|
|
|
OPCHECKCONTENTS.addElement("OTHER1").setText("OTHER1");
|
|
|
|
OPCHECKCONTENTS.addElement("OTHER1").setText("OTHER1");
|
|
|
@ -529,10 +584,10 @@ public class BomUtilWh {
|
|
|
|
List<QCheckBean> beans = new ArrayList<QCheckBean>();
|
|
|
|
List<QCheckBean> beans = new ArrayList<QCheckBean>();
|
|
|
|
for (TCComponent zt2_QCheck : zt2_QChecks) {
|
|
|
|
for (TCComponent zt2_QCheck : zt2_QChecks) {
|
|
|
|
// 质量检验项信息
|
|
|
|
// 质量检验项信息
|
|
|
|
String[] properties = zt2_QCheck.getProperties(new String[] {"zt2_code","zt2_jjxbh","zt2_jyxmc","zt2_jyxsjjg"
|
|
|
|
String[] properties = zt2_QCheck.getProperties(new String[] { "zt2_code", "zt2_jjxbh", "zt2_jyxmc",
|
|
|
|
,"zt2_bzgcsxbh","zt2_bzgcsx","zt2_bzgcxxbh","zt2_bzgczxx"});
|
|
|
|
"zt2_jyxsjjg", "zt2_bzgcsxbh", "zt2_bzgcsx", "zt2_bzgcxxbh", "zt2_bzgczxx" });
|
|
|
|
beans.add(new QCheckBean(properties[0],properties[1],
|
|
|
|
beans.add(new QCheckBean(properties[0], properties[1], properties[2], properties[3], properties[4],
|
|
|
|
properties[2],properties[3],properties[4],properties[5],properties[6],properties[7]));
|
|
|
|
properties[5], properties[6], properties[7]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Collections.sort(beans, new Comparator<QCheckBean>() {
|
|
|
|
Collections.sort(beans, new Comparator<QCheckBean>() {
|
|
|
|
|
|
|
|
|
|
|
@ -560,10 +615,11 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 读取二级工序
|
|
|
|
// 读取二级工序
|
|
|
|
public static void getGXInfo2(FlowBean bean, int index,
|
|
|
|
public static void getGXInfo2(FlowBean bean, int index, TCComponentItemRevision partRev, String p_uom, String now,
|
|
|
|
TCComponentItemRevision partRev, String p_uom, String now,Map<String, ExpandPSData[]> bomLineTree,
|
|
|
|
Map<String, ExpandPSData[]> bomLineTree, Element OPLIST, Element SONLIST, Integer valueOf)
|
|
|
|
Element OPLIST,Element SONLIST,Integer valueOf) throws Exception {
|
|
|
|
throws Exception {
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEM item = new DT_PROCESSROUTE_S4_REQLISTITEMSITEM();
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEM item = new DT_PROCESSROUTE_S4_REQLISTITEMSITEM();
|
|
|
|
String plnal = "1";
|
|
|
|
String plnal = "1";
|
|
|
|
String plnfl = String.format("%06d", index);
|
|
|
|
String plnfl = String.format("%06d", index);
|
|
|
@ -618,9 +674,11 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TCComponentItemRevision gxRev = gxLine.getItemRevision();
|
|
|
|
TCComponentItemRevision gxRev = gxLine.getItemRevision();
|
|
|
|
String[] properties2 = gxLine.getProperties(new String[] {"zt2_ControlCode","bl_ZT2_FirstOPRevision_zt2_ArtificialTime"
|
|
|
|
String[] properties2 = gxLine.getProperties(new String[] { "zt2_ControlCode",
|
|
|
|
,"bl_ZT2_FirstOPRevision_zt2_MachineTime","bl_ZT2_FirstOPRevision_zt2_ReadinessTime","bl_ZT2_FirstOPRevision_zt2_ProCycle"});
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_ArtificialTime", "bl_ZT2_FirstOPRevision_zt2_MachineTime",
|
|
|
|
String[] properties = gxRev.getProperties(new String[] {"item_id","item_revision_id","zt2_WorkCenter","object_name","zt2_ClassificationCode"});
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_ReadinessTime", "bl_ZT2_FirstOPRevision_zt2_ProCycle" });
|
|
|
|
|
|
|
|
String[] properties = gxRev.getProperties(new String[] { "item_id", "item_revision_id", "zt2_WorkCenter",
|
|
|
|
|
|
|
|
"object_name", "zt2_ClassificationCode" });
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM sub = new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM();
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM sub = new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM();
|
|
|
|
// subItems.add(sub);
|
|
|
|
// subItems.add(sub);
|
|
|
|
String kjjdId = properties[0] + "/" + properties[1];
|
|
|
|
String kjjdId = properties[0] + "/" + properties[1];
|
|
|
@ -670,14 +728,15 @@ public class BomUtilWh {
|
|
|
|
if (remark.equals("ZT2_FuLiao") || remark.equals("辅料")) {
|
|
|
|
if (remark.equals("ZT2_FuLiao") || remark.equals("辅料")) {
|
|
|
|
type = "2";
|
|
|
|
type = "2";
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
String[] properties3 = itemRevOfBOMLine.getProperties(new String[] {"item_id","item_revision_id",
|
|
|
|
String[] properties3 = itemRevOfBOMLine.getProperties(
|
|
|
|
"zt2_MaterialNo","zt2_Quantity"});
|
|
|
|
new String[] { "item_id", "item_revision_id", "zt2_MaterialNo", "zt2_Quantity" });
|
|
|
|
SONCONTENTS.addElement("TCID").setText(properties3[0] + "/" + properties3[1]);
|
|
|
|
SONCONTENTS.addElement("TCID").setText(properties3[0] + "/" + properties3[1]);
|
|
|
|
SONCONTENTS.addElement("WLBM").setText(properties3[2]);
|
|
|
|
SONCONTENTS.addElement("WLBM").setText(properties3[2]);
|
|
|
|
SONCONTENTS.addElement("DATUV").setText(now);
|
|
|
|
SONCONTENTS.addElement("DATUV").setText(now);
|
|
|
|
String zysapmenge = getZYSAPMENGE(itemRevOfBOMLine, null, bomLine, false, "1", new StringBuffer());
|
|
|
|
String zysapmenge = getZYSAPMENGE(itemRevOfBOMLine, null, bomLine, false, "1", new StringBuffer());
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUIT").setText(itemRevOfBOMLine.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("QUIT").setText(
|
|
|
|
|
|
|
|
itemRevOfBOMLine.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("SORTF");
|
|
|
|
SONCONTENTS.addElement("SORTF");
|
|
|
|
valueOf = valueOf + 10;
|
|
|
|
valueOf = valueOf + 10;
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(valueOf.toString());
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(valueOf.toString());
|
|
|
@ -701,7 +760,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -734,7 +794,8 @@ public class BomUtilWh {
|
|
|
|
fileType = "xlsx";
|
|
|
|
fileType = "xlsx";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String fileUid = dataset.getUid();
|
|
|
|
String fileUid = dataset.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -746,7 +807,6 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Element OPGXZYZDSFILELIST = OPCONTENTS.addElement("OPGXZYZDSFILELIST");
|
|
|
|
Element OPGXZYZDSFILELIST = OPCONTENTS.addElement("OPGXZYZDSFILELIST");
|
|
|
|
TCComponentItem procGuidBook = (TCComponentItem) gxRev.getRelatedComponent("ZT2_ProcGuidBookRelation");
|
|
|
|
TCComponentItem procGuidBook = (TCComponentItem) gxRev.getRelatedComponent("ZT2_ProcGuidBookRelation");
|
|
|
|
System.out.println("gxRev===========>" + gxRev + "procGuidBook======>" + procGuidBook);
|
|
|
|
System.out.println("gxRev===========>" + gxRev + "procGuidBook======>" + procGuidBook);
|
|
|
@ -773,7 +833,8 @@ public class BomUtilWh {
|
|
|
|
fileType = "xlsx";
|
|
|
|
fileType = "xlsx";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String fileUid = dataset.getUid();
|
|
|
|
String fileUid = dataset.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -796,10 +857,11 @@ public class BomUtilWh {
|
|
|
|
// item.setSUBITEMS(subItems.toArray(new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM[] {}));
|
|
|
|
// item.setSUBITEMS(subItems.toArray(new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM[] {}));
|
|
|
|
// return item;
|
|
|
|
// return item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 读取一级工序
|
|
|
|
// 读取一级工序
|
|
|
|
public static void getGXInfoComb(FlowBean bean, int index,
|
|
|
|
public static void getGXInfoComb(FlowBean bean, int index, TCComponentItemRevision partRev, String p_uom,
|
|
|
|
TCComponentItemRevision partRev, String p_uom, String now,Map<String, ExpandPSData[]> bomLineTree,
|
|
|
|
String now, Map<String, ExpandPSData[]> bomLineTree, Element KJJDLIST, Element SONLIST, Integer valueOf,
|
|
|
|
Element KJJDLIST,Element SONLIST,Integer valueOf,TCComponentBOMLine gxLine) throws Exception {
|
|
|
|
TCComponentBOMLine gxLine) throws Exception {
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEM item = new DT_PROCESSROUTE_S4_REQLISTITEMSITEM();
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEM item = new DT_PROCESSROUTE_S4_REQLISTITEMSITEM();
|
|
|
|
String plnal = "1";
|
|
|
|
String plnal = "1";
|
|
|
|
String plnfl = String.format("%06d", index);
|
|
|
|
String plnfl = String.format("%06d", index);
|
|
|
@ -841,9 +903,11 @@ public class BomUtilWh {
|
|
|
|
boolean inBx = bean.flow_split == null;
|
|
|
|
boolean inBx = bean.flow_split == null;
|
|
|
|
|
|
|
|
|
|
|
|
TCComponentItemRevision gxRev = gxLine.getItemRevision();
|
|
|
|
TCComponentItemRevision gxRev = gxLine.getItemRevision();
|
|
|
|
String[] properties2 = gxLine.getProperties(new String[] {"zt2_ControlCode","bl_ZT2_FirstOPRevision_zt2_ArtificialTime",
|
|
|
|
String[] properties2 = gxLine.getProperties(new String[] { "zt2_ControlCode",
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_MachineTime","bl_ZT2_FirstOPRevision_zt2_ReadinessTime","bl_ZT2_FirstOPRevision_zt2_ProCycle"});
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_ArtificialTime", "bl_ZT2_FirstOPRevision_zt2_MachineTime",
|
|
|
|
String[] properties = gxRev.getProperties(new String[] {"item_id","item_revision_id","zt2_WorkCenter","object_name","zt2_ClassificationCode"});
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_ReadinessTime", "bl_ZT2_FirstOPRevision_zt2_ProCycle" });
|
|
|
|
|
|
|
|
String[] properties = gxRev.getProperties(new String[] { "item_id", "item_revision_id", "zt2_WorkCenter",
|
|
|
|
|
|
|
|
"object_name", "zt2_ClassificationCode" });
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM sub = new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM();
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM sub = new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM();
|
|
|
|
// subItems.add(sub);
|
|
|
|
// subItems.add(sub);
|
|
|
|
String kjjdId = properties[0] + "/" + properties[1];
|
|
|
|
String kjjdId = properties[0] + "/" + properties[1];
|
|
|
@ -886,7 +950,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -900,10 +965,11 @@ public class BomUtilWh {
|
|
|
|
readTowGx(bomLineTree.get(gxLine.getUid()), gxRev, now, bomLineTree, OPLIST, SONLIST, valueOf);
|
|
|
|
readTowGx(bomLineTree.get(gxLine.getUid()), gxRev, now, bomLineTree, OPLIST, SONLIST, valueOf);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 读取一级工序
|
|
|
|
// 读取一级工序
|
|
|
|
public static void getGXInfo(FlowBean bean, int index,
|
|
|
|
public static void getGXInfo(FlowBean bean, int index, TCComponentItemRevision partRev, String p_uom, String now,
|
|
|
|
TCComponentItemRevision partRev, String p_uom, String now,Map<String, ExpandPSData[]> bomLineTree,
|
|
|
|
Map<String, ExpandPSData[]> bomLineTree, Element KJJDLIST, Element SONLIST, Integer valueOf)
|
|
|
|
Element KJJDLIST,Element SONLIST,Integer valueOf) throws Exception {
|
|
|
|
throws Exception {
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEM item = new DT_PROCESSROUTE_S4_REQLISTITEMSITEM();
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEM item = new DT_PROCESSROUTE_S4_REQLISTITEMSITEM();
|
|
|
|
String plnal = "1";
|
|
|
|
String plnal = "1";
|
|
|
|
String plnfl = String.format("%06d", index);
|
|
|
|
String plnfl = String.format("%06d", index);
|
|
|
@ -958,9 +1024,11 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TCComponentItemRevision gxRev = gxLine.getItemRevision();
|
|
|
|
TCComponentItemRevision gxRev = gxLine.getItemRevision();
|
|
|
|
String[] properties2 = gxLine.getProperties(new String[] {"zt2_ControlCode","bl_ZT2_FirstOPRevision_zt2_ArtificialTime",
|
|
|
|
String[] properties2 = gxLine.getProperties(new String[] { "zt2_ControlCode",
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_MachineTime","bl_ZT2_FirstOPRevision_zt2_ReadinessTime","bl_ZT2_FirstOPRevision_zt2_ProCycle"});
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_ArtificialTime", "bl_ZT2_FirstOPRevision_zt2_MachineTime",
|
|
|
|
String[] properties = gxRev.getProperties(new String[] {"item_id","item_revision_id","zt2_WorkCenter","object_name","zt2_ClassificationCode"});
|
|
|
|
"bl_ZT2_FirstOPRevision_zt2_ReadinessTime", "bl_ZT2_FirstOPRevision_zt2_ProCycle" });
|
|
|
|
|
|
|
|
String[] properties = gxRev.getProperties(new String[] { "item_id", "item_revision_id", "zt2_WorkCenter",
|
|
|
|
|
|
|
|
"object_name", "zt2_ClassificationCode" });
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM sub = new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM();
|
|
|
|
// DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM sub = new DT_PROCESSROUTE_S4_REQLISTITEMSITEMSUBITEMSSUBITEM();
|
|
|
|
// subItems.add(sub);
|
|
|
|
// subItems.add(sub);
|
|
|
|
String kjjdId = properties[0] + "/" + properties[1];
|
|
|
|
String kjjdId = properties[0] + "/" + properties[1];
|
|
|
@ -1003,7 +1071,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILENAME").setText(fileName);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
|
FILECONTENTS.addElement("FILETYPE").setText(fileType);
|
|
|
@ -1017,6 +1086,7 @@ public class BomUtilWh {
|
|
|
|
readTowGx(bomLineTree.get(gxLine.getUid()), gxRev, now, bomLineTree, OPLIST, SONLIST, valueOf);
|
|
|
|
readTowGx(bomLineTree.get(gxLine.getUid()), gxRev, now, bomLineTree, OPLIST, SONLIST, valueOf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void readGXFlow(TCComponentBOMLine gxLine, List<FlowBean> flowBeans, FlowBean currentFlow,
|
|
|
|
public static void readGXFlow(TCComponentBOMLine gxLine, List<FlowBean> flowBeans, FlowBean currentFlow,
|
|
|
|
boolean isMainFlow) throws Exception {
|
|
|
|
boolean isMainFlow) throws Exception {
|
|
|
|
TCComponent[] suc = gxLine.getReferenceListProperty("Mfg0successors");
|
|
|
|
TCComponent[] suc = gxLine.getReferenceListProperty("Mfg0successors");
|
|
|
@ -1046,6 +1116,7 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
readGXFlow((TCComponentBOMLine) suc[0], flowBeans, currentFlow, false);
|
|
|
|
readGXFlow((TCComponentBOMLine) suc[0], flowBeans, currentFlow, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// WBSList
|
|
|
|
// WBSList
|
|
|
|
public static void getWbsMsg2(TCComponentItemRevision pRev, String groupId, List<String> wbsList, Element WBSLIST) {
|
|
|
|
public static void getWbsMsg2(TCComponentItemRevision pRev, String groupId, List<String> wbsList, Element WBSLIST) {
|
|
|
|
|
|
|
|
|
|
|
@ -1072,6 +1143,7 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// WBSList
|
|
|
|
// WBSList
|
|
|
|
public static void getWbsMsg(TCComponentItemRevision pRev, String groupId, List<String> wbsList, Element WBSLIST) {
|
|
|
|
public static void getWbsMsg(TCComponentItemRevision pRev, String groupId, List<String> wbsList, Element WBSLIST) {
|
|
|
|
|
|
|
|
|
|
|
@ -1098,11 +1170,13 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 遍历产成品BOM 单层 没有BOM 和 文件跳过
|
|
|
|
// 遍历产成品BOM 单层 没有BOM 和 文件跳过
|
|
|
|
public static void expandAllBomPartBj(Map<String, ExpandPSData[]> expands, TCComponentBOMLine pBomLine,
|
|
|
|
public static void expandAllBomPartBj(Map<String, ExpandPSData[]> expands, TCComponentBOMLine pBomLine,
|
|
|
|
TCComponentItemRevision pRev,String groupName,List<String> wbsList,TCSession session,String now
|
|
|
|
TCComponentItemRevision pRev, String groupName, List<String> wbsList, TCSession session, String now,
|
|
|
|
,List<TCComponentMEProcessRevision> needTCM_meops,Map<String, TCComponent> gy_meops,
|
|
|
|
List<TCComponentMEProcessRevision> needTCM_meops, Map<String, TCComponent> gy_meops,
|
|
|
|
Element INTERGRATIONLIST,StringBuffer errMessage,List<TCComponentItem> cppRevision,String txtPath,Map<String, TCComponentItemRevision> material_revs) {
|
|
|
|
Element INTERGRATIONLIST, StringBuffer errMessage, List<TCComponentItem> cppRevision, String txtPath,
|
|
|
|
|
|
|
|
Map<String, TCComponentItemRevision> material_revs) {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String uid = pBomLine.getUid();
|
|
|
|
String uid = pBomLine.getUid();
|
|
|
@ -1133,7 +1207,8 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Element WLCONTENTS = WLLIST.addElement("WLCONTENTS"); // 文件信息
|
|
|
|
Element WLCONTENTS = WLLIST.addElement("WLCONTENTS"); // 文件信息
|
|
|
|
Element TCID = WLCONTENTS.addElement("TCID");
|
|
|
|
Element TCID = WLCONTENTS.addElement("TCID");
|
|
|
|
String[] properties = pRev.getProperties(new String[] {"item_id","item_revision_id","zt2_MaterialNo","zt2_Quantity","zt2_State"});
|
|
|
|
String[] properties = pRev.getProperties(
|
|
|
|
|
|
|
|
new String[] { "item_id", "item_revision_id", "zt2_MaterialNo", "zt2_Quantity", "zt2_State" });
|
|
|
|
|
|
|
|
|
|
|
|
TCID.setText(properties[0] + "/" + properties[1]);
|
|
|
|
TCID.setText(properties[0] + "/" + properties[1]);
|
|
|
|
|
|
|
|
|
|
|
@ -1152,7 +1227,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
@ -1173,7 +1249,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
@ -1195,10 +1272,11 @@ public class BomUtilWh {
|
|
|
|
BOMCONTENTS.addElement("STLAN").setText("1");
|
|
|
|
BOMCONTENTS.addElement("STLAN").setText("1");
|
|
|
|
BOMCONTENTS.addElement("STLAL").setText("1"); // <QUANTITY>基本数量</QUANTITY>
|
|
|
|
BOMCONTENTS.addElement("STLAL").setText("1"); // <QUANTITY>基本数量</QUANTITY>
|
|
|
|
BOMCONTENTS.addElement("QUANTITY").setText(properties[3]);
|
|
|
|
BOMCONTENTS.addElement("QUANTITY").setText(properties[3]);
|
|
|
|
BOMCONTENTS.addElement("QUIT").setText(pRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
BOMCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(pRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
Element SONLIST = BOMCONTENTS.addElement("SONLIST");
|
|
|
|
Element SONLIST = BOMCONTENTS.addElement("SONLIST");
|
|
|
|
// 获取工艺信息 BOPLIST BOPCONTENTS ()二级工序下的辅料放到子件
|
|
|
|
// 获取工艺信息 BOPLIST BOPCONTENTS ()二级工序下的辅料放到子件
|
|
|
|
String maxSeq = "";
|
|
|
|
String maxSeq = "10";
|
|
|
|
System.out.println("=========getProcess over========" + pRev);
|
|
|
|
System.out.println("=========getProcess over========" + pRev);
|
|
|
|
for (int i = 0; i < expandPSDatas.length; i++) {
|
|
|
|
for (int i = 0; i < expandPSDatas.length; i++) {
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
@ -1215,7 +1293,8 @@ public class BomUtilWh {
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
|
|
|
|
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUIT").setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
@ -1230,8 +1309,8 @@ public class BomUtilWh {
|
|
|
|
if (!KUtil.isEmpty(properties2[2])) {
|
|
|
|
if (!KUtil.isEmpty(properties2[2])) {
|
|
|
|
material_revs.put(properties2[2], rev2);
|
|
|
|
material_revs.put(properties2[2], rev2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
expandAllBomPart(expands,line2,rev2,groupName,wbsList,
|
|
|
|
expandAllBomPart(expands, line2, rev2, groupName, wbsList, session, now, needTCM_meops, gy_meops,
|
|
|
|
session,now,needTCM_meops,gy_meops,INTERGRATIONLIST,errMessage, txtPath,material_revs);
|
|
|
|
INTERGRATIONLIST, errMessage, txtPath, material_revs);
|
|
|
|
|
|
|
|
|
|
|
|
// if (!KUtil.isEmpty(zt2_materialNo)) {
|
|
|
|
// if (!KUtil.isEmpty(zt2_materialNo)) {
|
|
|
|
// material_revs.put(zt2_materialNo, part2Rev);
|
|
|
|
// material_revs.put(zt2_materialNo, part2Rev);
|
|
|
@ -1242,8 +1321,8 @@ public class BomUtilWh {
|
|
|
|
Integer valueOf = Integer.valueOf(maxSeq);
|
|
|
|
Integer valueOf = Integer.valueOf(maxSeq);
|
|
|
|
if (pRev != null && meops.length > 0) {
|
|
|
|
if (pRev != null && meops.length > 0) {
|
|
|
|
TXTUtil.writeTXT(txtPath, "物料[" + pRev + "]工艺信息:" + meops[0].getComponent());
|
|
|
|
TXTUtil.writeTXT(txtPath, "物料[" + pRev + "]工艺信息:" + meops[0].getComponent());
|
|
|
|
getProcess((TCComponentMEProcessRevision) meops[0].getComponent(), pRev, session, now,
|
|
|
|
getProcess((TCComponentMEProcessRevision) meops[0].getComponent(), pRev, session, now, "",
|
|
|
|
"", groupName, gy_meops, needTCM_meops,BOPLIST,SONLIST,valueOf);
|
|
|
|
groupName, gy_meops, needTCM_meops, BOPLIST, SONLIST, valueOf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1253,12 +1332,12 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 遍历产成品BOM 单层 没有BOM 和 文件跳过
|
|
|
|
// 遍历产成品BOM 单层 没有BOM 和 文件跳过
|
|
|
|
public static void expandAllBomPartBjOne(Map<String, ExpandPSData[]> expands, TCComponentBOMLine pBomLine,
|
|
|
|
public static void expandAllBomPartBjOne(Map<String, ExpandPSData[]> expands, TCComponentBOMLine pBomLine,
|
|
|
|
TCComponentItemRevision pRev,String groupName,List<String> wbsList,TCSession session,String now
|
|
|
|
TCComponentItemRevision pRev, String groupName, List<String> wbsList, TCSession session, String now,
|
|
|
|
,List<TCComponentMEProcessRevision> needTCM_meops,Map<String, TCComponent> gy_meops,
|
|
|
|
List<TCComponentMEProcessRevision> needTCM_meops, Map<String, TCComponent> gy_meops,
|
|
|
|
Element INTERGRATIONLIST,StringBuffer errMessage,List<TCComponentItem> cppRevision,String txtPath,Map<String, TCComponentItemRevision> material_revs) {
|
|
|
|
Element INTERGRATIONLIST, StringBuffer errMessage, List<TCComponentItem> cppRevision, String txtPath,
|
|
|
|
|
|
|
|
Map<String, TCComponentItemRevision> material_revs) {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String uid = pBomLine.getUid();
|
|
|
|
String uid = pBomLine.getUid();
|
|
|
@ -1289,7 +1368,8 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Element WLCONTENTS = WLLIST.addElement("WLCONTENTS"); // 文件信息
|
|
|
|
Element WLCONTENTS = WLLIST.addElement("WLCONTENTS"); // 文件信息
|
|
|
|
Element TCID = WLCONTENTS.addElement("TCID");
|
|
|
|
Element TCID = WLCONTENTS.addElement("TCID");
|
|
|
|
String[] properties = pRev.getProperties(new String[] {"item_id","item_revision_id","zt2_MaterialNo","zt2_Quantity","zt2_State"});
|
|
|
|
String[] properties = pRev.getProperties(
|
|
|
|
|
|
|
|
new String[] { "item_id", "item_revision_id", "zt2_MaterialNo", "zt2_Quantity", "zt2_State" });
|
|
|
|
|
|
|
|
|
|
|
|
TCID.setText(properties[0] + "/" + properties[1]);
|
|
|
|
TCID.setText(properties[0] + "/" + properties[1]);
|
|
|
|
|
|
|
|
|
|
|
@ -1308,7 +1388,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
@ -1329,7 +1410,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
@ -1351,10 +1433,11 @@ public class BomUtilWh {
|
|
|
|
BOMCONTENTS.addElement("STLAN").setText("1");
|
|
|
|
BOMCONTENTS.addElement("STLAN").setText("1");
|
|
|
|
BOMCONTENTS.addElement("STLAL").setText("1"); // <QUANTITY>基本数量</QUANTITY>
|
|
|
|
BOMCONTENTS.addElement("STLAL").setText("1"); // <QUANTITY>基本数量</QUANTITY>
|
|
|
|
BOMCONTENTS.addElement("QUANTITY").setText(properties[3]);
|
|
|
|
BOMCONTENTS.addElement("QUANTITY").setText(properties[3]);
|
|
|
|
BOMCONTENTS.addElement("QUIT").setText(pRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
BOMCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(pRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
Element SONLIST = BOMCONTENTS.addElement("SONLIST");
|
|
|
|
Element SONLIST = BOMCONTENTS.addElement("SONLIST");
|
|
|
|
// 获取工艺信息 BOPLIST BOPCONTENTS ()二级工序下的辅料放到子件
|
|
|
|
// 获取工艺信息 BOPLIST BOPCONTENTS ()二级工序下的辅料放到子件
|
|
|
|
String maxSeq = "";
|
|
|
|
String maxSeq = "10";
|
|
|
|
System.out.println("=========getProcess over========" + pRev);
|
|
|
|
System.out.println("=========getProcess over========" + pRev);
|
|
|
|
for (int i = 0; i < expandPSDatas.length; i++) {
|
|
|
|
for (int i = 0; i < expandPSDatas.length; i++) {
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
@ -1371,7 +1454,8 @@ public class BomUtilWh {
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
|
|
|
|
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUIT").setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
@ -1390,8 +1474,8 @@ public class BomUtilWh {
|
|
|
|
Integer valueOf = Integer.valueOf(maxSeq);
|
|
|
|
Integer valueOf = Integer.valueOf(maxSeq);
|
|
|
|
if (pRev != null && meops.length > 0) {
|
|
|
|
if (pRev != null && meops.length > 0) {
|
|
|
|
TXTUtil.writeTXT(txtPath, "物料[" + pRev + "]工艺信息:" + meops[0].getComponent());
|
|
|
|
TXTUtil.writeTXT(txtPath, "物料[" + pRev + "]工艺信息:" + meops[0].getComponent());
|
|
|
|
getProcess((TCComponentMEProcessRevision) meops[0].getComponent(), pRev, session, now,
|
|
|
|
getProcess((TCComponentMEProcessRevision) meops[0].getComponent(), pRev, session, now, "",
|
|
|
|
"", groupName, gy_meops, needTCM_meops,BOPLIST,SONLIST,valueOf);
|
|
|
|
groupName, gy_meops, needTCM_meops, BOPLIST, SONLIST, valueOf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1403,14 +1487,14 @@ public class BomUtilWh {
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean checkMatnr(StringBuffer errMessage, TCComponentItemRevision matnrRev) throws TCException {
|
|
|
|
public static boolean checkMatnr(StringBuffer errMessage, TCComponentItemRevision matnrRev) throws TCException {
|
|
|
|
|
|
|
|
|
|
|
|
TCProperty[] tcProperties = matnrRev.getTCProperties(new String[] {"zt2_SZFactory","zt2_SZProcuretype","zt2_SZSealedornot"});
|
|
|
|
TCProperty[] tcProperties = matnrRev
|
|
|
|
|
|
|
|
.getTCProperties(new String[] { "zt2_SZFactory", "zt2_SZProcuretype", "zt2_SZSealedornot" });
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String[] properties = matnrRev.getProperties(new String[] { "item_id", "zt2_State", "object_name" });
|
|
|
|
String[] properties = matnrRev.getProperties(new String[] { "item_id", "zt2_State", "object_name" });
|
|
|
|
String zt2_State = properties[1];// matnrRev.getStringProperty("zt2_State");
|
|
|
|
String zt2_State = properties[1];// matnrRev.getStringProperty("zt2_State");
|
|
|
|
// System.out.println("properties[4]===>"+zt2_State);
|
|
|
|
// System.out.println("properties[4]===>"+zt2_State);
|
|
|
|
if (zt2_State.equals("封存") || zt2_State.equals("D1")) {
|
|
|
|
if (zt2_State.equals("封存") || zt2_State.equals("D1")) {
|
|
|
|
errMessage.append("物料:").append(properties[0]).append("/")
|
|
|
|
errMessage.append("物料:").append(properties[0]).append("/").append(properties[2]).append("已封存,无法传递SAP");
|
|
|
|
.append(properties[2]).append("已封存,无法传递SAP");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Boolean flag = false;
|
|
|
|
Boolean flag = false;
|
|
|
|
String[] zt2_SZFactory = tcProperties[0].getStringArrayValue();
|
|
|
|
String[] zt2_SZFactory = tcProperties[0].getStringArrayValue();
|
|
|
@ -1420,18 +1504,18 @@ public class BomUtilWh {
|
|
|
|
if (zt2_SZFactory[num].equals("M060")) {
|
|
|
|
if (zt2_SZFactory[num].equals("M060")) {
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
if (zt2_SZProcuretype.length > num && zt2_SZProcuretype[num].equals("/")) {
|
|
|
|
if (zt2_SZProcuretype.length > num && zt2_SZProcuretype[num].equals("/")) {
|
|
|
|
errMessage.append("物料:").append(properties[0]).append("/")
|
|
|
|
errMessage.append("物料:").append(properties[0]).append("/").append(properties[2])
|
|
|
|
.append(properties[2]).append("物料不可用,无法传递SAP\n");
|
|
|
|
.append("物料不可用,无法传递SAP\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (zt2_SZSealedornot.length > num && zt2_SZSealedornot[num].equals("Y")) {
|
|
|
|
if (zt2_SZSealedornot.length > num && zt2_SZSealedornot[num].equals("Y")) {
|
|
|
|
errMessage.append("物料:").append(properties[0]).append("/")
|
|
|
|
errMessage.append("物料:").append(properties[0]).append("/").append(properties[2])
|
|
|
|
.append(properties[2]).append("已封存,无法传递SAP\n");
|
|
|
|
.append("已封存,无法传递SAP\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!flag) {
|
|
|
|
if (!flag) {
|
|
|
|
errMessage.append("物料:").append(properties[0]).append("/")
|
|
|
|
errMessage.append("物料:").append(properties[0]).append("/").append(properties[2])
|
|
|
|
.append(properties[2]).append("没有维护物料视图,无法传递SAP\n");
|
|
|
|
.append("没有维护物料视图,无法传递SAP\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
@ -1443,9 +1527,10 @@ public class BomUtilWh {
|
|
|
|
|
|
|
|
|
|
|
|
// 遍历产成品BOM 单层 没有BOM 和 文件跳过
|
|
|
|
// 遍历产成品BOM 单层 没有BOM 和 文件跳过
|
|
|
|
public static void expandAllBomPart(Map<String, ExpandPSData[]> expands, TCComponentBOMLine pBomLine,
|
|
|
|
public static void expandAllBomPart(Map<String, ExpandPSData[]> expands, TCComponentBOMLine pBomLine,
|
|
|
|
TCComponentItemRevision pRev,String groupName,List<String> wbsList,TCSession session,String now
|
|
|
|
TCComponentItemRevision pRev, String groupName, List<String> wbsList, TCSession session, String now,
|
|
|
|
,List<TCComponentMEProcessRevision> needTCM_meops,Map<String, TCComponent> gy_meops,
|
|
|
|
List<TCComponentMEProcessRevision> needTCM_meops, Map<String, TCComponent> gy_meops,
|
|
|
|
Element INTERGRATIONLIST,StringBuffer errMessage,String txtPath,Map<String, TCComponentItemRevision> material_revs) {
|
|
|
|
Element INTERGRATIONLIST, StringBuffer errMessage, String txtPath,
|
|
|
|
|
|
|
|
Map<String, TCComponentItemRevision> material_revs) {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String uid = pBomLine.getUid();
|
|
|
|
String uid = pBomLine.getUid();
|
|
|
@ -1469,7 +1554,8 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Element WLCONTENTS = WLLIST.addElement("WLCONTENTS"); // 文件信息
|
|
|
|
Element WLCONTENTS = WLLIST.addElement("WLCONTENTS"); // 文件信息
|
|
|
|
Element TCID = WLCONTENTS.addElement("TCID");
|
|
|
|
Element TCID = WLCONTENTS.addElement("TCID");
|
|
|
|
String[] properties = pRev.getProperties(new String[] {"item_id","item_revision_id","zt2_MaterialNo","zt2_Quantity","zt2_State"});
|
|
|
|
String[] properties = pRev.getProperties(
|
|
|
|
|
|
|
|
new String[] { "item_id", "item_revision_id", "zt2_MaterialNo", "zt2_Quantity", "zt2_State" });
|
|
|
|
|
|
|
|
|
|
|
|
TCID.setText(properties[0] + "/" + properties[1]);
|
|
|
|
TCID.setText(properties[0] + "/" + properties[1]);
|
|
|
|
|
|
|
|
|
|
|
@ -1488,7 +1574,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
@ -1509,7 +1596,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
@ -1531,11 +1619,13 @@ public class BomUtilWh {
|
|
|
|
BOMCONTENTS.addElement("STLAN").setText("1");
|
|
|
|
BOMCONTENTS.addElement("STLAN").setText("1");
|
|
|
|
BOMCONTENTS.addElement("STLAL").setText("1"); // <QUANTITY>基本数量</QUANTITY>
|
|
|
|
BOMCONTENTS.addElement("STLAL").setText("1"); // <QUANTITY>基本数量</QUANTITY>
|
|
|
|
BOMCONTENTS.addElement("QUANTITY").setText(properties[3]);
|
|
|
|
BOMCONTENTS.addElement("QUANTITY").setText(properties[3]);
|
|
|
|
BOMCONTENTS.addElement("QUIT").setText(pRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
BOMCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(pRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
Element SONLIST = BOMCONTENTS.addElement("SONLIST");
|
|
|
|
Element SONLIST = BOMCONTENTS.addElement("SONLIST");
|
|
|
|
// 获取工艺信息 BOPLIST BOPCONTENTS ()二级工序下的辅料放到子件
|
|
|
|
// 获取工艺信息 BOPLIST BOPCONTENTS ()二级工序下的辅料放到子件
|
|
|
|
String maxSeq = "";
|
|
|
|
String maxSeq = "10";
|
|
|
|
System.out.println("=========getProcess over========"+pRev+"expandPSDatas==>"+expandPSDatas.length);
|
|
|
|
System.out
|
|
|
|
|
|
|
|
.println("=========getProcess over========" + pRev + "expandPSDatas==>" + expandPSDatas.length);
|
|
|
|
for (int i = 0; i < expandPSDatas.length; i++) {
|
|
|
|
for (int i = 0; i < expandPSDatas.length; i++) {
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
ExpandPSData exPsData = expandPSDatas[i];
|
|
|
|
ExpandPSData exPsData = expandPSDatas[i];
|
|
|
@ -1558,7 +1648,8 @@ public class BomUtilWh {
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
|
|
|
|
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUIT").setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
@ -1573,8 +1664,8 @@ public class BomUtilWh {
|
|
|
|
if (!KUtil.isEmpty(properties2[2])) {
|
|
|
|
if (!KUtil.isEmpty(properties2[2])) {
|
|
|
|
material_revs.put(properties2[2], rev2);
|
|
|
|
material_revs.put(properties2[2], rev2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
expandAllBomPart(expands,line2,rev2,groupName,wbsList,session,now,
|
|
|
|
expandAllBomPart(expands, line2, rev2, groupName, wbsList, session, now, needTCM_meops, gy_meops,
|
|
|
|
needTCM_meops,gy_meops,INTERGRATIONLIST,errMessage,txtPath,material_revs);
|
|
|
|
INTERGRATIONLIST, errMessage, txtPath, material_revs);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
AIFComponentContext[] meops = pRev.whereReferencedByTypeRelation(new String[] { "MEProcessRevision" },
|
|
|
|
AIFComponentContext[] meops = pRev.whereReferencedByTypeRelation(new String[] { "MEProcessRevision" },
|
|
|
@ -1582,8 +1673,8 @@ public class BomUtilWh {
|
|
|
|
Integer valueOf = Integer.valueOf(maxSeq);
|
|
|
|
Integer valueOf = Integer.valueOf(maxSeq);
|
|
|
|
if (pRev != null && meops.length > 0) {
|
|
|
|
if (pRev != null && meops.length > 0) {
|
|
|
|
TXTUtil.writeTXT(txtPath, "物料[" + pRev + "]工艺信息:" + meops[0].getComponent());
|
|
|
|
TXTUtil.writeTXT(txtPath, "物料[" + pRev + "]工艺信息:" + meops[0].getComponent());
|
|
|
|
getProcess((TCComponentMEProcessRevision) meops[0].getComponent(), pRev, session, now,
|
|
|
|
getProcess((TCComponentMEProcessRevision) meops[0].getComponent(), pRev, session, now, "",
|
|
|
|
"", groupName, gy_meops, needTCM_meops,BOPLIST,SONLIST,valueOf);
|
|
|
|
groupName, gy_meops, needTCM_meops, BOPLIST, SONLIST, valueOf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1611,8 +1702,8 @@ public class BomUtilWh {
|
|
|
|
|
|
|
|
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
Element SONCONTENTS = SONLIST.addElement("SONCONTENTS");
|
|
|
|
TCComponentItemRevision rev2 = SAPUtil.getSAPPart(line2, session, groupName, errMessage);
|
|
|
|
TCComponentItemRevision rev2 = SAPUtil.getSAPPart(line2, session, groupName, errMessage);
|
|
|
|
String[] properties2 = rev2.getProperties(new String[] {"item_id","item_revision_id",
|
|
|
|
String[] properties2 = rev2.getProperties(
|
|
|
|
"zt2_MaterialNo","zt2_Quantity","zt2_State"});
|
|
|
|
new String[] { "item_id", "item_revision_id", "zt2_MaterialNo", "zt2_Quantity", "zt2_State" });
|
|
|
|
checkMatnr(errMessage, rev2);
|
|
|
|
checkMatnr(errMessage, rev2);
|
|
|
|
// System.out.println("properties[4]===>"+properties2[4]);
|
|
|
|
// System.out.println("properties[4]===>"+properties2[4]);
|
|
|
|
// if(properties2[4].equals("封存")||properties2[4].equals("D1")) {
|
|
|
|
// if(properties2[4].equals("封存")||properties2[4].equals("D1")) {
|
|
|
@ -1624,7 +1715,8 @@ public class BomUtilWh {
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
|
|
|
|
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUIT").setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
@ -1634,7 +1726,8 @@ public class BomUtilWh {
|
|
|
|
// if(i==expandPSDatas.length-1) {
|
|
|
|
// if(i==expandPSDatas.length-1) {
|
|
|
|
// maxSeq = line2.getProperty("bl_sequence_no");
|
|
|
|
// maxSeq = line2.getProperty("bl_sequence_no");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// if(!designRev.getType().contains("ZT2_Design3D") || !thList.contains(itemId.split("-")[0])) {
|
|
|
|
// if(!designRev.getType().contains("ZT2_Design3D") ||
|
|
|
|
|
|
|
|
// !thList.contains(itemId.split("-")[0])) {
|
|
|
|
// continue;
|
|
|
|
// continue;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// if (rev2.getProperty("zt2_SapState").equals("已传"))
|
|
|
|
// if (rev2.getProperty("zt2_SapState").equals("已传"))
|
|
|
@ -1654,9 +1747,10 @@ public class BomUtilWh {
|
|
|
|
|
|
|
|
|
|
|
|
// 遍历产成品BOM 单层 没有BOM 和 文件跳过
|
|
|
|
// 遍历产成品BOM 单层 没有BOM 和 文件跳过
|
|
|
|
public static void expandAllBomPartKj(Map<String, ExpandPSData[]> expands, TCComponentBOMLine tzBomLine,
|
|
|
|
public static void expandAllBomPartKj(Map<String, ExpandPSData[]> expands, TCComponentBOMLine tzBomLine,
|
|
|
|
TCComponentItemRevision pRev,String groupName,List<String> wbsList,TCSession session,String now
|
|
|
|
TCComponentItemRevision pRev, String groupName, List<String> wbsList, TCSession session, String now,
|
|
|
|
,List<TCComponentMEProcessRevision> needTCM_meops,Map<String, TCComponent> gy_meops,
|
|
|
|
List<TCComponentMEProcessRevision> needTCM_meops, Map<String, TCComponent> gy_meops,
|
|
|
|
Element INTERGRATIONLIST,StringBuffer errMessage,String txtPath,Map<String, TCComponentItemRevision> material_revs,List<String> thList) {
|
|
|
|
Element INTERGRATIONLIST, StringBuffer errMessage, String txtPath,
|
|
|
|
|
|
|
|
Map<String, TCComponentItemRevision> material_revs, List<String> thList) {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String uid = tzBomLine.getUid();
|
|
|
|
String uid = tzBomLine.getUid();
|
|
|
@ -1680,7 +1774,8 @@ public class BomUtilWh {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Element WLCONTENTS = WLLIST.addElement("WLCONTENTS"); // 文件信息
|
|
|
|
Element WLCONTENTS = WLLIST.addElement("WLCONTENTS"); // 文件信息
|
|
|
|
Element TCID = WLCONTENTS.addElement("TCID");
|
|
|
|
Element TCID = WLCONTENTS.addElement("TCID");
|
|
|
|
String[] properties = pRev.getProperties(new String[] {"item_id","item_revision_id","zt2_MaterialNo","zt2_Quantity","zt2_State"});
|
|
|
|
String[] properties = pRev.getProperties(
|
|
|
|
|
|
|
|
new String[] { "item_id", "item_revision_id", "zt2_MaterialNo", "zt2_Quantity", "zt2_State" });
|
|
|
|
|
|
|
|
|
|
|
|
TCID.setText(properties[0] + "/" + properties[1]);
|
|
|
|
TCID.setText(properties[0] + "/" + properties[1]);
|
|
|
|
|
|
|
|
|
|
|
@ -1699,7 +1794,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
@ -1720,7 +1816,8 @@ public class BomUtilWh {
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileName = ds.getProperty("object_name");
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileType = "文件";
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
String fileUid = ds.getUid();
|
|
|
|
System.out.println("fileId==>"+fileId+"fileName==>"+fileName+"fileType==>"+fileType+"fileUid==>"+fileUid);
|
|
|
|
System.out.println("fileId==>" + fileId + "fileName==>" + fileName + "fileType==>" + fileType
|
|
|
|
|
|
|
|
+ "fileUid==>" + fileUid);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
FILECONTENTS.addElement("FILEID").setText(fileId + "/" + fileRevId);
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <ID>图号</ID>(文件载体item_id)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
|
// <NAME>图纸名称</NAME>((文件载体object_name)
|
|
|
@ -1742,7 +1839,8 @@ public class BomUtilWh {
|
|
|
|
BOMCONTENTS.addElement("STLAN").setText("1");
|
|
|
|
BOMCONTENTS.addElement("STLAN").setText("1");
|
|
|
|
BOMCONTENTS.addElement("STLAL").setText("1"); // <QUANTITY>基本数量</QUANTITY>
|
|
|
|
BOMCONTENTS.addElement("STLAL").setText("1"); // <QUANTITY>基本数量</QUANTITY>
|
|
|
|
BOMCONTENTS.addElement("QUANTITY").setText(properties[3]);
|
|
|
|
BOMCONTENTS.addElement("QUANTITY").setText(properties[3]);
|
|
|
|
BOMCONTENTS.addElement("QUIT").setText(pRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
BOMCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(pRev.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
Element SONLIST = BOMCONTENTS.addElement("SONLIST");
|
|
|
|
Element SONLIST = BOMCONTENTS.addElement("SONLIST");
|
|
|
|
// 获取工艺信息 BOPLIST BOPCONTENTS ()二级工序下的辅料放到子件
|
|
|
|
// 获取工艺信息 BOPLIST BOPCONTENTS ()二级工序下的辅料放到子件
|
|
|
|
// String maxSeq = "";
|
|
|
|
// String maxSeq = "";
|
|
|
@ -1753,7 +1851,8 @@ public class BomUtilWh {
|
|
|
|
TCComponentBOMLine line2 = exPsData.bomLine;
|
|
|
|
TCComponentBOMLine line2 = exPsData.bomLine;
|
|
|
|
TCComponentItemRevision designRev = exPsData.itemRevOfBOMLine;
|
|
|
|
TCComponentItemRevision designRev = exPsData.itemRevOfBOMLine;
|
|
|
|
if (designRev.getType().equals("ZT2_XNZJBRevision")) {
|
|
|
|
if (designRev.getType().equals("ZT2_XNZJBRevision")) {
|
|
|
|
//虚拟组件包削层逻辑String now,StringBuffer errMessage,Element SONLIST,TCSession session,String groupName
|
|
|
|
// 虚拟组件包削层逻辑String now,StringBuffer errMessage,Element SONLIST,TCSession
|
|
|
|
|
|
|
|
// session,String groupName
|
|
|
|
ExpandPSData[] expandPSDatas2 = expands.get(line2.getUid());
|
|
|
|
ExpandPSData[] expandPSDatas2 = expands.get(line2.getUid());
|
|
|
|
xnzjbXcMsg(expandPSDatas2, now, errMessage, SONLIST, session, groupName, expands);
|
|
|
|
xnzjbXcMsg(expandPSDatas2, now, errMessage, SONLIST, session, groupName, expands);
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
@ -1775,7 +1874,8 @@ public class BomUtilWh {
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
String zysapmenge = getZYSAPMENGE(rev2, null, line2, false, "1", errMessage);
|
|
|
|
|
|
|
|
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUE").setText(zysapmenge);
|
|
|
|
SONCONTENTS.addElement("QUIT").setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("QUIT")
|
|
|
|
|
|
|
|
.setText(rev2.getItem().getTCProperty("zt2_unit").getStringValue().toUpperCase());
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SORTF").setText("");
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("SEQID").setText(line2.getProperty("bl_sequence_no"));
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
|
SONCONTENTS.addElement("POSTP").setText("L");
|
|
|
@ -1799,8 +1899,8 @@ public class BomUtilWh {
|
|
|
|
if (!KUtil.isEmpty(properties2[2])) {
|
|
|
|
if (!KUtil.isEmpty(properties2[2])) {
|
|
|
|
material_revs.put(properties2[2], rev2);
|
|
|
|
material_revs.put(properties2[2], rev2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
expandAllBomPartKj(expands,line2,rev2,groupName,wbsList,session,now,
|
|
|
|
expandAllBomPartKj(expands, line2, rev2, groupName, wbsList, session, now, needTCM_meops, gy_meops,
|
|
|
|
needTCM_meops,gy_meops,INTERGRATIONLIST,errMessage,txtPath,material_revs,thList);
|
|
|
|
INTERGRATIONLIST, errMessage, txtPath, material_revs, thList);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|