/**
   * 确定按钮
   *
   * @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");
  }
 // 撤消提交数据
 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 {
     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");
 }
  /**
   * Method execute
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return ActionForward
   */
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    // IdAF idAF = (IdAF) form;// TODO Auto-generated method stub
    try {
      // 把 PAYID 传过来放在SESSION 里
      if (request.getAttribute("payId_num") != null) {
        HttpSession session = request.getSession();
        session.setAttribute("payId_num_session", (String) request.getAttribute("payId_num"));
      }

      IAgentBS agentBS =
          (IAgentBS) BSUtils.getBusinessService("agentBS", this, mapping.getModuleConfig());
      Pagination pagination =
          getPagination(PAGINATION_KEY, request, (String) request.getAttribute("payId_num"));
      PaginationUtils.updatePagination(pagination, request);
      // TB  集合
      List list = agentBS.queryAgentInfoTbList(pagination);
      // TB  数量
      int count = agentBS.queryAgentInfoTbListCount(pagination);

      pagination.setNrOfElements(count);
      AgentInfoQueryTbAF agentInfoQueryTbAF = new AgentInfoQueryTbAF();
      agentInfoQueryTbAF.setList(list);
      request.setAttribute("agentInfoQueryTbAF", agentInfoQueryTbAF);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return mapping.findForward("to_agentInfoQueryTb_show");
  }
  /**
   * Method execute
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return ActionForward
   */
  public ActionForward updateCredencechar(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    try {
      IdAF idaf = (IdAF) form;
      String paraId = idaf.getId().toString();
      ICredencecharBS credencecharBS =
          (ICredencecharBS)
              BSUtils.getBusinessService("credencecharBS", this, mapping.getModuleConfig());

      // 根据ID判断记录是否存在
      boolean temp_isCredencechar = credencecharBS.isCredencecharById(paraId);
      if (!temp_isCredencechar) {
        ActionMessages messages = new ActionMessages();
        messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("该记录不存在,不能修改!", false));
        saveErrors(request, messages);
        return mapping.findForward("credencecharShowAC");
      }

      // 根据ID 查询出凭证字 和 凭证字名称
      CredencecharDTO credencecharDTO = credencecharBS.queryCredencecharParamExplainInfo(paraId);
      String paramExplain = credencecharDTO.getParamExplain();
      String paramExplainExplain = credencecharDTO.getParamExplainExplain();
      request.setAttribute("paraId", paraId);
      request.setAttribute("paramExplain", paramExplain);
      request.setAttribute("paramExplainExplain", paramExplainExplain);

      request.setAttribute("updateInfo", "updateInfo");
    } catch (Exception e) {
      e.printStackTrace();
    }
    return mapping.findForward("credencecharShowAC");
  }
  // 删除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 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");
 }
  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");
  }
Beispiel #9
0
 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");
 }
Beispiel #10
0
  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 mess = new ActionMessages();
    try {
      String id = (String) request.getParameter("id");
      ISpePickBS spePickBS =
          (ISpePickBS) BSUtils.getBusinessService("spePickBS", this, mapping.getModuleConfig());
      SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
      Org org = null;
      String name = "";
      String text = null;
      String f = "";
      String f1 = "";
      boolean flag1 = false;
      boolean flag2 = false;
      if (id != null && !id.equals("")) {

        id = BusiTools.convertSixNumber(id);
        org = spePickBS.queryOrgById(new Integer(id), securityInfo);
      }
      if (org != null && org.getOrgInfo().getOpenstatus().equals("2")) {
        flag1 = spePickBS.check(id, securityInfo); // 错账
        flag2 = spePickBS.checkTranOut(id); // 转出
        if (flag1) {
          f = "提示"; // 错账
        }
        if (flag2) {
          f1 = "提示"; // 转出
        }
        name = org.getOrgInfo().getName();
      } else if (!org.getOrgInfo().getOpenstatus().equals("2")) {
        text = "showNull2()";
        response.getWriter().write(text);
        response.getWriter().close();
      }
      text = "displays('" + id + "','" + name + "','" + f + "','" + f1 + "')";
      response.getWriter().write(text);
      response.getWriter().close();
    } catch (BusinessException be) {
      String text1 = "showNull()";
      response.getWriter().write(text1);
      response.getWriter().close();
    }

    return null;
  }
  public ActionForward print(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
    Pagination pagination =
        (Pagination) request.getSession().getAttribute(EmployeeInfoListShowAC.PAGINATION_KEY);
    IEmployeeInfoListBS pbs =
        (IEmployeeInfoListBS)
            BSUtils.getBusinessService("employeeInfoListBS", this, mapping.getModuleConfig());
    List list = pbs.getEmployeeInfoAllList(pagination, securityInfo);
    request.setAttribute("printlist", list);
    return mapping.findForward("to_empBaseInfoListprint");
  }
