Exemple #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;
  }
Exemple #2
0
  /**
   * 新增Customer
   *
   * @param customer
   */
  public void saveCustomer(Customer customer) throws RuntimeException {
    // CustomerPermission.doCheckSave();

    // TODO 根据当前项目的customerOneSale,是否为1,才进行判断
    // 客户来源为来访判断,该项目下电话号码是否重复
    if ("2".equals(customer.getCustomerSource())) {
      PhoneUniqueUtils.isPhoneRepeat(customer);
    }

    // 增加号码归属地(可以改成定时器去执行),CustomerPhoneFromQuartz.java
    // customer = PhoneUtils.postPhone(customer);

    // 根据project_code设置customer的price_num对应的项目的PRICE_AMOUNT值,area_num对应的项目的REQUEST_AREA值
    ProjectCodeFieldUtils.setRriceAndAreaNum(customer);

    // 如果来访日期为空,就增加默认为当天,2013.8.14
    if (CommonUtils.isStrEmpty(customer.getVisitDate())) {
      customer.setVisitDate(CommonUtils.getDateString(new Date()));
    }

    // 设定follow_time,(因为该字段为后来新增的,所以要在这里增加)
    customer.setFollowTime(CommonUtils.getDateFromString(customer.getVisitDate()));

    // 实际保存
    customerMapper.saveCustomer(customer);

    // CacheUtils.removeCache(cacheKeyOne,customer.getId());
  }