日期:2014-05-18  浏览次数:20695 次

来看段代码,目前我在维护,呵呵
已经快疯了,不知哪厮写的,没有需求,没有注释,连缩进都乱七八糟

我本将心向明月,奈何明月照沟渠...


String   fee= " ";
String   num= " ";
String   aname= " ";
String   bname= " ";
String   areaid= " ";

String   nowdate= " ";
//String   bfee= " ";
java.util.Date   now   =   new   java.util.Date();
SimpleDateFormat   df_time   =   new   SimpleDateFormat( "yyyy-MM-dd   hh:mm:ss ");
nowdate   =df_time.format(now);

String   pid=request.getParameter( "pid ")==null? " ":request.getParameter( "pid ");

String   branid=request.getParameter( "branid ")==null? " ":request.getParameter( "branid ");
String   year= " ";

String   cnt= " ";
String   id=userToken.getSysuserid();
String   sid= " ";
String   sysuserid= " ";
String   sname= " ";
String   aid=String.valueOf(userToken.getAreaId());
Connection   conn   =   dbconn.getConnection();
Statement   stmt   =   conn.createStatement();
Statement   st   =   conn.createStatement();

ResultSet   rset   =   null;
String   sql   = " ";

sql   = "select   sysuserid   from   td_pfeemanager   where   areaid= "+aid;
rs=stmt.executeQuery(sql);
while(rs.next())
{
sid=Utility.chgGBK(rs.getString(1));
}
rs.close();
rs=null;

if(!(sid.equals(id)))
{%>
<br>
<br>
<br>
<br>
<p   align= "center "> <b   class= "bigtitle   style2   style3 "> 你没有权限查看本页! </b>
<%}else{%>

<%

if(! " ".equals(pid)&&pid!=null){
if(! " ".equals(branid)&&branid!=null){
year=request.getParameter( "year ")==null? " ":request.getParameter( "year ");
rs   =stmt.executeQuery( "select   a.branchdeptid,b.branchdeptname,fee   from   ty_pfeereserve   a,ts_branchdept   b   where   a.branchdeptid   =   b.branchdeptid   and   a.branchdeptid   =   "+branid+ "   and   year   = ' "+year+ " ' ");
if(rs.next()){
bname   =   rs.getString(2);
fee   =   rs.getString(3);
}
rs.close();
rs=null;
//System.out.println( "2222 ");
}else{
rs=stmt.executeQuery( "select   year,a.areaid,c.areaname,a.sysuserid,b.name,a.fee   from   ty_pfeereserve   a,ts_sysuser   b,td_area   c     where   a.sysuserid   *=   b.sysuserid   and   a.areaid   =   c.areaid   and   preserveid= "+pid);
while(rs.next()){
    year=rs.getString(1);
    areaid=rs.getString(2);
    sysuserid=rs.getString(4);

    aname   =   rs.getString(3);

    sname   =   rs.getString(5);

    fee   =   rs.getString(6);

}
rs.close();
rs=null;
//System.out.println( "11111 ");
}
}


%>
<FORM   name= "form &q