master
郭宇航 4 years ago
parent ea7e6c9a8d
commit 8a5a879792

@ -92,7 +92,7 @@
</classpathentry>
<classpathentry kind="lib" path="lib/org.eclipse.osgi.services.nl_12000.2.0.jar"/>
<classpathentry kind="lib" path="lib/org.eclipse.osgi.services_3.7.100.v20180827-1536.jar"/>
<classpathentry kind="lib" path="lib/cn.com.origin.autocode_1.0.0.jar"/>
<classpathentry kind="lib" path="lib/cn.com.origin.autocodemanager_1.0.0.jar"/>
<classpathentry kind="lib" path="lib/cn.com.origin.autocode_1.0.0.jar" sourcepath="D:/eclipse/workspacejune24/6.21/com.connor.dfl.plm/lib/cn.com.origin.autocode_1.0.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -232,6 +232,9 @@
<command name="创建标准Bom" id="com.connor.dfl.plm.dfl041.Dfl041Handler"/>
<command name="ERP队列" id="com.connor.dfl.plm.dfl042.Dfl042Handler"/>
<command name="自动填写作业编号" id="com.connor.dfl.plm.dfl043.Dfl043Handler"/>
<command name="查询零件库存和价格" id="com.connor.dfl.plm.dfl044.Dfl044Handler"/>
<command name="流程报表导出" id="com.connor.dfl.plm.dfl045.Dfl045Handler"/>
<command name="价格bom报表导出" id="com.connor.dfl.plm.dfl046.BOMExportHandler"/>
</extension>
<!--handlers-->
<extension point="org.eclipse.ui.handlers">
@ -447,6 +450,9 @@
<handler commandId="com.connor.dfl.plm.dfl041.Dfl041Handler" class="com.connor.dfl.plm.dfl041.Dfl041Handler"/>
<handler commandId="com.connor.dfl.plm.dfl042.Dfl042Handler" class="com.connor.dfl.plm.dfl042.Dfl042Handler"/>
<handler commandId="com.connor.dfl.plm.dfl043.Dfl043Handler" class="com.connor.dfl.plm.dfl043.Dfl043Handler"/>
<handler commandId="com.connor.dfl.plm.dfl044.Dfl044Handler" class="com.connor.dfl.plm.dfl044.Dfl044Handler"/>
<handler commandId="com.connor.dfl.plm.dfl045.Dfl045Handler" class="com.connor.dfl.plm.dfl045.Dfl045Handler"/>
<handler commandId="com.connor.dfl.plm.dfl046.BOMExportHandler" class="com.connor.dfl.plm.dfl046.BOMExportHandler"/>
<!--
<handler commandId="com.connor.dfl.plm.dfl030.Dfl030Handler" class="com.connor.dfl.plm.dfl030.Dfl030Handler"/>
@ -507,7 +513,19 @@
</and>
</visibleWhen>
</command>
<command commandId="com.connor.dfl.plm.dfl044.Dfl044Handler" id="com.connor.dfl.plm.dfl044.Dfl044Handler">
<visibleWhen>
<and>
<with variable="rac_command_suppression">
<not>
<iterate operator="or">
<equals value="com.connor.dfl.plm.dfl044.Dfl044Handler"/>
</iterate>
</not>
</with>
</and>
</visibleWhen>
</command>
</menu>
@ -681,6 +699,35 @@
</and>
</visibleWhen>
</command>
<command commandId="com.connor.dfl.plm.dfl046.BOMExportHandler" id="com.connor.dfl.plm.dfl046.BOMExportHandler">
<visibleWhen>
<and>
<with variable="rac_command_suppression">
<not>
<iterate operator="or">
<equals value="com.connor.dfl.plm.dfl046.BOMExportHandler"/>
</iterate>
</not>
</with>
</and>
</visibleWhen>
</command>
<command commandId="com.connor.dfl.plm.dfl045.Dfl045Handler" id="com.connor.dfl.plm.dfl045.Dfl045Handler">
<visibleWhen>
<and>
<with variable="rac_command_suppression">
<not>
<iterate operator="or">
<equals value="com.connor.dfl.plm.dfl045.Dfl045Handler"/>
</iterate>
</not>
</with>
</and>
</visibleWhen>
</command>
</menu>
@ -711,19 +758,7 @@
</command>
<command commandId="com.connor.dfl.plm.dfl021.Dfl021Handler" id="com.connor.dfl.plm.dfl021.Dfl021Handler">
<visibleWhen>
<and>
<with variable="rac_command_suppression">
<not>
<iterate operator="or">
<equals value="com.connor.dfl.plm.dfl021.Dfl021Handler"/>
</iterate>
</not>
</with>
</and>
</visibleWhen>
</command>
-->
<command commandId="com.connor.dfl.plm.dfl035.ShowMyViewHandler" mnemonic="S" id="com.connor.dfl.plm.dfl035.ShowMyViewHandler">
<visibleWhen>

@ -272,7 +272,7 @@ public class Dfl003AIFDialog extends AbstractAIFDialog {
e2.printStackTrace();
}
jtext1.setEnabled(false);
jtext2.setEnabled(false);
jtext2.setEnabled(true);
jcomname.setEnabled(false);
jp2.setLayout(null);
jl1.setBounds(20, 20, 30, 30);

