📄 tjaction.java
字号:
package com.qhit.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.qhit.UseException;
import com.qhit.Utils;
import com.qhit.db.instance.DbIoMapMain;
import com.qhit.po.IoMapList;
import com.qhit.vo.IoMapMainQuery;
import com.qhit.vo.PageObj;
public class TjAction {
private DbIoMapMain dimm;
public TjAction() throws UseException {
this.dimm = new DbIoMapMain();
}
public void query(HttpServletRequest request, HttpServletResponse response)
throws Exception {
int sum = 0;
String mpid = Utils.getNotNull(request.getParameter("mpid"));
String oiid = Utils.getNotNull(request.getParameter("oiid"));
String state = "已审核";
String tj = request.getParameter("tj");
String outindatebegin = Utils.getNotNull(request
.getParameter("outindatebegin"));
String outindateend = Utils.getNotNull(request
.getParameter("outindateend"));
String currpagestr = Utils.getNotNull(request.getParameter("currpage"));
try {
IoMapMainQuery imq = new IoMapMainQuery();
imq.setOiid(oiid);
imq.setState(state);
imq.setOutindatebegin(outindatebegin);
imq.setOutindateend(outindateend);
if ("1".equals(tj)) {
imq.setOutintype("出库");
} else {
imq.setOutintype("进库");
}
if ("".equals(currpagestr))
currpagestr = "1";
int currpage = Integer.valueOf(currpagestr);
IoMapList iml = new IoMapList();
iml.setMpid(mpid);
List list = dimm.query(imq, iml);
PageObj vo = new PageObj();
vo.setCurrpage(currpage);
vo.setList(list);
request.setAttribute("po", vo);
sum = dimm.querysum(imq, iml);
request.setAttribute("sum", sum);
} catch (Exception e) {
e.printStackTrace();
request.setAttribute("error", "执行查询操作出错,原因:" + e.getMessage());
} finally {
dimm.closeAll();
if ("1".equals(tj)) {
request.getRequestDispatcher("tjoutquery.jsp").forward(request,
response);
} else {
request.getRequestDispatcher("tjinquery.jsp").forward(request,
response);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -