修复齐套性检查bug

main
刘江林 6 years ago
parent 83335fb52d
commit fcee732772

@ -501,6 +501,11 @@
<command commandId="JD2_BXECN" id="JDProject.menus.JD2_BXECN" mnemonic="S"></command>
<command commandId="JD2_BXQTXJC" id="JDProject.menus.JD2_BXQTXJC" mnemonic="S"></command>
</menu>
</menuContribution>
<menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=additions">
<menu id="JDProject.menus.JD2_CSXWHMENU" label="测试项维护" mnemonic="M">
<command commandId="JD2_CSXWH" id="JDProject.menus.JD2_CSXWH" mnemonic="S"></command>
</menu>
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any?after=additions">
@ -519,12 +524,6 @@
<visibleWhen>true</visibleWhen>
</command>
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any?after=additions">
<menu id="JDProject.menus.JD2_CSXWHMENU" label="测试项维护" mnemonic="M">
<command commandId="JD2_CSXWH" id="JDProject.menus.JD2_CSXWH" mnemonic="S"></command>
</menu>
</menuContribution>
</extension>
</plugin>

@ -19,8 +19,8 @@ public class CSXWHDialog extends Application {
}
private JPanel Panel;
private Object[] obj = new Object[] { "序号", "产品类型", "试验项目", "试验时间", "样品数量", "试验费用" };// 民用表
private Object[] obj2 = new Object[] { "序号", "类别", "项目", "项目费用" };// 工业表
private Object[] obj = new Object[] { "序号", "产品类型", "试验项目", "试验时间", "样品数量", "试验费用" };//
private Object[] obj2 = new Object[] { "序号", "类别", "项目", "项目费用" };//
public void initUI() {

@ -35,6 +35,7 @@ public class QTXJCDialog extends Application {
private List<String> sfList = new ArrayList<String>();
private TCComponent[] com;
private String type;
private Stage primaryStage = null;
public QTXJCDialog(List<String> sfList, TCComponent[] com, TCSession session, String type) throws TCException {
@ -47,7 +48,7 @@ public class QTXJCDialog extends Application {
@Override
public void start(Stage arg0) throws Exception {
Stage primaryStage = new Stage();
primaryStage = new Stage();
Pane root = new Pane();
Label pjStage = new Label("项目阶段");
pjStage.setLayoutX(37.0);
@ -195,7 +196,7 @@ public class QTXJCDialog extends Application {
String outpath = roadName;
System.out.println(outpath);
// System.out.println("typeĘÇ" + type);
File file = getExcle(jdname, type);
String sel = pjsName.getSelectionModel().getSelectedItem();
Map<String, List<TCComponent>> jfw = new HashMap<String, List<TCComponent>>();
@ -235,6 +236,7 @@ public class QTXJCDialog extends Application {
}
ExcelOperation.writeExcel(file, outpath, jfw);
System.out.println("导出成功");
primaryStage.close();
MessageBox.post("导出成功", "信息", MessageBox.INFORMATION);
}

@ -4,10 +4,36 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import com.connor.jd.plm.dialogs.CSXWHDialog;
import com.teamcenter.rac.aif.AbstractAIFUIApplication;
import com.teamcenter.rac.aifrcp.AIFUtility;
import com.teamcenter.rac.kernel.TCSession;
import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
import javafx.stage.Stage;
public class CSXWHHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
AbstractAIFUIApplication app = AIFUtility.getCurrentApplication();
TCSession session = (TCSession) app.getSession();
new Thread(() -> {
new JFXPanel();
Platform.setImplicitExit(false);
Platform.runLater(new Runnable() {
@Override
public void run() {
try {
CSXWHDialog csxwh = new CSXWHDialog();
csxwh.start(new Stage());
} catch (Exception e) {
e.printStackTrace();
}
}
});
}).start();
return null;
}

@ -30,7 +30,7 @@ public class QTXJCHandler extends AbstractHandler {
public Object execute(ExecutionEvent arg0) throws ExecutionException {
List<String> sfList = new ArrayList<String>();
String name = arg0.getCommand().getId();
// System.out.println("name:" + name);
try {
AbstractAIFUIApplication app = AIFUtility.getCurrentApplication();
if (app.getTargetComponent() != null && app.getTargetComponent() instanceof TCComponentProject) {
@ -41,14 +41,15 @@ public class QTXJCHandler extends AbstractHandler {
sfList.add(sf.getProperty("object_string"));
}
TCSession session = (TCSession) app.getSession();
switch (name) {
case "JDProject.menus.JD2_GTQTXJC":
case "JD2_GTQTXJC":
type = "GT";
break;
case "JDProject.menus.JD2_BLQTXJC":
case "JD2_BLQTXJC":
type = "BL";
break;
case "JDProject.menus.JD2_BXQTXJC":
case "JD2_BXQTXJC":
type = "BX";
break;
default:
@ -61,6 +62,7 @@ public class QTXJCHandler extends AbstractHandler {
@Override
public void run() {
try {
// System.out.println("typeÄÚČÝ" + type);
QTXJCDialog qtxjc = new QTXJCDialog(sfList, com, session, type);
qtxjc.start(new Stage());
} catch (Exception e) {

Loading…
Cancel
Save