|
|
|
@ -69,7 +69,10 @@ import com.teamcenter.rac.kernel.TCComponentItem;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentListOfValues;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentListOfValuesType;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentProcessType;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentProject;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentTaskTemplate;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCComponentTaskTemplateType;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCException;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCProperty;
|
|
|
|
|
import com.teamcenter.rac.kernel.TCSession;
|
|
|
|
@ -92,7 +95,8 @@ public class QDRWDialog 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 JComboBox<String> cfdJComboBox = new JComboBox<String>();
|
|
|
|
@ -112,8 +116,7 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
private ArrayList<String> sqlField;
|
|
|
|
|
private QDRWTableColorRender QDRWTableColorRender;
|
|
|
|
|
LinkedHashMap<String, LinkedHashMap<String, ArrayList<LinkedHashMap<String, String>>>> valueMap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Connection conn = null;
|
|
|
|
|
public QDRWDialog(TCSession session, String pref, String taskName) {
|
|
|
|
|
// TODO Auto-generated constructor stub
|
|
|
|
|
this.session = session;
|
|
|
|
@ -133,9 +136,6 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String[] split2 = prefs[0].split(";");
|
|
|
|
|
for (int j = 0; j < split2.length; j++) {
|
|
|
|
|
String[] split3 = split2[j].split("=");
|
|
|
|
@ -159,14 +159,13 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if (split3.length == 4) {
|
|
|
|
|
fieldsMap.put(split3[0], split3[1]);
|
|
|
|
|
System.out.println("split3[2]========"+split3[2]);
|
|
|
|
|
// System.out.println("split3[2]========" + split3[2]);
|
|
|
|
|
if (split3[2].contains("%")) {
|
|
|
|
|
String[] split4 = split3[2].split("%");
|
|
|
|
|
widtheMap.put(j, Integer.parseInt(split4[0]));
|
|
|
|
|
System.out.println("split4[0]========"+split4[0]);
|
|
|
|
|
// System.out.println("split4[0]========" + split4[0]);
|
|
|
|
|
canWriteColume.add(j);
|
|
|
|
|
} else {
|
|
|
|
|
widtheMap.put(j, Integer.parseInt(split3[2]));
|
|
|
|
@ -174,8 +173,6 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
lovPositionMap.put(j, split3[3]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
System.out.println("canWriteColume=====" + canWriteColume.size());
|
|
|
|
@ -224,7 +221,6 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void createActionEvent() {
|
|
|
|
|
this.ssButton.addActionListener(this);
|
|
|
|
|
this.ckButton.addActionListener(this);
|
|
|
|
@ -330,8 +326,6 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pane.setPreferredSize(new Dimension(1800, 850));
|
|
|
|
|
pane.setViewportView(table);// 为scrollPane指定显示对象为table
|
|
|
|
|
return pane;
|
|
|
|
@ -396,14 +390,13 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
if (source.equals(this.gbButton)) {
|
|
|
|
|
dispose();
|
|
|
|
|
}
|
|
|
|
|
else if(source.equals(this.ckButton)){
|
|
|
|
|
} else if (source.equals(this.ckButton)) {
|
|
|
|
|
int selectedRow = table.getSelectedRow();
|
|
|
|
|
if (selectedRow < 0) {
|
|
|
|
|
MessageBox.post("请选择某一行!", "提示", 2);
|
|
|
|
|
}
|
|
|
|
|
String selectId = (String)table.getValueAt(selectedRow,0);
|
|
|
|
|
String selectType = (String)table.getValueAt(selectedRow,1);
|
|
|
|
|
String selectId = (String) table.getValueAt(selectedRow, 1);
|
|
|
|
|
String selectType = (String) table.getValueAt(selectedRow, 2);
|
|
|
|
|
|
|
|
|
|
SwingUtilities.invokeLater(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
@ -418,25 +411,127 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} else if (source.equals(this.qrqdButton)) {
|
|
|
|
|
|
|
|
|
|
String[] value = session.getPreferenceService().getStringValues("LD_dbinfo2");
|
|
|
|
|
|
|
|
|
|
if (value == null || value.length == 0) {
|
|
|
|
|
MessageBox.post("首选项LD_dbinfo2配置有误,请检查。", "提示", 2);
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
Collections.addAll(dateConnList, value);
|
|
|
|
|
}
|
|
|
|
|
conn = getConn();
|
|
|
|
|
|
|
|
|
|
int count = 0;
|
|
|
|
|
for (int i = 0; i < table.getRowCount(); i++) {
|
|
|
|
|
if (table.getValueAt(i, 0).toString().equals("1")) {
|
|
|
|
|
boolean isProsess = false;
|
|
|
|
|
|
|
|
|
|
String id = table.getValueAt(i, 1).toString();
|
|
|
|
|
TCComponentItemRevision rev = null;
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
System.out.println("id============="+id);
|
|
|
|
|
TCComponent[] tcComponentsById = getTCComponentsById(session,id);
|
|
|
|
|
|
|
|
|
|
if(tcComponentsById != null && tcComponentsById.length > 0) {
|
|
|
|
|
System.out.println("tcComponentsById.length============="+tcComponentsById.length);
|
|
|
|
|
TCComponentItem item = (TCComponentItem)tcComponentsById[0];
|
|
|
|
|
rev = item.getLatestItemRevision();
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e1) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LinkedHashMap<String, ArrayList<LinkedHashMap<String, String>>> linkedHashMap = valueMap.get(id);
|
|
|
|
|
for (Entry<Integer, String> map : colorMap.entrySet()) {
|
|
|
|
|
boolean isProsess = false;
|
|
|
|
|
String prefValue = map.getValue();
|
|
|
|
|
String[] split = prefValue.split("\\.");
|
|
|
|
|
ArrayList<LinkedHashMap<String, String>> arrayList = linkedHashMap.get(split[0]);
|
|
|
|
|
String RWXDSJ = "";
|
|
|
|
|
String QQRW = "";
|
|
|
|
|
String SFSJGG = "";
|
|
|
|
|
String GGPSNR = "";
|
|
|
|
|
for (int j = 0; j < arrayList.size(); j++) {
|
|
|
|
|
|
|
|
|
|
if (arrayList.get(j).containsKey("RWXDSJ")) {
|
|
|
|
|
RWXDSJ = arrayList.get(j).get("RWXDSJ");
|
|
|
|
|
}
|
|
|
|
|
if (arrayList.get(j).containsKey("QQRW")) {
|
|
|
|
|
QQRW = arrayList.get(j).get("QQRW");
|
|
|
|
|
}
|
|
|
|
|
if (arrayList.get(j).containsKey("SFSJGG")) {
|
|
|
|
|
SFSJGG = arrayList.get(j).get("SFSJGG");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (arrayList.get(j).containsKey("GGPSNR")) {
|
|
|
|
|
GGPSNR = arrayList.get(j).get("GGPSNR");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
System.out.println("RWXDSJ======="+RWXDSJ);
|
|
|
|
|
System.out.println("QQRW======="+QQRW);
|
|
|
|
|
System.out.println("SFSJGG======="+SFSJGG);
|
|
|
|
|
|
|
|
|
|
if (RWXDSJ == null || RWXDSJ.isEmpty()) {
|
|
|
|
|
if (SFSJGG != null && !SFSJGG.isEmpty() && SFSJGG.equals("否")) {
|
|
|
|
|
isProsess = true;
|
|
|
|
|
} else if (SFSJGG != null && !SFSJGG.isEmpty() && SFSJGG.equals("是")
|
|
|
|
|
&& (QQRW == null || QQRW.isEmpty())) {
|
|
|
|
|
isProsess = true;
|
|
|
|
|
} else if (SFSJGG != null && !SFSJGG.isEmpty() && SFSJGG.equals("是")
|
|
|
|
|
&& (QQRW != null && !QQRW.isEmpty())) {
|
|
|
|
|
// 找前驱任务
|
|
|
|
|
ArrayList<Integer> judgeList = new ArrayList<Integer>();
|
|
|
|
|
dgRW(linkedHashMap, QQRW,judgeList);
|
|
|
|
|
if(judgeList.size() == 0) {
|
|
|
|
|
isProsess = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
System.out.println("taskName========="+taskName);
|
|
|
|
|
System.out.println("isProsess========"+isProsess);
|
|
|
|
|
if(isProsess && taskName != null && !taskName.isEmpty() && rev != null) {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
CreateProcess(session,rev,taskName,GGPSNR,split[0],id);
|
|
|
|
|
|
|
|
|
|
} catch (TCException e1) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (count == 0) {
|
|
|
|
|
MessageBox.post("请勾选数据!", "提示 ", MessageBox.INFORMATION);
|
|
|
|
|
if(conn != null) {
|
|
|
|
|
try {
|
|
|
|
|
conn.close();
|
|
|
|
|
} catch (SQLException e1) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(conn != null) {
|
|
|
|
|
try {
|
|
|
|
|
conn.close();
|
|
|
|
|
} catch (SQLException e1) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
MessageBox.post("启动完成!", "提示 ", MessageBox.INFORMATION);
|
|
|
|
|
} else if (source.equals(this.ssButton)) {
|
|
|
|
|
table.removeAll();
|
|
|
|
|
dtm1.setRowCount(0);
|
|
|
|
@ -465,8 +560,6 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
condition += "and JHJS <= '" + jhwcSStr + "' ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ids == null || ids.isEmpty()) {
|
|
|
|
|
MessageBox.post("请填写条件!", "提示", 2);
|
|
|
|
|
return;
|
|
|
|
@ -490,7 +583,6 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String[] value = session.getPreferenceService().getStringValues("LD_dbinfo2");
|
|
|
|
|
|
|
|
|
|
if (value == null || value.length == 0) {
|
|
|
|
@ -509,10 +601,10 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
}
|
|
|
|
|
fieldsSql = fieldsSql.substring(0, fieldsSql.length() - 1);
|
|
|
|
|
System.out.println("fieldsSql==========" + fieldsSql);
|
|
|
|
|
System.out.println("condition==================="+condition);
|
|
|
|
|
//System.out.println("condition===================" + condition);
|
|
|
|
|
String sqlIdString = "SELECT ID FROM LY_CHANGETASSKFORM_DETAILS where 1=1 " + condition;
|
|
|
|
|
System.out.println("sqlIdString=========" + sqlIdString);
|
|
|
|
|
Connection conn = getConn();
|
|
|
|
|
conn = getConn();
|
|
|
|
|
PreparedStatement stmt = null;
|
|
|
|
|
String selectIds = "";
|
|
|
|
|
String lastCondition = "";
|
|
|
|
@ -538,7 +630,7 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
// 去掉最后一个,
|
|
|
|
|
sqlIn.setLength(sqlIn.length() - 1);
|
|
|
|
|
sqlIn.append(")");
|
|
|
|
|
System.out.println("sqlIn======================"+sqlIn.toString());
|
|
|
|
|
//System.out.println("sqlIn======================" + sqlIn.toString());
|
|
|
|
|
lastCondition += "and ID IN " + sqlIn.toString();
|
|
|
|
|
} else {
|
|
|
|
|
lastCondition += "and ID='" + ids + "' ";
|
|
|
|
@ -548,10 +640,10 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 存数据的map
|
|
|
|
|
valueMap = new LinkedHashMap<String, LinkedHashMap<String, ArrayList<LinkedHashMap<String, String>>>>();
|
|
|
|
|
//String sqlString = "SELECT " + fieldsSql + " FROM LY_CHANGETASSKFORM_DETAILS where 1=1 "+lastCondition;
|
|
|
|
|
// String sqlString = "SELECT " + fieldsSql + " FROM LY_CHANGETASSKFORM_DETAILS
|
|
|
|
|
// where 1=1 "+lastCondition;
|
|
|
|
|
String sqlString = "SELECT * FROM LY_CHANGETASSKFORM_DETAILS where 1=1 " + lastCondition;
|
|
|
|
|
|
|
|
|
|
System.out.println("sqlString======" + sqlString);
|
|
|
|
@ -577,17 +669,19 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
// 获取列的值
|
|
|
|
|
String columnValue = result.getString(i); // 使用 getObject() 获取列的值
|
|
|
|
|
LinkedHashMap<String, String> fieldMap = new LinkedHashMap<String, String>();
|
|
|
|
|
fieldMap.put(columnName,columnValue == null? columnValue : validateAndFormatDate(columnValue));
|
|
|
|
|
fieldMap.put(columnName,
|
|
|
|
|
columnValue == null ? columnValue : validateAndFormatDate(columnValue));
|
|
|
|
|
tempList.add(fieldMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tempMap1.put(xh, tempList);
|
|
|
|
|
valueMap.put(id, tempMap1);
|
|
|
|
|
}
|
|
|
|
|
System.out.println(valueMap.toString());
|
|
|
|
|
//System.out.println(valueMap.toString());
|
|
|
|
|
QDRWTableColorRender.valueMap = valueMap;
|
|
|
|
|
QDRWTableColorRender.colorMap = colorMap;
|
|
|
|
|
for (Entry<String, LinkedHashMap<String, ArrayList<LinkedHashMap<String, String>>>> map : valueMap.entrySet()) {
|
|
|
|
|
for (Entry<String, LinkedHashMap<String, ArrayList<LinkedHashMap<String, String>>>> map : valueMap
|
|
|
|
|
.entrySet()) {
|
|
|
|
|
ArrayList<String> tableList = new ArrayList<String>();
|
|
|
|
|
tableList.add("0");
|
|
|
|
|
for (Entry<String, String> tempMap : fieldsMap.entrySet()) {
|
|
|
|
@ -619,7 +713,6 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
conn.close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e1) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
@ -727,14 +820,21 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
public boolean dgRW(LinkedHashMap<String, ArrayList<LinkedHashMap<String, String>>> linkedHashMap,String xh) {
|
|
|
|
|
ArrayList<LinkedHashMap<String, String>> arrayList = linkedHashMap.get(xh);
|
|
|
|
|
for (int i = 0; i < arrayList.size(); i++) {
|
|
|
|
|
String RWXDSJ = "";
|
|
|
|
|
public void dgRW(LinkedHashMap<String, ArrayList<LinkedHashMap<String, String>>> linkedHashMap, String xhs,
|
|
|
|
|
ArrayList<Integer> judgeList) {
|
|
|
|
|
|
|
|
|
|
if (xhs.contains(",")) {
|
|
|
|
|
String[] split = xhs.split(",");
|
|
|
|
|
for (int z = 0; z < split.length; z++) {
|
|
|
|
|
|
|
|
|
|
ArrayList<LinkedHashMap<String, String>> arrayList = linkedHashMap.get(split[z]);
|
|
|
|
|
String SJWCSJ = "";
|
|
|
|
|
String SFSJGG = "";
|
|
|
|
|
String QQRW = "";
|
|
|
|
|
if(arrayList.get(i).containsKey("RWXDSJ")) {
|
|
|
|
|
RWXDSJ = arrayList.get(i).get("RWXDSJ");
|
|
|
|
|
for (int i = 0; i < arrayList.size(); i++) {
|
|
|
|
|
|
|
|
|
|
if (arrayList.get(i).containsKey("SFSJGG")) {
|
|
|
|
|
SFSJGG = arrayList.get(i).get("SFSJGG");
|
|
|
|
|
}
|
|
|
|
|
if (arrayList.get(i).containsKey("SJWCSJ")) {
|
|
|
|
|
SJWCSJ = arrayList.get(i).get("SJWCSJ");
|
|
|
|
@ -742,14 +842,84 @@ public class QDRWDialog extends JFrame implements ActionListener {
|
|
|
|
|
if (arrayList.get(i).containsKey("QQRW")) {
|
|
|
|
|
QQRW = arrayList.get(i).get("QQRW");
|
|
|
|
|
}
|
|
|
|
|
if((RWXDSJ == null || RWXDSJ.isEmpty()) && (SJWCSJ == null || SJWCSJ.isEmpty()) && ) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
System.out.println("---SJWCSJ=======" + SFSJGG);
|
|
|
|
|
System.out.println("---SFSJGG=======" + SFSJGG);
|
|
|
|
|
System.out.println("---QQRW=======" + SFSJGG);
|
|
|
|
|
if (SFSJGG != null && !SFSJGG.isEmpty() && SFSJGG.equals("是")) {
|
|
|
|
|
if (SJWCSJ == null || SJWCSJ.isEmpty()) {
|
|
|
|
|
judgeList.add(0);
|
|
|
|
|
}
|
|
|
|
|
} else if (SFSJGG != null && !SFSJGG.isEmpty() && SFSJGG.equals("否") && QQRW != null
|
|
|
|
|
&& !QQRW.isEmpty()) {
|
|
|
|
|
dgRW(linkedHashMap, QQRW, judgeList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
ArrayList<LinkedHashMap<String, String>> arrayList = linkedHashMap.get(xhs);
|
|
|
|
|
String SJWCSJ = "";
|
|
|
|
|
String SFSJGG = "";
|
|
|
|
|
String QQRW = "";
|
|
|
|
|
for (int i = 0; i < arrayList.size(); i++) {
|
|
|
|
|
|
|
|
|
|
if (arrayList.get(i).containsKey("SFSJGG")) {
|
|
|
|
|
SFSJGG = arrayList.get(i).get("SFSJGG");
|
|
|
|
|
}
|
|
|
|
|
if (arrayList.get(i).containsKey("SJWCSJ")) {
|
|
|
|
|
SJWCSJ = arrayList.get(i).get("SJWCSJ");
|
|
|
|
|
}
|
|
|
|
|
if (arrayList.get(i).containsKey("QQRW")) {
|
|
|
|
|
QQRW = arrayList.get(i).get("QQRW");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
System.out.println("---SJWCSJ=======" + SJWCSJ);
|
|
|
|
|
System.out.println("---SFSJGG=======" + SFSJGG);
|
|
|
|
|
System.out.println("---QQRW=======" + QQRW);
|
|
|
|
|
if (SFSJGG != null && !SFSJGG.isEmpty() && SFSJGG.equals("是")) {
|
|
|
|
|
if (SJWCSJ == null || SJWCSJ.isEmpty()) {
|
|
|
|
|
judgeList.add(0);
|
|
|
|
|
}
|
|
|
|
|
} else if (SFSJGG != null && !SFSJGG.isEmpty() && SFSJGG.equals("否") && QQRW != null && !QQRW.isEmpty()) {
|
|
|
|
|
dgRW(linkedHashMap, QQRW, judgeList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
public void CreateProcess(TCSession session, TCComponent target, String processName, String rwmc,String xh,String id)
|
|
|
|
|
throws TCException {
|
|
|
|
|
try {
|
|
|
|
|
TCComponentProcessType processType = (TCComponentProcessType) session.getTypeComponent("Job");
|
|
|
|
|
TCComponentTaskTemplateType taskTemplateType = (TCComponentTaskTemplateType) session
|
|
|
|
|
.getTypeComponent("EPMTaskTemplate");
|
|
|
|
|
TCComponentTaskTemplate taskTemplate = taskTemplateType.find(processName, 0);
|
|
|
|
|
if (taskTemplate != null) {
|
|
|
|
|
String name = target.getProperty("object_string");
|
|
|
|
|
TCComponent create = processType.create(processName + ":" + name + "_" + rwmc, "", taskTemplate,
|
|
|
|
|
new TCComponent[] { target }, new int[] { 1 });
|
|
|
|
|
//System.out.println("uid===================" + create.getUid());
|
|
|
|
|
//System.out.println("type==" + create.getType());
|
|
|
|
|
//System.out.println("type==" + create.getStringProperty("object_type"));
|
|
|
|
|
|
|
|
|
|
String updateSql = "update LY_CHANGETASSKFORM_DETAILS set WFUID = '"+create.getUid()+"' where ID = '"+id+"' and XH = '"+xh+"'";
|
|
|
|
|
try {
|
|
|
|
|
PreparedStatement prepareStatement = conn.prepareStatement(updateSql);
|
|
|
|
|
boolean execute = prepareStatement.execute();
|
|
|
|
|
System.out.println("execute=="+execute+"|updateSql===="+updateSql);
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (TCException var7) {
|
|
|
|
|
var7.printStackTrace();
|
|
|
|
|
throw var7;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static TCComponent[] getTCComponentsById(TCSession session, String id) throws Exception {
|
|
|
|
|
return session.search("零组件...", new String[] { "零组件 ID" }, new String[] { id });
|
|
|
|
|
}
|
|
|
|
|
}
|