MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » 来看段代码,目前小弟我在维护,呵呵

来看段代码,目前小弟我在维护,呵呵

www.MyException.Cn  网友分享于:2015-08-27  浏览:12次
来看段代码,目前我在维护,呵呵
已经快疯了,不知哪厮写的,没有需求,没有注释,连缩进都乱七八糟

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


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 "   method= "post "     action= "projectfeeupdate.jsp?pid= <%=pid%> &aid= <%=aid%> &branid= <%=branid%> &year= <%=year%> "   onsubmit= "return   check(); ">

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有