check.jsp

来自「运输模块代码」· JSP 代码 · 共 42 行

JSP
42
字号
<%@ page contentType="text/html;charset=GBK" %>
<%@ include file="/IncludeBeginMD.jsp" %>
<%
    //检索的起始日期
    String sDate = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("sdate"));
    //检索截至日期
    String eDate = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("edate"));
    //检索界面传递过来的account,subacct
    String sAccount = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("account"));
    String sSubacct = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("subacct"));

    String sql = "select * from shipment where  worksno>=100000  ";
    if (sAccount != null && sAccount.length() > 0) {
        sql = sql + "  and account='" + sAccount + "'";
    }
    if (sSubacct != null && sSubacct.length() > 0) {
        sql = sql + "  and subacct='" + sSubacct + "'";
    }
    if (sDate != null && sDate.length() > 0) {
        //起始日期条件
        sql = sql + "  and shipdt >= '" + sDate + "'";
    }
    if (eDate != null && eDate.length() > 0) {
        //截至日期条件
        sql = sql + " and shipdt <= '" + eDate + "'";
    }
    sql = sql + "  order by shipdt desc";
     System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&sql="+sql);
    boolean noRecord = true;
    ASResultSet rs = Sqlca.getASResultSet(sql);
    if (rs.next()) {
        noRecord = false;
    } else {
        noRecord = true;
    }
%>
<script language=javascript>
    self.returnValue = "<%=noRecord%>";
    self.close();
</script>
<%@ include file="/IncludeEnd.jsp" %>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?