saveJson static method

Future<ResponseStatus> saveJson(
  1. String formId,
  2. Map<String, dynamic> json, {
  3. bool isDeleteEntry = true,
  4. bool isAutoSubmitAndAudit = false,
  5. List<String>? needUpDateFields,
  6. List<String>? needReturnFields,
})

Directly save json data.

formId The formId of the bill or basedata. json Json data. isDeleteEntry Before saving, it is wheter delete the entry. isAutoSubmitAndAudit Whehter to automatic audit.

@return A response model.

Implementation

static Future<ResponseStatus> saveJson(
  String formId, Map<String, dynamic> json,
  {
    bool isDeleteEntry=true,
    bool isAutoSubmitAndAudit=false,
    List<String>? needUpDateFields,
    List<String>? needReturnFields,
  }) async {
  var resp = await K3Client.getInstance().operate(
    SaveParam.builder()
      .formId(formId)
      .isDeleteEntry(isDeleteEntry)
      .isAutoSubmitAndAudit(isAutoSubmitAndAudit)
      .needUpDateFields(needUpDateFields)
      .needReturnFields(needReturnFields)
      .model(json)
      .build()
  );
  return ResponseStatus.fromJson(resp);
}