|
|
|
@ -35,25 +35,17 @@ import javax.swing.table.TableColumnModel;
|
|
|
|
|
|
|
|
|
|
import com.chint.plm.createEcn.Util;
|
|
|
|
|
import com.connor.chint.sap2.util.KUtil;
|
|
|
|
|
import com.connor.chint.sap2.util.POIUtil;
|
|
|
|
|
import com.connor.chint.sap2.util.ProgressBar;
|
|
|
|
|
import com.connor.chint.sap2.util.SAPUtil;
|
|
|
|
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
|
|
|
|
import com.teamcenter.rac.aif.AbstractAIFDialog;
|
|
|
|
|
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
|
|
|
|
|
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
|
|
|
|
import com.teamcenter.rac.kernel.ListOfValuesInfo;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponent;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentBOMLine;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentBOMWindow;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentBOMWindowType;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentForm;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentFormType;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentGroup;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentItem;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentListOfValues;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCException;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCSession;
|
|
|
|
|
import com.teamcenter.rac.util.MessageBox;
|
|
|
|
|
|
|
|
|
@ -61,7 +53,7 @@ import com.teamcenter.rac.util.MessageBox;
|
|
|
|
|
* BOM差异性
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public class CreateBOMDifferenceDialog extends AbstractAIFDialog {
|
|
|
|
|
public class CreateBOMDifferenceDialogWh extends AbstractAIFDialog {
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 1190944518442503011L;
|
|
|
|
|
public static final String[] HEADER = { "序号", "更改类别", "父件物料编码", "父件物料描述", "旧物料编码", "旧物料描述", "旧物料数量", "新物料编码",
|
|
|
|
@ -99,7 +91,7 @@ public class CreateBOMDifferenceDialog extends AbstractAIFDialog {
|
|
|
|
|
private String selectSubClassItemString = new String();
|
|
|
|
|
private String selectProcessTypeItemString = new String();
|
|
|
|
|
|
|
|
|
|
public CreateBOMDifferenceDialog(AbstractAIFApplication app) {
|
|
|
|
|
public CreateBOMDifferenceDialogWh(AbstractAIFApplication app) {
|
|
|
|
|
super(false);
|
|
|
|
|
this.app = app;
|
|
|
|
|
this.session = (TCSession) app.getSession();
|
|
|
|
@ -267,7 +259,7 @@ public class CreateBOMDifferenceDialog extends AbstractAIFDialog {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
try {
|
|
|
|
|
pb = new ProgressBar(CreateBOMDifferenceDialog.this, new Dimension(250, 50));
|
|
|
|
|
pb = new ProgressBar(CreateBOMDifferenceDialogWh.this, new Dimension(250, 50));
|
|
|
|
|
pb.startProgress();
|
|
|
|
|
pb.setText("正在生成BOM差异数据...");
|
|
|
|
|
pb.showDialog();
|
|
|
|
@ -306,11 +298,11 @@ public class CreateBOMDifferenceDialog extends AbstractAIFDialog {
|
|
|
|
|
* 根据图纸获取物料信息,获取P物料
|
|
|
|
|
*
|
|
|
|
|
* @param oldComponents 变更前或变更后物料
|
|
|
|
|
* @throws TCException
|
|
|
|
|
* @throws Exception
|
|
|
|
|
* @function
|
|
|
|
|
*/
|
|
|
|
|
private TCComponent[] getPMaterial(TCComponent[] oldComponents) throws TCException {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
private TCComponent[] getPMaterial(TCComponent[] oldComponents) throws Exception {
|
|
|
|
|
// Auto-generated method stub
|
|
|
|
|
// Util.ZT_PROP_PBOM;
|
|
|
|
|
// 物料编码 - E和P物料
|
|
|
|
|
Map<String, PBomBean> pbomMap = new HashMap<>();
|
|
|
|
@ -370,7 +362,7 @@ public class CreateBOMDifferenceDialog extends AbstractAIFDialog {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean isCellEditable(int row, int column) {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
// Auto-generated method stub
|
|
|
|
|
if (column > 9) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -394,7 +386,7 @@ public class CreateBOMDifferenceDialog extends AbstractAIFDialog {
|
|
|
|
|
Collections.sort(list, new Comparator<Entry<String, String>>() {
|
|
|
|
|
@Override
|
|
|
|
|
public int compare(Entry<String, String> o1, Entry<String, String> o2) {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
// Auto-generated method stub
|
|
|
|
|
return o1.getValue().compareTo(o2.getValue());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -461,7 +453,7 @@ public class CreateBOMDifferenceDialog extends AbstractAIFDialog {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
// Auto-generated method stub
|
|
|
|
|
disposeDialog();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -609,6 +601,7 @@ public class CreateBOMDifferenceDialog extends AbstractAIFDialog {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("deprecation")
|
|
|
|
|
public TCComponentForm createBOMEC(int rowCout) throws Exception {
|
|
|
|
|
TCComponentForm form = null;
|
|
|
|
|
TCComponent[] comps = tar.getRelatedComponents("IMAN_reference");
|