@ -361,7 +361,9 @@ public class Dfl019Operation extends AbstractAIFOperation{
if("T2_outsourceRevision".equals(type) || "T2_OutBuyPartRevision".equals(type)
||"T2_VirtualRevision".equals(type) ||"T2_EquipmentRevision".equals(type)
||"T2_SystemSchemeRevision".equals(type)) {
if("T2_outsourceRevision".equals(type)||"T2_OutBuyPartRevision".equals(type) ) {
//判断是否有状态
if("T2_outsourceRevision".equals(type)||"T2_OutBuyPartRevision".equals(type)
) {
TCProperty tcProperty = rev.getTCProperty("release_status_list");
TCComponent[] targets = tcProperty.getReferenceValueArray();
String groupcode1 = rev.getStringProperty("t2_groupCode");
@ -373,6 +375,8 @@ public class Dfl019Operation extends AbstractAIFOperation{
"提示", MessageBox.WARNING);
return true;
}
if("T2_outsourceRevision".equals(type)||"T2_OutBuyPartRevision".equals(type)
) {
if(groupcode1.equals("")){
MessageBox.post(rev.getStringProperty("item_id")+"该物料没有分群码!!",
"提示", MessageBox.WARNING);
@ -384,6 +388,8 @@ public class Dfl019Operation extends AbstractAIFOperation{
return true;
}
}
}
}else {
MessageBox.post("该物料不允许传递ERP!!",
"提示", MessageBox.WARNING);
@ -830,6 +836,8 @@ public class Dfl019Operation extends AbstractAIFOperation{
String zong= tops + sss3SB.toString()+bottom;
System.out.println(zong);
String tempPath = System.getProperty("java.io.tmpdir");
System.out.println("10.20temp路径======="+tempPath);
//String path = "D:\\SENDTOERPLOG\\" + fileName + ".txt";
String path = tempPath + fileName + ".txt";
File file = new File(path);
if (!file.exists()) {
@ -872,6 +880,8 @@ public class Dfl019Operation extends AbstractAIFOperation{
String zong= tops + sss3SB.toString()+bottom;
System.out.println(zong);
String tempPath = System.getProperty("java.io.tmpdir");
System.out.println("10.20temp路径======="+tempPath);
//String path = "D:\\SENDTOERPLOG\\" + fileName + ".txt";
String path = tempPath + fileName + ".txt";
File file = new File(path);
if (!file.exists()) {

@ -178,6 +178,8 @@ public class Dfl020Operation extends AbstractAIFOperation{
if(comp[0] instanceof TCComponentItemRevision ) {
rev = (TCComponentItemRevision) comp[0];
String rve_id = rev.getStringProperty("current_revision_id");
System.out.println("11.17rve_id======"+rve_id);
}
if(comp[0] instanceof TCComponentBOMLine ) {
TCComponentBOMLine get_bom_line = (TCComponentBOMLine) comp[0];
@ -186,8 +188,10 @@ public class Dfl020Operation extends AbstractAIFOperation{
TCProperty tcProperty1 = rev.getTCProperty("release_status_list");
TCComponent[] targets1 = tcProperty1.getReferenceValueArray();
String item_type = rev.getType();
//限制没有发布状态的非虚拟件版本发起bom传递erp命令
// if(!("T2_VirtualRevision".equals(item_type))) {
//限制没有发布状态的设备虚拟件版本发起bom传递erp命令
// if("T2_VirtualRevision".equals(item_type)||"T2_EquipmentRevision".equals(item_type)) {
// if(targets1 == null || targets1.length <= 0) {
// MessageBox.post("您选中的版本对象没有发布状态","提示",MessageBox.INFORMATION);
// return;
@ -253,7 +257,7 @@ public class Dfl020Operation extends AbstractAIFOperation{
TCTypeService service = session.getTypeService();
TCComponentBOMWindowType winType = (TCComponentBOMWindowType) service.getTypeComponent("BOMWindow");
TCComponentBOMWindow view = winType.create(null);
TCComponentBOMLine line = view.setWindowTopLine(item,item.getLatestItemRevision(), null, null);
TCComponentBOMLine line = view.setWindowTopLine(item,rev, null, null);
AIFComponentContext[] childs = line.getChildren();
if(childs != null && childs.length > 0) {
createXMLFile(line,zhangtao);
@ -286,6 +290,8 @@ public class Dfl020Operation extends AbstractAIFOperation{
//List<FatherBomLineBean> list = new ArrayList<FatherBomLineBean>();
StringBuilder uidSB = new StringBuilder();
try {
getBOMValue(line,list);
if(list.size() <=0) {
@ -295,7 +301,7 @@ public class Dfl020Operation extends AbstractAIFOperation{
}
} catch (Exception e) {
// TODO: handle exception
MessageBox.post("BOM 传递失败请检查BOM行是否正确" ,"提示",MessageBox.INFORMATION);
MessageBox.post("BOM 传递失败请检查BOM行是否正确!" ,"提示",MessageBox.INFORMATION);
return;
}
//获取父 属性
@ -414,6 +420,8 @@ public class Dfl020Operation extends AbstractAIFOperation{
String fileName ="BOM"+ plmls;
String tempPath = System.getProperty("java.io.tmpdir");
System.out.println("10.20temp路径======="+tempPath);
//String path = "D:\\SENDTOERPLOG\\" + fileName + ".txt";
String path = tempPath + fileName + ".txt";
File file = new File(path);
@ -531,8 +539,13 @@ public class Dfl020Operation extends AbstractAIFOperation{
list.add(fatherBean);
for (int i = 0; i < childrens.length; i++)
{
TCComponentBOMLine z_line = (TCComponentBOMLine)childrens[i].getComponent();
TCComponentItem item = z_line.getItem();
// String idString = item.getStringProperty("item_id");
// System.out.println("11.17id======"+idString);
System.out.println("11.17z_line======="+z_line);
System.out.println("11.17list======="+list);
String type = item.getType();
System.out.println("type=============" + type);
if (!("T2_OutBuyPart".equals(type)) && !("T2_outsource".equals(type)))

@ -78,6 +78,7 @@ public class Dfl025Operation extends AbstractAIFOperation{
File file = ((TCComponentDataset)excel).getTcFiles()[0].getFmsFile();
SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");// 设置日期格式
String time = df.format(new Date());
System.out.println("11.12======"+lattetTime+"========"+EarlyTime);
String[] keys = new String[] {"创建时间晚于","创建时间早于"};
String[] values = new String[] {lattetTime,EarlyTime};
List<TCComponent> compList = queryObject("查找系统方案", keys, values);

@ -1,35 +1,51 @@
package com.connor.dfl.plm.dfl028;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JTextField;
import javax.swing.filechooser.FileSystemView;
import org.jacorb.idl.runtime.int_token;
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.TCComponent;
import com.teamcenter.rac.kernel.TCComponentBOMLine;
import com.teamcenter.rac.kernel.TCComponentBOMWindow;
import com.teamcenter.rac.kernel.TCComponentBOMWindowType;
import com.teamcenter.rac.kernel.TCComponentDataset;
import com.teamcenter.rac.kernel.TCComponentItem;
import com.teamcenter.rac.kernel.TCComponentItemRevision;
import com.teamcenter.rac.kernel.TCComponentRevisionRule;
import com.teamcenter.rac.kernel.TCComponentTcFile;
import com.teamcenter.rac.kernel.TCComponentUser;
import com.teamcenter.rac.kernel.TCException;
import com.teamcenter.rac.kernel.TCSession;
import com.teamcenter.rac.util.MessageBox;
@ -45,13 +61,26 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
private JFileChooser jFileChooser;
private JButton okBut = new JButton("下载");
private JButton celBut = new JButton("取消");
private List<File> fmsFilelist = new ArrayList<>();
private List<String> hzmlist = new ArrayList<>();
private List<String> namelist = new ArrayList<>();
private ArrayList<File> fmsFilelist = new ArrayList<>();
private ArrayList<String> hzmlist = new ArrayList<>();
private ArrayList<String> namelist = new ArrayList<>();
private FileInputStream fis;
private FileOutputStream fos;
private JPanel btnPanel1;
private JPanel btnPanel2;
private JPanel btnPanel3;
private String hzm;
private int iDataset=0;
private String datasetDir;
private Boolean outPartBool=false;
private JProgressBar bar;
private long fileSize=0;
private Boolean allCheck=false;
private List<String> noFileList=new ArrayList<String>();
private List<String> datasetList=new ArrayList<String>();
private Map<String, String> pathMap=new HashMap<String, String>();
private String pathString;
ExecutorService pool = Executors.newCachedThreadPool();
public Dfl028AIFDialog(AbstractAIFApplication arg0){
this.app = arg0;
this.session = (TCSession)app.getSession();
@ -62,18 +91,29 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
public void run() {
//显示窗口
init();
//启用查询按钮
// qryBtn.setEnabled(true);
}
//获取下载文件列表
private void getload(TCComponentDataset dataset){
private void getload(TCComponentDataset dataset,String path,List<String> list,String itemid){
try {
TCComponentTcFile[] file = dataset.getTcFiles();
if(file == null || file.length ==0){
MessageBox.post("数据集没有命名引用的文件,请检查!",
"WARNING",MessageBox.WARNING);
if(itemid.equals("sjj")) {
String noFileString=path+"_"+dataset.getStringProperty("object_name");
noFileList.add(noFileString);
}else {
AIFComponentContext[] itemRev = dataset.whereReferenced();
String items="";
for(AIFComponentContext context:itemRev) {
if(context.getComponent() instanceof TCComponentItemRevision) {
TCComponentItemRevision revision=(TCComponentItemRevision)context.getComponent();
items=revision.getStringProperty("item_id")+"_"+revision.getStringProperty("current_revision_id");
}
}
String noFileString=items+"_"+dataset.getStringProperty("object_name");
noFileList.add(noFileString);
}
return;
}else{
for(int i=0;i<file.length;i++){
@ -81,18 +121,24 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
continue;
}
//获取后缀名
String hzm = file[i].getTCProperty("file_ext").getStringValue();
hzm = file[i].getTCProperty("file_ext").getStringValue();
//获取文件名(带后缀)
if(list.contains(hzm)) {
String name = file[i].getTCProperty("original_file_name").getStringValue();
if(name.contains(".")){
//获取文件名(不带后缀)
name = name.substring(0, name.lastIndexOf("."));
}
String replace = name.replace("/", "-").replace("<", "-").
replace(">", "-").replace(":", "-").replace("|","-").
replace("\\","-").replace("*","-").replace("?","-");
//获取文件用户下载
File fmsFile = file[i].getFmsFile();
hzmlist.add(hzm);
namelist.add(name);
namelist.add(path+File.separator+replace);
fmsFilelist.add(fmsFile);
fileSize=fileSize+fmsFile.length();
}
}
}
} catch (TCException e) {
@ -102,10 +148,40 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
}
}
//获取文件后缀名
// private void gethzm(TCComponentDataset dataset) {
// try {
// //获取文件数组
// TCComponentTcFile[] file = dataset.getTcFiles();
// //判断数据集有没有命名引用的文件
// if(file == null || file.length ==0){
// MessageBox.post("数据集没有命名引用的文件,请检查!",
// "WARNING",MessageBox.WARNING);
// return;
// }else{
// //遍历循环文件数组
// for(int i=0;i<file.length;i++){
// //判断文件类型不是"ImanFile"
// if(!file[i].getType().equals("ImanFile")){
// continue;
// }
// //获取后缀名
// hzm = file[i].getTCProperty("file_ext").getStringValue();
// }
// }
// }catch (TCException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// MessageBox.post("发生错误:"+e.getMessage(),"错误",MessageBox.ERROR);
// }
// }
//文件下载到指定路径
private void downloadfile(String fpath){
try{
long hasReadByte = 0L;// 已经读取的字节个数
float result;
int progressSize = 0;
for(int i=0;i<hzmlist.size();i++){
//拼接输出文件名
String filename = namelist.get(i)+"."+hzmlist.get(i);
@ -119,11 +195,21 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
int len = 0;
while((len=fis.read(bs))!=-1){
fos.write(bs, 0, len);
hasReadByte = hasReadByte + len;
result = (float) ((double) hasReadByte / fileSize);
progressSize = Math.round(result * 100);
updateProgress(bar, progressSize);
}
if (progressSize <100) {
updateProgress(bar, progressSize);
}
if(progressSize==100) {
bar.setForeground(Color.blue);
}
if(fos!=null) fos.close();
if(fis!=null) fis.close();
}
MessageBox.post("下载成功","成功",MessageBox.INFORMATION);
}catch(Exception e){
e.printStackTrace();
MessageBox.post("下载失败:"+e.getMessage(),"错误",MessageBox.ERROR);
@ -131,6 +217,8 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
try {
fos.close();
fis.close();
MessageBox.post("下载完成","2",2);
this.dispose();
} catch (IOException e) {
// TODO Auto-generated catch block
@ -153,19 +241,54 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
//界面初始化
private void init(){
this.setLayout(new PropertyLayout());
this.setPreferredSize(new Dimension(550, 150));
this.setPreferredSize(new Dimension(650, 300));
FileSystemView fsv = FileSystemView.getFileSystemView();
String deskPath = fsv.getHomeDirectory().getPath();
//第一行:图纸类型
btnPanel1 = new JPanel();
JLabel drawingtype = new JLabel("图纸类型:");
JCheckBox checkBox1 = new JCheckBox("DWG");
JCheckBox checkBox2 = new JCheckBox("PDF");
JCheckBox checkBox3 = new JCheckBox("STP");
btnPanel1.add(checkBox1);
btnPanel1.add(checkBox2);
btnPanel1.add(checkBox3);
JCheckBox checkBox2 = new JCheckBox("idw");//new
JCheckBox checkBox3 = new JCheckBox("PDF");
JCheckBox checkBox4 = new JCheckBox("ipt");//new
JCheckBox checkBox5 = new JCheckBox("iam");//new
JCheckBox checkBox6 = new JCheckBox("STP");
JCheckBox checkBox7 = new JCheckBox("STEP");//new
//btnPanel1.add(drawingtype);
btnPanel1.add("1.1.left.top",drawingtype);
btnPanel1.add("1.2.left.top",checkBox1);
btnPanel1.add("1.3.left.top",checkBox2);
btnPanel1.add("1.4.left.top",checkBox3);
btnPanel1.add("1.5.left.top",checkBox4);
btnPanel1.add("1.6.left.top",checkBox5);
btnPanel1.add("1.7.left.top",checkBox6);
btnPanel1.add("1.8.left.top",checkBox7);
//第二行:零件类型
btnPanel2 = new JPanel();
JLabel itemtype = new JLabel("零件类型:");
JCheckBox checkBox11 = new JCheckBox("全部");
JCheckBox checkBox12 = new JCheckBox("外购件");
JCheckBox checkBox13 = new JCheckBox("外协件");
JCheckBox checkBox14 = new JCheckBox("虚拟件");
//btnPanel2.add(itemtype);
btnPanel2.add("1.1.left.top",itemtype);
btnPanel2.add("1.2.left.top",checkBox11);
btnPanel2.add("1.3.left.top",checkBox12);
btnPanel2.add("1.4.left.top",checkBox13);
btnPanel2.add("1.5.left.top",checkBox14);
//第三行附加条件
btnPanel3 = new JPanel();
JLabel additional = new JLabel("附加筛选:");
JCheckBox checkBox21 = new JCheckBox("外协件/外购件打包下载");
JCheckBox checkBox22 = new JCheckBox("仅下载已发布图纸");
//btnPanel3.add(additional);
btnPanel3.add("1.1.left.top",additional);
btnPanel3.add("1.2.left.top",checkBox21);
btnPanel3.add("1.3.left.top",checkBox22);
//第四行下载选项
jLabel = new JLabel("下载路径:");
jtf.setText(deskPath);
jButton = new JButton("...");
jButton = new JButton("浏览");
jFileChooser = new JFileChooser();
this.jFileChooser.setCurrentDirectory(new File(deskPath));
this.jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
@ -176,7 +299,12 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
panel.add("2.1.left.top",okBut);
panel.add("2.2.left.top",celBut);
this.add("1.1.left.top",btnPanel1);
this.add("2.1.left.top",panel);
// this.add("2.1.left.top",itemtype);
this.add("2.1.left.top",btnPanel2);
// this.add("3.1.left.top",additional);
this.add("3.1.left.top",btnPanel3);
this.add("4.1.left.top",panel);
// this.add("5.1.left.top",paneljdt);
this.setResizable(false);
this.setBounds(5, 5, 5, 5);
this.centerToScreen();
@ -191,16 +319,106 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
okBut.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
datasetList.add("DWG");
datasetList.add("Tofflon_DWG");
datasetList.add("T2_DWG");
datasetList.add("AIDrawing");
datasetList.add("PDF");
datasetList.add("AIPart");
datasetList.add("AIAssembly");
datasetList.add("TAI2_TCAI115_AISTEP");
datasetList.add("TAI2_TCAI115_AISTEP");
Component[] jcbs = btnPanel2.getComponents();//将勾选的内容存入数组
Boolean btnpa2=false;
for(Component component : jcbs) {
if(component instanceof JCheckBox) {
JCheckBox checkBox=(JCheckBox)component;
if(checkBox.isSelected()) {
btnpa2=true;
}
}
}
Component[] jcbs2 = btnPanel1.getComponents();//将勾选的内容存入数组
Boolean btnpa1=false;
for(Component component : jcbs2) {
if(component instanceof JCheckBox) {
JCheckBox checkBox=(JCheckBox)component;
if(checkBox.isSelected()) {
btnpa1=true;
}
}
}
if(!btnpa1) {
MessageBox.post("请选择图纸类型","提示",2);
}
Boolean ljlxno=false;
for(int t=0;t<targets.length;t++) {
if(targets[t] instanceof TCComponentDataset) {
}else {
ljlxno=true;
}
}
if(!btnpa2 && ljlxno) {
MessageBox.post("请选择零件类型","提示",2);
}
// TODO Auto-generated method stub
if((btnpa2||!ljlxno)&&btnpa1) {
getTypes();
if(fmsFilelist.size()!=0) {
System.out.print("开始下载");
String fpath = jtf.getText();
final String fpath = jtf.getText();
if(fpath != null && (!fpath.trim().equals(""))){
// ProgressBarThread wait = new ProgressBarThread("下载", "下载中。。。");
// wait.start();
new Thread(new Runnable() {
@Override
public void run() {
JDialog dialog = new JDialog();
bar=new JProgressBar(0,100);
Container contentPane = dialog.getContentPane();
contentPane.setLayout(new GridLayout(2, 1));
JTextField text=new JTextField("下载中");
contentPane.add("1.1.center.top", text);
contentPane.add("2.1.center.top", bar);
dialog.setSize(300, 100);
dialog.setVisible(true);
dialog.setLocationRelativeTo(dialog.getParent());
downloadfile(fpath);
setVisible(false);
dialog.setVisible(false);
}
}).start();
// wait.setBool(true);// 关闭进度条
// wait.interrupt();
}else{
MessageBox.post("文件路径不能为空!", "警告", MessageBox.INFORMATION);
}
} else {
MessageBox.post("没有找到符合条件的图纸","提示",2);
}
if(noFileList.size()!=0) {
OutputStreamWriter outputStreamWriter;
try {
outputStreamWriter = new OutputStreamWriter(new FileOutputStream(pathString+File.separator+"部分数据集没有命名的引用.txt"));
BufferedWriter bWriter = new BufferedWriter(outputStreamWriter);
for(String liString:noFileList) {
bWriter.write(liString);
bWriter.newLine();
}
bWriter.close();
outputStreamWriter.close();
if(Desktop.isDesktopSupported()){
File worksheet = new File(pathString+File.separator+"部分数据集没有命名的引用.txt");
Desktop.getDesktop().open(worksheet); // or Desktop.getDesktop().edit(worksheet);
}
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
}
});
celBut.addActionListener(new ActionListener() {
@ -215,86 +433,291 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
this.centerToScreen();
this.showDialog();
}
//获取图纸类型
public void getTypes() {
List<String> list = new ArrayList<String>();
Component[] jcbs = btnPanel1.getComponents();//将勾选的内容存入数组
for(Component component : jcbs) {
if(component instanceof JCheckBox) {
JCheckBox jcb = (JCheckBox) component;
if(jcb.isSelected()) {
list.add(jcb.getText());
if("DWG".equals(jcb.getText())) {
list.add("T2_DWG");
list.add("DWG");
list.add("dwg");
}else if ("STP".equals(jcb.getText())) {
list.add("TAI2_TCAI115_AISTEP");
list.add("stp");
}else if("PDF".equals(jcb.getText())) {
list.add("pdf");
list.add("PDF");
}else if("idw".equals(jcb.getText())) {
list.add("idw");
}else if ("ipt".equals(jcb.getText())) {
list.add("ipt");
}else if ("iam".equals(jcb.getText())) {
list.add("iam");
}else if ("STEP".equals(jcb.getText())) {
list.add("STEP");
list.add("step");
}
}
}
if(list.size() <= 0) {
list.add("T2_DWG");
list.add("PDF");
list.add("TAI2_TCAI115_AISTEP");
}
try {
for (int i = 0; i < targets.length; i++) {
if(targets[i] instanceof TCComponentBOMLine){
List<String> itemlist = new ArrayList<String>();
//执行获取零件类型的方法
itemlist = getitemType();
//定义bom行
TCComponentBOMLine line = (TCComponentBOMLine) targets[i];
TCComponentItemRevision rev = line.getItemRevision();
String objName= rev.getStringProperty("object_name");
String replace = objName.replace("/", "-").replace("<", "-").
replace(">", "-").replace(":", "-").replace("|","-").
replace("\\","-").replace("*","-").replace("?","-");
String revtype = rev.getType();
String dataDir2 =jtf.getText()+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//创建版本文件夹
File csFile=new File(dataDir2);
//数据版本创建自己的文件夹
String dataName = rev.getStringProperty("item_id")+"_"+ rev.getStringProperty("current_revision_id")+
"_"+replace;//文件名
pathString=dataDir2;
if(!csFile.exists()) {
csFile.mkdir();
}
System.out.println("cs"+rev.toString()+list.get(0));
String dataName2="";
//遍历视图 去找符合条件的 文件夹已经创建
getOutPart(rev,dataName,list);
String dataDir3 =jtf.getText()+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//创建版本文件夹总成
File csFile2=new File(dataDir3);
if(!csFile2.exists()) {
csFile2.mkdir();
}
dataName2=dataName+File.separator+rev.getStringProperty("item_id")+"_"+ rev.getStringProperty("current_revision_id")+
"_"+replace;
TCComponent[] datasets = rev.getReferenceListProperty("IMAN_specification");
TCComponent[] datasets2 = rev.getReferenceListProperty("IMAN_Rendering");
for (int j = 0; j < datasets.length; j++) {
String type = datasets[j].getType();
if(list.contains(type)) {
TCComponentDataset dataset = (TCComponentDataset) datasets[j];
getload(dataset);
//获取数据集数组
TCComponentDataset dataset01 = null;
if(datasets[j] instanceof TCComponentDataset) {
dataset01 = (TCComponentDataset) datasets[j];
}else {
continue;
}
//执行获取后缀名的方法
// gethzm(dataset01);
//执行获取零件类型的方法
String type = dataset01.getType();
//判断list包含hzm字符串的值 且 itemlist包含revtype的值
if(itemlist.contains(revtype)||allCheck) {
if(datasetList.contains(type)) {
//获取数据集数据
TCComponentDataset dataset02 = (TCComponentDataset) datasets[j];
//执行getload方法
getload(dataset02,dataName,list,rev.getStringProperty("item_id"));
getload(dataset02,dataName2,list,rev.getStringProperty("item_id"));
}
}
}
for (int j = 0; j < datasets2.length; j++) {
String type = datasets2[j].getType();
if(list.contains(type)) {
//获取数据集数组
TCComponentDataset dataset02 = null;
if(datasets2[j] instanceof TCComponentDataset) {
dataset02 = (TCComponentDataset) datasets2[j];
}else {
continue;
}
//执行获取后缀名的方法
// gethzm(dataset02);
String type = dataset02.getType();
//判断是否为所需要的零件类型
if(itemlist.contains(revtype)||allCheck) {
if(datasetList.contains(type)) {
TCComponentDataset dataset = (TCComponentDataset) datasets2[j];
getload(dataset);
getload(dataset,dataName,list,rev.getStringProperty("item_id"));
getload(dataset,dataName2,list,rev.getStringProperty("item_id"));
}
}
}
}else if(targets[i] instanceof TCComponentItemRevision){
}
else if(targets[i] instanceof TCComponentItemRevision){
List<String> itemlist = new ArrayList<String>();
//执行获取零件类型的方法
itemlist = getitemType();
TCComponentItemRevision rev = (TCComponentItemRevision) targets[i];
String revtype = rev.getType();
String objName= rev.getStringProperty("object_name");
String replace = objName.replace("/", "-").replace("<", "-").
replace(">", "-").replace(":", "-").replace("|","-").
replace("\\","-").replace("*","-").replace("?","-");
String dataDir =jtf.getText()+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//创建版本文件夹
File csFile=new File(dataDir);
//数据版本创建自己的文件夹
String dataName =rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//文件名
String dataName2="";
pathString=dataDir;
if(!csFile.exists()) {
csFile.mkdir();
}
//遍历视图 去找符合条件的 文件夹已经创建
getOutPart(rev,dataName,list);
String dataDir3 =jtf.getText()+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//创建版本文件夹总成
File csFile2=new File(dataDir3);
if(!csFile2.exists()) {
csFile2.mkdir();
}
dataName2 =dataName+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//文件名
TCComponent[] datasets = rev.getReferenceListProperty("IMAN_specification");
TCComponent[] datasets2 = rev.getReferenceListProperty("IMAN_Rendering");
for (int j = 0; j < datasets.length; j++) {
String type = datasets[j].getType();
if(list.contains(type)) {
//获取数据集数组
TCComponentDataset dataset02 = null;
if(datasets[j] instanceof TCComponentDataset) {
dataset02 = (TCComponentDataset) datasets[j];
}else {
continue;
}
//执行获取后缀名的方法
// gethzm(dataset02);
String type = dataset02.getType();
//判断零件类型
if(itemlist.contains(revtype)||allCheck) {
if(datasetList.contains(type)) {
TCComponentDataset dataset = (TCComponentDataset) datasets[j];
System.out.println("下载文件");
getload(dataset);
getload(dataset,dataName,list,rev.getStringProperty("item_id"));
getload(dataset,dataName2,list,rev.getStringProperty("item_id"));
}
}
}
for (int j = 0; j < datasets2.length; j++) {
String type = datasets2[j].getType();
if(list.contains(type)) {
//获取数据集数组
TCComponentDataset dataset02 = null;
if(datasets2[j] instanceof TCComponentDataset) {
dataset02 = (TCComponentDataset) datasets2[j];
}else {
continue;
}
//执行获取后缀名的方法
// gethzm(dataset02);
String type = dataset02.getType();
//判断零件类型
if (itemlist.contains(revtype)||allCheck) {
if(datasetList.contains(type)) {
TCComponentDataset dataset = (TCComponentDataset) datasets2[j];
getload(dataset);
getload(dataset,dataName,list,rev.getStringProperty("item_id"));
getload(dataset,dataName2,list,rev.getStringProperty("item_id"));
}
}
}
}else if(targets[i] instanceof TCComponentDataset) {
TCComponentDataset dataset = (TCComponentDataset) targets[i];
getload(dataset);
String dataName="";
String objName = dataset.getStringProperty("object_name");
String replaceName = objName.replace("/", "-").replace("<", "-").
replace(">", "-").replace(":", "-").replace("|","-").
replace("\\","-").replace("*","-").replace("?","-");
if(iDataset==0) {
dataName=jtf.getText()+File.separator+replaceName;
datasetDir=replaceName;
pathString=dataName;
File csFile=new File(dataName);
if(!csFile.exists()) {
csFile.mkdir();
}
}
iDataset=1;
String type = dataset.getType();
// gethzm(dataset);
if(datasetList.contains(type)) {
getload(dataset,datasetDir,list,"sjj");
}
}else if(targets[i] instanceof TCComponentItem){
List<String> itemlist = new ArrayList<String>();
//执行获取零件类型的方法
itemlist = getitemType();
TCComponentItem item = (TCComponentItem) targets[i];
// item.getReleasedItemRevisions();
TCComponentItemRevision rev = item.getLatestItemRevision();
String revtype = rev.getType();
String objName= rev.getStringProperty("object_name");
String replace = objName.replace("/", "-").replace("<", "-").
replace(">", "-").replace(":", "-").replace("|","-").
replace("\\","-").replace("*","-").replace("?","-");
String dataDir2 =jtf.getText()+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//创建版本文件夹
File csFile=new File(dataDir2);
//数据版本创建自己的文件夹
String dataName = rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//文件名
pathString=dataDir2;
if(!csFile.exists()) {
csFile.mkdir();
}
String dataName2="";
//遍历视图 去找符合条件的 文件夹已经创建
getOutPart(rev,dataName,list);
String dataDir3 =jtf.getText()+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//创建版本文件夹总成
File csFile2=new File(dataDir3);
if(!csFile2.exists()) {
csFile2.mkdir();
}
dataName2 =dataName+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+replace;//文件名
TCComponent[] datasets = rev.getReferenceListProperty("IMAN_specification");
TCComponent[] datasets2 = rev.getReferenceListProperty("IMAN_Rendering");
for (int j = 0; j < datasets.length; j++) {
String type = datasets[j].getType();
if(list.contains(type)) {
//获取数据集数组
TCComponentDataset dataset02 = null;
if(datasets[j] instanceof TCComponentDataset) {
dataset02 = (TCComponentDataset) datasets[j];
}else {
continue;
}
//执行获取后缀名的方法
String type = dataset02.getType();
// gethzm(dataset02);
if(itemlist.contains(revtype)||allCheck) {
if(datasetList.contains(type)) {
TCComponentDataset dataset = (TCComponentDataset) datasets[j];
getload(dataset);
getload(dataset,dataName,list,rev.getStringProperty("item_id"));
getload(dataset,dataName2,list,rev.getStringProperty("item_id"));
}
}
}
for (int j = 0; j < datasets2.length; j++) {
String type = datasets2[j].getType();
if(list.contains(type)) {
//获取数据集数组
TCComponentDataset dataset02 = null;
if(datasets2[j] instanceof TCComponentDataset) {
dataset02 = (TCComponentDataset) datasets2[j];
}else {
continue;
}
//执行获取后缀名的方法
// gethzm(dataset02);
String type = dataset02.getType();
if(itemlist.contains(revtype)||allCheck) {
if(datasetList.contains(type)) {
TCComponentDataset dataset = (TCComponentDataset) datasets2[j];
getload(dataset);
getload(dataset, dataName,list,rev.getStringProperty("item_id"));
getload(dataset, dataName2,list,rev.getStringProperty("item_id"));
}
}
}
}else {
@ -304,7 +727,261 @@ public class Dfl028AIFDialog extends AbstractAIFDialog {
}
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
//获取零件类型
public List<String> getitemType() {
List<String> itemlist = new ArrayList<String>();
Component[] jcbs = btnPanel2.getComponents();//将勾选的内容存入数组
//遍历勾选的内容
for(Component component : jcbs) {
if(component instanceof JCheckBox) {
JCheckBox jcb = (JCheckBox) component;
//判断元素是否被选中
if(jcb.isSelected()) {
itemlist.add(jcb.getText());
itemlist.add(jcb.getText());
if("全部".equals(jcb.getText())) {
allCheck=true;
itemlist.add("T2_VirtualRevision");
itemlist.add("T2_OutBuyPartRevision");
itemlist.add("T2_outsourceRevision");
itemlist.add("T2_EquipmentRevision");
}else if ("外协件".equals(jcb.getText())) {
itemlist.add("T2_outsourceRevision");
}else if ("外购件".equals(jcb.getText())) {
itemlist.add("T2_OutBuyPartRevision");
}else if ("虚拟件".equals(jcb.getText())) {
itemlist.add("T2_VirtualRevision");
}
}
}
}
return itemlist;
}
public void getOutPart(TCComponentItemRevision rev ,String dir,List<String> list) throws TCException {
//设备获取完成了 获取子键 全部 全获取 外购 判断当前 外购子键不判断
TCComponentItem item = rev.getItem();
List<String> itemlist = new ArrayList<String>();
//执行获取零件类型的方法
itemlist = getitemType();
Boolean sxTj = getSxTj();
TCComponentBOMWindowType winType = (TCComponentBOMWindowType) session.getTypeService()
.getTypeComponent("BOMWindow");
TCComponentRevisionRule[] listAllRules = TCComponentRevisionRule.listAllRules(session);
TCComponentBOMWindow window = winType.create(null);
for(TCComponentRevisionRule rule:listAllRules) {
if(sxTj&&rule.toString().equals("Precise;Any Status;Latest Working")) {
window.setRevisionRule(rule);
}else if (!sxTj&&rule.toString().equals("Latest Working")) {
window.setRevisionRule(rule);
}
}
window.lock();
TCComponentBOMLine topLine = window.setWindowTopLine(
item, rev, null, null);
AIFComponentContext[] children2=new AIFComponentContext[4096];
children2=topLine.getChildren();
// AIFComponentContext[] children = topLine.getChildren();
for(int i=0;i<children2.length;i++) {
TCComponentBOMLine line=(TCComponentBOMLine)children2[i].getComponent();
getOutPartInBom(line,sxTj,0,itemlist,dir,list,0,dir);
}
// for(AIFComponentContext context:children2) {
// TCComponentBOMLine line=(TCComponentBOMLine)context.getComponent();
// //判断发布 版本规则 判断
//// TCComponentItemRevision revision = line.getItemRevision();
//// if(itemlist.contains(revision.getType())||allCheck) {//外协外购虚拟
// getOutPartInBom(line,sxTj,0,itemlist,dir,list,0,dir); //不论什么类型父级都要遍历下面所有的 选择的类型
//// }
// }
window.save();
window.unlock();
window.close();
}
// public TCComponentItemRevision findLatesStatus(TCComponentItemRevision rev) {
// TCComponentItemRevision latestRev=rev;
// try {
// TCComponentItem item = rev.getItem();
// TCComponent[] revList = item.getReferenceListProperty("revision_list");
// List<TCComponentItemRevision> listRev=new ArrayList<TCComponentItemRevision>();
// for(TCComponent revs:revList) {
// TCComponentItemRevision revision=(TCComponentItemRevision)revs;
// TCComponent[] status = revision.getReferenceListProperty("release_status_list");
// if(status.length!=0) {
// if(status[0].toString().equals("TCM 已发布")) {
// listRev.add(revision);
// }
// }
// }
//
// if(listRev.size()!=0) {
// latestRev=listRev.get(0);
// Date newDate=latestRev.getDateProperty("creation_date");
// for(TCComponentItemRevision revision:listRev) {
// Date date = revision.getDateProperty("creation_date");
// int datei = newDate.compareTo(date);
// if(datei<0) {
// newDate=date;
// latestRev=revision;
// }
// }
// }
// } catch (TCException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// return latestRev;
// }
//遍历bom视图找出所有外协件 外购件 i判断是不是第一层外协外购
public void getOutPartInBom(TCComponentBOMLine bomLine,Boolean sxtj,int i,List<String> itemList,
String dir,List<String> list,int bomNum,String dirFs) throws TCException {
TCComponentItemRevision rev = bomLine.getItemRevision();
// if(sxtj) {
// rev=findLatesStatus(rev);
// }
String dirTop=dir;
// String revtype = rev.getStringProperty("object_type");
String revtype= rev.getType();//真实值
if((itemList.contains(revtype)&&bomNum==0)||allCheck||bomNum==1) {
Boolean l=revtype.equals("T2_OutBuyPartRevision")||revtype.equals("T2_outsourceRevision")||revtype.equals("ItemRevision");
if(outPartBool&&l) {
String dirString=jtf.getText()+File.separator+dir+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+rev.getStringProperty("object_name");
dir=dir+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+rev.getStringProperty("object_name");
dirTop=dir;
File csFile=new File(dirString);
if(!csFile.exists()) {
csFile.mkdir();
}
if(bomLine.getChildren().length!=0) {
dirString=dirString+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+rev.getStringProperty("object_name");
dir=dir+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+rev.getStringProperty("object_name");
File csFile2=new File(dirString);
if(!csFile2.exists()) {
csFile2.mkdir();
}
}
if(i==0 ) {
pathMap.put("1", dir);
if(bomLine.getChildren().length!=0) {
dirString=dirString+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+rev.getStringProperty("object_name");
File csFile3=new File(dirString);
if(!csFile3.exists()) {
csFile3.mkdir();
}
dir=dir+File.separator+rev.getStringProperty("item_id")+"_"+
rev.getStringProperty("current_revision_id")+"_"+rev.getStringProperty("object_name");
}
}i++;
}
TCComponent[] datasets = rev.getReferenceListProperty("IMAN_specification");
TCComponent[] datasets2 = rev.getReferenceListProperty("IMAN_Rendering");
for (int j = 0; j < datasets.length; j++) {
//获取数据集数组
TCComponentDataset dataset01=null;
if(datasets[j] instanceof TCComponentDataset) {
dataset01 = (TCComponentDataset) datasets[j];
}
else {
continue;
}
// TCComponentDataset dataset01 = (TCComponentDataset) datasets[j];
//执行获取后缀名的方法
// gethzm(dataset01);
//执行获取零件类型的方法
String type = dataset01.getStringProperty("object_type");
//判断list包含hzm字符串的值 且 itemlist包含revtype的值
if(datasetList.contains(type)) {
//获取数据集数据
TCComponentDataset dataset02 = null;
if(datasets[j] instanceof TCComponentDataset) {
dataset02 = (TCComponentDataset) datasets[j];
}else {
continue;
}
//执行getload方法
getload(dataset02,dir,list,rev.getStringProperty("item_id"));
//复制一份到父级
if(!dir.equals(dirFs)) {
getload(dataset02,dirFs,list,rev.getStringProperty("item_id"));
}
if(!dir.equals(pathMap.get("1"))&& pathMap.get("1")!=null) {
getload(dataset02,pathMap.get("1"),list,rev.getStringProperty("item_id"));
}
}
}
for (int j = 0; j < datasets2.length; j++) {
//获取数据集数组
TCComponentDataset dataset02 = null;
if(datasets2[j] instanceof TCComponentDataset) {
dataset02 = (TCComponentDataset) datasets2[j];
}else {
continue;
}
//执行获取后缀名的方法
// gethzm(dataset02);
//判断是否为所需要的零件类型
String type = dataset02.getStringProperty("object_type");
if(datasetList.contains(type)) {
TCComponentDataset dataset = (TCComponentDataset) datasets2[j];
getload(dataset,dir,list,rev.getStringProperty("item_id"));
if(!dir.equals(dirFs)) {
getload(dataset,dirFs,list,rev.getStringProperty("item_id"));
}
if(!dir.equals(pathMap.get("1"))) {
getload(dataset02,pathMap.get("1"),list,rev.getStringProperty("item_id"));
}
}
}
AIFComponentContext[] children = bomLine.getChildren();
for(AIFComponentContext context:children) {
TCComponentBOMLine line=(TCComponentBOMLine)context.getComponent();
getOutPartInBom(line,sxtj,i,itemList,dirTop,list,1,dirFs);
}
} else {
AIFComponentContext[] children = bomLine.getChildren();
for(AIFComponentContext context:children) {
TCComponentBOMLine line=(TCComponentBOMLine)context.getComponent();
getOutPartInBom(line,sxtj,0,itemList,dirTop,list,0,dirFs);
}
}
}
private static void updateProgress(JProgressBar copyProgressBar, int progressSize) {
copyProgressBar.setString(progressSize + "%");
copyProgressBar.setValue(progressSize);
}
public Boolean getSxTj(){
List<String> tjlist = new ArrayList<String>();
Boolean statusBool=false;
Component[] jcbs = btnPanel3.getComponents();
for(Component component:jcbs) {
if(component instanceof JCheckBox) {
JCheckBox jcb = (JCheckBox) component;
if(jcb.isSelected()) {
tjlist.add(jcb.getText());
}
}
}
for(String s:tjlist) {
if(s.equals("仅下载已发布图纸")) {
statusBool=true;
}
if(s.equals("外协件/外购件打包下载")) {
outPartBool=true;
}
}
return statusBool;
}
}

@ -95,14 +95,14 @@ public class Dfl032Dialog extends AbstractAIFDialog{
@Override
public void run() {
ParseXMLUtil xml=new ParseXMLUtil();
File file=xml.getSXX("DFL_CLASS_Xml", session);
attrList =xml.parseXMLCode(file);
if(attrList == null || attrList.size() <= 0) {
MessageBox.post("首选项DFL_CLASS_Xml未配置请检查", "WARNING",
MessageBox.WARNING);
return;
}
// ParseXMLUtil xml=new ParseXMLUtil();
// File file=xml.getSXX("DFL_CLASS_Xml", session);
// attrList =xml.parseXMLCode(file);
// if(attrList == null || attrList.size() <= 0) {
// MessageBox.post("首选项DFL_CLASS_Xml未配置请检查", "WARNING",
// MessageBox.WARNING);
// return;
// }
InterfaceAIFComponent comp = app.getTargetComponent();
String compType = comp.getType();
System.out.println("compType=============="+compType);
@ -381,19 +381,19 @@ public class Dfl032Dialog extends AbstractAIFDialog{
classPropList.add(bean);
}
}
for (int i = 0; i < attrList.size(); i++) {
String classValue = attrList.get(i);
if(classValue.contains(";")) {
String[] classValues = classValue.split(";");
if(c.getId().equals(classValues[0])) {
attrName = new String [classValues.length -1];
for (int j = 0; j < attrName.length; j++) {
attrName[j] = classValues[j+1];
}
break;
}
}
}
// for (int i = 0; i < attrList.size(); i++) {
// String classValue = attrList.get(i);
// if(classValue.contains(";")) {
// String[] classValues = classValue.split(";");
// if(c.getId().equals(classValues[0])) {
// attrName = new String [classValues.length -1];
// for (int j = 0; j < attrName.length; j++) {
// attrName[j] = classValues[j+1];
// }
// break;
// }
// }
// }
String[] columnNames = new String[icsAttrS.length + 3];
columnNames[0] = "序号";
columnNames[1] = "品号";
@ -448,18 +448,18 @@ public class Dfl032Dialog extends AbstractAIFDialog{
model.setDataVector(cellData, columnNames);
//DefaultTableCellRenderer类可以绘制单元格的背景、字体颜色等功能
DefaultTableCellRenderer backGroundColor = new DefaultTableCellRenderer();
// DefaultTableCellRenderer backGroundColor = new DefaultTableCellRenderer();
//绘制部门列的背景为黄色
backGroundColor.setBackground(Color.yellow);
if(attrName != null && attrName.length > 0) {
for (int i = 0; i < attrName.length; i++) {
List<String> colList = Arrays.asList(columnNames);
if(colList.contains(attrName[i])) {
TableColumn tableColumn = qryTable.getColumn(attrName[i]);
tableColumn.setCellRenderer(backGroundColor);
}
}
}
// backGroundColor.setBackground(Color.yellow);
// if(attrName != null && attrName.length > 0) {
// for (int i = 0; i < attrName.length; i++) {
// List<String> colList = Arrays.asList(columnNames);
// if(colList.contains(attrName[i])) {
// TableColumn tableColumn = qryTable.getColumn(attrName[i]);
// tableColumn.setCellRenderer(backGroundColor);
// }
// }
// }
qryTable.getColumnModel().getColumn(0).setPreferredWidth(10);
qryTable.setDefaultRenderer(Object.class, new TableCellTextAreaRenderer());
JScrollPane scrollPane=new JScrollPane(qryTable);

@ -61,10 +61,12 @@ import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.jacorb.idl.runtime.int_token;
//import com.connor.dfl.plm.dfl038.MyComparator;
import com.connor.dfl.plm.util.DataBaseControl;
import com.connor.dfl.plm.util.ProgressBar;
import com.connor.dfl.plm.util.ProgressBarThread;
import com.lowagie.text.Row;
//import com.sun.javafx.image.IntPixelAccessor;
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCComponentQuery;
@ -142,7 +144,7 @@ public class DFL038Jframe extends JFrame {
private JButton cancelButton;
private JPanel centerPanel1;
private String[] title = new String[] { "产品部门", "产品名称", "变更通知单号", "产品型号", "客户名称", "更改类型", "更改原因", "图纸更改类型", "责任部门",
private String[] title = new String[] { "产品部门", "产品名称", "变更通知单号", "产品型号", "客户名称", "申请人","更改类型", "更改原因", "图纸更改类型", "责任部门",
"责任人", "品号", "品名", "原版本", "现版本", "变更数量", "产品类型", "错误类型", "价格预告", "销售分类", "是否产生成本损失", "项目阶段", "料件领用分类",
"图纸发至", "项目编号", "通知紧急程度", "申请时间", "账套", "流程阶段" };
@ -480,7 +482,7 @@ public class DFL038Jframe extends JFrame {
"jdbc:oracle:thin:@192.168.1.138:1521/tc12", "infodba", "infodba");
control.openDataBase();
String colString = " F.PRODUCTDEPARTMENT,F.PRODUCTNAME,F.CHANGELISTCODE,F.PROJECTMODEL,F.CLIENTNAME,F.CHANGETYPE,F.CHANGEREASON,F.TZGGLX,F.DUTYDEPARTMENT,F.DUTYMAN,D.PH,D.PM,D.YBB,D.XBB,D.BGSL,F.PRODUCTTYPE,F.ERRORTYPE,F.PRICEBOOKING,F.SALSECLASSIFY,F.ISNOTPRODUCTLOSS,F.XMJD,F.RECEIVECLASSIFY,F.DRAWINGTO,F.PROJECTCODE,F.NOTIFYEMERGENCYPROCEDURES,F.APPLYDATE,F.ACCOUNTSET ";
String colString = " F.PRODUCTDEPARTMENT,F.PRODUCTNAME,F.CHANGELISTCODE,F.PROJECTMODEL,F.CLIENTNAME,F.APPLYNAME,F.CHANGETYPE,F.CHANGEREASON,F.TZGGLX,F.DUTYDEPARTMENT,F.DUTYMAN,D.PH,D.PM,D.YBB,D.XBB,D.BGSL,F.PRODUCTTYPE,F.ERRORTYPE,F.PRICEBOOKING,F.SALSECLASSIFY,F.ISNOTPRODUCTLOSS,F.XMJD,F.RECEIVECLASSIFY,F.DRAWINGTO,F.PROJECTCODE,F.NOTIFYEMERGENCYPROCEDURES,F.APPLYDATE,F.ACCOUNTSET ";
// 获取需要判断的列
@ -491,21 +493,24 @@ public class DFL038Jframe extends JFrame {
+ " F.APPLYDATE IS NOT NULL AND to_date(F.applydate,'yyyy-MM-dd HH24:mi:ss') >= to_date('"
+ startTime
+ "','yyyy-MM-dd HH24:mi:ss') AND to_date(F.applydate,'yyyy-MM-dd HH24:mi:ss') <= to_date('"
+ endTime + "','yyyy-MM-dd HH24:mi:ss') " + conditions+" order by F.PRODUCTDEPARTMENT,F.APPLYDATE";
+ endTime + "','yyyy-MM-dd HH24:mi:ss') " + conditions
+ " order by F.PRODUCTDEPARTMENT,F.APPLYDATE";
if (depart == null || depart.trim().equals("")) {
sql1 = "select " + colString + " from DFL_CHANGEFORM F LEFT OUTER JOIN DFL_CHANGEDETAILS D ON " + leftConditions
+ " (F.OBJECTCODE like'ECN%' or F.OBJECTCODE like'QECN%') " + " AND "
sql1 = "select " + colString + " from DFL_CHANGEFORM F LEFT OUTER JOIN DFL_CHANGEDETAILS D ON "
+ leftConditions + " (F.OBJECTCODE like'ECN%' or F.OBJECTCODE like'QECN%') " + " AND "
+ " F.APPLYDATE IS NOT NULL AND to_date(F.applydate,'yyyy-MM-dd HH24:mi:ss') >= to_date('"
+ startTime
+ "','yyyy-MM-dd HH24:mi:ss') AND to_date(F.applydate,'yyyy-MM-dd HH24:mi:ss') <= to_date('"
+ endTime + "','yyyy-MM-dd HH24:mi:ss') " + conditions+" order by F.PRODUCTDEPARTMENT,F.APPLYDATE";
+ endTime + "','yyyy-MM-dd HH24:mi:ss') " + conditions
+ " order by F.PRODUCTDEPARTMENT,F.APPLYDATE";
} else if (depart != null && "全部".equals(depart)) {
sql1 = "select " + colString + " from DFL_CHANGEFORM F LEFT OUTER JOIN DFL_CHANGEDETAILS D ON " + leftConditions
+ " (F.OBJECTCODE like'ECN%' or F.OBJECTCODE like'QECN%') " + " AND "
sql1 = "select " + colString + " from DFL_CHANGEFORM F LEFT OUTER JOIN DFL_CHANGEDETAILS D ON "
+ leftConditions + " (F.OBJECTCODE like'ECN%' or F.OBJECTCODE like'QECN%') " + " AND "
+ " F.APPLYDATE IS NOT NULL AND to_date(F.applydate,'yyyy-MM-dd HH24:mi:ss') >= to_date('"
+ startTime
+ "','yyyy-MM-dd HH24:mi:ss') AND to_date(F.applydate,'yyyy-MM-dd HH24:mi:ss') <= to_date('"
+ endTime + "','yyyy-MM-dd HH24:mi:ss') " + conditions+" order by F.PRODUCTDEPARTMENT,F.APPLYDATE";
+ endTime + "','yyyy-MM-dd HH24:mi:ss') " + conditions
+ " order by F.PRODUCTDEPARTMENT,F.APPLYDATE";
}
System.out.println(sql1);
@ -584,11 +589,11 @@ public class DFL038Jframe extends JFrame {
i++;
XSSFRow Row = sheet2.createRow(i);
String changeFormId = dbQuery.getString(3);
if (changeFormId!=null && !changeFormId.equals(lastChangeFormId)) {
if (changeFormId != null && !changeFormId.equals(lastChangeFormId)) {
List<TCComponent> queryObject = queryObject("零组件 ID", new String[] { "零组件 ID" },
new String[] { changeFormId });
System.out.println(changeFormId);
if (queryObject!=null && queryObject.size() > 0) {
if (queryObject != null && queryObject.size() > 0) {
TCComponent component = queryObject.get(0);
AIFComponentContext[] versions = component.getChildren("revision_list");
TCComponent versionComponent = (TCComponent) versions[0].getComponent();
@ -623,8 +628,11 @@ public class DFL038Jframe extends JFrame {
}
Set<String> set = new HashSet<String>();
int db2 = 0;
while (dbQuery2.next()) {
set.add(dbQuery2.getString(3));
db2++;
}
dbQuery2.first();
dbQuery2.previous();
@ -664,29 +672,18 @@ public class DFL038Jframe extends JFrame {
}
}
System.out.println(dbQuery2.getRow()+"--1--"+changeType.length);
System.out.println(dbQuery2.getRow() + "--1--" + changeType.length);
int[][] CTN = new int[list.size()][changeType.length];
String year = list.get(0).substring(0,4);
int lastRN = list.size()+1;
int[] countNum = null;
int countYear = 0;
String year = list.get(0).substring(0, 4);
int rowY = 0;
int lastRN = list.size() + 1;
int current = 0;
while (dbQuery2.next()) {
current++;
for (int j = 0; j < list.size(); j++) {
// System.out.println(year+"-----2------"+rows[j].getCell(0).getStringCellValue().substring(0,4));
// if(!year.equals(rows[j].getCell(0).getStringCellValue().substring(0,4))) {
// System.out.println(year);
// year = rows[j].getCell(0).getStringCellValue().substring(0,4);
// System.out.println("after"+year);
// XSSFRow row = sheet1.createRow(lastRN++);
// row.createCell(0).setCellValue("合计:");
// for(int o=0;o<changeType.length;o++) {
// row.createCell(o+1).setCellValue(CTN[j][o]);
// }
// row.createCell(changeType.length+1).setCellValue(getArrayCount(CTN[j]));
// sheet1.shiftRows(j, lastRN-1, 1, true, false);
// }
if (dbQuery2.getString(3).equals(list.get(j))) {
System.out.println(dbQuery2.getString(3));
for (int n = 0; n < changeType.length; n++) {
@ -696,121 +693,72 @@ public class DFL038Jframe extends JFrame {
createCell.setCellStyle(cellStyle);
createCell.setCellValue(dbQuery2.getString(1));
num[n] += Integer.parseInt(dbQuery2.getString(1));
}
}
for (int n = 0; n < changeType.length; n++) {
CTN[j][n] = num[n];
}
}
}
if (!year.equals(rows[j].getCell(0).getStringCellValue().substring(0, 4))) {
System.out.println(list);
System.out.println(year);
XSSFRow row = sheet1.createRow(lastRN++);
XSSFCell cell = row.createCell(0);
cell.setCellStyle(cellStyle);
cell.setCellValue(year + "合计:");
year = rows[j].getCell(0).getStringCellValue().substring(0, 4);
System.out.println("after" + year);
for (int o = 0; o < changeType.length; o++) {
cell = row.createCell(o + 1);
cell.setCellStyle(cellStyle);
cell.setCellValue(CTN[j - 1][o]);
}
cell = row.createCell(changeType.length + 1);
cell.setCellStyle(cellStyle);
cell.setCellValue(getArrayCount(CTN[j - 1]));
countNum = arrayAdd(CTN[j - 1], countNum);
int lastYearDetail[] = null;
int yearNum=1;
for (int j = 0; j <=list.size(); j++) {
if(j==list.size()) {
sheet1.shiftRows(j+yearNum, lastRN++, 1, true, false);
XSSFRow row = sheet1.createRow(j+yearNum);
XSSFCell createCell2 = row.createCell(0);
createCell2.setCellStyle(cellStyle);
createCell2.setCellValue("合计:");
if(lastYearDetail ==null) {
for(int o=0;o<changeType.length;o++) {
XSSFCell createCell = row.createCell(o+1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(CTN[j-1][o]);
}
XSSFCell createCell = row.createCell(changeType.length+1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(getArrayCount(CTN[j-1]));
lastYearDetail = CTN[j-1];
}else {
for(int o=0;o<changeType.length;o++) {
XSSFCell createCell = row.createCell(o+1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(CTN[j-1][o]-lastYearDetail[o]);
}
XSSFCell createCell = row.createCell(changeType.length+1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(getArrayCount(CTN[j-1])-getArrayCount(lastYearDetail));
lastYearDetail = CTN[j-1];
// sheet1.shiftRows(j, lastRN-1, 1, true, false);
}
yearNum++;
break;
}
// System.out.println(year+"-----2------"+rows[j].getCell(0).getStringCellValue().substring(0,4));
if(!year.equals(rows[j].getCell(0).getStringCellValue().substring(0,4))) {
System.out.println(year);
year = rows[j].getCell(0).getStringCellValue().substring(0,4);
System.out.println("after"+year);
sheet1.shiftRows(j+1, lastRN++, 1, true, false);
XSSFRow row = sheet1.createRow(j+1);
XSSFCell createCell2 = row.createCell(0);
createCell2.setCellStyle(cellStyle);
createCell2.setCellValue("合计:");
if(lastYearDetail ==null) {
for(int o=0;o<changeType.length;o++) {
XSSFCell createCell = row.createCell(o+1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(CTN[j][o]);
}
XSSFCell createCell = row.createCell(changeType.length+1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(getArrayCount(CTN[j]));
lastYearDetail = CTN[j];
}else {
for(int o=0;o<changeType.length;o++) {
XSSFCell createCell = row.createCell(o+1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(CTN[j][o]-lastYearDetail[o]);
for (int n = 0; n < changeType.length; n++) {
CTN[j][n] = num[n];
}
XSSFCell createCell = row.createCell(changeType.length+1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(getArrayCount(CTN[j])-getArrayCount(lastYearDetail));
lastYearDetail = CTN[j];
}
// sheet1.createRow(j+1);
yearNum++;
}
if(current == db2) {
if(countNum!=null) {
XSSFRow row = sheet1.createRow(lastRN++);
XSSFCell cell = row.createCell(0);
cell.setCellStyle(cellStyle);
cell.setCellValue(list.get(list.size()-1).substring(0,4)+"合计:");
for (int o = 0; o < changeType.length; o++) {
cell = row.createCell(o + 1);
cell.setCellStyle(cellStyle);
System.out.println("cell=>"+(null==cell));
System.out.println("CTN[CTN.length-1]=>"+(null==CTN[CTN.length-1]));
System.out.println("CTN[CTN.length-1][o]=>"+CTN[CTN.length-1][o]);
System.out.println("countNum[o]=>"+countNum[o]);
cell.setCellValue(CTN[CTN.length-1][o]-countNum[o]);
}
for(int p=0;p<list.size();p++) {
System.out.println(Arrays.toString(CTN[p]));
cell = row.createCell(changeType.length + 1);
cell.setCellStyle(cellStyle);
cell.setCellValue(getArrayCount(CTN[CTN.length-1])-getArrayCount(countNum));
}
XSSFRow row = sheet1.createRow(list.size()+yearNum);
XSSFCell createCell2 = row.createCell(0);
createCell2.setCellStyle(cellStyle);
createCell2.setCellValue("合计:");
for (int j = 0; j < num.length; j++) {
XSSFCell cell = row.createCell(j + 1);
XSSFRow row = sheet1.createRow(lastRN++);
XSSFCell cell = row.createCell(0);
cell.setCellStyle(cellStyle);
cell.setCellValue("合计:");
for (int o = 0; o < changeType.length; o++) {
cell = row.createCell(o + 1);
cell.setCellStyle(cellStyle);
cell.setCellValue(num[j]);
cell.setCellValue(CTN[CTN.length-1][o]);
}
int count = 0;
for (int q : num) {
count += q;
cell = row.createCell(changeType.length + 1);
cell.setCellStyle(cellStyle);
cell.setCellValue(getArrayCount(CTN[CTN.length-1]));
}
XSSFCell createCell = row.createCell(num.length + 1);
createCell.setCellStyle(cellStyle);
createCell.setCellValue(count);
for (int m = 0; m <= changeType.length; m++) {
sheet1.setColumnWidth(m, 10 * 256);
// sheet1.autoSizeColumn(m);
}
for (int j = 0; j <= title.length; j++) {
sheet2.setColumnWidth(j, 20 * 256);
// sheet2.autoSizeColumn(j);
for (int p = 0; p < list.size(); p++) {
System.out.println(Arrays.toString(CTN[p]));
}
FileOutputStream fos = FileUtils.openOutputStream(new File(absoluteFilePath));
@ -819,11 +767,6 @@ public class DFL038Jframe extends JFrame {
fos.close();
}
// listByYear(CTN,list.size(),absoluteFilePath);
} catch (Exception e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
@ -992,28 +935,27 @@ public class DFL038Jframe extends JFrame {
XSSFSheet sheet = (XSSFSheet) workbook.getSheet("月份清单");
int lastRowNum = sheet.getLastRowNum();
int[] num = new int[changeType.length];
for(int i=0;i<changeType.length;i++) {
for (int i = 0; i < changeType.length; i++) {
num[i] = 0;
}
String year = sheet.getRow(1).getCell(0).getStringCellValue().substring(0,4);
String year = sheet.getRow(1).getCell(0).getStringCellValue().substring(0, 4);
for(int i=1;i<=lastRowNum;i++) {
for (int i = 1; i <= lastRowNum; i++) {
XSSFRow row = sheet.getRow(i);
if(!year.equals(row.getCell(0).getStringCellValue().substring(0,4))) {
sheet.shiftRows(i, lastRowNum, 1,true,false);
if (!year.equals(row.getCell(0).getStringCellValue().substring(0, 4))) {
sheet.shiftRows(i, lastRowNum, 1, true, false);
XSSFRow row2 = sheet.createRow(++lastRowNum);
for(int n=0;n<=changeType.length+1;n++) {
for (int n = 0; n <= changeType.length + 1; n++) {
XSSFCell cell = row2.createCell(n);
if(n==0) {
cell.setCellValue("合计:");
}else if(n<=changeType.length){
cell.setCellValue(num[n-1]);
}else {
if (n == 0) {
cell.setCellValue("合计1:");
} else if (n <= changeType.length) {
cell.setCellValue(num[n - 1]);
} else {
cell.setCellValue(getArrayCount(num));
}
}
}
}
@ -1026,7 +968,7 @@ public class DFL038Jframe extends JFrame {
int startRow = 1;
XSSFSheet sheet = (XSSFSheet) workbook.getSheet("详细清单");
int lastRowNum = sheet.getLastRowNum();
if(lastRowNum<=0) {
if (lastRowNum <= 0) {
return;
}
String merginId = sheet.getRow(1).getCell(2).getStringCellValue();
@ -1035,8 +977,8 @@ public class DFL038Jframe extends JFrame {
if (!merginId.equals(currentId)) {
CellRangeAddress region = new CellRangeAddress(startRow, i - 1, 0, 0);
sheet.addMergedRegion(region);
for(int j=1;j<title.length;j++) {
if(j==10 || j==11 || j==12 || j==13 || j==14) {
for (int j = 1; j < title.length; j++) {
if (j == 10 || j == 11 || j == 12 || j == 13 || j == 14) {
continue;
}
region = new CellRangeAddress(startRow, i - 1, j, j);
@ -1049,8 +991,8 @@ public class DFL038Jframe extends JFrame {
if (i == lastRowNum) {
CellRangeAddress region = new CellRangeAddress(startRow, lastRowNum, 0, 0);
sheet.addMergedRegion(region);
for(int j=1;j<title.length;j++) {
if(j==10 || j==11 || j==12 || j==13 || j==14) {
for (int j = 1; j < title.length; j++) {
if (j == 10 || j == 11 || j == 12 || j == 13 || j == 14) {
continue;
}
region = new CellRangeAddress(startRow, lastRowNum, j, j);
@ -1065,12 +1007,26 @@ public class DFL038Jframe extends JFrame {
public int getArrayCount(int[] args) {
int count = 0;
for(int i=0;i<args.length;i++) {
count+=args[i];
for (int i = 0; i < args.length; i++) {
count += args[i];
}
return count;
}
public static int[] arrayAdd(int[] array,int [] val) {
int[] back = new int[array.length];
for(int i=0;i<array.length;i++) {
if(val == null) {
back[i] = array[i];
}
else {
back[i] = array[i]+val[i];
}
}
return back;
}
public static void main(String[] args) {
new DFL038Jframe();
// Date date = new Date();

@ -270,8 +270,6 @@ public class CreateNoemBOMDialogs extends AbstractAIFDialog {
}
/**
*
*
@ -367,7 +365,6 @@ public class CreateNoemBOMDialogs extends AbstractAIFDialog {
}
}
if(vals != null) {
TCTypeService service = session.getTypeService();
//获取BOMWindowType
TCComponentBOMWindowType winType = (TCComponentBOMWindowType) service

@ -140,10 +140,13 @@ public class AddDialogApply_TZ extends AbstractAIFDialog {
if(!("".equals(s.trim()))) {
sb.append(";");
}
sb.append(list.get(i));
if(i < list.size()-1) {
if(sb.length()>0&&sb.charAt(sb.length()-1)!=';') {
sb.append(";");
}
sb.append(list.get(i));
// if(i < list.size()-1) {
// sb.append(";");
// }
}
//changeform.model1.setValueAt(proid, 8, 1);

@ -100,10 +100,13 @@ public class AddDialogNotify_TZ extends AbstractAIFDialog {
if(!("".equals(s.trim()))) {
sb.append(";");
}
sb.append(list.get(i));
if(i < list.size()-1) {
if(sb.length()>0&&sb.charAt(sb.length()-1)!=';') {
sb.append(";");
}
sb.append(list.get(i));
// if(i < list.size()-1) {
// sb.append(";");
// }
}
//changeform.model1.setValueAt(proid, 8, 1);

@ -442,10 +442,13 @@ public class AddDialogQuickChange_TZ extends AbstractAIFDialog {
if(!("".equals(s.trim()))) {
sb.append(";");
}
sb.append(list.get(i));
if(i < list.size()-1) {
if(sb.length()>0&&sb.charAt(sb.length()-1)!=';') {
sb.append(";");
}
sb.append(list.get(i));
// if(i < list.size()-1) {
// sb.append(";");
// }
}
//changeform.model1.setValueAt(proid, 8, 1);

File diff suppressed because it is too large Load Diff

@ -1,5 +1,7 @@
package com.connor.dfl.plm.forms;
import org.jacorb.idl.runtime.int_token;
/**
*
* @author ËïÒã
@ -14,6 +16,7 @@ public class ChangeDetils {
private String YSL;
private String XSL;
private String BGSL;
private String GGSM;
private String WZPSL;
private String WZPUJ;
private String ZZSL;
@ -30,7 +33,7 @@ public class ChangeDetils {
public ChangeDetils() {
}
public ChangeDetils(String objtctCode,String pH, String pM, String yBB, String xBB, String ySL, String xSL, String bGSL, String wZPSL,
public ChangeDetils(String objtctCode,String pH, String pM, String yBB, String xBB, String ySL, String xSL, String bGSL,String gGSM, String wZPSL,
String wZPUJ, String zZSL, String zZYJ, String sCSL, String sSYJ, String cKSL, String cLYJ) {
this.objectCode= objtctCode;
this.PH = pH;
@ -40,6 +43,7 @@ public class ChangeDetils {
this.YSL = ySL;
this.XSL = xSL;
this.BGSL = bGSL;
this.GGSM = gGSM;
this.WZPSL = wZPSL;
this.WZPUJ = wZPUJ;
this.ZZSL = zZSL;
@ -94,11 +98,19 @@ public class ChangeDetils {
XSL = xSL;
}
public String getBGSL() {
return BGSL;
}
public void setBGSL(String bGSL) {
BGSL = bGSL;
}
public String getGGSM() {
return GGSM;
}
public void setGGSM(String gGSM) {
GGSM = gGSM;
}
public String getWZPSL() {
return WZPSL;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -83,7 +83,7 @@ public class ClassValueUtil {
String kaitou1 = attrName.substring(0,2);
//前两个字是否为规格
if("规格".equals(kaitou1)) {
valueBean.setSpec(value);
valueBean.setSpec(lovValue);
}
}
else if(attrName.contains("订货码")){

Loading…
Cancel
Save