|
|
@ -6,47 +6,52 @@ import java.io.File;
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
import java.io.FileOutputStream;
|
|
|
|
import java.io.FileOutputStream;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.sql.Connection;
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
|
|
|
import java.sql.Statement;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.httpclient.util.URIUtil;
|
|
|
|
import org.apache.commons.httpclient.util.URIUtil;
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCell;
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFRow;
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
|
|
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
|
|
|
|
|
|
import org.apache.poi.ss.util.CellRangeAddress;
|
|
|
|
|
|
|
|
import org.casic.javafx.control.DateTimePicker;
|
|
|
|
import org.dom4j.Document;
|
|
|
|
import org.dom4j.Document;
|
|
|
|
import org.dom4j.DocumentHelper;
|
|
|
|
import org.dom4j.DocumentHelper;
|
|
|
|
import org.dom4j.Element;
|
|
|
|
import org.dom4j.Element;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.chint.plm.SearchSapResult.SumTableBean;
|
|
|
|
import com.chint.plm.fxUtil.KFXPanel;
|
|
|
|
import com.chint.plm.fxUtil.KFXPanel;
|
|
|
|
import com.chint.plm.fxUtil.KFXPanelController;
|
|
|
|
import com.chint.plm.fxUtil.KFXPanelController;
|
|
|
|
|
|
|
|
import com.connor.chint.JDBPackage.JDBFrame;
|
|
|
|
|
|
|
|
import com.connor.chint.sap2.util.BomToSapUtil;
|
|
|
|
import com.connor.chint.sap2.util.KUtil;
|
|
|
|
import com.connor.chint.sap2.util.KUtil;
|
|
|
|
import com.connor.chint.sap2.util.POIUtil;
|
|
|
|
import com.connor.chint.sap2.util.POIUtil;
|
|
|
|
import com.connor.chint.sap2.util.SAPUtil;
|
|
|
|
import com.connor.chint.sap2.util.SAPUtil;
|
|
|
|
import com.connor.chint.sap2.util.SqlUtil;
|
|
|
|
import com.connor.chint.sap2.util.SqlUtil;
|
|
|
|
import com.spire.xls.CheckState;
|
|
|
|
|
|
|
|
import com.spire.xls.Workbook;
|
|
|
|
|
|
|
|
import com.spire.xls.Worksheet;
|
|
|
|
|
|
|
|
import com.spire.xls.core.ICheckBox;
|
|
|
|
|
|
|
|
import com.spire.xls.core.ICheckBoxes;
|
|
|
|
|
|
|
|
import com.spire.xls.core.IShape;
|
|
|
|
|
|
|
|
import com.spire.xls.core.IShapes;
|
|
|
|
|
|
|
|
import com.squareup.okhttp.MediaType;
|
|
|
|
import com.squareup.okhttp.MediaType;
|
|
|
|
import com.squareup.okhttp.OkHttpClient;
|
|
|
|
import com.squareup.okhttp.OkHttpClient;
|
|
|
|
import com.squareup.okhttp.Request;
|
|
|
|
import com.squareup.okhttp.Request;
|
|
|
|
import com.squareup.okhttp.RequestBody;
|
|
|
|
import com.squareup.okhttp.RequestBody;
|
|
|
|
import com.squareup.okhttp.Response;
|
|
|
|
import com.squareup.okhttp.Response;
|
|
|
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
|
|
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
|
|
|
|
|
|
|
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
|
|
|
import com.teamcenter.rac.aifrcp.AIFUtility;
|
|
|
|
import com.teamcenter.rac.aifrcp.AIFUtility;
|
|
|
|
import com.teamcenter.rac.kernel.TCComponent;
|
|
|
|
import com.teamcenter.rac.kernel.TCComponent;
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentDataset;
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentDataset;
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentItem;
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentItem;
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentItemType;
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentItemType;
|
|
|
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentTcFile;
|
|
|
|
import com.teamcenter.rac.kernel.TCException;
|
|
|
|
import com.teamcenter.rac.kernel.TCException;
|
|
|
|
import com.teamcenter.rac.kernel.TCProperty;
|
|
|
|
import com.teamcenter.rac.kernel.TCProperty;
|
|
|
|
import com.teamcenter.rac.kernel.TCSession;
|
|
|
|
import com.teamcenter.rac.kernel.TCSession;
|
|
|
@ -56,6 +61,7 @@ import edu.emory.mathcs.backport.java.util.Arrays;
|
|
|
|
import javafx.application.Platform;
|
|
|
|
import javafx.application.Platform;
|
|
|
|
import javafx.beans.property.SimpleIntegerProperty;
|
|
|
|
import javafx.beans.property.SimpleIntegerProperty;
|
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
|
|
|
|
|
import javafx.beans.value.ObservableValue;
|
|
|
|
import javafx.collections.FXCollections;
|
|
|
|
import javafx.collections.FXCollections;
|
|
|
|
import javafx.collections.ObservableList;
|
|
|
|
import javafx.collections.ObservableList;
|
|
|
|
import javafx.event.ActionEvent;
|
|
|
|
import javafx.event.ActionEvent;
|
|
|
@ -78,12 +84,6 @@ import javafx.scene.layout.GridPane;
|
|
|
|
import javafx.scene.layout.StackPane;
|
|
|
|
import javafx.scene.layout.StackPane;
|
|
|
|
import javafx.stage.Stage;
|
|
|
|
import javafx.stage.Stage;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @author cyh
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* 创建更改ECN页面
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public class CreateEcnController extends KFXPanelController {
|
|
|
|
public class CreateEcnController extends KFXPanelController {
|
|
|
|
@FXML
|
|
|
|
@FXML
|
|
|
|
private TextField ecnId;
|
|
|
|
private TextField ecnId;
|
|
|
@ -116,7 +116,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
private List<String> wips = new ArrayList<String>();
|
|
|
|
private List<String> wips = new ArrayList<String>();
|
|
|
|
private List<String> products = new ArrayList<String>();
|
|
|
|
private List<String> products = new ArrayList<String>();
|
|
|
|
private List<EcnBean> ecnBeans = new ArrayList<EcnBean>();
|
|
|
|
private List<EcnBean> ecnBeans = new ArrayList<EcnBean>();
|
|
|
|
private AbstractAIFApplication app;
|
|
|
|
protected AbstractAIFApplication app;
|
|
|
|
private TCSession session;
|
|
|
|
private TCSession session;
|
|
|
|
private TCComponent target;
|
|
|
|
private TCComponent target;
|
|
|
|
@FXML
|
|
|
|
@FXML
|
|
|
@ -142,17 +142,11 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
private CreateEcnController controller;
|
|
|
|
private CreateEcnController controller;
|
|
|
|
private CreateEcnFrame frame;
|
|
|
|
private CreateEcnFrame frame;
|
|
|
|
private String[] database;
|
|
|
|
private String[] database;
|
|
|
|
protected final String UPDATE_OA = "update CHINT_ECR_FROM_OA set STATUS = '已引用' where APPLYNO = ? ";
|
|
|
|
public final String UPDATE_OA = "update CHINT_ECR_FROM_OA set STATUS = '已引用' where APPLYNO = ? ";
|
|
|
|
protected final String SELECT_OA_APPLYNO = "select * from CHINT_ECR_FROM_OA where APPLYNO = ? ";
|
|
|
|
public final String SELECT_OA_APPLYNO = "select * from CHINT_ECR_FROM_OA where APPLYNO = ? ";
|
|
|
|
private final int PAGE_ITEM_CNT = 6;//每页对象数量
|
|
|
|
|
|
|
|
private final int FIRST_PAGE = 28;//第二页起始行
|
|
|
|
|
|
|
|
private final int PAGE_ROW_CNT = 16;//每页行数
|
|
|
|
|
|
|
|
private final int ITEM_ROW_CNT = 1;//每个对象行数
|
|
|
|
|
|
|
|
private final int TITLE_ROW_CNT = 7;//表头行数
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void initData(KFXPanel paramKFXPanel) throws Exception {
|
|
|
|
public void initData(KFXPanel paramKFXPanel) throws Exception {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
this.app = AIFUtility.getCurrentApplication();
|
|
|
|
this.app = AIFUtility.getCurrentApplication();
|
|
|
|
this.session = (TCSession) app.getSession();
|
|
|
|
this.session = (TCSession) app.getSession();
|
|
|
|
target = (TCComponent) app.getTargetComponent();
|
|
|
|
target = (TCComponent) app.getTargetComponent();
|
|
|
@ -192,7 +186,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
* @function 创建按钮
|
|
|
|
* @function 创建按钮
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@FXML
|
|
|
|
@FXML
|
|
|
|
private void createClick(ActionEvent event) throws Exception {
|
|
|
|
void createClick(ActionEvent event) throws Exception {
|
|
|
|
if (ecnId.getText().isEmpty()) {
|
|
|
|
if (ecnId.getText().isEmpty()) {
|
|
|
|
MessageBox.post("请先指派变更单ID", "提示", 2);
|
|
|
|
MessageBox.post("请先指派变更单ID", "提示", 2);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -211,13 +205,11 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
if (item.getRelatedComponents("IMAN_reference").length > 0) {
|
|
|
|
if (item.getRelatedComponents("IMAN_reference").length > 0) {
|
|
|
|
TCComponent[] comps = item.getRelatedComponents("IMAN_reference");
|
|
|
|
TCComponent[] comps = item.getRelatedComponents("IMAN_reference");
|
|
|
|
for (int i = 0, len = comps.length; i < len; i++) {
|
|
|
|
for (int i = 0, len = comps.length; i < len; i++) {
|
|
|
|
if (comps[i].isTypeOf("MSExcelX")) {// instanceof TCComponentDataset
|
|
|
|
if (comps[i] instanceof TCComponentDataset) {
|
|
|
|
dataset = (TCComponentDataset) comps[i];
|
|
|
|
dataset = (TCComponentDataset) comps[i];
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(dataset != null) {
|
|
|
|
|
|
|
|
// dataset=(TCComponentDataset) item.getRelatedComponents("IMAN_reference")[0];
|
|
|
|
// dataset=(TCComponentDataset) item.getRelatedComponents("IMAN_reference")[0];
|
|
|
|
TCComponentDataset datasetM = getDataset(type, 0);
|
|
|
|
TCComponentDataset datasetM = getDataset(type, 0);
|
|
|
|
file = Util.getExcel(datasetM);
|
|
|
|
file = Util.getExcel(datasetM);
|
|
|
@ -272,7 +264,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
createOrReplace(dataset, file, changeName);
|
|
|
|
createOrReplace(dataset, file, changeName);
|
|
|
|
|
|
|
|
|
|
|
|
item.setRelated("IMAN_reference", new TCComponent[] { dataset });
|
|
|
|
item.setRelated("IMAN_reference", new TCComponent[] { dataset });
|
|
|
|
// item.unlock();
|
|
|
|
item.unlock();
|
|
|
|
MessageBox.post("创建完成", "", MessageBox.INFORMATION);
|
|
|
|
MessageBox.post("创建完成", "", MessageBox.INFORMATION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -347,203 +339,94 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @param dataset 数据集
|
|
|
|
* @param 数据集
|
|
|
|
* @param file 文件路径
|
|
|
|
* @param 文件路径
|
|
|
|
* @param changeName 更改类型 创建或者替换excel文件
|
|
|
|
* @param 更改类型 创建或者替换excel文件
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void createOrReplace(TCComponentDataset dataset, File file, String changeName) {
|
|
|
|
protected void createOrReplace(TCComponentDataset dataset, File file, String changeName) {
|
|
|
|
//TODO 20240227大幅修改excel
|
|
|
|
// 20200407新增删除多余的
|
|
|
|
FileInputStream fis = null;
|
|
|
|
|
|
|
|
FileOutputStream fos = null;
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
fis = new FileInputStream(file);
|
|
|
|
FileInputStream fis = new FileInputStream(file);
|
|
|
|
XSSFWorkbook workbook = new XSSFWorkbook(fis);
|
|
|
|
HSSFWorkbook workBook = new HSSFWorkbook(fis);
|
|
|
|
XSSFSheet sheet = workbook.getSheetAt(0);
|
|
|
|
HSSFSheet sheet = workBook.getSheetAt(0);
|
|
|
|
XSSFRow row;
|
|
|
|
sheet.getRow(1).getCell(6).setCellValue(changeName);
|
|
|
|
XSSFCell cell;
|
|
|
|
sheet.getRow(1).getCell(13).setCellValue(ecnId.getText());
|
|
|
|
// setTitle(sheet, 1);
|
|
|
|
// int page = 0;
|
|
|
|
//表头
|
|
|
|
List<CellRangeAddress> mergeRegions = null;
|
|
|
|
row = POIUtil.getRow(sheet, 0);
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 0);
|
|
|
|
for (int i = 0; i < pages; i++) {
|
|
|
|
cell.setCellValue(factoryText.getText());//单位
|
|
|
|
int pace = 0;
|
|
|
|
cell = POIUtil.getCell(row, 5);
|
|
|
|
if (sheet.getRow(2 + i * 23) == null) {
|
|
|
|
cell.setCellValue((rb_formalChange.isSelected() ? "正式" : "临时") + cell.getStringCellValue());//正式更改 临时更改
|
|
|
|
if (mergeRegions == null) {
|
|
|
|
cell = POIUtil.getCell(row, 17);
|
|
|
|
mergeRegions = Util.getMergeRegions(sheet, 2, 24);
|
|
|
|
cell.setCellValue(ecnId.getText());//通知单编号
|
|
|
|
}
|
|
|
|
row = POIUtil.getRow(sheet, 1);
|
|
|
|
Util.addExcelPage(i, mergeRegions, sheet, workBook);
|
|
|
|
cell = POIUtil.getCell(row, 17);
|
|
|
|
int index = 0;
|
|
|
|
cell.setCellValue(relateEcnText.getText());//关联申请单编号
|
|
|
|
for (int k = i * 5; k < (i + 1) * 5; k++) {
|
|
|
|
row = POIUtil.getRow(sheet, 3);
|
|
|
|
sheet.getRow(5 + 3 * index + i * 23).getCell(1).setCellValue("");
|
|
|
|
cell = POIUtil.getCell(row, 18);
|
|
|
|
sheet.getRow(5 + 3 * index + i * 23).getCell(6).setCellValue("");
|
|
|
|
cell.setCellValue("共 " + pages + " 页");//页数
|
|
|
|
sheet.getRow(5 + 3 * index + i * 23).getCell(9).setCellValue("");
|
|
|
|
row = POIUtil.getRow(sheet, 4);
|
|
|
|
sheet.getRow(5 + 3 * index + i * 23).getCell(12).setCellValue("");
|
|
|
|
cell = POIUtil.getCell(row, 0);
|
|
|
|
sheet.getRow(5 + 3 * index + i * 23).getCell(14).setCellValue("");
|
|
|
|
cell.setCellValue(productModel);//产品型号
|
|
|
|
index++;
|
|
|
|
cell = POIUtil.getCell(row, 3);
|
|
|
|
}
|
|
|
|
cell.setCellValue(prodNameComb.getSelectionModel().getSelectedItem());//产品名称
|
|
|
|
}
|
|
|
|
cell = POIUtil.getCell(row, 6);
|
|
|
|
sheet.getRow(2 + i * 23).getCell(15).setCellValue("共 " + pages + " 页");
|
|
|
|
cell.setCellValue(markText.getText());//文件名称
|
|
|
|
sheet.getRow(3 + i * 23).getCell(1).setCellValue(changeType);
|
|
|
|
cell = POIUtil.getCell(row, 10);
|
|
|
|
// sheet.getRow(3 + i * 23).getCell(9).setCellValue(jobNames);//工作号 去掉了
|
|
|
|
cell.setCellValue(contractNo);//合同代号
|
|
|
|
sheet.getRow(3 + i * 23).getCell(11).setCellValue(contractNo);
|
|
|
|
cell = POIUtil.getCell(row, 12);
|
|
|
|
sheet.getRow(3 + i * 23).getCell(14).setCellValue(changeTime);
|
|
|
|
cell.setCellValue(contractName);//合同名称
|
|
|
|
sheet.getRow(23 + i * 23).getCell(2).setCellValue(contractName);
|
|
|
|
cell = POIUtil.getCell(row, 16);
|
|
|
|
|
|
|
|
cell.setCellValue(changeTime);//更改实施日期
|
|
|
|
String[] unitCount = changeUnit1.split(";");
|
|
|
|
cell = POIUtil.getCell(row, 18);
|
|
|
|
for (int j = 0; j < unitCount.length; j++) {
|
|
|
|
cell.setCellValue("第 1 页");//页号
|
|
|
|
sheet.getRow(5 + j + i * 23).getCell(15).setCellValue(unitCount[j]);
|
|
|
|
row = POIUtil.getRow(sheet, 5);
|
|
|
|
}
|
|
|
|
cell = POIUtil.getCell(row, 3);
|
|
|
|
HSSFCell cell;
|
|
|
|
cell.setCellValue(changeUnit1);//发放部门
|
|
|
|
|
|
|
|
|
|
|
|
for (int k = i * 5; k < (i + 1) * 5; k++) {
|
|
|
|
//复制表头与页
|
|
|
|
if (k > changeDrawingNo.length - 1) {
|
|
|
|
if(pages > 1) {
|
|
|
|
break;
|
|
|
|
// for(int i = 0; i < 6; i++)
|
|
|
|
}
|
|
|
|
// POIUtil.copyRow(workbook, POIUtil.getRow(sheet, i), POIUtil.getRow(sheet, i + 35), true);
|
|
|
|
sheet.getRow(5 + 3 * pace + i * 23).getCell(1).setCellValue(changeDrawingNo[k]);
|
|
|
|
POIUtil.copyRows(sheet, 0, TITLE_ROW_CNT - 1, FIRST_PAGE, 19, 1);
|
|
|
|
sheet.getRow(5 + 3 * pace + i * 23).getCell(3).setCellValue(sign[k]);
|
|
|
|
row = POIUtil.getRow(sheet, FIRST_PAGE + 4);
|
|
|
|
// sheet.getRow(5 + 3 * pace + i * 23).getCell(4).setCellValue(placesNo[k]);
|
|
|
|
cell = POIUtil.getCell(row, 18);
|
|
|
|
sheet.getRow(5 + 3 * pace + i * 23).getCell(5).setCellValue(partition[k]);
|
|
|
|
cell.setCellValue("第 2 页");//页号
|
|
|
|
sheet.getRow(5 + 3 * pace + i * 23).getCell(6).setCellValue(changeBefore1[k]);
|
|
|
|
}else {
|
|
|
|
sheet.getRow(5 + 3 * pace + i * 23).getCell(9).setCellValue(changeAfter1[k]);
|
|
|
|
POIUtil.deleteRows(sheet, FIRST_PAGE, FIRST_PAGE + PAGE_ROW_CNT - 1);
|
|
|
|
sheet.getRow(5 + 3 * pace + i * 23).getCell(12).setCellValue(changeReason[k]);
|
|
|
|
}
|
|
|
|
sheet.getRow(5 + 3 * pace + i * 23).getCell(14).setCellValue(processType1[k]);
|
|
|
|
if(pages > 2) {
|
|
|
|
|
|
|
|
POIUtil.copyRows(sheet, FIRST_PAGE, FIRST_PAGE + PAGE_ROW_CNT - 1, FIRST_PAGE + PAGE_ROW_CNT, 19, pages - 2);
|
|
|
|
pace++;
|
|
|
|
for(int i = 2; i < pages; i++) {
|
|
|
|
}
|
|
|
|
int cnt = (i - 1) * PAGE_ROW_CNT;
|
|
|
|
|
|
|
|
row = POIUtil.getRow(sheet, FIRST_PAGE + 4 + cnt);
|
|
|
|
}
|
|
|
|
cell = POIUtil.getCell(row, 18);
|
|
|
|
if (pages == 0) {
|
|
|
|
cell.setCellValue("第 " + (i + 1) + " 页");//页号
|
|
|
|
sheet.getRow(2).getCell(15).setCellValue("共 1 页");
|
|
|
|
}
|
|
|
|
sheet.getRow(3).getCell(1).setCellValue(productModel);
|
|
|
|
}
|
|
|
|
// sheet.getRow(3).getCell(9).setCellValue(jobNames);
|
|
|
|
|
|
|
|
sheet.getRow(3).getCell(11).setCellValue(contractNo);
|
|
|
|
//内容表格
|
|
|
|
sheet.getRow(3).getCell(14).setCellValue(changeTime);
|
|
|
|
ObservableList<EcnBean> items = tableView.getItems();
|
|
|
|
sheet.getRow(23).getCell(2).setCellValue(contractName);
|
|
|
|
for (int i = 0; i < items.size(); i++) {
|
|
|
|
String[] unitCount = changeUnit1.split(";");
|
|
|
|
if(i < 2) {
|
|
|
|
for (int j = 0; j < unitCount.length; j++) {
|
|
|
|
row = POIUtil.getRow(sheet, i + TITLE_ROW_CNT);
|
|
|
|
sheet.getRow(5 + j).getCell(15).setCellValue(unitCount[j]);
|
|
|
|
}else {
|
|
|
|
}
|
|
|
|
int r = (i - 1) % PAGE_ITEM_CNT, page = (i - 1) / PAGE_ITEM_CNT;
|
|
|
|
|
|
|
|
if(r == 0) {
|
|
|
|
|
|
|
|
r = PAGE_ITEM_CNT;
|
|
|
|
|
|
|
|
page --;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
row = POIUtil.getRow(sheet, FIRST_PAGE + TITLE_ROW_CNT + (r - 1) * ITEM_ROW_CNT + page * PAGE_ROW_CNT);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// EcnBean ecnBean = items.get(i);
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 0);
|
|
|
|
|
|
|
|
cell.setCellValue(i + 1);//序号
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 1);
|
|
|
|
|
|
|
|
cell.setCellValue(changeDrawingNo[i]);//图样代号(文件编号)
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 3);
|
|
|
|
|
|
|
|
cell.setCellValue(sign[i]);//标记
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 4);
|
|
|
|
|
|
|
|
cell.setCellValue(partition[i]);//处数
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 5);
|
|
|
|
|
|
|
|
cell.setCellValue(changeBefore1[i]);//更改前
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 8);
|
|
|
|
|
|
|
|
cell.setCellValue(szVersionBefs[i]);//更改前版本
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 9);
|
|
|
|
|
|
|
|
cell.setCellValue(changeAfter1[i]);//更改后
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 12);
|
|
|
|
|
|
|
|
cell.setCellValue(szVersionAfts[i]);//更改后版本
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 13);
|
|
|
|
|
|
|
|
cell.setCellValue(productSzs[i]);//特性等级
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 14);
|
|
|
|
|
|
|
|
cell.setCellValue(changeReason[i]);//更改原因
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, 17);
|
|
|
|
|
|
|
|
cell.setCellValue(processType1[i]);//产品处理意见
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//影响分析表格
|
|
|
|
|
|
|
|
ObservableList<RefTableBean> refs = refTable.getItems();
|
|
|
|
|
|
|
|
for (int i = 0; i < refs.size(); i++) {
|
|
|
|
|
|
|
|
RefTableBean refTableBean = refs.get(i);
|
|
|
|
|
|
|
|
row = POIUtil.getRow(sheet, i % 15 + TITLE_ROW_CNT + 3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int j = i / 15;
|
|
|
|
|
|
|
|
j = (j == 0) ? 4 : 14;
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, j + (refTableBean.getShYes().isSelected() ? 0 : 1));
|
|
|
|
|
|
|
|
cell.setCellValue("√");//是 否
|
|
|
|
|
|
|
|
j += 2;
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, j++);
|
|
|
|
|
|
|
|
cell.setCellValue(refTableBean.getUserVal());//责任人
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, j++);
|
|
|
|
|
|
|
|
cell.setCellValue(refTableBean.getCompDate().getText());//计划完成时间
|
|
|
|
|
|
|
|
cell = POIUtil.getCell(row, j++);
|
|
|
|
|
|
|
|
cell.setCellValue(refTableBean.getMark().getText());//备注
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
File file2 = null;
|
|
|
|
File file2 = null;
|
|
|
|
String timeNow = Util.GetNowDate();
|
|
|
|
String timeNow = Util.GetNowDate();
|
|
|
|
String filePath = System.getProperty("java.io.tmpdir") + timeNow + ".xlsx";
|
|
|
|
String filePath = System.getProperty("java.io.tmpdir") + timeNow + ".xls";
|
|
|
|
file2 = new File(filePath);
|
|
|
|
file2 = new File(filePath);
|
|
|
|
fos = new FileOutputStream(file2);
|
|
|
|
FileOutputStream fos = new FileOutputStream(file2);
|
|
|
|
workbook.write(fos);
|
|
|
|
workBook.write(fos);
|
|
|
|
fos.close();
|
|
|
|
|
|
|
|
fis.close();
|
|
|
|
Util.deMerge(filePath, filePath, pages);
|
|
|
|
|
|
|
|
Util.delete(filePath, filePath, pages);
|
|
|
|
Workbook spireBook = new Workbook();
|
|
|
|
|
|
|
|
spireBook.loadFromFile(filePath);
|
|
|
|
|
|
|
|
Worksheet spireSheet = spireBook.getWorksheets().get(0);
|
|
|
|
|
|
|
|
ICheckBoxes boxes = spireSheet.getCheckBoxes();
|
|
|
|
|
|
|
|
// System.out.println("boxes:" + boxes.getCount());
|
|
|
|
|
|
|
|
ICheckBox box1 = boxes.get(0);
|
|
|
|
|
|
|
|
CheckState check1 = rb_product.isSelected() ? CheckState.Checked : CheckState.Unchecked;
|
|
|
|
|
|
|
|
box1.setCheckState(check1);
|
|
|
|
|
|
|
|
ICheckBox box2 = boxes.get(1);
|
|
|
|
|
|
|
|
CheckState check2 = rb_Process.isSelected() ? CheckState.Checked : CheckState.Unchecked;
|
|
|
|
|
|
|
|
box2.setCheckState(check2);
|
|
|
|
|
|
|
|
if(boxes.getCount() > 2) {
|
|
|
|
|
|
|
|
ICheckBox box3 = boxes.get(2);
|
|
|
|
|
|
|
|
box3.setCheckState(check1);
|
|
|
|
|
|
|
|
ICheckBox box4 = boxes.get(3);
|
|
|
|
|
|
|
|
box4.setCheckState(check2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(pages > 2) {
|
|
|
|
|
|
|
|
String t1 = box1.getText();
|
|
|
|
|
|
|
|
String t2 = box2.getText();
|
|
|
|
|
|
|
|
for(int i = 2; i < pages; i++) {
|
|
|
|
|
|
|
|
int r = FIRST_PAGE + (i - 1) * PAGE_ROW_CNT + 3;
|
|
|
|
|
|
|
|
ICheckBox checkbox1 = boxes.addCheckBox(r, 4, 18, 80);
|
|
|
|
|
|
|
|
checkbox1.setCheckState(check1);
|
|
|
|
|
|
|
|
checkbox1.setText(t1);
|
|
|
|
|
|
|
|
ICheckBox checkbox2 = boxes.addCheckBox(r, 6, 18, 80);
|
|
|
|
|
|
|
|
checkbox2.setCheckState(check2);
|
|
|
|
|
|
|
|
checkbox2.setText(t2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else if(pages < 2) {
|
|
|
|
|
|
|
|
IShapes shapes = spireSheet.getShapes();
|
|
|
|
|
|
|
|
IShape box = shapes.get(2);
|
|
|
|
|
|
|
|
System.out.println("boxes:" + box.getName());
|
|
|
|
|
|
|
|
box.setVisible(false);
|
|
|
|
|
|
|
|
box.remove();
|
|
|
|
|
|
|
|
box = shapes.get(3);
|
|
|
|
|
|
|
|
System.out.println("boxes:" + box.getHtmlString());
|
|
|
|
|
|
|
|
box.setVisible(false);
|
|
|
|
|
|
|
|
box.remove();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
spireBook.save();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Util.deMerge(filePath, filePath, pages);
|
|
|
|
|
|
|
|
// Util.delete(filePath, filePath, pages);
|
|
|
|
|
|
|
|
dataset.setFiles(new String[] { filePath }, new String[] { "excel" });
|
|
|
|
dataset.setFiles(new String[] { filePath }, new String[] { "excel" });
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
if(fis != null) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
fis.close();
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(fos != null) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
fos.close();
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private String contractNo; // 合同代号
|
|
|
|
private String contractNo; // 合同代号
|
|
|
@ -559,7 +442,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
* @throws Exception
|
|
|
|
* @throws Exception
|
|
|
|
* @function 修改变更对象的属性
|
|
|
|
* @function 修改变更对象的属性
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void setItemProperty(TCComponentItem item, String changeName) throws Exception {
|
|
|
|
protected void setItemProperty(TCComponentItem item, String changeName) throws Exception {
|
|
|
|
|
|
|
|
|
|
|
|
contractNo = contractText.getText(); // 合同代号
|
|
|
|
contractNo = contractText.getText(); // 合同代号
|
|
|
|
contractName = htNameText.getText();// 合同名称
|
|
|
|
contractName = htNameText.getText();// 合同名称
|
|
|
@ -585,7 +468,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
CheckBox radioButton = partBtns.get(j);
|
|
|
|
CheckBox radioButton = partBtns.get(j);
|
|
|
|
if (radioButton.isSelected()) {
|
|
|
|
if (radioButton.isSelected()) {
|
|
|
|
if (unit.length() > 0) {
|
|
|
|
if (unit.length() > 0) {
|
|
|
|
unit.append(" ").append(radioButton.getText());
|
|
|
|
unit.append(";").append(radioButton.getText());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
unit.append(radioButton.getText());
|
|
|
|
unit.append(radioButton.getText());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -596,7 +479,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
ObservableList<EcnBean> items = tableView.getItems();
|
|
|
|
ObservableList<EcnBean> items = tableView.getItems();
|
|
|
|
int rowCount = items.size();
|
|
|
|
int rowCount = items.size();
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("rowCount:" + rowCount);
|
|
|
|
System.out.println(rowCount);
|
|
|
|
changeDrawingNo = new String[rowCount];
|
|
|
|
changeDrawingNo = new String[rowCount];
|
|
|
|
sign = new String[rowCount];
|
|
|
|
sign = new String[rowCount];
|
|
|
|
// placesNo = new String[rowCount];
|
|
|
|
// placesNo = new String[rowCount];
|
|
|
@ -611,18 +494,14 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
productSzs = new String[rowCount];
|
|
|
|
productSzs = new String[rowCount];
|
|
|
|
processSzs = new String[rowCount];
|
|
|
|
processSzs = new String[rowCount];
|
|
|
|
|
|
|
|
|
|
|
|
if(rowCount < 3) {
|
|
|
|
int modulus = changeDrawingNo.length % 5;
|
|
|
|
pages = 1;
|
|
|
|
int dlivery = changeDrawingNo.length / 5;
|
|
|
|
}else {
|
|
|
|
|
|
|
|
int modulus = (rowCount - 2) % 6;
|
|
|
|
|
|
|
|
int dlivery = (rowCount - 2) / 6 + 1;
|
|
|
|
|
|
|
|
if (modulus == 0) {
|
|
|
|
if (modulus == 0) {
|
|
|
|
pages = dlivery;
|
|
|
|
pages = dlivery;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
pages = dlivery + 1;
|
|
|
|
pages = dlivery + 1;
|
|
|
|
|
|
|
|
System.out.println("页数pages:" + pages);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.println("页数pages:" + pages);//TODO
|
|
|
|
|
|
|
|
for (int i = 0; i < rowCount; i++) {
|
|
|
|
for (int i = 0; i < rowCount; i++) {
|
|
|
|
EcnBean ecnBean = items.get(i);
|
|
|
|
EcnBean ecnBean = items.get(i);
|
|
|
|
changeDrawingNo[i] = ecnBean.getDrawNo().getText();
|
|
|
|
changeDrawingNo[i] = ecnBean.getDrawNo().getText();
|
|
|
@ -639,23 +518,6 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
szVersionAfts[i] = ecnBean.getAfterVersion().getText();
|
|
|
|
szVersionAfts[i] = ecnBean.getAfterVersion().getText();
|
|
|
|
productSzs[i] = ecnBean.getProductSz().getSelectionModel().getSelectedItem();
|
|
|
|
productSzs[i] = ecnBean.getProductSz().getSelectionModel().getSelectedItem();
|
|
|
|
processSzs[i] = rb_product.isSelected() ? "Y" : "N";
|
|
|
|
processSzs[i] = rb_product.isSelected() ? "Y" : "N";
|
|
|
|
|
|
|
|
|
|
|
|
if(changeDrawingNo[i] == null)
|
|
|
|
|
|
|
|
changeDrawingNo[i] = "";
|
|
|
|
|
|
|
|
if(sign[i] == null)
|
|
|
|
|
|
|
|
sign[i] = "";
|
|
|
|
|
|
|
|
if(partition[i] == null)
|
|
|
|
|
|
|
|
partition[i] = "";
|
|
|
|
|
|
|
|
if(changeBefore1[i] == null)
|
|
|
|
|
|
|
|
changeBefore1[i] = "";
|
|
|
|
|
|
|
|
if(changeAfter1[i] == null)
|
|
|
|
|
|
|
|
changeAfter1[i] = "";
|
|
|
|
|
|
|
|
if(szVersionBefs[i] == null)
|
|
|
|
|
|
|
|
szVersionBefs[i] = "";
|
|
|
|
|
|
|
|
if(szVersionAfts[i] == null)
|
|
|
|
|
|
|
|
szVersionAfts[i] = "";
|
|
|
|
|
|
|
|
if(productSzs[i] == null)
|
|
|
|
|
|
|
|
productSzs[i] = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
item.getTCProperty("zt2_ChangeDrawingNo").setStringValueArray(changeDrawingNo);
|
|
|
|
item.getTCProperty("zt2_ChangeDrawingNo").setStringValueArray(changeDrawingNo);
|
|
|
|
item.getTCProperty("zt2_Sign").setStringValueArray(sign);
|
|
|
|
item.getTCProperty("zt2_Sign").setStringValueArray(sign);
|
|
|
@ -812,8 +674,6 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
String result = read.getString("result");
|
|
|
|
String result = read.getString("result");
|
|
|
|
if (result.equals("否")) {
|
|
|
|
if (result.equals("否")) {
|
|
|
|
refTableBean.setShNo(true);
|
|
|
|
refTableBean.setShNo(true);
|
|
|
|
}else {
|
|
|
|
|
|
|
|
refTableBean.setShYes(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
i = i + 1;
|
|
|
|
i = i + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -906,9 +766,8 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @function 初始化影响分析的表格 绑定bean
|
|
|
|
* @function 初始化影响分析的表格 绑定bean
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
|
|
|
private void createDetailTable() {
|
|
|
|
private void createDetailTable() {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
|
|
TableColumn<EcnBean, TextArea> tc_beforChange = new TableColumn<EcnBean, TextArea>("更改前");
|
|
|
|
TableColumn<EcnBean, TextArea> tc_beforChange = new TableColumn<EcnBean, TextArea>("更改前");
|
|
|
|
TableColumn<EcnBean, TextArea> tc_afterChange = new TableColumn<EcnBean, TextArea>("更改后");
|
|
|
|
TableColumn<EcnBean, TextArea> tc_afterChange = new TableColumn<EcnBean, TextArea>("更改后");
|
|
|
@ -969,9 +828,8 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @function 影响分析数据表格
|
|
|
|
* @function 影响分析数据表格
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
|
|
|
private void createRefTable() {
|
|
|
|
private void createRefTable() {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
// 影响分析表格
|
|
|
|
// 影响分析表格
|
|
|
|
|
|
|
|
|
|
|
|
TableColumn<RefTableBean, String> deapart = new TableColumn<RefTableBean, String>("部门");
|
|
|
|
TableColumn<RefTableBean, String> deapart = new TableColumn<RefTableBean, String>("部门");
|
|
|
@ -1074,7 +932,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
* @function 添加监听
|
|
|
|
* @function 添加监听
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void addAssignAction(List<RefTableBean> refTableBeans) {
|
|
|
|
private void addAssignAction(List<RefTableBean> refTableBeans) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
Button userBtn = refTableBeans.get(0).getUserBtn();
|
|
|
|
Button userBtn = refTableBeans.get(0).getUserBtn();
|
|
|
|
assignBtnAction(userBtn, 0, 7, refTableBeans);
|
|
|
|
assignBtnAction(userBtn, 0, 7, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(7).getUserBtn(), 7, 11, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(7).getUserBtn(), 7, 11, refTableBeans);
|
|
|
@ -1094,7 +952,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
* @function
|
|
|
|
* @function
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void assignBtnAction(Button userBtn, int start, int end, List<RefTableBean> refTableBeans) {
|
|
|
|
private void assignBtnAction(Button userBtn, int start, int end, List<RefTableBean> refTableBeans) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
userBtn.setOnAction(e -> {
|
|
|
|
userBtn.setOnAction(e -> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String userVal = refTableBeans.get(start).getUserVal();
|
|
|
|
String userVal = refTableBeans.get(start).getUserVal();
|
|
|
@ -1112,7 +970,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e1) {
|
|
|
|
} catch (Exception e1) {
|
|
|
|
// Auto-generated catch block
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e1.printStackTrace();
|
|
|
|
e1.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -1124,22 +982,14 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
* @throws Exception
|
|
|
|
* @throws Exception
|
|
|
|
* @function 调用OA接口获取用户的9位ID
|
|
|
|
* @function 调用OA接口获取用户的9位ID
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private Map<String, String> getUserItemOA(String name) throws Exception {//TODO 调用OA接口
|
|
|
|
Map<String, String> getUserItemOA(String name) throws Exception {
|
|
|
|
OkHttpClient client = new OkHttpClient();
|
|
|
|
OkHttpClient client = new OkHttpClient();
|
|
|
|
Map<String, String> emailMap = new HashMap<>();
|
|
|
|
Map<String, String> emailMap = new HashMap<>();
|
|
|
|
String url = session.getPreferenceService().getStringValues("CHINT_OAUserID_RUL")[0];
|
|
|
|
|
|
|
|
System.out.println("url==>" + url);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
|
|
|
|
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
|
|
|
|
RequestBody body = RequestBody.create(mediaType, "Email=&Name=" + name + "&UserUUID=");
|
|
|
|
RequestBody body = RequestBody.create(mediaType, "Email=&Name=" + name);
|
|
|
|
Request request = new Request.Builder()
|
|
|
|
Request request = new Request.Builder()
|
|
|
|
// .url("http://10.207.0.245:8012/Portal/Webservices/EH/EH_Q_BPM_Two_Service.asmx/GetUserItems")
|
|
|
|
.url("http://10.207.0.245:8012/Portal/Webservices/EH/EH_Q_BPM_Two_Service.asmx/GetUserItems")
|
|
|
|
.url(url)
|
|
|
|
.method("POST", body).addHeader("Content-Type", "application/x-www-form-urlencoded").build();
|
|
|
|
.method("POST", body)
|
|
|
|
|
|
|
|
.addHeader("item", "2100004876")
|
|
|
|
|
|
|
|
.addHeader("wbs", "")
|
|
|
|
|
|
|
|
.addHeader("factoryNo", "")
|
|
|
|
|
|
|
|
.addHeader("Content-Type", "application/x-www-form-urlencoded").build();
|
|
|
|
|
|
|
|
Response response = client.newCall(request).execute();
|
|
|
|
Response response = client.newCall(request).execute();
|
|
|
|
String string = response.body().string();
|
|
|
|
String string = response.body().string();
|
|
|
|
System.out.println("xml==>" + string);
|
|
|
|
System.out.println("xml==>" + string);
|
|
|
@ -1148,7 +998,6 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
String type = rootElement.elementText("TYPE");
|
|
|
|
String type = rootElement.elementText("TYPE");
|
|
|
|
String message = rootElement.elementText("MESSAGE");
|
|
|
|
String message = rootElement.elementText("MESSAGE");
|
|
|
|
if (type.equals("S")) {
|
|
|
|
if (type.equals("S")) {
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
|
|
|
List<Element> elements = rootElement.elements("items");
|
|
|
|
List<Element> elements = rootElement.elements("items");
|
|
|
|
|
|
|
|
|
|
|
|
for (Element element : elements) {
|
|
|
|
for (Element element : elements) {
|
|
|
@ -1176,21 +1025,20 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
* @param frame
|
|
|
|
* @param frame
|
|
|
|
* @function 添加页面的监听
|
|
|
|
* @function 添加页面的监听
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
|
|
|
private void addWindListener(CreateEcnFrame frame) {
|
|
|
|
private void addWindListener(CreateEcnFrame frame) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
|
|
frame.addComponentListener(new ComponentListener() {
|
|
|
|
frame.addComponentListener(new ComponentListener() {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void componentShown(ComponentEvent e) {
|
|
|
|
public void componentShown(ComponentEvent e) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void componentResized(ComponentEvent e) {
|
|
|
|
public void componentResized(ComponentEvent e) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
// System.out.println("==============");
|
|
|
|
// System.out.println("==============");
|
|
|
|
double width = e.getComponent().getSize().getWidth();
|
|
|
|
double width = e.getComponent().getSize().getWidth();
|
|
|
|
// // double width = primaryStage.getWidth();
|
|
|
|
// // double width = primaryStage.getWidth();
|
|
|
@ -1203,13 +1051,13 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void componentMoved(ComponentEvent e) {
|
|
|
|
public void componentMoved(ComponentEvent e) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void componentHidden(ComponentEvent e) {
|
|
|
|
public void componentHidden(ComponentEvent e) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -1223,7 +1071,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
String part = read.getString(1);
|
|
|
|
String part = read.getString(1);
|
|
|
|
String reason = read.getString(2);
|
|
|
|
String reason = read.getString(2);
|
|
|
|
String manage = read.getString(3);
|
|
|
|
String manage = read.getString(3);
|
|
|
|
// String dataset = read.getString(4);
|
|
|
|
String dataset = read.getString(4);
|
|
|
|
String factory = read.getString(5);
|
|
|
|
String factory = read.getString(5);
|
|
|
|
String grade = read.getString(6);
|
|
|
|
String grade = read.getString(6);
|
|
|
|
factoryText.setText(factory);
|
|
|
|
factoryText.setText(factory);
|
|
|
@ -1301,7 +1149,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
rb_tempChange.isSelected(), assignBtn);
|
|
|
|
rb_tempChange.isSelected(), assignBtn);
|
|
|
|
dialog.start(new Stage());
|
|
|
|
dialog.start(new Stage());
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
// Auto-generated catch block
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1319,7 +1167,7 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
dialog.start(new Stage());
|
|
|
|
dialog.start(new Stage());
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
// Auto-generated catch block
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|