<% @ Page contenttype = "text/html; charset = gb2312" %>
<% @ Page import = "Java. util. List" %>
<% @ Page import = "Java. util. Map" %>
<% @ Page import = "com. YC. ycportal. blockimp. Service. commonservice" %>
<%
Response. setcontenttype ("text/XML ");
String userid = request. getparameter ("userid ");
// Create the response XML
If (userid! = NULL &&! "". Equals (userid. Trim ())){
List gylist = commonservice. getinstance (). getdynamictable ("select * From dic_counter where counter_id = '" + userid + "'");
If (gylist! = NULL & gylist. Size () = 1 ){
Map gymap = (MAP) gylist. Get (0 );
String gyname = (string) gymap. Get ("counter_name"); // clerk name
String organid = (string) gymap. Get ("organ_id"); // the clerk's row number
List organlist = commonservice. getinstance (). getdynamictable ("select * From dic_organ where organ_id = '31" + organid + "'");
If (organlist! = NULL & organlist. Size () = 1 ){
Map organmap = (MAP) organlist. Get (0 );
String organname = (string) organmap. Get ("organ_name"); // obtain the row name of the clerk
// XML to be returned by the Organization
Stringbuffer xml = new stringbuffer ("<? XML version =/"1.0/" encoding =/"gb2312/"?> <Result> <queryresult> success </queryresult> <Name> "). append (gyname ). append ("</Name> <bank_id> "). append (organid ). append ("</bank_id> <bank_name> "). append (organname ). append ("</bank_name> </result> ");
// Send the response back to the browser
Response. getwriter (). Write (XML. tostring ());
} Else {
Response. getwriter (). Write ("<result> <queryresult> failed </queryresult> </result> ");
}
} Else {
Response. getwriter (). Write ("<result> <queryresult> failed </queryresult> </result> ");
}
} Else {
Response. getwriter (). Write ("<result> <queryresult> failed </queryresult> </result> ");
}
%>