12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 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<List<ThesaurusDTO>> 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 ?? <ThesaurusDTO>[];
- } catch (e) {
- logger.e("EntryManager getThesaurusPage ex:$e");
- return <ThesaurusDTO>[];
- }
- }
- @override
- Future<List<ThesaurusItemDTO>> getThesaurusItems({
- String? thesaurusCode,
- String? keyword,
- }) async {
- return await rpc.ultrasoundReport
- .vitalGetThesaurusItemsAsync(GetThesaurusItemsRequest(
- thesaurusCode: thesaurusCode,
- keyword: keyword,
- token: token,
- ));
- }
- }
|