src/com/oa/actions/PriceAction.java

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.oa.actions;
import java.util.List;

import org.apache.struts2.ServletActionContext;

import com.oa.models.TPrice;
import com.oa.models.TProduct;
import com.oa.models.TSupplier;
import com.oa.services.PriceServices;
import com.oa.services.ProductServices;
import com.oa.services.SupplierServices;
import com.oa.utils.PageInfo;


public class PriceAction extends BaseAction{
	private PriceServices priceServices;
	private SupplierServices supplierServices;
	private ProductServices productServices;
	private Integer id;
	private Integer supplierid;
	private Integer productid;
	private String pricename;
	private Float price;
	private String status;
	private String searchname;
	private String searchname1;
	private String num;
	private String username;
	private String remark;
	private String inputdate;
	
	public String queryPrice() throws Exception{
		if (getSessionAttribute("querypageunit") == null) {
			setSessionAttribute("querypageunit",this.pageunit);
		}
		StringBuffer cond = new StringBuffer();
		if(null!=searchname&&""!=searchname.trim()){
			cond.append(" and a.username like '%"+searchname.trim()+"%' ");
		}
		if(null!=searchname1&&""!=searchname1.trim()){
			cond.append(" and a.inputdate like '%"+searchname1.trim()+"%' ");
		}
		if(null!=getRequestParameter("flag") &&""!=getRequestParameter("flag")){
			setSessionAttribute("flag", getRequestParameter("flag"));
		}
		if(null!=getSessionAttribute("flag") &&""!=(String)getSessionAttribute("flag")){
			cond.append(" and a.status = '"+(String)getSessionAttribute("flag")+"' ");
		}
		
		int curpage = Integer.parseInt(this.getCurrentpage(ServletActionContext.getRequest()));
		int pageunit = Integer.parseInt(this.getPageunit(ServletActionContext.getRequest(), "querypageunit"));

		String url = "price_queryPrice?a=a";
		
		PageInfo pageInfo = this.priceServices.queryPrice(curpage,
				pageunit, ServletActionContext.getRequest(), url, cond.toString());
		setRequestAttribute("pageinfo", pageInfo);
		setRequestAttribute("searchname", this.searchname);
		return "queryPrice";
	}
后面还有 168 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。