예제 #1
0
 public ModelAndView auditVoucher(
     HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse)
     throws Exception {
   this.logger.debug("entering 'auditVoucher' method...");
   Long localLong =
       org.springframework.web.bind.ServletRequestUtils.getLongParameter(
           paramHttpServletRequest, "voucherNo");
   Boolean localBoolean =
       org.springframework.web.bind.ServletRequestUtils.getBooleanParameter(
           paramHttpServletRequest, "isPass");
   VoucherService localVoucherService = (VoucherService) SysData.getBean("f_voucherService");
   Voucher localVoucher = localVoucherService.getVoucherByNo(localLong);
   localVoucher.setAuditor(AclCtrl.getLogonID(paramHttpServletRequest));
   localVoucherService.updateVoucherNotEntrys(localVoucher);
   int i = localVoucherService.auditVoucher(localLong, localBoolean.booleanValue());
   String str = "";
   if (i == -1) {
     str = "凭证审核失败!请确认摘要与科目是否正确。";
   } else if (i == -2) {
     str = "凭证审核失败!造成201余额为负值。";
   } else {
     str = "凭证审核成功!";
   }
   return new ModelAndView("finance/public/done", "resultMsg", str);
 }
예제 #2
0
 public ModelAndView voucherMod(
     HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse)
     throws Exception {
   this.logger.debug("entering 'voucherMod' method...");
   VoucherService localVoucherService = (VoucherService) SysData.getBean("f_voucherService");
   Long localLong =
       org.springframework.web.bind.ServletRequestUtils.getLongParameter(
           paramHttpServletRequest, "voucherNo");
   Voucher localVoucher = localVoucherService.getVoucherByNo(localLong);
   fillVoucher(paramHttpServletRequest, localVoucher);
   localVoucherService.updateVoucher(localVoucher);
   return new ModelAndView("finance/public/done", "resultMsg", "更新凭证成功!");
 }
예제 #3
0
 public ModelAndView voucherEditForward(
     HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse)
     throws Exception {
   this.logger.debug("entering 'voucherEditForward' method...");
   VoucherService localVoucherService = (VoucherService) SysData.getBean("f_voucherService");
   String str1 = paramHttpServletRequest.getParameter("voucherNo");
   Voucher localVoucher = localVoucherService.getVoucherByNo(new Long(str1));
   String str2 = paramHttpServletRequest.getParameter("sign");
   if ((str2 == null) || (str2.length() == 0)) {
     str2 = "view";
   }
   ModelAndView localModelAndView =
       new ModelAndView("finance/voucher/editVoucher", "voucher", localVoucher);
   localModelAndView.addObject("sign", str2);
   return localModelAndView;
 }