/** * 保存奖金发放信息 * * @param mapping * @param form * @param request * @param response * @return */ public ActionForward saveXs0717( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String xsbh = request.getParameter("xsbh"); String zdbh = request.getParameter("zdbh"); String xnxqh = request.getParameter("xnxqh"); String je = request.getParameter("je"); User user = (User) (request.getSession().getAttribute(GlobalNames.USER_SESSION_KEY)); Jg0101 ffr = this.getIFdyxxglService().findJg0101ByJgh(user.getAccount()); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); java.util.Date today = new java.util.Date(); String theDate = sdf.format(today); Xs0101 curXS = this.getPjpytjServiceImpl().findXs0101ByXsbh(xsbh); Double yxJE = this.getPjpytjServiceImpl().findXs0720ByYxbh(curXS.getXx0301().getYxbh(), xnxqh); if (yxJE.doubleValue() > 0) { Xs0717 xs0717 = new Xs0717(); xs0717.setXs0708(this.getPjpytjServiceImpl().findXs0708ByZdbh(zdbh)); xs0717.setXs0101(curXS); xs0717.setJg0101(ffr); xs0717.setRq(theDate); try { xs0717.setJe(Double.valueOf(je)); } catch (Exception ex) { } this.getPjpytjServiceImpl().saveXs0717(xs0717, request); this.writeJsMessage(response, "alert('数据保存成功');"); } else { this.writeJsMessage(response, ""); } return null; }
/** * Ajax请求(根据学号查找学生) * * @param mapping * @param form * @param request * @param response * @return */ public ActionForward findXsByXh( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String xh = request.getParameter("xh"); response.setCharacterEncoding("utf-8"); response.setDateHeader("Expires", 0); response.setHeader("Cache-Control", "no-cache"); try { PrintWriter out = response.getWriter(); List list = this.getIJcffglService().findXsByXh(xh); String str = ""; if (list.size() == 0) { out.print(0); } else { Xs0101 xs0101 = (Xs0101) list.get(0); str += xs0101.getXm() + "," + xs0101.getZzdXb().getDmmc() + "," + xs0101.getXs0206().getBjmc() + "," + xs0101.getRxnf() + "," + xs0101.getJx01().getZymc() + "," + xs0101.getXx0301().getDwmc(); out.println(str); } } catch (Exception e) { e.printStackTrace(); } return null; }