陈翼晖 2 years ago
commit 76b3cd4cd5

@ -457,7 +457,7 @@ public class NewJFrame extends javax.swing.JFrame {
jLabel1.setText("¹¤×°ÐèÇó²éѯ");
jLabel1.setFont(new Font("Serif", Font.PLAIN, 20));
String[] title = new String [] { "序号","申请人","流程实例ID","工艺负责人","计划时间", "委托理由", "技术工艺要求", "OA表单链接","创建报价成本单","状态"};
String[] title = new String [] { "序号","申请人","流程实例ID","工艺负责人","计划时间", "委托理由", "技术工艺要求", "OA表单链接","创建工装需求","状态"};
jTable2.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {},title
));

@ -16,8 +16,10 @@ import org.apache.http.util.EntityUtils;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.connor.chint.sap2.util.SAPUtil;
import com.teamcenter.rac.aif.AbstractAIFOperation;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCComponentItem;
import com.teamcenter.rac.kernel.TCComponentItemRevision;
import com.teamcenter.rac.kernel.TCSession;
import com.teamcenter.rac.util.MessageBox;
@ -71,13 +73,14 @@ public class sendGXToMOMOperation extends AbstractAIFOperation{
for(TCComponent component : referenceListProperty) {
String gxType = component.getStringProperty("object_type");
if("ZT2_ProcessRule".equals(gxType)) {
TCComponent[] referenceListProperty2 = component.getReferenceListProperty("IMAN_specification");
TCComponentItemRevision latestItemRevision = ((TCComponentItem)component).getLatestItemRevision();
TCComponent[] referenceListProperty2 = latestItemRevision.getReferenceListProperty("IMAN_specification");
if(referenceListProperty2!=null && referenceListProperty2.length>0) {
for(TCComponent component2 : referenceListProperty2) {
String typePdf = component2.getStringProperty("object_type");
if("PDF".equals(typePdf) || "pdf".equals(typePdf)) {
FileJson fileJson = new FileJson();
fileJson.setName(component2.getStringProperty("object_type"));
fileJson.setName(component2.getStringProperty("object_name"));
fileJson.setUid(component2.getUid());
fileJson.setNo((fileJsons.size()+1)*10+"");
fileJsons.add(fileJson);
@ -93,19 +96,20 @@ public class sendGXToMOMOperation extends AbstractAIFOperation{
process.setProcessRouteFiles(fileJsons);
System.out.println("开始获取file数组2");
TCComponent[] referenceListProperty1 = revision.getReferenceListProperty("ZT2_ProcGuidBookRuleRelation");
TCComponent[] referenceListProperty1 = revision.getReferenceListProperty("ZT2_ProcGuidBookRelation");
List<FileJson> fileJsons1 = new ArrayList<FileJson>();
if(referenceListProperty1!=null && referenceListProperty1.length>0) {
for(TCComponent component : referenceListProperty1) {
String gxType = component.getStringProperty("object_type");
if("ZT2_ProcGuidBook".equals(gxType)) {
TCComponent[] referenceListProperty2 = component.getReferenceListProperty("IMAN_specification");
TCComponentItemRevision latestItemRevision = ((TCComponentItem)component).getLatestItemRevision();
TCComponent[] referenceListProperty2 = latestItemRevision.getReferenceListProperty("IMAN_specification");
if(referenceListProperty2!=null && referenceListProperty2.length>0) {
for(TCComponent component2 : referenceListProperty2) {
String typePdf = component2.getStringProperty("object_type");
if("PDF".equals(typePdf) || "pdf".equals(typePdf)) {
FileJson fileJson = new FileJson();
fileJson.setName(component2.getStringProperty("object_type"));
fileJson.setName(component2.getStringProperty("object_name"));
fileJson.setUid(component2.getUid());
fileJson.setNo((fileJsons1.size()+1)*10+"");
fileJsons1.add(fileJson);
@ -120,6 +124,8 @@ public class sendGXToMOMOperation extends AbstractAIFOperation{
System.out.println(fileJsons1.toString());
process.setEsopFiles(fileJsons1);
}
System.out.println("要发送的数据"+process.toString());
String json = JSON.toJSONString(process);

Loading…
Cancel
Save