|
|
@ -4,10 +4,14 @@ import java.sql.ResultSet;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
|
|
|
|
|
|
|
import com.connor.chint.sap2.util.BomToSapUtil;
|
|
|
|
import com.connor.chint.sap2.util.BomToSapUtil;
|
|
|
|
|
|
|
|
import com.connor.chint.sap2.util.ChintPreferenceUtil;
|
|
|
|
|
|
|
|
import com.connor.chint.sap2.util.SqlUtil;
|
|
|
|
|
|
|
|
import com.teamcenter.rac.util.MessageBox;
|
|
|
|
|
|
|
|
|
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
|
import javafx.collections.ObservableList;
|
|
|
|
import javafx.collections.ObservableList;
|
|
|
|
import javafx.scene.control.Button;
|
|
|
|
import javafx.scene.control.Button;
|
|
|
|
|
|
|
|
import javafx.scene.control.TableView;
|
|
|
|
|
|
|
|
|
|
|
|
public class RelateEcnBean {
|
|
|
|
public class RelateEcnBean {
|
|
|
|
protected SimpleStringProperty num;// ÐòºÅ
|
|
|
|
protected SimpleStringProperty num;// ÐòºÅ
|
|
|
@ -50,7 +54,8 @@ public class RelateEcnBean {
|
|
|
|
|
|
|
|
|
|
|
|
public RelateEcnBean(SimpleStringProperty num, SimpleStringProperty contConde, SimpleStringProperty contName,
|
|
|
|
public RelateEcnBean(SimpleStringProperty num, SimpleStringProperty contConde, SimpleStringProperty contName,
|
|
|
|
SimpleStringProperty requestNo, SimpleStringProperty prodModel, SimpleStringProperty applicant,
|
|
|
|
SimpleStringProperty requestNo, SimpleStringProperty prodModel, SimpleStringProperty applicant,
|
|
|
|
SimpleStringProperty status, String link, CreateEcnController controller, ResultSet read)
|
|
|
|
SimpleStringProperty status, String link, CreateEcnController controller,
|
|
|
|
|
|
|
|
ResultSet read, String[] prefs, TableView<RelateEcnBean> tableView)
|
|
|
|
throws SQLException {
|
|
|
|
throws SQLException {
|
|
|
|
super();
|
|
|
|
super();
|
|
|
|
this.num = num;
|
|
|
|
this.num = num;
|
|
|
@ -80,7 +85,9 @@ public class RelateEcnBean {
|
|
|
|
e1.printStackTrace();
|
|
|
|
e1.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// 导入按钮,导入之后状态更新为已引用
|
|
|
|
importBtn.setOnAction(e -> {
|
|
|
|
importBtn.setOnAction(e -> {
|
|
|
|
|
|
|
|
SqlUtil.getTCDataConnection(prefs);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
ObservableList<RefTableBean> items = controller.refTable.getItems();
|
|
|
|
ObservableList<RefTableBean> items = controller.refTable.getItems();
|
|
|
|
for (int i = 0; i < 7; i++) {
|
|
|
|
for (int i = 0; i < 7; i++) {
|
|
|
@ -107,9 +114,16 @@ public class RelateEcnBean {
|
|
|
|
controller.markText.setText(docuName);
|
|
|
|
controller.markText.setText(docuName);
|
|
|
|
controller.relateEcnText.setText(applyNo);
|
|
|
|
controller.relateEcnText.setText(applyNo);
|
|
|
|
controller.refTable.setItems(items);
|
|
|
|
controller.refTable.setItems(items);
|
|
|
|
|
|
|
|
this.status.setValue("已引用");
|
|
|
|
|
|
|
|
// 更新数据库信息
|
|
|
|
|
|
|
|
SqlUtil.update(controller.UPDATE_OA, new String[] { applyNo });
|
|
|
|
|
|
|
|
tableView.refresh();
|
|
|
|
|
|
|
|
MessageBox.post("导入完成", "", MessageBox.INFORMATION);
|
|
|
|
} catch (Exception e1) {
|
|
|
|
} catch (Exception e1) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e1.printStackTrace();
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
SqlUtil.freeAll();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|