vitalHealthExamBooking.dart 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import 'dart:core';
  2. import 'package:fis_jsonrpc/client_base.dart';
  3. import 'package:fis_common/json_convert.dart';
  4. import 'vitalHealthExamBooking.m.dart';
  5. import 'liveConsultation.m.dart';
  6. class VitalHealthExamBookingService extends JsonRpcClientBase {
  7. VitalHealthExamBookingService(
  8. String host, {
  9. String serviceName = "IVitalHealthExamBookingService",
  10. Map<String, String>? headers,
  11. int? timeout,
  12. }) : super(
  13. host,
  14. serviceName,
  15. headers: headers,
  16. timeout: timeout,
  17. ) {
  18. /// 注册响应实体反序列化处理器
  19. FJsonConvert.setDecoder((map) => PageResult<HealthExamBookingDTO>.fromJson(map));
  20. FJsonConvert.setDecoder((map) => HealthExamBookingDTO.fromJson(map));
  21. FJsonConvert.setDecoder((map) => HealthExamPersonDTO.fromJson(map));
  22. FJsonConvert.setDecoder((map) => PageResult<RegisterInfoDTO>.fromJson(map));
  23. FJsonConvert.setDecoder((map) => RegisterInfoDTO.fromJson(map));
  24. }
  25. Future<PageResult<HealthExamBookingDTO>> getHealthExamBookingPageAsync(GetHealthExamBookingPageRequest request) async {
  26. var rpcRst = await call("GetHealthExamBookingPageAsync", request);
  27. var result = PageResult<HealthExamBookingDTO>.fromJson(rpcRst as Map<String, dynamic>);
  28. return result;
  29. }
  30. Future<String> saveHealthExamBookingAsync(SaveHealthExamBookingRequest request) async {
  31. var rpcRst = await call("SaveHealthExamBookingAsync", request);
  32. return rpcRst;
  33. }
  34. Future<HealthExamBookingDTO> getHealthExamBookingAsync(GetHealthExamBookingRequest request) async {
  35. var rpcRst = await call("GetHealthExamBookingAsync", request);
  36. var result = HealthExamBookingDTO.fromJson(rpcRst as Map<String, dynamic>);
  37. return result;
  38. }
  39. Future<bool> deleteHealthExamBookingAsync(DeleteHealthExamBookingRequest request) async {
  40. var rpcRst = await call("DeleteHealthExamBookingAsync", request);
  41. return rpcRst;
  42. }
  43. Future<bool> signUpASync(SignUpHealthExamBookingRequest request) async {
  44. var rpcRst = await call("SignUpASync", request);
  45. return rpcRst;
  46. }
  47. Future<HealthExamPersonDTO> getExamBookingByIDCardAsync(GetExamBookingByIDCardRequest request) async {
  48. var rpcRst = await call("GetExamBookingByIDCardAsync", request);
  49. var result = HealthExamPersonDTO.fromJson(rpcRst as Map<String, dynamic>);
  50. return result;
  51. }
  52. Future<String> addRegiterInfoAsync(AddRegiterInfoRequest request) async {
  53. var rpcRst = await call("AddRegiterInfoAsync", request);
  54. return rpcRst;
  55. }
  56. Future<bool> updateRegiterInfoAsync(UpdateRegiterInfoRequest request) async {
  57. var rpcRst = await call("UpdateRegiterInfoAsync", request);
  58. return rpcRst;
  59. }
  60. Future<PageResult<RegisterInfoDTO>> getRegisterInfoPageAsync(GetRegiterInfoPageRequest request) async {
  61. var rpcRst = await call("GetRegisterInfoPageAsync", request);
  62. var result = PageResult<RegisterInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  63. return result;
  64. }
  65. }