java.lang.Object
ru.bitel.bgbilling.kernel.contract.api.server.bean.customer.CustomerDao

public class CustomerDao extends Object
  • Field Details

  • Constructor Details

    • CustomerDao

      public CustomerDao(Connection con)
  • Method Details

    • searchCustomer

      public void searchCustomer(SearchResult<Customer> searchResult, Customer.CustomerType customerType, List<ru.bitel.bgbilling.common.model.KeyValue> filters) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerLink

      public Optional<CustomerLink> getCustomerLink(int contractId, LocalDateTime dateTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • addCustomerLink

      public void addCustomerLink(CustomerLink customerLink) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getNewCustomerId

      public int getNewCustomerId(Customer.CustomerType type) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateCustomerFieldValue

      public String updateCustomerFieldValue(int customerId, String fieldKey, String fieldValue, int userId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateCustomerContact

      public String updateCustomerContact(int customerId, CustomerContactType contactType, String value, int userId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateCustomerBank

      public String updateCustomerBank(int customerId, String text, int userId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • customerEmployeeList

      public List<CustomerEmployee> customerEmployeeList(int customerId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • customerEmployeeUpdate

      public String customerEmployeeUpdate(int customerId, CustomerEmployee value, int userId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • customerEmployeeDelete

      public String customerEmployeeDelete(int customerId, String uuid, int userId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerDataJson

      public org.json.JSONObject getCustomerDataJson(int customerId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomer

      public Customer getCustomer(int customerId) throws ru.bitel.bgbilling.common.BGException
      Строка в JSON формате с данными клиента
      Parameters:
      customerId -
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
    • searchByKey

      public org.json.JSONArray searchByKey(Customer.CustomerType customerType, String key, String value) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • setCustomerLink

      public void setCustomerLink(int contractId, int customerId, LocalDateTime linkDateTimeFrom) throws ru.bitel.bgbilling.common.BGException
      Установка связки клиент - договор
      Parameters:
      contractId - id договора
      customerId - id кастомера
      linkDateTimeFrom - время привязки
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerContracts

      public List<CustomerContract> getCustomerContracts(int customerId, LocalDateTime onTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • setCustomerUnlinkContract

      public boolean setCustomerUnlinkContract(int contractId, LocalDateTime unlinkTime) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerParameterHistory

      public String getCustomerParameterHistory(int customerId, String fieldKey, int lastRecordCount) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getCustomerParameter

      public String getCustomerParameter(int customerId, String fieldKey) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • deleteCustomer

      public void deleteCustomer(int customerId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • customerByCustomerAccount

      public Customer customerByCustomerAccount(long account) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • customerAccounts

      public List<CustomerAccount> customerAccounts(int customerId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • customerAccountAdd

      public CustomerAccount customerAccountAdd(int customerId, long account, int userId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • customerAccountDelete

      public void customerAccountDelete(int customerId, long account) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • customerAccountSet

      public void customerAccountSet(int customerId, int contractId, long account) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException