コード例 #1
0
  // 保存付汇单据的到账金额
  private void saveRMBMoney(HttpServletRequest request, HttpServletResponse response) {
    response.setContentType("text/json");
    PrintWriter out = null;
    try {
      out = response.getWriter();

      // 获得将要删除附件的付汇单Id
      HashMap<String, String> Moneyhm = new HashMap<String, String>();
      Moneyhm.put("ID", request.getParameter("ID"));
      Moneyhm.put("RMBMoney", request.getParameter("RMBMoney"));

      int iresult = GeneralManager.update(Moneyhm, "BJCustomerFuHui");
      if (iresult != 1) {
        iresult = 0;
      }

      out.print("{\"result\":\"" + iresult + "\"}");
      out.close();
    } catch (Exception e) {
      if (out != null) {
        out.print("{\"result\":\"-3\"}");
        out.close();
      } else {
        e.printStackTrace();
      }
    } finally {
      if (null != out) {
        out.flush();
        out.close();
      }
    }
  }
コード例 #2
0
 // 停用发货人
 @SuppressWarnings("unused")
 private String disableSender(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
   String resultPage = "/ss/bj?disclass=Sender&action=getSenderList";
   try {
     int id = Integer.parseInt(request.getParameter("id"));
     GeneralManager.disable(id, "BeiJingSender");
   } catch (Exception e) {
     e.printStackTrace();
     resultPage = Constant.ERROR_PAGE;
     request.setAttribute(Constant.ERROR_EXCEPTION, "程序出错,请联系系统管理员!");
   }
   return resultPage;
 }
コード例 #3
0
 // 更新发货人信息
 public String updateSender(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
   String resultPage = "/ss/bj?disclass=Sender&action=getSenderList";
   try {
     HashMap<String, String> dataMap = BaseTable.getSenderInput(request);
     GeneralManager.update(dataMap, "BeiJingSender");
   } catch (ACDException e) {
     request.setAttribute("ACDException", e.toString());
     resultPage = Constant.ERROR_JSP;
   } catch (Exception e) {
     e.printStackTrace();
     request.setAttribute("ACDException", e.toString());
     resultPage = Constant.ERROR_JSP;
   }
   return resultPage;
 }
コード例 #4
0
 // 添加北京发货人信息
 public String addSender(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
   String resultPage = "/ss/bj?disclass=Sender&action=getSenderList";
   try {
     HashMap<String, String> hm = BaseTable.getSenderInput(request);
     hm.remove("ID");
     GeneralManager.create(hm, "BeiJingSender");
   } catch (ACDException e) {
     request.setAttribute(Constant.ERROR_EXCEPTION, e);
     resultPage = Constant.ERROR_JSP;
   } catch (Exception e) {
     e.printStackTrace();
     request.setAttribute(Constant.ERROR_EXCEPTION, new ACDException(e.toString()));
     resultPage = Constant.ERROR_JSP;
   }
   return resultPage;
 }
コード例 #5
0
 // 修改结算清单前获得当前清单数据
 public String editSender(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
   String resultPage = "/beijing/base/sender_edit.jsp";
   try {
     // 根据ID获得当前id结算清单的信息放入request
     int id = Integer.parseInt(request.getParameter("id"));
     @SuppressWarnings("unchecked")
     HashMap<String, String> dataMap = GeneralManager.getbyID(id, "BeiJingSender");
     request.setAttribute(Constant.PARA_HASH, dataMap);
   } catch (ACDException e) {
     request.setAttribute("ACDException", e.toString());
     resultPage = Constant.ERROR_JSP;
   } catch (Exception e) {
     e.printStackTrace();
     request.setAttribute("ACDException", e.toString());
     resultPage = Constant.ERROR_JSP;
   }
   return resultPage;
 }