123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572 |
- import 'aIDiagnosis.m.dart';
- import 'connect.m.dart';
- import 'patient.m.dart';
- import 'identityApply.m.dart';
- import 'authentication.m.dart';
- import 'package:fis_jsonrpc/utils.dart';
- enum UserInfoStateEnum {
- Nonactivated,
- Activated,
- }
- class LoginLockInfoDTO {
- DateTime? loginDate;
- int times;
- LoginLockInfoDTO({
- this.loginDate,
- this.times = 0,
- });
- factory LoginLockInfoDTO.fromJson(Map<String, dynamic> map) {
- return LoginLockInfoDTO(
- loginDate: map['LoginDate'] != null ? DateTime.parse(map['LoginDate']) : null,
- times: map['Times'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(loginDate != null)
- map['LoginDate'] = JsonRpcUtils.dateFormat(loginDate!);
- map['Times'] = times;
- return map;
- }
- }
- class UserDTO extends UserBaseDTO{
- String? phone;
- String? email;
- String? nickName;
- String? fullName;
- String? organizationCode;
- String? organizationName;
- String? rootOrganizationCode;
- String? rootOrganizationName;
- List<String >? authorityGroups;
- List<String >? bindDevices;
- String? lastIP;
- int logintimes;
- UserInfoStateEnum userState;
- List<String >? roleCodes;
- List<String >? rankCodes;
- List<String >? positionCodes;
- ApplyStateEnum applyState;
- String? rankName;
- String? positionName;
- bool isDirector;
- List<String >? fieldList;
- List<String >? deletePatientCodes;
- bool isBatchExportDiagnoseData;
- String? bindAssistantUserCode;
- LoginLockInfoDTO? loginLockInfo;
- UserDTO({
- this.phone,
- this.email,
- this.nickName,
- this.fullName,
- this.organizationCode,
- this.organizationName,
- this.rootOrganizationCode,
- this.rootOrganizationName,
- this.authorityGroups,
- this.bindDevices,
- this.lastIP,
- this.logintimes = 0,
- this.userState = UserInfoStateEnum.Nonactivated,
- this.roleCodes,
- this.rankCodes,
- this.positionCodes,
- this.applyState = ApplyStateEnum.NotApply,
- this.rankName,
- this.positionName,
- this.isDirector = false,
- this.fieldList,
- this.deletePatientCodes,
- this.isBatchExportDiagnoseData = false,
- this.bindAssistantUserCode,
- this.loginLockInfo,
- String? userCode,
- String? userName,
- String? headImageUrl,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- userCode: userCode,
- userName: userName,
- headImageUrl: headImageUrl,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory UserDTO.fromJson(Map<String, dynamic> map) {
- return UserDTO(
- phone: map['Phone'],
- email: map['Email'],
- nickName: map['NickName'],
- fullName: map['FullName'],
- organizationCode: map['OrganizationCode'],
- organizationName: map['OrganizationName'],
- rootOrganizationCode: map['RootOrganizationCode'],
- rootOrganizationName: map['RootOrganizationName'],
- authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
- bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
- lastIP: map['LastIP'],
- logintimes: map['Logintimes'],
- userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
- roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
- rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
- positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
- applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
- rankName: map['RankName'],
- positionName: map['PositionName'],
- isDirector: map['IsDirector'],
- fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
- deletePatientCodes: map['DeletePatientCodes'] != null ? map['DeletePatientCodes'].cast<String>().toList() : null,
- isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
- bindAssistantUserCode: map['BindAssistantUserCode'],
- loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null,
- userCode: map['UserCode'],
- userName: map['UserName'],
- headImageUrl: map['HeadImageUrl'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(phone != null)
- map['Phone'] = phone;
- if(email != null)
- map['Email'] = email;
- if(nickName != null)
- map['NickName'] = nickName;
- if(fullName != null)
- map['FullName'] = fullName;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if(organizationName != null)
- map['OrganizationName'] = organizationName;
- if(rootOrganizationCode != null)
- map['RootOrganizationCode'] = rootOrganizationCode;
- if(rootOrganizationName != null)
- map['RootOrganizationName'] = rootOrganizationName;
- if(authorityGroups != null)
- map['AuthorityGroups'] = authorityGroups;
- if(bindDevices != null)
- map['BindDevices'] = bindDevices;
- if(lastIP != null)
- map['LastIP'] = lastIP;
- map['Logintimes'] = logintimes;
- map['UserState'] = userState.index;
- if(roleCodes != null)
- map['RoleCodes'] = roleCodes;
- if(rankCodes != null)
- map['RankCodes'] = rankCodes;
- if(positionCodes != null)
- map['PositionCodes'] = positionCodes;
- map['ApplyState'] = applyState.index;
- if(rankName != null)
- map['RankName'] = rankName;
- if(positionName != null)
- map['PositionName'] = positionName;
- map['IsDirector'] = isDirector;
- if(fieldList != null)
- map['FieldList'] = fieldList;
- if(deletePatientCodes != null)
- map['DeletePatientCodes'] = deletePatientCodes;
- map['IsBatchExportDiagnoseData'] = isBatchExportDiagnoseData;
- if(bindAssistantUserCode != null)
- map['BindAssistantUserCode'] = bindAssistantUserCode;
- if(loginLockInfo != null)
- map['LoginLockInfo'] = loginLockInfo;
- return map;
- }
- }
- class GetUserInfoRequest extends TokenRequest{
- GetUserInfoRequest({
- String? token,
- }) : super(
- token: token,
- );
- factory GetUserInfoRequest.fromJson(Map<String, dynamic> map) {
- return GetUserInfoRequest(
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class AlterUserInfoRequest extends TokenRequest{
- String? phone;
- String? email;
- String? nickName;
- String? fullName;
- String? headImageUrl;
- String? organizationCode;
- String? extensionData;
- AlterUserInfoRequest({
- this.phone,
- this.email,
- this.nickName,
- this.fullName,
- this.headImageUrl,
- this.organizationCode,
- this.extensionData,
- String? token,
- }) : super(
- token: token,
- );
- factory AlterUserInfoRequest.fromJson(Map<String, dynamic> map) {
- return AlterUserInfoRequest(
- phone: map['Phone'],
- email: map['Email'],
- nickName: map['NickName'],
- fullName: map['FullName'],
- headImageUrl: map['HeadImageUrl'],
- organizationCode: map['OrganizationCode'],
- extensionData: map['ExtensionData'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(phone != null)
- map['Phone'] = phone;
- if(email != null)
- map['Email'] = email;
- if(nickName != null)
- map['NickName'] = nickName;
- if(fullName != null)
- map['FullName'] = fullName;
- if(headImageUrl != null)
- map['HeadImageUrl'] = headImageUrl;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if(extensionData != null)
- map['ExtensionData'] = extensionData;
- return map;
- }
- }
- enum OrganizationQueryTypeEnum {
- Wait,
- Single,
- AllDep,
- All,
- }
- class GetUserListRequest extends TokenRequest{
- String? keyword;
- OrganizationQueryTypeEnum organizationQueryType;
- String? organizationCode;
- String? rankCode;
- String? positionCode;
- bool exceptSelf;
- GetUserListRequest({
- this.keyword,
- this.organizationQueryType = OrganizationQueryTypeEnum.Wait,
- this.organizationCode,
- this.rankCode,
- this.positionCode,
- this.exceptSelf = false,
- String? token,
- }) : super(
- token: token,
- );
- factory GetUserListRequest.fromJson(Map<String, dynamic> map) {
- return GetUserListRequest(
- keyword: map['Keyword'],
- organizationQueryType: OrganizationQueryTypeEnum.values.firstWhere((e) => e.index == map['OrganizationQueryType']),
- organizationCode: map['OrganizationCode'],
- rankCode: map['RankCode'],
- positionCode: map['PositionCode'],
- exceptSelf: map['ExceptSelf'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(keyword != null)
- map['Keyword'] = keyword;
- map['OrganizationQueryType'] = organizationQueryType.index;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if(rankCode != null)
- map['RankCode'] = rankCode;
- if(positionCode != null)
- map['PositionCode'] = positionCode;
- map['ExceptSelf'] = exceptSelf;
- return map;
- }
- }
- class RemoveUsersFromOrganizationRequest extends TokenRequest{
- List<String >? userCodes;
- RemoveUsersFromOrganizationRequest({
- this.userCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory RemoveUsersFromOrganizationRequest.fromJson(Map<String, dynamic> map) {
- return RemoveUsersFromOrganizationRequest(
- userCodes: map['UserCodes'] != null ? map['UserCodes'].cast<String>().toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(userCodes != null)
- map['UserCodes'] = userCodes;
- return map;
- }
- }
- class SetUserOrganizationInfoRequest extends TokenRequest{
- String? userCode;
- List<String >? roleCodes;
- List<String >? rankCodes;
- List<String >? positionCodes;
- String? organizationCode;
- SetUserOrganizationInfoRequest({
- this.userCode,
- this.roleCodes,
- this.rankCodes,
- this.positionCodes,
- this.organizationCode,
- String? token,
- }) : super(
- token: token,
- );
- factory SetUserOrganizationInfoRequest.fromJson(Map<String, dynamic> map) {
- return SetUserOrganizationInfoRequest(
- userCode: map['UserCode'],
- roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
- rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
- positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
- organizationCode: map['OrganizationCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(userCode != null)
- map['UserCode'] = userCode;
- if(roleCodes != null)
- map['RoleCodes'] = roleCodes;
- if(rankCodes != null)
- map['RankCodes'] = rankCodes;
- if(positionCodes != null)
- map['PositionCodes'] = positionCodes;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- return map;
- }
- }
- class AlterPersonInfoRequest {
- String? token;
- String? nickName;
- String? headImageUrl;
- AlterPersonInfoRequest({
- this.token,
- this.nickName,
- this.headImageUrl,
- });
- factory AlterPersonInfoRequest.fromJson(Map<String, dynamic> map) {
- return AlterPersonInfoRequest(
- token: map['Token'],
- nickName: map['NickName'],
- headImageUrl: map['HeadImageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(token != null)
- map['Token'] = token;
- if(nickName != null)
- map['NickName'] = nickName;
- if(headImageUrl != null)
- map['HeadImageUrl'] = headImageUrl;
- return map;
- }
- }
- class ShareDeviceUserDTO extends BaseDTO{
- String? userCode;
- String? fullName;
- String? phone;
- String? headImageUrl;
- List<String >? rankNames;
- String? rootOrganizationCode;
- String? rootOrganizationName;
- ShareDeviceUserDTO({
- this.userCode,
- this.fullName,
- this.phone,
- this.headImageUrl,
- this.rankNames,
- this.rootOrganizationCode,
- this.rootOrganizationName,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ShareDeviceUserDTO.fromJson(Map<String, dynamic> map) {
- return ShareDeviceUserDTO(
- userCode: map['UserCode'],
- fullName: map['FullName'],
- phone: map['Phone'],
- headImageUrl: map['HeadImageUrl'],
- rankNames: map['RankNames'] != null ? map['RankNames'].cast<String>().toList() : null,
- rootOrganizationCode: map['RootOrganizationCode'],
- rootOrganizationName: map['RootOrganizationName'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(userCode != null)
- map['UserCode'] = userCode;
- if(fullName != null)
- map['FullName'] = fullName;
- if(phone != null)
- map['Phone'] = phone;
- if(headImageUrl != null)
- map['HeadImageUrl'] = headImageUrl;
- if(rankNames != null)
- map['RankNames'] = rankNames;
- if(rootOrganizationCode != null)
- map['RootOrganizationCode'] = rootOrganizationCode;
- if(rootOrganizationName != null)
- map['RootOrganizationName'] = rootOrganizationName;
- return map;
- }
- }
- class GetShareDeviceUsersPageRequest extends PageRequest{
- String? deviceCode;
- GetShareDeviceUsersPageRequest({
- this.deviceCode,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory GetShareDeviceUsersPageRequest.fromJson(Map<String, dynamic> map) {
- return GetShareDeviceUsersPageRequest(
- deviceCode: map['DeviceCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- return map;
- }
- }
- class UserFeatureInfoResult {
- String? featureCode;
- String? featureName;
- String? fatherCode;
- String? uniqueCode;
- UserFeatureInfoResult({
- this.featureCode,
- this.featureName,
- this.fatherCode,
- this.uniqueCode,
- });
- factory UserFeatureInfoResult.fromJson(Map<String, dynamic> map) {
- return UserFeatureInfoResult(
- featureCode: map['FeatureCode'],
- featureName: map['FeatureName'],
- fatherCode: map['FatherCode'],
- uniqueCode: map['UniqueCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(featureCode != null)
- map['FeatureCode'] = featureCode;
- if(featureName != null)
- map['FeatureName'] = featureName;
- if(fatherCode != null)
- map['FatherCode'] = fatherCode;
- if(uniqueCode != null)
- map['UniqueCode'] = uniqueCode;
- return map;
- }
- }
- class GetUserByCodeRequest extends TokenRequest{
- String? userCode;
- GetUserByCodeRequest({
- this.userCode,
- String? token,
- }) : super(
- token: token,
- );
- factory GetUserByCodeRequest.fromJson(Map<String, dynamic> map) {
- return GetUserByCodeRequest(
- userCode: map['UserCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(userCode != null)
- map['UserCode'] = userCode;
- return map;
- }
- }
|