- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
Statement stmt1 = null;
ResultSet rs1 = null;
try {
StringBuilder sb = new StringBuilder(2000);
String sql = "";
String ss = "";
String ss_begin = "";
String ss_middle = "";
String ss_end = "";
int xcount = 0;
String XXX_ID = "";
String XXX_NAME = "";
if (c.XLANG_ID == 1) {
sql = sql + " SELECT 99 , 'Исходные' FROM dual union all ";
sql = sql + " SELECT 1 , 'Непарные исходные' FROM dual union all ";
sql = sql + " SELECT 2 , 'Временная' FROM dual union all ";
sql = sql + " SELECT 3 , 'Встречные' FROM dual ";
//sql = sql + " SELECT 4 , 'Непарные встречные' FROM dual ";
} else if (c.XLANG_ID == 2) {
sql = sql + " SELECT 99 , 'Base BPEBs' FROM dual union all ";
sql = sql + " SELECT 1 , 'Base BPEBs unpaired' FROM dual union all ";
sql = sql + " SELECT 2 , 'Temporary BPEB' FROM dual union all ";
sql = sql + " SELECT 3 , 'Generated BPEBs' FROM dual ";
//sql = sql + " SELECT 4 , 'Generated BPEBs unpaired' FROM dual ";
}
stmt1 = this.con.createStatement();
rs1 = stmt1.executeQuery(sql);
while (rs1.next()) {
xcount = xcount + 1;
XXX_ID = rs1.getString(1);
XXX_NAME = rs1.getString(2);
sb = sb.append("<msg>")
.append("<xid>").append(XXX_ID).append("</xid>")
.append("<xname>").append(vtb.budget.osa.tools.Tools.stringToXML(XXX_NAME)).append("</xname>")
.append("</msg>");
}
rs1.close();
stmt1.close();
ss_begin = ss_begin + "<xml id='XML_table1'>"
+ "<tab1>";
ss_end = ss_end
+ "</tab1>"
+ "</xml>";
if (xcount == 0) {
ss_middle = ss_middle + "<msg>"
+ "<xid></xid>"
+ "<xcode></xcode>"
+ "<xname></xname>"
+ "</msg>";
} else {
ss_middle = sb.toString();
}
ss = ss_begin + ss_middle + ss_end;
ss_begin = null;
ss_middle = null;
ss_end = null;
sb = null;
return ss;
}