public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages messages = null; try { String flowHeadId = request.getParameter("id"); if (flowHeadId != null && !flowHeadId.equals("null") && !flowHeadId.equals("")) { SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); IBizCheckBS bizCheckBS = (IBizCheckBS) BSUtils.getBusinessService("bizCheckBS", this, mapping.getModuleConfig()); AdjustAccountDTO adjustAccountDTO = bizCheckBS.queryAdjustAccountById(flowHeadId, securityInfo); adjustAccountDTO.setFlowHeadId(flowHeadId); request.getSession().setAttribute("adjustAccountDTO", adjustAccountDTO); } } catch (BusinessException bex) { messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(bex.getMessage(), false)); request.getSession().setAttribute("adjustAccountDTO", null); saveErrors(request, messages); } return mapping.findForward("to_adjustAccount_show"); }
public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages messages = new ActionMessages(); try { SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); ILoanerlogoutBS loanerlogoutBS = (ILoanerlogoutBS) BSUtils.getBusinessService("loanerlogoutBS", this, mapping.getModuleConfig()); String contractId = (String) request.getParameter("contractId"); if (contractId != null && !"".equals(contractId.trim())) { contractId = (String) request.getParameter("contractId"); } loanerlogoutBS.findLoanerlogouAvailable(contractId); loanerlogoutBS.saveLoanerlogouTa(contractId, securityInfo); request.setAttribute("save", "save"); } catch (BusinessException be) { messages.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage(be.getLocalizedMessage(), false)); saveErrors(request, messages); return mapping.findForward("loanerlogout_show"); } catch (Exception e) { e.printStackTrace(); } return mapping.findForward("loanerlogout_show"); }
/** * 确定按钮 * * @param mapping * @param form * @param request * @param response * @return * @throws Exception */ public ActionForward edit( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages messages = null; // Object obj = new Object(); // String pl121Id = ""; // obj = (Object)request.getSession().getAttribute("pl121Id"); // if(obj!=null){ // pl121Id = obj.toString(); // } String pl121Id = (String) request.getSession().getAttribute("pl121Id"); EndorsecontractTbAF endorsecontractTbAF = (EndorsecontractTbAF) form; SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); IAssurepledgechgBS assurepledgechgBS = (IAssurepledgechgBS) BSUtils.getBusinessService("assurepledgechgBS", this, mapping.getModuleConfig()); try { assurepledgechgBS.addPledgeContract(pl121Id, securityInfo, endorsecontractTbAF, request); messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("操作成功!", false)); saveErrors(request, messages); } catch (BusinessException bex) { messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(bex.getMessage(), false)); saveErrors(request, messages); } return mapping.findForward("to_endorsecontractTbShowAC"); }
// 删除AA202表中记录,条件是:id=选择的id 除AA203表中记录,条件是:变更清册id=选择的id public ActionForward remove( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages messages = null; try { IdAF idaf = (IdAF) form; SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); String ip = securityInfo.getUserInfo().getUserIp(); String name = securityInfo.getUserInfo().getUsername(); String id = idaf.getId().toString(); IChgslarybaseBS chgslarybaseBS = (IChgslarybaseBS) BSUtils.getBusinessService("chgslarybaseBS", this, mapping.getModuleConfig()); chgslarybaseBS.deleteAllChgPaymentTailMaintain(new Integer(id), ip, name, securityInfo); messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("删除成功!", false)); saveErrors(request, messages); } catch (BusinessException e) { messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(e.getMessage(), false)); saveErrors(request, messages); return mapping.findForward("chgslarybaseTbShowAC.do"); } return mapping.findForward("chgslarybaseTbShowAC.do"); }
public ActionForward update( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { IdAF idaf = (IdAF) form; String id = idaf.getId().toString(); Pagination pagination = new Pagination(); IChgslarybaseBS chgslarybaseBS = (IChgslarybaseBS) BSUtils.getBusinessService("chgslarybaseBS", this, mapping.getModuleConfig()); String orgid = chgslarybaseBS.findOrgidById(id); String type = "2"; pagination.getQueryCriterions().put("org.id", orgid); request.setAttribute("type", "0"); request.getSession().setAttribute(ChgslarybaseTaShowAC.PAGINATION_KEY, pagination); } catch (BusinessException e) { ActionMessages messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(e.getMessage(), false)); saveErrors(request, messages); return mapping.findForward("chgslarybaseTbShowAC.do"); } return mapping.findForward("chgslarybaseTaShowAC.do"); }
// 撤消提交数据 public ActionForward pproval( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages messages = null; try { IdAF idaf = (IdAF) form; SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); String id = idaf.getId().toString(); IChgslarybaseBS chgslarybaseBS = (IChgslarybaseBS) BSUtils.getBusinessService("chgslarybaseBS", this, mapping.getModuleConfig()); String orgid = chgslarybaseBS.queryOrgidByChgPaymentHeadID(id); String flag = "2"; chgslarybaseBS.removePickInChgPaymentTailMaintain(id, orgid, securityInfo, flag); messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("撤消提交成功!", false)); saveErrors(request, messages); } catch (BusinessException e) { messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(e.getMessage(), false)); saveErrors(request, messages); return mapping.findForward("chgslarybaseTbShowAC.do"); } return mapping.findForward("chgslarybaseTbShowAC.do"); }
public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages messages = null; try { messages = new ActionMessages(); TraninAddAF traninAddAF = (TraninAddAF) form; TranInTail tranInTail = traninAddAF.getTranInTail(); String traninTailsex = traninAddAF.getTraninTailsex(); tranInTail.setSex(new Integer(traninTailsex)); String empName = tranInTail.getName(); String cardNum = tranInTail.getCardNum(); String noteNum = traninAddAF.getNoteNum(); String tranInHeadById = traninAddAF.getTranInHeadId(); String inOrgId = traninAddAF.getInOrgId(); ITraninBS traninBS = (ITraninBS) BSUtils.getBusinessService("traninBS", this, mapping.getModuleConfig()); SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); String info = traninBS.addTranInTail_sy(inOrgId, noteNum, tranInTail, securityInfo); if (info.equals("showTraninListAC")) { messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("操作成功!", false)); saveErrors(request, messages); return mapping.findForward("showTraninListAC"); } if (info.equals("employeeMaintainAC")) { List list = traninBS.queryEmp_sy(empName, cardNum); traninAddAF.setNoteNum(noteNum); traninAddAF.setInOrgId(inOrgId); traninAddAF.setTranInTail(tranInTail); traninAddAF.setList(list); request.setAttribute("traninAddAF", traninAddAF); return mapping.findForward("showemppop"); } if (info.equals("sameEmployeeMaintainAC")) { List list = traninBS.querySameCompanyEmp_sy(inOrgId, empName, cardNum); traninAddAF.setNoteNum(noteNum); traninAddAF.setInOrgId(inOrgId); traninAddAF.setTranInTail(tranInTail); traninAddAF.setList(list); request.setAttribute("traninAddAF", traninAddAF); request.getSession().setAttribute("Magssage", "sameorg"); return mapping.findForward("showemppop"); } } catch (BusinessException bex) { messages = new ActionMessages(); messages.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage(bex.getLocalizedMessage().toString(), false)); saveErrors(request, messages); } catch (Exception e) { e.printStackTrace(); } return mapping.findForward("showTraninListAC"); }
/** * 根据输入合同编号查询合同编号是否存在 * * @param contractId 合同编号 * @throws Exception, BusinessException * @author wsh */ public void findGiveaccInfoExist(String contractId, List loanBankList) throws Exception, BusinessException { // TODO Auto-generated method stub BusinessException be = null; int count = 0; try { count = borrowerAccDAO.queryIdExist1_wsh(contractId, loanBankList).intValue(); // 条件成立说明输入合同编号不存在 if (count == 0) { be = new BusinessException("合同编号不存在或不在用户权限下!"); throw be; } } catch (BusinessException e) { // TODO: handle exception e.printStackTrace(); throw be; } catch (Exception e) { e.printStackTrace(); } }
public ActionForward deluse( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { saveToken(request); ActionMessages messages = null; try { Pagination pagination = (Pagination) request.getSession().getAttribute(PAGINATION_KEY); IdAF idaf = (IdAF) form; String id = idaf.getId().toString(); SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); String ip = securityInfo.getUserInfo().getUserIp(); String name = securityInfo.getUserInfo().getUsername(); pagination.getQueryCriterions().put("id", id); pagination.getQueryCriterions().put("ip", ip); pagination.getQueryCriterions().put("name", name); IChgslarybaseBS chgslarybaseBS = (IChgslarybaseBS) BSUtils.getBusinessService("chgslarybaseBS", this, mapping.getModuleConfig()); if (chgslarybaseBS.deluseChgPaymentSalaryBaseMaintain(pagination)) { messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("撤消启用成功!", false)); saveErrors(request, messages); } } catch (BusinessException e) { messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(e.getMessage(), false)); saveErrors(request, messages); return mapping.findForward("chgslarybaseTbShowAC.do"); } return mapping.findForward("chgslarybaseTbShowAC.do"); }
public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { response.setContentType("text/html;charset=UTF-8"); response.setHeader("Cache-Control", "no-cache"); ActionMessages messages = null; SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); DestoryBackTaAF destoryBackTaAF = new DestoryBackTaAF(); String text = ""; String message = ""; String contractId = ""; // 合同编号 String borrowerName = ""; // 借款人姓名 String cardKindName = ""; // 显示证件类型对应的名称 String cardNum = ""; // 证件号码 BigDecimal overplusLoanMoney = new BigDecimal(0.00); // 剩余本金 String loanModeName = ""; // 还款方式 BigDecimal noBackMoney = new BigDecimal(0.00); // 核销未收回金额 try { String loanKouAcc = (String) request.getParameter("loanKouAcc"); IDestoryBackBS destoryBackBS = (IDestoryBackBS) BSUtils.getBusinessService("destoryBackBS", this, mapping.getModuleConfig()); destoryBackTaAF = destoryBackBS.queryContractInfo(loanKouAcc, securityInfo); contractId = destoryBackTaAF.getContractId(); // 合同编号 borrowerName = destoryBackTaAF.getBorrowerName(); // 借款人姓名 cardKindName = destoryBackTaAF.getCardKindName(); // 证件类型 cardNum = destoryBackTaAF.getCardNum(); // 证件号码 overplusLoanMoney = destoryBackTaAF.getOverplusLoanMoney(); // 剩余本金 loanModeName = destoryBackTaAF.getLoanModeName(); // 还款方式 noBackMoney = destoryBackTaAF.getNoBackMoney(); // 核销未收回金额 } catch (BusinessException bex) { message = bex.getMessage(); messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(bex.getMessage(), false)); saveErrors(request, messages); } text = "display('" + contractId + "','" + borrowerName + "','" + cardKindName + "','" + cardNum + "'," + "'" + overplusLoanMoney + "','" + loanModeName + "','" + noBackMoney + "'"; text += ",'" + message + "');"; response.getWriter().write(text); response.getWriter().close(); return null; }
public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub ActionMessages messages = null; String paramValue = ""; String contractId = null; String comeFromType = null; String afterSure = null; EndorsecontractTaAF endorsecontractTaAF = new EndorsecontractTaAF(); SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo"); String insert = (String) request.getSession().getAttribute("insert"); IEndorsecontractBS endorsecontractBS = (IEndorsecontractBS) BSUtils.getBusinessService("endorsecontractBS", this, mapping.getModuleConfig()); Pagination pagination = getPagination(PAGINATION_KEY, request); List loanBankNameList = new ArrayList(); // 银行 List bankList = securityInfo.getDkUserBankList(); Userslogincollbank userslogincollbank = null; Iterator bank = bankList.iterator(); while (bank.hasNext()) { userslogincollbank = (Userslogincollbank) bank.next(); loanBankNameList.add( new org.apache.struts.util.LabelValueBean( userslogincollbank.getCollBankName(), userslogincollbank.getCollBankId().toString())); } try { comeFromType = (String) request.getAttribute("comeFromType"); // 用来判断是否为维护传来的状态 afterSure = (String) request.getAttribute("afterSure"); paramValue = endorsecontractBS.queryParamValue(securityInfo); // 参数值('AB' String temp_an = (String) request.getAttribute("temp_an"); if (temp_an == null) { if (comeFromType != null) { // 先判断是否是点击维护修改按钮过来 contractId = (String) request.getSession().getAttribute("contractId"); loanBankNameList = endorsecontractBS.queryBankList(contractId, securityInfo); endorsecontractTaAF = endorsecontractBS.queryContractInfo_(contractId, pagination, securityInfo, request); endorsecontractTaAF.setIsComeFromT5("0"); // 是从维护按钮过来,合同编号按钮禁用 } else if ("afterSure".equals(afterSure)) { // 点击确定后过来的 contractId = (String) request.getSession().getAttribute("contractId"); loanBankNameList = endorsecontractBS.queryBankList(contractId, securityInfo); endorsecontractTaAF = endorsecontractBS.queryContractInfo_(contractId, pagination, securityInfo, request); String error = (String) request.getAttribute("error"); if (error == null) { endorsecontractTaAF.setIsComeFromT5("0"); // 是从维护按钮过来,合同编号按钮禁用 } else { endorsecontractTaAF = new EndorsecontractTaAF(); } } else { // 从其他页面过来的 contractId = (String) request.getSession().getAttribute("contractId"); // 下面这行代码,点击节点进入时,银行下拉框将为空 loanBankNameList = endorsecontractBS.queryBankList(contractId, securityInfo); endorsecontractTaAF = endorsecontractBS.queryContractInfo( contractId, pagination, securityInfo, request, insert); } } } catch (BusinessException bex) { bex.printStackTrace(); messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(bex.getMessage(), false)); saveErrors(request, messages); } request.setAttribute("loanBankNameList", loanBankNameList); endorsecontractTaAF.setParamValue(paramValue); String temp_beentruster = endorsecontractTaAF.getBeentruster(); endorsecontractTaAF.setTemp_beentruster(temp_beentruster); String aftermaintain = (String) request.getSession().getAttribute("aftermaintain"); if (aftermaintain != null && !"".equals(aftermaintain)) { request.getSession().setAttribute("aftermaintain", null); } String taIsNeedDel = (String) request.getAttribute("taIsNeedDel"); endorsecontractTaAF.setIsNeedDel(taIsNeedDel); request.setAttribute("endorsecontractTaAF", endorsecontractTaAF); request.getSession().setAttribute("afterSure", null); return mapping.findForward("to_endorsecontractTa"); }