⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sale_flow_list.jsp

📁 实现很多功能 实现很多功能 实现很多功能
💻 JSP
字号:
<%@	include file="tags.jsp"%>
<%
String pc = request.getParameter("productCode");
String sc = request.getParameter("storeCode");
boolean pcNoEmpty = false;
boolean scNoEmpty = false;

if(pc!=null && !"".equals(pc)){
	pcNoEmpty = true;	
}

if(sc!=null && !"".equals(sc)) {
	scNoEmpty = true;	
}

if(pcNoEmpty==true && scNoEmpty==true){
	pageContext.setAttribute("filterNo",new Integer(8));
}else if(pcNoEmpty){
	pageContext.setAttribute("filterNo",new Integer(4));
}else if(scNoEmpty){
	pageContext.setAttribute("filterNo",new Integer(2));
}else{
	pageContext.setAttribute("filterNo",new Integer(0));
}
%>

<%pageContext.setAttribute("all",new String("全部".getBytes("iso-8859-1"),"utf-8")); %>


<c:choose>
	<c:when test="${pageScope.filterNo eq 8}">
		<sql:query var="flows"
		 sql="select tf.create_date as create_date,
		 			tf.product_code as productCode,
		 			tf.store_code as storeCode,
					ts.name as store_name  ,
					tp.name as product_name
		 from t_data_sale_flow tf, t_dic_chain_store ts, t_dic_product tp
		  where (tf.store_code=ts.id and tf.product_code=tp.id)
		  and product_code =? and store_code=? order by tf.id desc">
			<sql:param value="${param.productCode }"/>
			<sql:param value="${param.storeCode }"/>
		</sql:query>
	</c:when>
	<c:when test="${pageScope.filterNo eq 4}">
		<sql:query var="flows" sql="select tf.create_date as create_date,
		 			tf.product_code as productCode,
		 			tf.store_code as storeCode,
					ts.name as store_name  ,
					tp.name as product_name
		 from t_data_sale_flow tf, t_dic_chain_store ts, t_dic_product tp
		  where (tf.store_code=ts.id and tf.product_code=tp.id)
		   and product_code =?  order by tf.id desc">
			<sql:param value="${param.productCode }"/>
		</sql:query>
	</c:when>
	<c:when test="${pageScope.filterNo eq 2}">
		<sql:query var="flows" sql="select tf.create_date as create_date,
		 			tf.product_code as productCode,
		 			tf.store_code as storeCode,
					ts.name as store_name  ,
					tp.name as product_name
		 from t_data_sale_flow tf, t_dic_chain_store ts, t_dic_product tp
		  where (tf.store_code=ts.id and tf.product_code=tp.id) 
		  and  store_code=? order by tf.id desc">
			<sql:param value="${param.storeCode }"/>
		</sql:query>
	</c:when>
	<c:otherwise>
		<sql:query var="flows" sql="select tf.create_date as create_date,
		 			tf.product_code as productCode,
		 			tf.store_code as storeCode,
					ts.name as store_name  ,
					tp.name as product_name
		 from t_data_sale_flow tf, t_dic_chain_store ts, t_dic_product tp
		  where (tf.store_code=ts.id and tf.product_code=tp.id)
		   order by tf.id desc" />
	</c:otherwise>
</c:choose>

<sql:query var="products" sql="select * from t_dic_product order by id desc"/>
<sql:query var="stores" sql="select * from t_dic_chain_store order by id desc"/>
<root>
	<flows>
	<c:forEach var="flow" items="${flows.rows }">
		<flow productCode="${fn:fillZero(flow.productCode,4) }" productName="${flow.product_name }" storeCode="${fn:fillZero(flow.storeCode,4) }" storeName="${flow.store_name }" saleDate="${fn:getPlusTime(flow.create_date) }"/>
	</c:forEach>
	</flows>
	
	<products>
		<product id="" name="${pageScope.all }"/>
		<c:forEach var="p" items="${products.rows }">
			<product id="${p.id }" name="${p.name }"/>
		</c:forEach>
	</products>
	
	<stores>
		<store id="" name="${pageScope.all }"/>	
		<c:forEach var="s" items="${stores.rows }">
			<store id="${s.id }" name="${s.name }"/>
		</c:forEach>	
	</stores>
</root>

⌨️ 快捷键说明

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