Beispiel #1
0
  public String myGetCheckFeeDateList() throws Exception {

    JSONArray jsonArray = new JSONArray();

    confirmCond = new ConfirmCond();
    confirmCond.setPropertyId(request.getParameter("propertyId"));

    List<Map<String, Object>> checkFeeDateList = confirmServices.checkFeeDateList(confirmCond);

    for (int i = 0; i < checkFeeDateList.size(); i++) {

      Map<String, Object> mapobject = checkFeeDateList.get(i);

      String checkfee_date =
          mapobject.get("checkfee_date") == null ? "" : mapobject.get("checkfee_date").toString();

      if (!CommonUtils.isStrEmpty(checkfee_date)) {

        Map<String, Object> json = new HashMap<String, Object>();
        json.put(
            "checkFeeDate",
            CommonUtils.getDateString(CommonUtils.getDateFromString(checkfee_date)));

        jsonArray.add(json);
      }
    }

    CustomerUtils.writeResponse(response, jsonArray.toString());

    return null;
  }
Beispiel #2
0
  public String getProjectByCompanyId() throws Exception {
    String content = "<option value=\"\">" + CommonUtils.ALL + "</option>"; // 默认值

    String companyId = request.getParameter("companyId");
    try {

      LinkedHashMap<String, String> projectMap =
          HengDaUtils.getProjectsByCompanyId(Integer.parseInt(companyId));

      StringBuffer sb = new StringBuffer();

      if (projectMap.keySet().size() > 1) {
        Set<String> keys = projectMap.keySet();
        for (String key : keys) {
          String value = projectMap.get(key);
          sb.append("<option value=\"").append(key).append("\">").append(value).append("</option>");
        }
      }

      String getContent = sb.toString();
      if (!CustomerUtils.isStrEmpty(getContent)) {
        content = getContent;
      }

    } catch (Exception e) {

    }

    CustomerUtils.writeResponse(response, content);

    return null;
  }