Beispiel #12
0
 public ActionForward execute(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response) {
   try {
     SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
     ParamAF paramAF = (ParamAF) form;
     ParamDTO paramDTO = paramAF.getParamDTO();
     IParamBS paramBS =
         (IParamBS) BSUtils.getBusinessService("paramBS", this, mapping.getModuleConfig());
     paramBS.saveParamInfo(paramDTO, securityInfo);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return mapping.findForward("param_show");
 }
  public ActionForward printone(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    String id = (String) request.getParameter("id");
    String iid = (String) request.getParameter("iid");
    IEmployeeInfoListBS pbs =
        (IEmployeeInfoListBS)
            BSUtils.getBusinessService("employeeInfoListBS", this, mapping.getModuleConfig());
    Integer orgId = new Integer(iid);
    Integer empId = new Integer(id);
    Emp emp = pbs.findEmpByOrdIdAndEmpId(orgId, empId);
    request.setAttribute("emp", emp);
    return mapping.findForward("to_empBaseInfoprint");
  }
 public ActionForward deleteCredencechar(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response) {
   try {
     IdAF idaf = (IdAF) form;
     String paraId = idaf.getId().toString();
     ICredencecharBS credencecharBS =
         (ICredencecharBS)
             BSUtils.getBusinessService("credencecharBS", this, mapping.getModuleConfig());
     // 权限
     SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
     // bookId
     String bookId = securityInfo.getBookId();
     // 根据ID 判断是否有记录
     boolean temp_credencechar = credencecharBS.isCredencecharById(paraId);
     if (temp_credencechar) { // 有记录
       // 判断该记录的FN102.para_id在FN201.CREDENCE_CHARACTER or FN210.CREDENCE_CHARACTER中是否存在
       boolean temp_Existence = credencecharBS.isCredencecharByParamValue(paraId, bookId);
       if (temp_Existence) { // 不存在
         // 删除 paramId 记录
         credencecharBS.deleteCredencecharInfo(paraId, securityInfo);
       } else { // 存在
         ActionMessages messages = new ActionMessages();
         messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("该条记录已被应用,不允许删除!", false));
         saveErrors(request, messages);
       }
     } else {
       // 没有记录
       ActionMessages messages = new ActionMessages();
       messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("该记录已删除!", false));
       saveErrors(request, messages);
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return mapping.findForward("credencecharShowAC");
 }
  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");
  }
  /**
   * Method execute
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return ActionForward
   */
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {

    ParticularglTaAF particularglTaAF =
        (ParticularglTaAF) request.getSession().getAttribute("toprinttcparticularglTaAF");

    SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
    String opertname = securityInfo.getRealName();
    ILoanDocNumDesignBS loanDocNumDesignBS =
        (ILoanDocNumDesignBS)
            BSUtils.getBusinessService(
                "sysloanloanDocNumDesignBS", this, mapping.getModuleConfig());
    String userName = "";
    try {
      String name = loanDocNumDesignBS.getNamePara();

      if (name.equals("1")) {
        userName = securityInfo.getUserName();
      } else {
        userName = securityInfo.getRealName();
      }

    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    String time = securityInfo.getUserInfo().getPlbizDate();
    request.setAttribute("opertname", userName);
    request.setAttribute("time", time);
    request.setAttribute("particularglTaAF", particularglTaAF);
    request.getSession().setAttribute("toprinttcparticularglTaAF", null);

    return mapping.findForward("particulargl_tc_print");
  }
 public ActionForward execute(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   // TODO Auto-generated method stub
   try {
     SettleincanddecAF settleincanddecAF = new SettleincanddecAF();
     Pagination pagination = getPagination(SettleincanddecShowAC.PAGINATION_KEY, request);
     PaginationUtils.updatePagination(pagination, request);
     SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
     List list = null;
     ISettleincanddecBS settleincanddecBS =
         (ISettleincanddecBS)
             BSUtils.getBusinessService("settleincanddecBS", this, mapping.getModuleConfig());
     list = settleincanddecBS.querySettleIncAndDecList(securityInfo, pagination);
     settleincanddecAF.setList(list);
     request.setAttribute("settleincanddecAF", settleincanddecAF);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return mapping.findForward("to_show_settleincanddec");
 }
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    ActionMessages messages = null;
    SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
    try {

      OrgAccountInfoAF af = new OrgAccountInfoAF();
      String id = (String) request.getAttribute("id");
      String mode = request.getParameter("mode");
      String opTime = (String) request.getAttribute("opTime");
      Pagination pagination = getPagination(OrgAccountInfoTcShowAC.PAGINATION_KEY, request);
      Pagination pagination1 =
          (Pagination) request.getSession().getAttribute(OrgAccountInfoTaShowAC.PAGINATION_KEY);
      pagination.getQueryCriterions().put("opDate", pagination1.getQueryCriterions().get("opDate"));
      pagination
          .getQueryCriterions()
          .put("inOpDate", pagination1.getQueryCriterions().get("inOpDate"));
      if (id != null) {
        pagination.getQueryCriterions().put("id", id);
      }
      if (opTime != null) {
        pagination.getQueryCriterions().put("opTime", opTime);
      }
      mode = (String) pagination1.getQueryCriterions().get("mode");
      pagination.getQueryCriterions().put("mode", pagination1.getQueryCriterions().get("mode"));
      PaginationUtils.updatePagination(pagination, request);
      IOrgAccountInfoBS orgAccountInfoBS =
          (IOrgAccountInfoBS)
              BSUtils.getBusinessService("orgAccountInfoBS", this, mapping.getModuleConfig());
      List officelist = securityInfo.getOfficeList();
      List officelist1 = new ArrayList();
      OfficeDto dto = null;
      Iterator itr = officelist.iterator();
      while (itr.hasNext()) {
        dto = (OfficeDto) itr.next();
        officelist1.add(
            new org.apache.struts.util.LabelValueBean(
                dto.getOfficeName().toString(), dto.getOfficeCode().toString()));
      }
      List bankList = securityInfo.getCollBankList();
      List bankList1 = new ArrayList();
      Userslogincollbank bankdto = null;
      Iterator itr1 = bankList.iterator();
      while (itr1.hasNext()) {
        bankdto = (Userslogincollbank) itr1.next();
        bankList1.add(
            new org.apache.struts.util.LabelValueBean(
                bankdto.getCollBankName().toString(), bankdto.getCollBankId().toString()));
      }
      request.getSession(true).setAttribute("bankList1", bankList1);
      request.getSession(true).setAttribute("officelist1", officelist1);
      List list = orgAccountInfoBS.findOrgAccountInfoByDay(pagination, securityInfo);
      OrgAccountInfoTotalDTO totaldto =
          orgAccountInfoBS.findOrgAccountInfoDayTotal(pagination, securityInfo);
      request.setAttribute("orgAccountInfoTotalDTO", totaldto);
      af.setMode(pagination1.getQueryCriterions().get("mode") + "");
      request.setAttribute("orgAccountInfoAF", af);
      request.setAttribute("LIST", list);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return mapping.findForward(getForword());
  }
  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");
    try {
      String id = (String) request.getParameter("id"); // 转出单位ID
      ItranoutBS tranoutBS =
          (ItranoutBS) BSUtils.getBusinessService("tranoutBS", this, mapping.getModuleConfig());

      Org org = null;
      String name = "";
      BigDecimal monthIncome = new BigDecimal(0.00);
      boolean b = false;
      boolean c = false;
      String f = "";
      String str = "";
      String yg = "";
      String yg_a = "";
      if (id != null && !id.equals("")) {
        org = tranoutBS.fingOrgInfo(id, securityInfo);

        if (org != null) {
          yg = tranoutBS.FindAA103_DayTime(org.getOrgInfo().getCollectionBankId());
          if (securityInfo.getUserInfo().getBizDate().equals(yg)) {
            yg_a = "a";
          } else {
            yg_a = "b";
          }
          name = org.getOrgInfo().getName();
          b = tranoutBS.findAdjustWrongFAccountByOrgid(org.getId().toString(), securityInfo);
          c = tranoutBS.check(org.getId().toString());
          if (b) {
            str = "此单位存在未记账的错账调整业务!";
          }
          if (c) {
            f = "提示";
          }
        }
        String text = null;
        String paginationKey = getPaginationKey();
        Pagination pagination = (Pagination) request.getSession().getAttribute(paginationKey);
        pagination.getQueryCriterions().put("id", id);
        pagination.getQueryCriterions().put("name", name);
        pagination.getQueryCriterions().put("monthIncome", monthIncome);

        if (name == null || name.equals("") || name.length() < 1) name = "";

        text =
            "displays('"
                + id
                + "','"
                + name
                + "','"
                + monthIncome
                + "','"
                + str
                + "','"
                + f
                + "','"
                + yg_a
                + "')";
        response.getWriter().write(text);
        response.getWriter().close();
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 public ActionForward execute(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response) {
   ActionMessages messages = null;
   try {
     /** 分页 */
     Pagination pagination = getPagination(PAGINATION_KEY, request);
     PaginationUtils.updatePagination(pagination, request);
     saveToken(request);
     RateShowAF rateShowAF = new RateShowAF();
     IRatemngBS ratemngBS =
         (IRatemngBS) BSUtils.getBusinessService("ratemngBS", this, mapping.getModuleConfig());
     List list = ratemngBS.findRatemngList_sy(pagination);
     // 以下程序是判断是否启用按钮好用。
     SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
     List temp_list = securityInfo.getAllOfficeList();
     List temp_officecode = new ArrayList();
     OfficeDto officeDto = null;
     String info = "";
     String loadsMassage = "";
     // 确定有几个没有启用
     if (!temp_list.isEmpty()) {
       for (int i = 0; i < temp_list.size(); i++) {
         officeDto = (OfficeDto) temp_list.get(i);
         String officecode = officeDto.getOfficeCode();
         info = ratemngBS.checkOfficeCode(officecode);
         if (!info.equals("") && info.equals("nohi")) {
           temp_officecode.add(info);
         }
       }
     }
     // 办事处个数和没启用个数相等的时候启用按钮可用
     if (temp_list.size() == temp_officecode.size()) {
       loadsMassage = "hi";
     }
     RatemngAF ratemngAF = new RatemngAF();
     ratemngAF.setLoadsMassage(loadsMassage);
     ratemngAF.setList(list);
     List officeList = securityInfo.getAllOfficeList();
     List officeList1 = new ArrayList();
     OfficeDto officedto = null;
     Iterator itr1 = officeList.iterator();
     while (itr1.hasNext()) {
       officedto = (OfficeDto) itr1.next();
       officeList1.add(
           new org.apache.struts.util.LabelValueBean(
               officedto.getOfficeName(), officedto.getOfficeCode()));
     }
     request.getSession(true).setAttribute("officeList1", officeList1);
     ratemngAF.setOfficecode("");
     rateShowAF.setRatetypemap(BusiTools.listBusiProperty(BusiConst.CHGTYPESTATUS));
     request.setAttribute("ratemngAF", ratemngAF);
     request.setAttribute("rateShowAF", rateShowAF);
     ratemngAF.reset(mapping, request);
   } catch (Exception ex) {
     ex.printStackTrace();
   }
   return mapping.findForward("to_ratemng_list");
 }
  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");
  }
  /**
   * Method execute
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return ActionForward
   */
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    response.setContentType("text/html;charset=UTF-8");
    response.setHeader("Cache-Control", "no-cache");
    SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
    String assitId = (String) request.getParameter("assitId");
    String contractid = (String) request.getSession().getAttribute("contractIdWY");
    ILoanapplyBS loanapplyBS =
        (ILoanapplyBS) BSUtils.getBusinessService("loanapplyBS", this, mapping.getModuleConfig());
    try {
      LoanapplyTbNewAF loanapplytbnewAF =
          loanapplyBS.findAssistanBorrowerInfo(contractid, securityInfo, assitId);
      // 枚举转换性别
      String sex =
          BusiTools.getBusiValue(Integer.parseInt(loanapplytbnewAF.getSex()), BusiConst.SEX);
      loanapplytbnewAF.setSex(sex);
      // 枚举转换证件类型
      String cardKind =
          BusiTools.getBusiValue(
              new Integer(loanapplytbnewAF.getCardKind()).intValue(), BusiConst.DOCUMENTSSTATE);
      loanapplytbnewAF.setCardKind(cardKind);

      String nation = "";
      if (loanapplytbnewAF.getNation() != null) {
        nation = loanapplytbnewAF.getNation();
      }
      loanapplytbnewAF.setNation(nation);
      String nativePlace = "";
      if (loanapplytbnewAF.getNativePlace() != null) {
        nativePlace = loanapplytbnewAF.getNativePlace();
      }
      loanapplytbnewAF.setNativePlace(nativePlace);
      String business = "";
      if (loanapplytbnewAF.getBusiness() != null) {
        business = loanapplytbnewAF.getBusiness();
      }
      loanapplytbnewAF.setBusiness(business);
      String title = "";
      if (loanapplytbnewAF.getTitle() != null) {
        title = loanapplytbnewAF.getTitle();
      }
      loanapplytbnewAF.setTitle(title);
      String marriageSt = "";
      if (loanapplytbnewAF.getMarriageSt() != null) {
        marriageSt = loanapplytbnewAF.getMarriageSt();
      }
      loanapplytbnewAF.setMarriageSt(marriageSt);
      String degree = "";
      if (loanapplytbnewAF.getDegree() != null) {
        degree = loanapplytbnewAF.getDegree();
      }
      loanapplytbnewAF.setDegree(degree);
      String homeAddr = "";
      if (loanapplytbnewAF.getHomeAddr() != null) {
        homeAddr = loanapplytbnewAF.getHomeAddr();
      }
      loanapplytbnewAF.setHomeAddr(homeAddr);
      String homeMail = "";
      if (loanapplytbnewAF.getHomeMail() != null) {
        homeMail = loanapplytbnewAF.getHomeMail();
      }
      loanapplytbnewAF.setHomeMail(homeMail);
      String homeMobile = "";
      if (loanapplytbnewAF.getHomeMobile() != null) {
        homeMobile = loanapplytbnewAF.getHomeMobile();
      }
      loanapplytbnewAF.setHomeMobile(homeMobile);
      String houseTel = "";
      if (loanapplytbnewAF.getHouseTel() != null) {
        houseTel = loanapplytbnewAF.getHouseTel();
      }
      loanapplytbnewAF.setHouseTel(houseTel);
      String orgId = "";
      if (loanapplytbnewAF.getOrgId() != null) {
        orgId = loanapplytbnewAF.getOrgId();
      }
      loanapplytbnewAF.setOrgId(orgId);
      String orgName = "";
      if (loanapplytbnewAF.getOrgName() != null) {
        orgName = loanapplytbnewAF.getOrgName();
      }
      loanapplytbnewAF.setOrgName(orgName);
      String orgTel = "";
      if (loanapplytbnewAF.getOrgTel() != null) {
        orgTel = loanapplytbnewAF.getOrgTel();
      }
      loanapplytbnewAF.setOrgTel(orgTel);
      String orgAddr = "";
      if (loanapplytbnewAF.getOrgAddr() != null) {
        orgAddr = loanapplytbnewAF.getOrgAddr();
      }
      loanapplytbnewAF.setOrgAddr(orgAddr);
      String orgMail = "";

      if (loanapplytbnewAF.getOrgMail() != null) {
        orgMail = loanapplytbnewAF.getOrgMail();
      }
      loanapplytbnewAF.setOrgMail(orgMail);
      String accBlnce = "";
      if (loanapplytbnewAF.getAccBlnce() != null) {
        accBlnce = loanapplytbnewAF.getAccBlnce();
      }
      loanapplytbnewAF.setAccBlnce(accBlnce);
      String monthSalary = "";
      if (loanapplytbnewAF.getMonthSalary() != null) {
        monthSalary = loanapplytbnewAF.getMonthSalary();
      }
      loanapplytbnewAF.setMonthSalary(monthSalary);
      String monthPay = "";
      if (loanapplytbnewAF.getMonthPay() != null) {
        monthPay = loanapplytbnewAF.getMonthPay();
      }
      loanapplytbnewAF.setMonthPay(monthPay);
      String empSt = "";
      if (loanapplytbnewAF.getEmpSt() != null) {
        empSt = loanapplytbnewAF.getEmpSt();
      }
      loanapplytbnewAF.setEmpSt(empSt);
      String bgnDate = "";

      if (loanapplytbnewAF.getBgnDate() != null) {
        bgnDate = loanapplytbnewAF.getBgnDate();
      }
      loanapplytbnewAF.setBgnDate(bgnDate);
      String endDate = "";
      if (loanapplytbnewAF.getEndDate() != null) {
        endDate = loanapplytbnewAF.getEndDate();
      }
      loanapplytbnewAF.setEndDate(endDate);

      request.getSession().setAttribute("printloanapplytbnewAF", loanapplytbnewAF);

      String text = "";
      text =
          "displayIn('"
              + loanapplytbnewAF.getEmpId()
              + "','"
              + loanapplytbnewAF.getName()
              + "','"
              + loanapplytbnewAF.getRelation()
              + "','"
              + loanapplytbnewAF.getSex()
              + "','"
              + loanapplytbnewAF.getCardKind()
              + "','"
              + loanapplytbnewAF.getCardNum()
              + "','"
              + loanapplytbnewAF.getBirthday()
              + "','"
              + loanapplytbnewAF.getAge()
              + "','"
              + nation
              + "','"
              + nativePlace
              + "','"
              + business
              + "','"
              + title
              + "','"
              + marriageSt
              + "','"
              + degree
              + "','"
              + homeAddr
              + "','"
              + homeMail
              + "','"
              + homeMobile
              + "','"
              + houseTel
              + "','"
              + orgId
              + "','"
              + orgName
              + "','"
              + orgTel
              + "','"
              + orgAddr
              + "','"
              + orgMail
              + "','"
              + accBlnce
              + "','"
              + monthSalary
              + "','"
              + monthPay
              + "','"
              + empSt
              + "','"
              + bgnDate
              + "','"
              + endDate
              + "')";
      response.getWriter().write(text);
      response.getWriter().close();

    } catch (Exception e) {
      String text = "";
      text = "displayInerror('" + e.getLocalizedMessage().toString() + "')";
      try {
        response.getWriter().write(text);
        response.getWriter().close();
      } catch (IOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
      }
    }
    return null;
  }
 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;
 }
Beispiel #24
0
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    // TODO Auto-generated method stub
    try {
      OrgkhAF af = (OrgkhAF) form;
      //      String orgId=(String)request.getParameter("orgId");
      //      String isModify="";
      String orgId = (String) request.getSession().getAttribute("orgId");
      SecurityInfo securityInfo = (SecurityInfo) request.getSession().getAttribute("SecurityInfo");
      String officecodeID = request.getParameter("officecode");
      //      isModify=bizcheckBS.queruIsBankModify(orgId);
      IOrgOpenAccountBS orgOpenAccountBS =
          (IOrgOpenAccountBS)
              BSUtils.getBusinessService("orgOpenAccountBS", this, mapping.getModuleConfig());
      Org org = orgOpenAccountBS.findOPA(new Integer(orgId));
      af.setOrg(org);
      if (request.getParameter("officecode") != null) {
        af.getOrg().getOrgInfo().setOfficecode(officecodeID);
      }
      //    取出用户权限办事处,显示在下拉菜单中
      List officeList = securityInfo.getOfficeList();
      List officeList1 = new ArrayList();
      OfficeDto officedto = null;
      Iterator itr1 = officeList.iterator();
      while (itr1.hasNext()) {
        officedto = (OfficeDto) itr1.next();
        officeList1.add(
            new org.apache.struts.util.LabelValueBean(
                officedto.getOfficeName(), officedto.getOfficeCode()));
      }

      // 得到办事处下的归集银行
      OfficeDto officeDtoTest = null;
      List collBankListTest = null;
      // 从请求参数中得到办事处id
      if (request.getParameter("officecode") != null) {
        collBankListTest = orgOpenAccountBS.queryCollBank(officecodeID);
      } else {
        officeDtoTest = (OfficeDto) officeList.get(0);
        collBankListTest = orgOpenAccountBS.queryCollBank(officeDtoTest.getOfficeCode());
      }

      // 判断该权限下的某个办事处对应的归集银行
      List collBankList = securityInfo.getCollBankList();
      List collBankList1 = new ArrayList();
      Userslogincollbank userslogincollbank = null;
      Iterator itr2 = collBankList.iterator();
      while (itr2.hasNext()) {
        userslogincollbank = (Userslogincollbank) itr2.next();
        for (int i = 0; i < collBankListTest.size(); i++) {
          CollBank collBank = (CollBank) collBankListTest.get(i);
          if (userslogincollbank.getCollBankId().equals(collBank.getCollBankId())) {
            collBankList1.add(
                new org.apache.struts.util.LabelValueBean(
                    userslogincollbank.getCollBankName().toString(),
                    userslogincollbank.getCollBankId().toString()));
          }
        }
      }
      request.getSession(true).setAttribute("officeList1", officeList1);
      request.getSession(true).setAttribute("collBankList1", collBankList1);
      request.setAttribute("orgkhAF", af);
    } catch (Exception e) {
      // TODO: handle exception
      e.printStackTrace();
    }
    return mapping.findForward("to_show_modify");
  }