package com.wages.action; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.apache.struts2.ServletActionContext; import com.wages.dao.RpDao; import com.wages.dao.StaffDao; import com.wages.hentity.Rp; import com.wages.hentity.Staff; public class RpAction { public Rp rp; private RpDao rpDao; private StaffDao staffDao; public StaffDao getStaffDao() { return staffDao; } public void setStaffDao(StaffDao staffDao) { this.staffDao = staffDao; } public RpDao getRpDao() { return rpDao; } public void setRpDao(RpDao rpDao) { this.rpDao = rpDao; } public Rp getRp() { return rp; } public void setRp(Rp rp) { this.rp = rp; } public String rps() { HttpServletRequest request = ServletActionContext.getRequest(); List<Rp> rps = rpDao.rps(); request.setAttribute("rps", rps); return "rps"; } public String delRps() { rpDao.delRp(rp.getRpId()); return rps(); } public String rpDetail() { HttpServletRequest request = ServletActionContext.getRequest(); Rp curRp = rpDao.queryRp(rp.getRpId()); request.setAttribute("curRp", curRp); return "rpDetail"; } public String updateRp() { rpDao.updateRp(rp); return rps(); } public String staffId() { HttpServletRequest request = ServletActionContext.getRequest(); List<Staff> staffs = staffDao.staffs(); request.setAttribute("staffs", staffs); return "addRp"; } public String rpAdd() { rpDao.rpAdd(rp); return rps(); } // public String rpAdd() { // RpDao rpDao = new RpDao(); // if(rp.getRpType().equals("³Í·£")) { // float x = 0; // x = -rp.getRpMoney(); // rp.setRpMoney(x); // } // rpDao.rpAdd(rp); // return rps(); // } }

255921158 LV5
2024年7月17日
pangzhihui LV14
2024年5月15日
阿昌先生 LV13
2024年3月26日
wuying8208 LV15
2023年11月25日
hz1109 LV7
2023年11月7日
微信网友_6482083022819328 LV14
2023年5月22日
qfch120 LV8
2023年3月28日
13655961071 LV5
2022年12月24日
微信网友_6254095067451392 LV3
2022年12月9日
zhaoyangwfd LV17
2022年10月11日

benben2020
3月19日
暂无贡献等级
571818771 LV3
2024年12月17日
随便取个名字_哈哈 LV27
2024年11月23日
微信网友_7253744540979200 LV1
2024年11月14日
zhangsan_lisi
2024年9月18日
暂无贡献等级
255921158 LV5
2024年7月17日
quartz LV8
2024年7月1日
educationAAA LV11
2024年6月23日
ailixiya LV1
2024年6月11日
wangbh1234 LV1
2024年6月6日