|
|
|
@ -55,7 +55,6 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
|
|
|
|
import com.teamcenter.rac.kernel.ListOfValuesInfo;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponent;
|
|
|
|
@ -86,7 +85,8 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
private LinkedHashMap<Integer, String> lovPositionMap = new LinkedHashMap<Integer, String>();
|
|
|
|
|
private LinkedHashMap<String, Integer> positionFieldMap = new LinkedHashMap<String, Integer>();
|
|
|
|
|
private LinkedHashMap<Integer, Integer> widtheMap = new LinkedHashMap<Integer, Integer>();
|
|
|
|
|
//public static final int[] HEADERWIDTH = new int[] { 50, 100, 200, 200, 100, 100, 80, 80, 100, 150, 150, 150, 150,150, 150, 150, 150, 150, 150 };
|
|
|
|
|
// public static final int[] HEADERWIDTH = new int[] { 50, 100, 200, 200, 100,
|
|
|
|
|
// 100, 80, 80, 100, 150, 150, 150, 150,150, 150, 150, 150, 150, 150 };
|
|
|
|
|
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
private DefaultTableModel dtm1;
|
|
|
|
|
private JButton yyButton = new JButton("应用");
|
|
|
|
@ -97,19 +97,29 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
private static ArrayList<String> dateConnList = new ArrayList<String>();
|
|
|
|
|
private String type;
|
|
|
|
|
private String id;
|
|
|
|
|
private String objectString;
|
|
|
|
|
private boolean readOnly;
|
|
|
|
|
private ArrayList<Integer> canWriteColume = new ArrayList<Integer>();
|
|
|
|
|
|
|
|
|
|
public RWFPDialog(TCSession session,String type,String id) {
|
|
|
|
|
public RWFPDialog(TCSession session, String type, String id, String objectString, boolean readOnly) {
|
|
|
|
|
// TODO Auto-generated constructor stub
|
|
|
|
|
this.session = session;
|
|
|
|
|
this.type = type;
|
|
|
|
|
this.id = id;
|
|
|
|
|
this.objectString = objectString;
|
|
|
|
|
this.readOnly = readOnly;
|
|
|
|
|
initUI();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void initUI() {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
this.setTitle("ÈÎÎñ·ÖÅä±í");
|
|
|
|
|
|
|
|
|
|
if(readOnly) {
|
|
|
|
|
yyButton.setEnabled(false);
|
|
|
|
|
tzsjButton.setEnabled(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setTitle(objectString+"变更任务分配表");
|
|
|
|
|
this.setLayout(new BorderLayout());
|
|
|
|
|
|
|
|
|
|
String[] cfdj = session.getPreferenceService().getStringValues("Connor_ChangeTaskForm_TriggerLevelMapping");
|
|
|
|
@ -119,9 +129,18 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < cfdj.length; i++) {
|
|
|
|
|
|
|
|
|
|
String[] split = cfdj[i].split("=");
|
|
|
|
|
cfdjPref.put(split[0],split[1]);
|
|
|
|
|
cfdJComboBox.addItem(split[0]);
|
|
|
|
|
if(split[0].equals(type)) {
|
|
|
|
|
String[] split2 = split[1].split(";");
|
|
|
|
|
for (int j = 0; j < split2.length; j++) {
|
|
|
|
|
String[] split3 = split2[j].split("\\|");
|
|
|
|
|
cfdjPref.put(split3[0],split3[1]);
|
|
|
|
|
cfdJComboBox.addItem(split3[0]);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取首选项匹配的类型
|
|
|
|
@ -172,6 +191,11 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
System.out.println("fieldsMap====="+fieldsMap);
|
|
|
|
|
System.out.println("positionMap====="+lovPositionMap);
|
|
|
|
|
System.out.println("widtheMap====="+widtheMap);
|
|
|
|
|
if(fieldsMap.size() == 0) {
|
|
|
|
|
|
|
|
|
|
MessageBox.post("该类型未匹配到首选项!", "提示 ", MessageBox.INFORMATION);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Collection<String> valuesCollection = fieldsMap.values();
|
|
|
|
|
|
|
|
|
|
// 将集合转换为数组
|
|
|
|
@ -258,7 +282,6 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void createActionEvent() {
|
|
|
|
|
this.yyButton.addActionListener(this);
|
|
|
|
|
this.gbButton.addActionListener(this);
|
|
|
|
@ -389,8 +412,7 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
if (source.equals(this.gbButton)) {
|
|
|
|
|
dispose();
|
|
|
|
|
}
|
|
|
|
|
else if(source.equals(this.yyButton)){
|
|
|
|
|
} else if (source.equals(this.yyButton)) {
|
|
|
|
|
// 保存数据
|
|
|
|
|
Connection conn = getConn();
|
|
|
|
|
PreparedStatement stmt = null;
|
|
|
|
@ -423,7 +445,6 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if (stmt != null) {
|
|
|
|
|
stmt.close();
|
|
|
|
@ -432,7 +453,6 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
conn.close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e1) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
@ -491,7 +511,8 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
System.out.println("gsPrefTopLine.get(j)========" + gsPrefTopLine.get(j));
|
|
|
|
|
Integer colume = positionFieldMap.get(gsPrefTopLine.get(j));
|
|
|
|
|
if (colume != null) {
|
|
|
|
|
System.out.println(positionFieldMap.get(gsPrefTopLine.get(j))+"=================positionFieldMap.get(gsPrefTopLine.get(j))");
|
|
|
|
|
System.out.println(positionFieldMap.get(gsPrefTopLine.get(j))
|
|
|
|
|
+ "=================positionFieldMap.get(gsPrefTopLine.get(j))");
|
|
|
|
|
// 处理公式
|
|
|
|
|
String gs = split[j];
|
|
|
|
|
System.out.println("gs========" + gs);
|
|
|
|
@ -505,7 +526,6 @@ public class RWFPDialog extends JFrame implements ActionListener {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|