device.dart 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. import 'dart:core';
  2. import 'package:fis_jsonrpc/client_base.dart';
  3. import 'package:fis_common/json_convert.dart';
  4. import 'device.m.dart';
  5. import 'researchEdition.m.dart';
  6. import 'liveConsultation.m.dart';
  7. import 'notification.m.dart';
  8. class DeviceService extends JsonRpcClientBase {
  9. DeviceService(
  10. String host, {
  11. String serviceName = "IDeviceService",
  12. Map<String, String>? headers,
  13. int? timeout,
  14. }) : super(
  15. host,
  16. serviceName,
  17. headers: headers,
  18. timeout: timeout,
  19. ) {
  20. /// 注册响应实体反序列化处理器
  21. FJsonConvert.setDecoder((map) => DeviceInfoDTO.fromJson(map));
  22. FJsonConvert.setDecoder((map) => DeviceExtendInfoDTO.fromJson(map));
  23. FJsonConvert.setDecoder((map) => PageCollection<DeviceInfoDTO>.fromJson(map));
  24. FJsonConvert.setDecoder((map) => DictionaryDTO.fromJson(map));
  25. FJsonConvert.setDecoder((map) => PageCollection<DeviceExtendInfoDTO>.fromJson(map));
  26. FJsonConvert.setDecoder((map) => SelectItemDTO.fromJson(map));
  27. FJsonConvert.setDecoder((map) => DeviceServerSettingResult.fromJson(map));
  28. FJsonConvert.setDecoder((map) => DiagnosisModuleDTO.fromJson(map));
  29. FJsonConvert.setDecoder((map) => ReportVideoDeviceInfoResult.fromJson(map));
  30. FJsonConvert.setDecoder((map) => JoinDeviceLiveRoomResult.fromJson(map));
  31. FJsonConvert.setDecoder((map) => CreateLiveShareInfoResult.fromJson(map));
  32. FJsonConvert.setDecoder((map) => JoinDeviceLiveRoomByShareResult.fromJson(map));
  33. FJsonConvert.setDecoder((map) => CreateLiveRoomInfoResult.fromJson(map));
  34. FJsonConvert.setDecoder((map) => DeviceControlParameterDataDTO.fromJson(map));
  35. FJsonConvert.setDecoder((map) => BrandModelOutputConfigDTO.fromJson(map));
  36. FJsonConvert.setDecoder((map) => PageResult<DevicePatchDTO>.fromJson(map));
  37. FJsonConvert.setDecoder((map) => DevicePatchDTO.fromJson(map));
  38. FJsonConvert.setDecoder((map) => DevicePatchVersionDTO.fromJson(map));
  39. FJsonConvert.setDecoder((map) => DevicePrinterVersionDTO.fromJson(map));
  40. FJsonConvert.setDecoder((map) => PageResult<DevicePrinterDTO>.fromJson(map));
  41. FJsonConvert.setDecoder((map) => DevicePrinterDTO.fromJson(map));
  42. FJsonConvert.setDecoder((map) => DeviceConnectStateResult.fromJson(map));
  43. FJsonConvert.setDecoder((map) => ProbeApplicationSettingInfoDTO.fromJson(map));
  44. FJsonConvert.setDecoder((map) => RemoteConnectsRequest.fromJson(map));
  45. FJsonConvert.setDecoder((map) => DevicePrinterParameterDTO.fromJson(map));
  46. FJsonConvert.setDecoder((map) => PageCollection<SelectItemDTO>.fromJson(map));
  47. FJsonConvert.setDecoder((map) => LicenseInfoBasicDTO.fromJson(map));
  48. }
  49. Future<bool> heartRateAsync(TokenRequest request) async {
  50. var rpcRst = await call("HeartRateAsync", request);
  51. return rpcRst;
  52. }
  53. Future<DeviceInfoDTO> createDeviceInfoAsync(CreateDeviceRequest request) async {
  54. var rpcRst = await call("CreateDeviceInfoAsync", request);
  55. var result = DeviceInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  56. return result;
  57. }
  58. Future<DeviceExtendInfoDTO> getDeviceInfoAsync(GetDeviceRequest request) async {
  59. var rpcRst = await call("GetDeviceInfoAsync", request);
  60. var result = DeviceExtendInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  61. return result;
  62. }
  63. Future<DeviceInfoDTO> findDeviceInfoByNameAsync(FindDeviceInfoByNameRequest request) async {
  64. var rpcRst = await call("FindDeviceInfoByNameAsync", request);
  65. var result = DeviceInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  66. return result;
  67. }
  68. Future<DeviceExtendInfoDTO> getDeviceByShortCodeAsync(GetDeviceByShortCodeRequest request) async {
  69. var rpcRst = await call("GetDeviceByShortCodeAsync", request);
  70. var result = DeviceExtendInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  71. return result;
  72. }
  73. Future<PageCollection<DeviceInfoDTO>> getDeviceInfoPageAsync(PageFilterRequest request) async {
  74. var rpcRst = await call("GetDeviceInfoPageAsync", request);
  75. var result = PageCollection<DeviceInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  76. return result;
  77. }
  78. Future<bool> bindDeviceAsync(BindDeviceRequest request) async {
  79. var rpcRst = await call("BindDeviceAsync", request);
  80. return rpcRst;
  81. }
  82. Future<bool> modifyDeviceAsync(ModifyDeviceRequest request) async {
  83. var rpcRst = await call("ModifyDeviceAsync", request);
  84. return rpcRst;
  85. }
  86. Future<bool> updateDeviceAsync(UpdateDeviceRequest request) async {
  87. var rpcRst = await call("UpdateDeviceAsync", request);
  88. return rpcRst;
  89. }
  90. Future<String> createDictionaryItemAsync(CreateDictionaryItemRequest request) async {
  91. var rpcRst = await call("CreateDictionaryItemAsync", request);
  92. return rpcRst;
  93. }
  94. Future<List<DictionaryDTO>> findDeviceModelItemsAsync(FindDeviceModelItemsRequest request) async {
  95. var rpcRst = await call("FindDeviceModelItemsAsync", request);
  96. var result = (rpcRst as List).map((e)=>DictionaryDTO.fromJson(e as Map<String, dynamic>)).toList();
  97. return result;
  98. }
  99. Future<List<DictionaryDTO>> findDeviceTypeItemsAsync(FindDeviceTypeItemsRequest request) async {
  100. var rpcRst = await call("FindDeviceTypeItemsAsync", request);
  101. var result = (rpcRst as List).map((e)=>DictionaryDTO.fromJson(e as Map<String, dynamic>)).toList();
  102. return result;
  103. }
  104. Future<bool> createShareDeviceToUserAsync(CreateShareDeviceToUserRequest request) async {
  105. var rpcRst = await call("CreateShareDeviceToUserAsync", request);
  106. return rpcRst;
  107. }
  108. Future<bool> deleteShareDeviceToUserAsync(DeleteShareDeviceToUserRequest request) async {
  109. var rpcRst = await call("DeleteShareDeviceToUserAsync", request);
  110. return rpcRst;
  111. }
  112. Future<bool> removeDeviceRelevancyAsync(RemoveDeviceRelevancyRequest request) async {
  113. var rpcRst = await call("RemoveDeviceRelevancyAsync", request);
  114. return rpcRst;
  115. }
  116. Future<PageCollection<DeviceExtendInfoDTO>> getPersonDeviceListAsync(GetPersonDeviceRequest request) async {
  117. var rpcRst = await call("GetPersonDeviceListAsync", request);
  118. var result = PageCollection<DeviceExtendInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  119. return result;
  120. }
  121. Future<PageCollection<DeviceExtendInfoDTO>> getPersonOrgDeviceListAsync(GetPersonDeviceRequest request) async {
  122. var rpcRst = await call("GetPersonOrgDeviceListAsync", request);
  123. var result = PageCollection<DeviceExtendInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  124. return result;
  125. }
  126. Future<PageCollection<DeviceInfoDTO>> getDeviceListByPersonRoleAsync(GetPersonRoleDeviceRequest request) async {
  127. var rpcRst = await call("GetDeviceListByPersonRoleAsync", request);
  128. var result = PageCollection<DeviceInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  129. return result;
  130. }
  131. Future<List<DeviceExtendInfoDTO>> findDevicesByOrganizationCodeAsync(FindDevicesByOrganizationCodeRequest request) async {
  132. var rpcRst = await call("FindDevicesByOrganizationCodeAsync", request);
  133. var result = (rpcRst as List).map((e)=>DeviceExtendInfoDTO.fromJson(e as Map<String, dynamic>)).toList();
  134. return result;
  135. }
  136. Future<List<SelectItemDTO>> getPersonDeviceDropdownListAsync(TokenRequest request) async {
  137. var rpcRst = await call("GetPersonDeviceDropdownListAsync", request);
  138. var result = (rpcRst as List).map((e)=>SelectItemDTO.fromJson(e as Map<String, dynamic>)).toList();
  139. return result;
  140. }
  141. Future<DeviceServerSettingResult> queryServerConfigAsync(TokenRequest request) async {
  142. var rpcRst = await call("QueryServerConfigAsync", request);
  143. var result = DeviceServerSettingResult.fromJson(rpcRst as Map<String, dynamic>);
  144. return result;
  145. }
  146. Future<bool> addDeviceToOrgAsync(AddDeviceToOrgRequest request) async {
  147. var rpcRst = await call("AddDeviceToOrgAsync", request);
  148. return rpcRst;
  149. }
  150. Future<List<String>> getDeviceBindUsersCodesAsync(GetDeviceRequest request) async {
  151. var rpcRst = await call("GetDeviceBindUsersCodesAsync", request);
  152. var result = (rpcRst as List).cast<String>().toList();
  153. return result;
  154. }
  155. Future<List<DiagnosisModuleDTO>> findDeviceDiagnosisModulesAsync(FindDeviceDiagnosisModulesRequest request) async {
  156. var rpcRst = await call("FindDeviceDiagnosisModulesAsync", request);
  157. var result = (rpcRst as List).map((e)=>DiagnosisModuleDTO.fromJson(e as Map<String, dynamic>)).toList();
  158. return result;
  159. }
  160. Future<bool> modifyDeviceDiagnosisModuleStateAsync(ModifyDeviceDiagnosisModuleStateRequest request) async {
  161. var rpcRst = await call("ModifyDeviceDiagnosisModuleStateAsync", request);
  162. return rpcRst;
  163. }
  164. Future<ReportVideoDeviceInfoResult> reportVideoDeviceInfoAsync(ReportVideoDeviceInfoRequest request) async {
  165. var rpcRst = await call("ReportVideoDeviceInfoAsync", request);
  166. var result = ReportVideoDeviceInfoResult.fromJson(rpcRst as Map<String, dynamic>);
  167. return result;
  168. }
  169. Future<int> getActiveDeviceCount() async {
  170. var rpcRst = await call("GetActiveDeviceCount", );
  171. return rpcRst;
  172. }
  173. Future<bool> sendControlParameterByDeviceAsync(SendControlParameterByDeviceRequest request) async {
  174. var rpcRst = await call("SendControlParameterByDeviceAsync", request);
  175. return rpcRst;
  176. }
  177. Future<JoinDeviceLiveRoomResult> joinDeviceLiveRoomAsync(JoinDeviceLiveRoomRequest request) async {
  178. var rpcRst = await call("JoinDeviceLiveRoomAsync", request);
  179. var result = JoinDeviceLiveRoomResult.fromJson(rpcRst as Map<String, dynamic>);
  180. return result;
  181. }
  182. Future<bool> leaveDeviceLiveRoomAsync(LeaveDeviceLiveRoomRequest request) async {
  183. var rpcRst = await call("LeaveDeviceLiveRoomAsync", request);
  184. return rpcRst;
  185. }
  186. Future<bool> reportLiveViewStateAsync(ReportLiveViewStateRequest request) async {
  187. var rpcRst = await call("ReportLiveViewStateAsync", request);
  188. return rpcRst;
  189. }
  190. Future<CreateLiveShareInfoResult> createLiveShareInfoAsync(CreateLiveShareInfoRequest request) async {
  191. var rpcRst = await call("CreateLiveShareInfoAsync", request);
  192. var result = CreateLiveShareInfoResult.fromJson(rpcRst as Map<String, dynamic>);
  193. return result;
  194. }
  195. Future<JoinDeviceLiveRoomByShareResult> joinDeviceLiveRoomByShareAsync(JoinDeviceLiveRoomByShareRequest request) async {
  196. var rpcRst = await call("JoinDeviceLiveRoomByShareAsync", request);
  197. var result = JoinDeviceLiveRoomByShareResult.fromJson(rpcRst as Map<String, dynamic>);
  198. return result;
  199. }
  200. Future<bool> leaveDeviceLiveRoomByShareAsync(LeaveDeviceLiveRoomByShareRequest request) async {
  201. var rpcRst = await call("LeaveDeviceLiveRoomByShareAsync", request);
  202. return rpcRst;
  203. }
  204. Future<bool> reportLiveViewStateByShareAsync(ReportLiveViewStateByShareRequest request) async {
  205. var rpcRst = await call("ReportLiveViewStateByShareAsync", request);
  206. return rpcRst;
  207. }
  208. Future<bool> reportLiveStateAsync(ReportLiveStateRequest request) async {
  209. var rpcRst = await call("ReportLiveStateAsync", request);
  210. return rpcRst;
  211. }
  212. Future<CreateLiveRoomInfoResult> createLiveRoomInfoAsync(CreateLiveRoomInfoRequest request) async {
  213. var rpcRst = await call("CreateLiveRoomInfoAsync", request);
  214. var result = CreateLiveRoomInfoResult.fromJson(rpcRst as Map<String, dynamic>);
  215. return result;
  216. }
  217. Future<bool> uploadConsultationDataAsync(UploadConsultationDataRequest request) async {
  218. var rpcRst = await call("UploadConsultationDataAsync", request);
  219. return rpcRst;
  220. }
  221. Future<DeviceControlParameterDataDTO> getControlParametersAsync(GetControlParametersRequest request) async {
  222. var rpcRst = await call("GetControlParametersAsync", request);
  223. var result = DeviceControlParameterDataDTO.fromJson(rpcRst as Map<String, dynamic>);
  224. return result;
  225. }
  226. Future<bool> applyRemoteConnectionAsync(ControlDeviceConnectRequest request) async {
  227. var rpcRst = await call("ApplyRemoteConnectionAsync", request);
  228. return rpcRst;
  229. }
  230. Future<bool> acceptRemoteConnnectionAsync(ControlDeviceResponseRequest request) async {
  231. var rpcRst = await call("AcceptRemoteConnnectionAsync", request);
  232. return rpcRst;
  233. }
  234. Future<bool> applyRemoteControlAsync(ControlDeviceParameterRequest request) async {
  235. var rpcRst = await call("ApplyRemoteControlAsync", request);
  236. return rpcRst;
  237. }
  238. Future<bool> getRemoteLogAsync(GetRemoteLogRequest request) async {
  239. var rpcRst = await call("GetRemoteLogAsync", request);
  240. return rpcRst;
  241. }
  242. Future<bool> responseRemoteLogAsync(RemoteLogResponseRequest request) async {
  243. var rpcRst = await call("ResponseRemoteLogAsync", request);
  244. return rpcRst;
  245. }
  246. Future<bool> scanBindDeviceAsync(ScanBindDeviceRequest request) async {
  247. var rpcRst = await call("ScanBindDeviceAsync", request);
  248. return rpcRst;
  249. }
  250. Future<bool> reportBrandModelOutputConfigAsync(ReportBrandModelOutputConfigRequest request) async {
  251. var rpcRst = await call("ReportBrandModelOutputConfigAsync", request);
  252. return rpcRst;
  253. }
  254. Future<List<BrandModelOutputConfigDTO>> syncBrandModelOutputConfigAsync(SyncBrandModelOutputConfigRequest request) async {
  255. var rpcRst = await call("SyncBrandModelOutputConfigAsync", request);
  256. var result = (rpcRst as List).map((e)=>BrandModelOutputConfigDTO.fromJson(e as Map<String, dynamic>)).toList();
  257. return result;
  258. }
  259. Future<List<String>> getBrandsAsync(GetBrandsRequest request) async {
  260. var rpcRst = await call("GetBrandsAsync", request);
  261. var result = (rpcRst as List).cast<String>().toList();
  262. return result;
  263. }
  264. Future<List<String>> getModelsAsync(GetModelsRequest request) async {
  265. var rpcRst = await call("GetModelsAsync", request);
  266. var result = (rpcRst as List).cast<String>().toList();
  267. return result;
  268. }
  269. Future<bool> addDevicePatchAsync(AddDevicePatchRequest request) async {
  270. var rpcRst = await call("AddDevicePatchAsync", request);
  271. return rpcRst;
  272. }
  273. Future<PageResult<DevicePatchDTO>> findDevicePatchPagesAsync(FindDevicePatchPageRequest request) async {
  274. var rpcRst = await call("FindDevicePatchPagesAsync", request);
  275. var result = PageResult<DevicePatchDTO>.fromJson(rpcRst as Map<String, dynamic>);
  276. return result;
  277. }
  278. Future<bool> deletePatchByCodeAsync(DeleteDevicePatchByCodeRequest request) async {
  279. var rpcRst = await call("DeletePatchByCodeAsync", request);
  280. return rpcRst;
  281. }
  282. Future<bool> updateDevicePatchAsync(UpdateDevicePatchRequest request) async {
  283. var rpcRst = await call("UpdateDevicePatchAsync", request);
  284. return rpcRst;
  285. }
  286. Future<bool> pushDevicePatchAsync(PushDevicePatchRequest request) async {
  287. var rpcRst = await call("PushDevicePatchAsync", request);
  288. return rpcRst;
  289. }
  290. Future<PageResult<DevicePatchDTO>> findPushDevicePatchPagesAsync(FindPushDevicePatchPageRequest request) async {
  291. var rpcRst = await call("FindPushDevicePatchPagesAsync", request);
  292. var result = PageResult<DevicePatchDTO>.fromJson(rpcRst as Map<String, dynamic>);
  293. return result;
  294. }
  295. Future<bool> uploadDeviceDownloadPatchProgressToUserAsync(UploadDeviceDownloadPatchProgressToUserRequest request) async {
  296. var rpcRst = await call("UploadDeviceDownloadPatchProgressToUserAsync", request);
  297. return rpcRst;
  298. }
  299. Future<bool> addDevicePatchVersionAsync(AddDevicePatchVersionRequest request) async {
  300. var rpcRst = await call("AddDevicePatchVersionAsync", request);
  301. return rpcRst;
  302. }
  303. Future<List<DevicePatchVersionDTO>> findDevicePatchVersionListAsync(FindDevicePatchListRequest request) async {
  304. var rpcRst = await call("FindDevicePatchVersionListAsync", request);
  305. var result = (rpcRst as List).map((e)=>DevicePatchVersionDTO.fromJson(e as Map<String, dynamic>)).toList();
  306. return result;
  307. }
  308. Future<bool> deleteDevicePatchVersionAsync(DeleteDevicePatchVersionRequest request) async {
  309. var rpcRst = await call("DeleteDevicePatchVersionAsync", request);
  310. return rpcRst;
  311. }
  312. Future<bool> addDevicePrinterVersionAsync(AddDevicePrinterVersionRequest request) async {
  313. var rpcRst = await call("AddDevicePrinterVersionAsync", request);
  314. return rpcRst;
  315. }
  316. Future<List<DevicePrinterVersionDTO>> findDevicePrinterVersionListAsync(FindDevicePrinterVersionListRequest request) async {
  317. var rpcRst = await call("FindDevicePrinterVersionListAsync", request);
  318. var result = (rpcRst as List).map((e)=>DevicePrinterVersionDTO.fromJson(e as Map<String, dynamic>)).toList();
  319. return result;
  320. }
  321. Future<bool> deleteDevicePrinterVersionAsync(DeleteDevicePrinterVersionRequest request) async {
  322. var rpcRst = await call("DeleteDevicePrinterVersionAsync", request);
  323. return rpcRst;
  324. }
  325. Future<bool> addDevicePrinterAsync(AddDevicePrinterRequest request) async {
  326. var rpcRst = await call("AddDevicePrinterAsync", request);
  327. return rpcRst;
  328. }
  329. Future<PageResult<DevicePrinterDTO>> findDevicePrinterPagesAsync(FindDevicePrinterPageRequest request) async {
  330. var rpcRst = await call("FindDevicePrinterPagesAsync", request);
  331. var result = PageResult<DevicePrinterDTO>.fromJson(rpcRst as Map<String, dynamic>);
  332. return result;
  333. }
  334. Future<bool> deletePrinterByCodeAsync(DeleteDevicePrinterByCodeRequest request) async {
  335. var rpcRst = await call("DeletePrinterByCodeAsync", request);
  336. return rpcRst;
  337. }
  338. Future<bool> updateDevicePrinterAsync(UpdateDevicePrinterRequest request) async {
  339. var rpcRst = await call("UpdateDevicePrinterAsync", request);
  340. return rpcRst;
  341. }
  342. Future<bool> setDevicePrinterAsync(SetDevicePrinterRequest request) async {
  343. var rpcRst = await call("SetDevicePrinterAsync", request);
  344. return rpcRst;
  345. }
  346. Future<bool> uploadDevicePrinterAsync(UploadDevicePrinterRequest request) async {
  347. var rpcRst = await call("UploadDevicePrinterAsync", request);
  348. return rpcRst;
  349. }
  350. Future<bool> restartDeviceAsync(RestartDeviceRequest request) async {
  351. var rpcRst = await call("RestartDeviceAsync", request);
  352. return rpcRst;
  353. }
  354. Future<bool> modifyEmergencyDeviceCodeAsync(ModifyEmergencyDeviceCodeRequest request) async {
  355. var rpcRst = await call("ModifyEmergencyDeviceCodeAsync", request);
  356. return rpcRst;
  357. }
  358. Future<String> sendCommandToDeviceAsync(SendCommandToDeviceRequest request) async {
  359. var rpcRst = await call("SendCommandToDeviceAsync", request);
  360. return rpcRst;
  361. }
  362. Future<String> sendResultToClientAsync(SendResultToClientRequest request) async {
  363. var rpcRst = await call("SendResultToClientAsync", request);
  364. return rpcRst;
  365. }
  366. Future<String> getResultFromServerAsync(GetResultFromServerRequest request) async {
  367. var rpcRst = await call("GetResultFromServerAsync", request);
  368. return rpcRst;
  369. }
  370. Future<bool> disconnectRemoteControl(RemoteConnectStautsRequest request) async {
  371. var rpcRst = await call("DisconnectRemoteControl", request);
  372. return rpcRst;
  373. }
  374. Future<bool> remoteConnectHeartRateAsync(RemoteConnectHeartRateRequest request) async {
  375. var rpcRst = await call("RemoteConnectHeartRateAsync", request);
  376. return rpcRst;
  377. }
  378. Future<bool> checkDeviceIsIdleAsync(GetDeviceRequest request) async {
  379. var rpcRst = await call("CheckDeviceIsIdleAsync", request);
  380. return rpcRst;
  381. }
  382. Future<String> checkUserIsExistRoomIdAsync(GetDeviceRequest request) async {
  383. var rpcRst = await call("CheckUserIsExistRoomIdAsync", request);
  384. return rpcRst;
  385. }
  386. Future<bool> addUserRemoteConnectAsync(AddUserRemoteConnectRequest request) async {
  387. var rpcRst = await call("AddUserRemoteConnectAsync", request);
  388. return rpcRst;
  389. }
  390. Future<bool> closeUserRemoteConnectAsync(GetDeviceRequest request) async {
  391. var rpcRst = await call("CloseUserRemoteConnectAsync", request);
  392. return rpcRst;
  393. }
  394. Future<bool> userCancelLogDownloadAsync(GetDeviceRequest request) async {
  395. var rpcRst = await call("UserCancelLogDownloadAsync", request);
  396. return rpcRst;
  397. }
  398. Future<List<DeviceConnectStateResult>> getDeviceStateListByTokenAsync(GetDeviceStateListRequest request) async {
  399. var rpcRst = await call("GetDeviceStateListByTokenAsync", request);
  400. var result = (rpcRst as List).map((e)=>DeviceConnectStateResult.fromJson(e as Map<String, dynamic>)).toList();
  401. return result;
  402. }
  403. Future<bool> deviceCancelLogDownloadAsync(DeivceCancelLogDownloadRequest request) async {
  404. var rpcRst = await call("DeviceCancelLogDownloadAsync", request);
  405. return rpcRst;
  406. }
  407. Future<bool> deviceRemoteConnectHeartRateAsync(RemoteConnectHeartRateRequest request) async {
  408. var rpcRst = await call("DeviceRemoteConnectHeartRateAsync", request);
  409. return rpcRst;
  410. }
  411. Future<bool> applyProbeApplicationSettingAsync(ProbeApplicationSettingRequest request) async {
  412. var rpcRst = await call("ApplyProbeApplicationSettingAsync", request);
  413. return rpcRst;
  414. }
  415. Future<bool> responseProbeApplicationSettingAsync(ProbeApplicationSettingResultRequest request) async {
  416. var rpcRst = await call("ResponseProbeApplicationSettingAsync", request);
  417. return rpcRst;
  418. }
  419. Future<ProbeApplicationSettingInfoDTO> getProbeApplicationSettingAsync(GetControlParametersRequest request) async {
  420. var rpcRst = await call("GetProbeApplicationSettingAsync", request);
  421. var result = ProbeApplicationSettingInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  422. return result;
  423. }
  424. Future<RemoteConnectsRequest> findConnectingDeviceListAsync(GetDeviceRequest request) async {
  425. var rpcRst = await call("FindConnectingDeviceListAsync", request);
  426. var result = RemoteConnectsRequest.fromJson(rpcRst as Map<String, dynamic>);
  427. return result;
  428. }
  429. Future<bool> closeConnectingDeviceListAsync(GetDeviceRequest request) async {
  430. var rpcRst = await call("CloseConnectingDeviceListAsync", request);
  431. return rpcRst;
  432. }
  433. Future<List<DevicePrinterParameterDTO>> getDevicePrintersForUploadAsync(GetDevicePrintersForUploadRequest request) async {
  434. var rpcRst = await call("GetDevicePrintersForUploadAsync", request);
  435. var result = (rpcRst as List).map((e)=>DevicePrinterParameterDTO.fromJson(e as Map<String, dynamic>)).toList();
  436. return result;
  437. }
  438. Future<List<String>> getDevicePatchTypeListAsync(TokenRequest request) async {
  439. var rpcRst = await call("GetDevicePatchTypeListAsync", request);
  440. var result = (rpcRst as List).cast<String>().toList();
  441. return result;
  442. }
  443. Future<bool> existsDevicePrinterAsync(ExistsDevicePrinterRequest request) async {
  444. var rpcRst = await call("ExistsDevicePrinterAsync", request);
  445. return rpcRst;
  446. }
  447. Future<bool> batchInsertDevicePrintersDataAsync(MigrateDevicePrinterRequest request) async {
  448. var rpcRst = await call("BatchInsertDevicePrintersDataAsync", request);
  449. return rpcRst;
  450. }
  451. Future<bool> batchInsertDevicePatchsDataAsync(MigrateDevicePatchRequest request) async {
  452. var rpcRst = await call("BatchInsertDevicePatchsDataAsync", request);
  453. return rpcRst;
  454. }
  455. Future<PageCollection<DeviceExtendInfoDTO>> getOrganizationDeviceListAsync(GetPersonDeviceRequest request) async {
  456. var rpcRst = await call("GetOrganizationDeviceListAsync", request);
  457. var result = PageCollection<DeviceExtendInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  458. return result;
  459. }
  460. Future<PageCollection<SelectItemDTO>> getPersonDeviceDropdownPageAsync(GetPersonDeviceDropdownPageRequest request) async {
  461. var rpcRst = await call("GetPersonDeviceDropdownPageAsync", request);
  462. var result = PageCollection<SelectItemDTO>.fromJson(rpcRst as Map<String, dynamic>);
  463. return result;
  464. }
  465. Future<bool> existConnectingDeviceInfoAsync(GetDeviceRequest request) async {
  466. var rpcRst = await call("ExistConnectingDeviceInfoAsync", request);
  467. return rpcRst;
  468. }
  469. Future<List<LicenseInfoBasicDTO>> getLicenseInfoListAsync(TokenRequest request) async {
  470. var rpcRst = await call("GetLicenseInfoListAsync", request);
  471. var result = (rpcRst as List).map((e)=>LicenseInfoBasicDTO.fromJson(e as Map<String, dynamic>)).toList();
  472. return result;
  473. }
  474. Future<bool> saveLicenseInfoListAsync(SaveLicenseInfoRequest request) async {
  475. var rpcRst = await call("SaveLicenseInfoListAsync", request);
  476. return rpcRst;
  477. }
  478. Future<bool> saveDongleInfoListAsync(SaveDongleInfoRequest request) async {
  479. var rpcRst = await call("SaveDongleInfoListAsync", request);
  480. return rpcRst;
  481. }
  482. }