import 'package:fis_common/logger/logger.dart'; import 'package:fis_i18n/i18n.dart'; import 'package:fis_jsonrpc/rpc.dart'; import 'package:vitalapp/rpc.dart'; import 'interfaces/base_manager.dart'; import 'interfaces/entry.dart'; class EntryManager extends BaseManager implements IEntryManager { ///获取词条库分页 @override Future> getThesaurusPage({String keyword = ''}) async { try { final getThesaurusPage = await rpc.ultrasoundReport.vitalGetThesaurusPageAsync( GetThesaurusPageRequest( token: token, pageIndex: 1, pageSize: 100, thesaurusName: keyword, languageCode: i18nBook.locale.toCodeString('-'), ), ); return getThesaurusPage.pageData ?? []; } catch (e) { logger.e("EntryManager getThesaurusPage ex:$e"); return []; } } @override Future> getThesaurusItems({ String? thesaurusCode, String? keyword, }) async { return await rpc.ultrasoundReport .vitalGetThesaurusItemsAsync(GetThesaurusItemsRequest( thesaurusCode: thesaurusCode, keyword: keyword, token: token, )); } }