|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.chint.plm.createEcn;
|
|
|
|
|
|
|
|
|
|
import java.awt.Window;
|
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
@ -101,6 +102,48 @@ public class RelateEcnController {
|
|
|
|
|
this.controller = controller;
|
|
|
|
|
this.session = session;
|
|
|
|
|
initTable();
|
|
|
|
|
// 2024.1.11 新增 已经关联的变更单初始化
|
|
|
|
|
init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @function
|
|
|
|
|
*/
|
|
|
|
|
private void init() {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
String applyCode = controller.relateEcnText.getText();
|
|
|
|
|
if (applyCode != null && !applyCode.isEmpty()) {
|
|
|
|
|
String[] prefs = ChintPreferenceUtil.getPreferences("database_tc", session);
|
|
|
|
|
SqlUtil.getTCDataConnection(prefs);
|
|
|
|
|
try {
|
|
|
|
|
int num = 1;
|
|
|
|
|
ResultSet read = SqlUtil.read(controller.SELECT_OA_APPLYNO, new String[] {applyCode});
|
|
|
|
|
List<RelateEcnBean> ecnBeans = new ArrayList<>();
|
|
|
|
|
while (read.next()) {
|
|
|
|
|
String contConde = read.getString("CONTRACTNO");
|
|
|
|
|
String contName = read.getString("CONTRACTNAME");
|
|
|
|
|
String requestNo = read.getString("APPLYNO");
|
|
|
|
|
String prodModel = read.getString("PRODUCTMODEL");
|
|
|
|
|
String applicant = read.getString("APPLYUSER");// STATUS
|
|
|
|
|
String status = read.getString("STATUS");
|
|
|
|
|
String link = read.getString("APPLYLINK");
|
|
|
|
|
ecnBeans.add(
|
|
|
|
|
new RelateEcnBean(new SimpleStringProperty(num + ""), new SimpleStringProperty(contConde),
|
|
|
|
|
new SimpleStringProperty(contName), new SimpleStringProperty(requestNo),
|
|
|
|
|
new SimpleStringProperty(prodModel), new SimpleStringProperty(applicant),
|
|
|
|
|
new SimpleStringProperty(status), link, controller, read, prefs, tableView));
|
|
|
|
|
}
|
|
|
|
|
tableView.getItems().clear();
|
|
|
|
|
tableView.getItems().addAll(ecnBeans);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
} finally {
|
|
|
|
|
SqlUtil.freeAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -205,7 +248,7 @@ public class RelateEcnController {
|
|
|
|
|
ecnBeans.add(new RelateEcnBean(new SimpleStringProperty(num + ""), new SimpleStringProperty(contConde),
|
|
|
|
|
new SimpleStringProperty(contName), new SimpleStringProperty(requestNo),
|
|
|
|
|
new SimpleStringProperty(prodModel), new SimpleStringProperty(applicant),
|
|
|
|
|
new SimpleStringProperty(status), link, controller, read));
|
|
|
|
|
new SimpleStringProperty(status), link, controller, read, prefs, tableView));
|
|
|
|
|
num++;
|
|
|
|
|
}
|
|
|
|
|
tableView.getItems().clear();
|
|
|
|
|