Пример #1
0
  /**
   * 保存院系奖金发放信息
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return
   */
  public ActionForward saveXs0720(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    String xnxqh = request.getParameter("xnxqh");
    String yxbh = request.getParameter("yxbh");
    // String zje = request.getParameter("zje");
    String yfje = request.getParameter("yfje");
    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);

    Xs0720 xs0720 = new Xs0720();
    xs0720.setJx12(this.getIFdyxxglService().findJx12ByXnxqh(xnxqh));
    xs0720.setVxx0301(this.getIFdyxxglService().findVxx0301ByYxbh(yxbh));
    xs0720.setJg0101(ffr);
    xs0720.setFfrq(theDate);
    try {
      xs0720.setZje(Double.valueOf(yfje));
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    this.getPjpytjServiceImpl().saveXs0720(xs0720, request);
    this.writeJsMessage(response, "alert('数据保存成功');");
    return null;
  }
Пример #2
0
 /** 删除院系奖金发放清单 */
 public ActionForward deleteXs0720(
     ActionMapping mapping,
     ActionForm actionForm,
     HttpServletRequest request,
     HttpServletResponse response) {
   String valueKey = request.getParameter("valueKey");
   if (valueKey != null && !"".equals(valueKey)) {
     String[] theKeys = valueKey.split("\\$");
     for (int i = 0; i < theKeys.length; i++) {
       if (theKeys[i] != null && !"".equals(theKeys[i])) {
         String[] theValues = theKeys[i].split(",");
         String xnxqh = theValues[0];
         String yxbh = theValues[1];
         Xs0720 xs0720 = new Xs0720();
         xs0720.setJx12(this.getIFdyxxglService().findJx12ByXnxqh(xnxqh));
         xs0720.setVxx0301(this.getIFdyxxglService().findVxx0301ByYxbh(yxbh));
         this.getPjpytjServiceImpl().deleteXs0720(xs0720, request);
       }
     }
     this.writeJsMessage(
         response, "alert('数据删除成功!');window.parent.Form1.action='';window.parent.Form1.submit()");
   }
   return null;
 }