/**
   * 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");
  }
  /**
   * 添加按钮
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return
   * @throws Exception
   */
  public ActionForward add(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    //      request.getSession().setAttribute("contractId", null);
    EndorsecontractTbAF endorsecontractTbAF = (EndorsecontractTbAF) form;
    EndorsecontractTbAF esAF = new EndorsecontractTbAF();
    String key = AssurepledgechgTbShowAC.PAGINATION_KEY;
    Pagination pagination = (Pagination) request.getSession().getAttribute(key);
    List list = (List) pagination.getQueryCriterions().get("list");
    String contractId = endorsecontractTbAF.getContractId();
    String debitter = endorsecontractTbAF.getDebitter();
    String pledgePerson = endorsecontractTbAF.getPledgePerson(); // 抵押人姓名
    String office = endorsecontractTbAF.getOffice(); // 抵押权人(即××中心)
    String assistantOrgName = endorsecontractTbAF.getAssistantOrgName(); // 担保公司名称
    esAF.setContractId(contractId);
    esAF.setDebitter(debitter);
    esAF.setPledgePerson(pledgePerson);
    esAF.setOffice(office);
    esAF.setAssistantOrgName(assistantOrgName);
    esAF.setList(list);
    esAF.setIsReadOnly("1");
    // 证件类型下拉框
    Map map = BusiTools.listBusiProperty(BusiConst.DOCUMENTSSTATE);
    esAF.setMap(map);
    request.getSession().setAttribute("theEndorsecontractTbAF", esAF);
    request.getSession().setAttribute("pl121Id", null);
    return mapping.findForward("to_assurepledgechgTb");
  }
  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");
  }
 private Pagination getPagination(String paginationKey, HttpServletRequest request, String payId) {
   Pagination pagination = (Pagination) request.getSession().getAttribute(paginationKey);
   if (pagination == null) {
     pagination = new Pagination(0, 10, 1, "a301.org_id", "ASC", new HashMap(0));
     pagination.getQueryCriterions().put("payId", payId);
     request.getSession().setAttribute(paginationKey, pagination);
   }
   return pagination;
 }
Exemple #5
0
 /**
  * 查询划款帐号维护中要打印列表信息
  *
  * @param pagination
  * @throws Exception
  * @return List
  * @author wsh
  */
 public List findHouseAccPrintList(Pagination pagination, List loanBankList) throws Exception {
   // TODO Auto-generated method stub
   List list = new ArrayList();
   try {
     String contractId = "";
     String borrowerName = "";
     String cardNum = "";
     String sellerName = "";
     if (pagination.getQueryCriterions().get("contractId") != null) {
       contractId = (String) pagination.getQueryCriterions().get("contractId");
     }
     if (pagination.getQueryCriterions().get("borrowerName") != null) {
       borrowerName = (String) pagination.getQueryCriterions().get("borrowerName");
     }
     if (pagination.getQueryCriterions().get("cardNum") != null) {
       cardNum = (String) pagination.getQueryCriterions().get("cardNum");
     }
     if (pagination.getQueryCriterions().get("sellerName") != null) {
       cardNum = (String) pagination.getQueryCriterions().get("sellerName");
     }
     list =
         housesDAO.queryHousePrintList_wsh(
             contractId, borrowerName, cardNum, sellerName, loanBankList);
     for (int i = 0; i < list.size(); i++) {
       HouseListDTO houseListDTO = (HouseListDTO) list.get(i);
       // 转换真实姓名
       if (houseListDTO.getOperator() != null && !"".equals(houseListDTO.getOperator()))
         houseListDTO.setOperator(getUserRealName(houseListDTO.getOperator()));
     }
   } catch (Exception e) {
     // TODO: handle exception
     e.printStackTrace();
   }
   return list;
 }
 public ActionForward execute(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response) {
   try {
     CashDayClearTcAF cashDayClearTcAF = (CashDayClearTcAF) form;
     CashDayClearTcFindDTO cashDayClearTcFindDTO = cashDayClearTcAF.getCashDayClearTcFindDTO();
     cashDayClearTcFindDTO.setType("1");
     Pagination pagination = new Pagination(0, 10, 1, "fn210.credence_id", "DESC", new HashMap(0));
     pagination.getQueryCriterions().put("cashDayClearTcFindDTO", cashDayClearTcFindDTO);
     String paginationKey = getPaginationKey();
     request.getSession().setAttribute(paginationKey, pagination);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return mapping.findForward("accountclear_show");
 }
  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 {
    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;
  }