query static method

Future<Map<String, dynamic>> query({
  1. required String formId,
  2. required List<String> fieldKeys,
  3. String filterString = "",
  4. String orderString = "",
  5. int pageIdex = 1,
  6. int pageSize = 20,
})

This method is used to query data from Kingdee Cloud's forms.

formId The formId of the bill or basedata. fieldKeys The field key's names. filterString The filter srting, likely SQL's where. orderString The order srting, likely SQL's order by. pageIdex The page's index. pageSize The page's size.

@return Json data.

Implementation

static Future<Map<String, dynamic>> query({
  required String formId,
  required List<String> fieldKeys,
  String filterString="",
  String orderString="",
  int pageIdex=1,
  int pageSize=20,
}) {
  return K3Client.getInstance().operate(
    QueryParam.builder()
      .formId(formId)
      .fieldKeys(fieldKeys)
      .filterString(filterString)
      .orderString(orderString)
      .startRow((pageIdex-1)*pageSize)
      .limit(pageSize)
      .build()
  );
}