private void fillVoucher(HttpServletRequest paramHttpServletRequest, Voucher paramVoucher) { ParamUtil.bindData(paramHttpServletRequest, paramVoucher); Long[] arrayOfLong = Utility.getLongParameters(paramHttpServletRequest, "entryId"); String[] arrayOfString1 = paramHttpServletRequest.getParameterValues("entrySummary"); String[] arrayOfString2 = org.springframework.web.bind.ServletRequestUtils.getStringParameters( paramHttpServletRequest, "accountCode"); String[] arrayOfString3 = org.springframework.web.bind.ServletRequestUtils.getStringParameters( paramHttpServletRequest, "accountName"); String[] arrayOfString4 = org.springframework.web.bind.ServletRequestUtils.getStringParameters( paramHttpServletRequest, "debitAmount"); String[] arrayOfString5 = org.springframework.web.bind.ServletRequestUtils.getStringParameters( paramHttpServletRequest, "creditAmount"); ArrayList localArrayList = new ArrayList(); for (int i = 0; i < arrayOfString2.length; i++) { VoucherEntry localVoucherEntry = new VoucherEntry(); localVoucherEntry.setEntryId(arrayOfLong[i]); localVoucherEntry.setEntrySummary(arrayOfString1[i]); localVoucherEntry.setAccountCode(arrayOfString2[i]); localVoucherEntry.setDebitAmount(new BigDecimal(arrayOfString4[i])); localVoucherEntry.setCreditAmount(new BigDecimal(arrayOfString5[i])); localArrayList.add(localVoucherEntry); } paramVoucher.setVoucherEntrys(localArrayList); }
public ModelAndView channelMod( HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse) throws Exception { this.logger.debug("entering 'updateChannel' method..."); VoucherService localVoucherService = (VoucherService) SysData.getBean("f_voucherService"); Channel localChannel = new Channel(); ParamUtil.bindData(paramHttpServletRequest, localChannel); localVoucherService.updateChannel(localChannel); return new ModelAndView("finance/public/done", "resultMsg", "修改通道成功!"); }