user.m.dart 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808
  1. import 'liveConsultation.m.dart';
  2. import 'notification.m.dart';
  3. import 'upgrade.m.dart';
  4. import 'education.m.dart';
  5. import 'organization.m.dart';
  6. import 'patient.m.dart';
  7. import 'recordInfo.m.dart';
  8. import 'package:fis_jsonrpc/utils.dart';
  9. class GetUserInfoRequest extends TokenRequest{
  10. GetUserInfoRequest({
  11. String? token,
  12. }) : super(
  13. token: token,
  14. );
  15. factory GetUserInfoRequest.fromJson(Map<String, dynamic> map) {
  16. return GetUserInfoRequest(
  17. token: map['Token'],
  18. );
  19. }
  20. Map<String, dynamic> toJson() {
  21. final map = super.toJson();
  22. return map;
  23. }
  24. }
  25. class AlterUserInfoRequest extends TokenRequest{
  26. String? phone;
  27. String? email;
  28. String? nickName;
  29. String? fullName;
  30. String? headImageUrl;
  31. String? organizationCode;
  32. String? extensionData;
  33. String? shortCode;
  34. String? languageCode;
  35. AlterUserInfoRequest({
  36. this.phone,
  37. this.email,
  38. this.nickName,
  39. this.fullName,
  40. this.headImageUrl,
  41. this.organizationCode,
  42. this.extensionData,
  43. this.shortCode,
  44. this.languageCode,
  45. String? token,
  46. }) : super(
  47. token: token,
  48. );
  49. factory AlterUserInfoRequest.fromJson(Map<String, dynamic> map) {
  50. return AlterUserInfoRequest(
  51. phone: map['Phone'],
  52. email: map['Email'],
  53. nickName: map['NickName'],
  54. fullName: map['FullName'],
  55. headImageUrl: map['HeadImageUrl'],
  56. organizationCode: map['OrganizationCode'],
  57. extensionData: map['ExtensionData'],
  58. shortCode: map['ShortCode'],
  59. languageCode: map['LanguageCode'],
  60. token: map['Token'],
  61. );
  62. }
  63. Map<String, dynamic> toJson() {
  64. final map = super.toJson();
  65. if (phone != null)
  66. map['Phone'] = phone;
  67. if (email != null)
  68. map['Email'] = email;
  69. if (nickName != null)
  70. map['NickName'] = nickName;
  71. if (fullName != null)
  72. map['FullName'] = fullName;
  73. if (headImageUrl != null)
  74. map['HeadImageUrl'] = headImageUrl;
  75. if (organizationCode != null)
  76. map['OrganizationCode'] = organizationCode;
  77. if (extensionData != null)
  78. map['ExtensionData'] = extensionData;
  79. if (shortCode != null)
  80. map['ShortCode'] = shortCode;
  81. if (languageCode != null)
  82. map['LanguageCode'] = languageCode;
  83. return map;
  84. }
  85. }
  86. class GetUserPageRequest extends PageRequest{
  87. String? keyword;
  88. OrganizationQueryTypeEnum organizationQueryType;
  89. String? organizationCode;
  90. String? rankCode;
  91. String? positionCode;
  92. bool exceptSelf;
  93. String? language;
  94. List<String>? roleCodes;
  95. bool? isAgent;
  96. GetUserPageRequest({
  97. this.keyword,
  98. this.organizationQueryType = OrganizationQueryTypeEnum.Wait,
  99. this.organizationCode,
  100. this.rankCode,
  101. this.positionCode,
  102. this.exceptSelf = false,
  103. this.language,
  104. this.roleCodes,
  105. this.isAgent,
  106. int pageIndex = 0,
  107. int pageSize = 0,
  108. String? token,
  109. }) : super(
  110. pageIndex: pageIndex,
  111. pageSize: pageSize,
  112. token: token,
  113. );
  114. factory GetUserPageRequest.fromJson(Map<String, dynamic> map) {
  115. return GetUserPageRequest(
  116. keyword: map['Keyword'],
  117. organizationQueryType: OrganizationQueryTypeEnum.values.firstWhere((e) => e.index == map['OrganizationQueryType']),
  118. organizationCode: map['OrganizationCode'],
  119. rankCode: map['RankCode'],
  120. positionCode: map['PositionCode'],
  121. exceptSelf: map['ExceptSelf'],
  122. language: map['Language'],
  123. roleCodes: map['RoleCodes']?.cast<String>().toList(),
  124. isAgent: map['IsAgent'],
  125. pageIndex: map['PageIndex'],
  126. pageSize: map['PageSize'],
  127. token: map['Token'],
  128. );
  129. }
  130. Map<String, dynamic> toJson() {
  131. final map = super.toJson();
  132. if (keyword != null)
  133. map['Keyword'] = keyword;
  134. map['OrganizationQueryType'] = organizationQueryType.index;
  135. if (organizationCode != null)
  136. map['OrganizationCode'] = organizationCode;
  137. if (rankCode != null)
  138. map['RankCode'] = rankCode;
  139. if (positionCode != null)
  140. map['PositionCode'] = positionCode;
  141. map['ExceptSelf'] = exceptSelf;
  142. if (language != null)
  143. map['Language'] = language;
  144. if (roleCodes != null)
  145. map['RoleCodes'] = roleCodes;
  146. if (isAgent != null)
  147. map['IsAgent'] = isAgent;
  148. return map;
  149. }
  150. }
  151. class RemoveUsersFromOrganizationRequest extends TokenRequest{
  152. List<String>? userCodes;
  153. RemoveUsersFromOrganizationRequest({
  154. this.userCodes,
  155. String? token,
  156. }) : super(
  157. token: token,
  158. );
  159. factory RemoveUsersFromOrganizationRequest.fromJson(Map<String, dynamic> map) {
  160. return RemoveUsersFromOrganizationRequest(
  161. userCodes: map['UserCodes']?.cast<String>().toList(),
  162. token: map['Token'],
  163. );
  164. }
  165. Map<String, dynamic> toJson() {
  166. final map = super.toJson();
  167. if (userCodes != null)
  168. map['UserCodes'] = userCodes;
  169. return map;
  170. }
  171. }
  172. class SetUserOrganizationInfoRequest extends TokenRequest{
  173. String? userCode;
  174. List<String>? roleCodes;
  175. List<String>? rankCodes;
  176. List<String>? positionCodes;
  177. String? organizationCode;
  178. SetUserOrganizationInfoRequest({
  179. this.userCode,
  180. this.roleCodes,
  181. this.rankCodes,
  182. this.positionCodes,
  183. this.organizationCode,
  184. String? token,
  185. }) : super(
  186. token: token,
  187. );
  188. factory SetUserOrganizationInfoRequest.fromJson(Map<String, dynamic> map) {
  189. return SetUserOrganizationInfoRequest(
  190. userCode: map['UserCode'],
  191. roleCodes: map['RoleCodes']?.cast<String>().toList(),
  192. rankCodes: map['RankCodes']?.cast<String>().toList(),
  193. positionCodes: map['PositionCodes']?.cast<String>().toList(),
  194. organizationCode: map['OrganizationCode'],
  195. token: map['Token'],
  196. );
  197. }
  198. Map<String, dynamic> toJson() {
  199. final map = super.toJson();
  200. if (userCode != null)
  201. map['UserCode'] = userCode;
  202. if (roleCodes != null)
  203. map['RoleCodes'] = roleCodes;
  204. if (rankCodes != null)
  205. map['RankCodes'] = rankCodes;
  206. if (positionCodes != null)
  207. map['PositionCodes'] = positionCodes;
  208. if (organizationCode != null)
  209. map['OrganizationCode'] = organizationCode;
  210. return map;
  211. }
  212. }
  213. class AlterPersonInfoRequest {
  214. String? token;
  215. String? nickName;
  216. String? headImageUrl;
  217. AlterPersonInfoRequest({
  218. this.token,
  219. this.nickName,
  220. this.headImageUrl,
  221. });
  222. factory AlterPersonInfoRequest.fromJson(Map<String, dynamic> map) {
  223. return AlterPersonInfoRequest(
  224. token: map['Token'],
  225. nickName: map['NickName'],
  226. headImageUrl: map['HeadImageUrl'],
  227. );
  228. }
  229. Map<String, dynamic> toJson() {
  230. final map = Map<String, dynamic>();
  231. if (token != null) {
  232. map['Token'] = token;
  233. }
  234. if (nickName != null) {
  235. map['NickName'] = nickName;
  236. }
  237. if (headImageUrl != null) {
  238. map['HeadImageUrl'] = headImageUrl;
  239. }
  240. return map;
  241. }
  242. }
  243. class ShareDeviceUserDTO extends BaseDTO{
  244. String? userCode;
  245. String? fullName;
  246. String? userName;
  247. String? displayName;
  248. String? phone;
  249. String? headImageUrl;
  250. List<String>? rankNames;
  251. String? rootOrganizationCode;
  252. String? rootOrganizationName;
  253. ShareDeviceUserDTO({
  254. this.userCode,
  255. this.fullName,
  256. this.userName,
  257. this.displayName,
  258. this.phone,
  259. this.headImageUrl,
  260. this.rankNames,
  261. this.rootOrganizationCode,
  262. this.rootOrganizationName,
  263. DateTime? createTime,
  264. DateTime? updateTime,
  265. }) : super(
  266. createTime: createTime,
  267. updateTime: updateTime,
  268. );
  269. factory ShareDeviceUserDTO.fromJson(Map<String, dynamic> map) {
  270. return ShareDeviceUserDTO(
  271. userCode: map['UserCode'],
  272. fullName: map['FullName'],
  273. userName: map['UserName'],
  274. displayName: map['DisplayName'],
  275. phone: map['Phone'],
  276. headImageUrl: map['HeadImageUrl'],
  277. rankNames: map['RankNames']?.cast<String>().toList(),
  278. rootOrganizationCode: map['RootOrganizationCode'],
  279. rootOrganizationName: map['RootOrganizationName'],
  280. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  281. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  282. );
  283. }
  284. Map<String, dynamic> toJson() {
  285. final map = super.toJson();
  286. if (userCode != null)
  287. map['UserCode'] = userCode;
  288. if (fullName != null)
  289. map['FullName'] = fullName;
  290. if (userName != null)
  291. map['UserName'] = userName;
  292. if (displayName != null)
  293. map['DisplayName'] = displayName;
  294. if (phone != null)
  295. map['Phone'] = phone;
  296. if (headImageUrl != null)
  297. map['HeadImageUrl'] = headImageUrl;
  298. if (rankNames != null)
  299. map['RankNames'] = rankNames;
  300. if (rootOrganizationCode != null)
  301. map['RootOrganizationCode'] = rootOrganizationCode;
  302. if (rootOrganizationName != null)
  303. map['RootOrganizationName'] = rootOrganizationName;
  304. return map;
  305. }
  306. }
  307. class GetShareDeviceUsersPageRequest extends PageRequest{
  308. String? deviceCode;
  309. GetShareDeviceUsersPageRequest({
  310. this.deviceCode,
  311. int pageIndex = 0,
  312. int pageSize = 0,
  313. String? token,
  314. }) : super(
  315. pageIndex: pageIndex,
  316. pageSize: pageSize,
  317. token: token,
  318. );
  319. factory GetShareDeviceUsersPageRequest.fromJson(Map<String, dynamic> map) {
  320. return GetShareDeviceUsersPageRequest(
  321. deviceCode: map['DeviceCode'],
  322. pageIndex: map['PageIndex'],
  323. pageSize: map['PageSize'],
  324. token: map['Token'],
  325. );
  326. }
  327. Map<String, dynamic> toJson() {
  328. final map = super.toJson();
  329. if (deviceCode != null)
  330. map['DeviceCode'] = deviceCode;
  331. return map;
  332. }
  333. }
  334. class UserFeatureInfoResult {
  335. String? featureCode;
  336. String? featureName;
  337. String? fatherCode;
  338. String? uniqueCode;
  339. UserFeatureInfoResult({
  340. this.featureCode,
  341. this.featureName,
  342. this.fatherCode,
  343. this.uniqueCode,
  344. });
  345. factory UserFeatureInfoResult.fromJson(Map<String, dynamic> map) {
  346. return UserFeatureInfoResult(
  347. featureCode: map['FeatureCode'],
  348. featureName: map['FeatureName'],
  349. fatherCode: map['FatherCode'],
  350. uniqueCode: map['UniqueCode'],
  351. );
  352. }
  353. Map<String, dynamic> toJson() {
  354. final map = Map<String, dynamic>();
  355. if (featureCode != null) {
  356. map['FeatureCode'] = featureCode;
  357. }
  358. if (featureName != null) {
  359. map['FeatureName'] = featureName;
  360. }
  361. if (fatherCode != null) {
  362. map['FatherCode'] = fatherCode;
  363. }
  364. if (uniqueCode != null) {
  365. map['UniqueCode'] = uniqueCode;
  366. }
  367. return map;
  368. }
  369. }
  370. class UserInfoByCodeDTO extends UserDTO{
  371. String? bindAssistantUserName;
  372. String? bindAssistantDoctorUserName;
  373. UserInfoByCodeDTO({
  374. this.bindAssistantUserName,
  375. this.bindAssistantDoctorUserName,
  376. String? nickName,
  377. String? organizationCode,
  378. String? organizationName,
  379. String? departmentCode,
  380. String? departmentName,
  381. String? departmentShortCode,
  382. String? rootOrganizationCode,
  383. String? rootOrganizationName,
  384. List<String>? authorityGroups,
  385. List<String>? bindDevices,
  386. List<String>? bindDeviceOrganizations,
  387. String? lastIP,
  388. int logintimes = 0,
  389. UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
  390. List<String>? roleCodes,
  391. List<String>? rankCodes,
  392. List<String>? positionCodes,
  393. ApplyStateEnum applyState = ApplyStateEnum.NotApply,
  394. String? rankName,
  395. String? positionName,
  396. bool isDirector = false,
  397. List<String>? fieldList,
  398. List<String>? deletePatientCodes,
  399. bool isBatchExportDiagnoseData = false,
  400. String? bindAssistantUserCode,
  401. String? bindAssistantDoctorUserCode,
  402. LoginLockInfoDTO? loginLockInfo,
  403. String? signature,
  404. String? language,
  405. bool enableReportLabel = false,
  406. List<AssociatedInfoDTO>? associatedInfos,
  407. String? commonPlatformUserId,
  408. String? bindEmergencyDeviceCode,
  409. String? bindEmergencyExpertCode,
  410. List<String>? dashboardOrgCodes,
  411. String? organizationShortCode,
  412. String? rootOrganizationShortCode,
  413. bool isOldAgent = false,
  414. List<String>? userFeatureCodes,
  415. String? openId,
  416. String? phone,
  417. String? email,
  418. String? userCode,
  419. String? userName,
  420. String? fullName,
  421. String? headImageUrl,
  422. String? displayName,
  423. DateTime? createTime,
  424. DateTime? updateTime,
  425. }) : super(
  426. nickName: nickName,
  427. organizationCode: organizationCode,
  428. organizationName: organizationName,
  429. departmentCode: departmentCode,
  430. departmentName: departmentName,
  431. departmentShortCode: departmentShortCode,
  432. rootOrganizationCode: rootOrganizationCode,
  433. rootOrganizationName: rootOrganizationName,
  434. authorityGroups: authorityGroups,
  435. bindDevices: bindDevices,
  436. bindDeviceOrganizations: bindDeviceOrganizations,
  437. lastIP: lastIP,
  438. logintimes: logintimes,
  439. userState: userState,
  440. roleCodes: roleCodes,
  441. rankCodes: rankCodes,
  442. positionCodes: positionCodes,
  443. applyState: applyState,
  444. rankName: rankName,
  445. positionName: positionName,
  446. isDirector: isDirector,
  447. fieldList: fieldList,
  448. deletePatientCodes: deletePatientCodes,
  449. isBatchExportDiagnoseData: isBatchExportDiagnoseData,
  450. bindAssistantUserCode: bindAssistantUserCode,
  451. bindAssistantDoctorUserCode: bindAssistantDoctorUserCode,
  452. loginLockInfo: loginLockInfo,
  453. signature: signature,
  454. language: language,
  455. enableReportLabel: enableReportLabel,
  456. associatedInfos: associatedInfos,
  457. commonPlatformUserId: commonPlatformUserId,
  458. bindEmergencyDeviceCode: bindEmergencyDeviceCode,
  459. bindEmergencyExpertCode: bindEmergencyExpertCode,
  460. dashboardOrgCodes: dashboardOrgCodes,
  461. organizationShortCode: organizationShortCode,
  462. rootOrganizationShortCode: rootOrganizationShortCode,
  463. isOldAgent: isOldAgent,
  464. userFeatureCodes: userFeatureCodes,
  465. openId: openId,
  466. phone: phone,
  467. email: email,
  468. userCode: userCode,
  469. userName: userName,
  470. fullName: fullName,
  471. headImageUrl: headImageUrl,
  472. displayName: displayName,
  473. createTime: createTime,
  474. updateTime: updateTime,
  475. );
  476. factory UserInfoByCodeDTO.fromJson(Map<String, dynamic> map) {
  477. return UserInfoByCodeDTO(
  478. bindAssistantUserName: map['BindAssistantUserName'],
  479. bindAssistantDoctorUserName: map['BindAssistantDoctorUserName'],
  480. nickName: map['NickName'],
  481. organizationCode: map['OrganizationCode'],
  482. organizationName: map['OrganizationName'],
  483. departmentCode: map['DepartmentCode'],
  484. departmentName: map['DepartmentName'],
  485. departmentShortCode: map['DepartmentShortCode'],
  486. rootOrganizationCode: map['RootOrganizationCode'],
  487. rootOrganizationName: map['RootOrganizationName'],
  488. authorityGroups: map['AuthorityGroups']?.cast<String>().toList(),
  489. bindDevices: map['BindDevices']?.cast<String>().toList(),
  490. bindDeviceOrganizations: map['BindDeviceOrganizations']?.cast<String>().toList(),
  491. lastIP: map['LastIP'],
  492. logintimes: map['Logintimes'],
  493. userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
  494. roleCodes: map['RoleCodes']?.cast<String>().toList(),
  495. rankCodes: map['RankCodes']?.cast<String>().toList(),
  496. positionCodes: map['PositionCodes']?.cast<String>().toList(),
  497. applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
  498. rankName: map['RankName'],
  499. positionName: map['PositionName'],
  500. isDirector: map['IsDirector'],
  501. fieldList: map['FieldList']?.cast<String>().toList(),
  502. deletePatientCodes: map['DeletePatientCodes']?.cast<String>().toList(),
  503. isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
  504. bindAssistantUserCode: map['BindAssistantUserCode'],
  505. bindAssistantDoctorUserCode: map['BindAssistantDoctorUserCode'],
  506. loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null,
  507. signature: map['Signature'],
  508. language: map['Language'],
  509. enableReportLabel: map['EnableReportLabel'],
  510. associatedInfos: map['AssociatedInfos'] != null ? (map['AssociatedInfos'] as List).map((e)=>AssociatedInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  511. commonPlatformUserId: map['CommonPlatformUserId'],
  512. bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'],
  513. bindEmergencyExpertCode: map['BindEmergencyExpertCode'],
  514. dashboardOrgCodes: map['DashboardOrgCodes']?.cast<String>().toList(),
  515. organizationShortCode: map['OrganizationShortCode'],
  516. rootOrganizationShortCode: map['RootOrganizationShortCode'],
  517. isOldAgent: map['IsOldAgent'],
  518. userFeatureCodes: map['UserFeatureCodes']?.cast<String>().toList(),
  519. openId: map['OpenId'],
  520. phone: map['Phone'],
  521. email: map['Email'],
  522. userCode: map['UserCode'],
  523. userName: map['UserName'],
  524. fullName: map['FullName'],
  525. headImageUrl: map['HeadImageUrl'],
  526. displayName: map['DisplayName'],
  527. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  528. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  529. );
  530. }
  531. Map<String, dynamic> toJson() {
  532. final map = super.toJson();
  533. if (bindAssistantUserName != null)
  534. map['BindAssistantUserName'] = bindAssistantUserName;
  535. if (bindAssistantDoctorUserName != null)
  536. map['BindAssistantDoctorUserName'] = bindAssistantDoctorUserName;
  537. return map;
  538. }
  539. }
  540. class GetUserByCodeRequest extends TokenRequest{
  541. String? userCode;
  542. GetUserByCodeRequest({
  543. this.userCode,
  544. String? token,
  545. }) : super(
  546. token: token,
  547. );
  548. factory GetUserByCodeRequest.fromJson(Map<String, dynamic> map) {
  549. return GetUserByCodeRequest(
  550. userCode: map['UserCode'],
  551. token: map['Token'],
  552. );
  553. }
  554. Map<String, dynamic> toJson() {
  555. final map = super.toJson();
  556. if (userCode != null)
  557. map['UserCode'] = userCode;
  558. return map;
  559. }
  560. }
  561. enum CommonSettingsEnum {
  562. Signature,
  563. Language,
  564. EnableReportLabel,
  565. }
  566. class CommonSettingsRequest extends TokenRequest{
  567. CommonSettingsEnum settingType;
  568. String? value;
  569. CommonSettingsRequest({
  570. this.settingType = CommonSettingsEnum.Signature,
  571. this.value,
  572. String? token,
  573. }) : super(
  574. token: token,
  575. );
  576. factory CommonSettingsRequest.fromJson(Map<String, dynamic> map) {
  577. return CommonSettingsRequest(
  578. settingType: CommonSettingsEnum.values.firstWhere((e) => e.index == map['SettingType']),
  579. value: map['Value'],
  580. token: map['Token'],
  581. );
  582. }
  583. Map<String, dynamic> toJson() {
  584. final map = super.toJson();
  585. map['SettingType'] = settingType.index;
  586. if (value != null)
  587. map['Value'] = value;
  588. return map;
  589. }
  590. }
  591. class RefreshStaticticRecordsRequest {
  592. String? userCode;
  593. bool inExecutor;
  594. RefreshStaticticRecordsRequest({
  595. this.userCode,
  596. this.inExecutor = false,
  597. });
  598. factory RefreshStaticticRecordsRequest.fromJson(Map<String, dynamic> map) {
  599. return RefreshStaticticRecordsRequest(
  600. userCode: map['UserCode'],
  601. inExecutor: map['InExecutor'],
  602. );
  603. }
  604. Map<String, dynamic> toJson() {
  605. final map = Map<String, dynamic>();
  606. if (userCode != null) {
  607. map['UserCode'] = userCode;
  608. }
  609. map['InExecutor'] = inExecutor;
  610. return map;
  611. }
  612. }
  613. enum ScheduleTypeEnum {
  614. Consultation,
  615. Training,
  616. }
  617. class ClientScheduleDTO {
  618. String? title;
  619. TransactionStatusEnum status;
  620. ScheduleTypeEnum scheduleType;
  621. DateTime? startTime;
  622. DateTime? endTime;
  623. String? relevanceCode;
  624. ClientScheduleDTO({
  625. this.title,
  626. this.status = TransactionStatusEnum.Applied,
  627. this.scheduleType = ScheduleTypeEnum.Consultation,
  628. this.startTime,
  629. this.endTime,
  630. this.relevanceCode,
  631. });
  632. factory ClientScheduleDTO.fromJson(Map<String, dynamic> map) {
  633. return ClientScheduleDTO(
  634. title: map['Title'],
  635. status: TransactionStatusEnum.values.firstWhere((e) => e.index == map['Status']),
  636. scheduleType: ScheduleTypeEnum.values.firstWhere((e) => e.index == map['ScheduleType']),
  637. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  638. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  639. relevanceCode: map['RelevanceCode'],
  640. );
  641. }
  642. Map<String, dynamic> toJson() {
  643. final map = Map<String, dynamic>();
  644. if (title != null) {
  645. map['Title'] = title;
  646. }
  647. map['Status'] = status.index;
  648. map['ScheduleType'] = scheduleType.index;
  649. if (startTime != null) {
  650. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  651. }
  652. if (endTime != null) {
  653. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  654. }
  655. if (relevanceCode != null) {
  656. map['RelevanceCode'] = relevanceCode;
  657. }
  658. return map;
  659. }
  660. }
  661. class FindSchedulesRequest extends TokenRequest{
  662. DateTime? startTime;
  663. DateTime? endTime;
  664. FindSchedulesRequest({
  665. this.startTime,
  666. this.endTime,
  667. String? token,
  668. }) : super(
  669. token: token,
  670. );
  671. factory FindSchedulesRequest.fromJson(Map<String, dynamic> map) {
  672. return FindSchedulesRequest(
  673. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  674. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  675. token: map['Token'],
  676. );
  677. }
  678. Map<String, dynamic> toJson() {
  679. final map = super.toJson();
  680. if (startTime != null)
  681. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  682. if (endTime != null)
  683. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  684. return map;
  685. }
  686. }
  687. enum ApplicantTypeEnum {
  688. Client,
  689. Device,
  690. Management,
  691. ThirdParty,
  692. Server,
  693. }
  694. class MessageExtendInfoDTO extends BaseDTO{
  695. String? messageCode;
  696. NotificationTypeEnum notificationType;
  697. String? content;
  698. DateTime? notifyTime;
  699. ApplicantTypeEnum receiverType;
  700. String? relevanceCode;
  701. bool isReaded;
  702. DateTime? deliveryTime;
  703. DateTime? readTime;
  704. MessageExtendInfoDTO({
  705. this.messageCode,
  706. this.notificationType = NotificationTypeEnum.Unknown,
  707. this.content,
  708. this.notifyTime,
  709. this.receiverType = ApplicantTypeEnum.Client,
  710. this.relevanceCode,
  711. this.isReaded = false,
  712. this.deliveryTime,
  713. this.readTime,
  714. DateTime? createTime,
  715. DateTime? updateTime,
  716. }) : super(
  717. createTime: createTime,
  718. updateTime: updateTime,
  719. );
  720. factory MessageExtendInfoDTO.fromJson(Map<String, dynamic> map) {
  721. return MessageExtendInfoDTO(
  722. messageCode: map['MessageCode'],
  723. notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
  724. content: map['Content'],
  725. notifyTime: map['NotifyTime'] != null ? DateTime.parse(map['NotifyTime']) : null,
  726. receiverType: ApplicantTypeEnum.values.firstWhere((e) => e.index == map['ReceiverType']),
  727. relevanceCode: map['RelevanceCode'],
  728. isReaded: map['IsReaded'],
  729. deliveryTime: map['DeliveryTime'] != null ? DateTime.parse(map['DeliveryTime']) : null,
  730. readTime: map['ReadTime'] != null ? DateTime.parse(map['ReadTime']) : null,
  731. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  732. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  733. );
  734. }
  735. Map<String, dynamic> toJson() {
  736. final map = super.toJson();
  737. if (messageCode != null)
  738. map['MessageCode'] = messageCode;
  739. map['NotificationType'] = notificationType.index;
  740. if (content != null)
  741. map['Content'] = content;
  742. if (notifyTime != null)
  743. map['NotifyTime'] = JsonRpcUtils.dateFormat(notifyTime!);
  744. map['ReceiverType'] = receiverType.index;
  745. if (relevanceCode != null)
  746. map['RelevanceCode'] = relevanceCode;
  747. map['IsReaded'] = isReaded;
  748. if (deliveryTime != null)
  749. map['DeliveryTime'] = JsonRpcUtils.dateFormat(deliveryTime!);
  750. if (readTime != null)
  751. map['ReadTime'] = JsonRpcUtils.dateFormat(readTime!);
  752. return map;
  753. }
  754. }
  755. class QueryMessageListRequest extends PageRequest{
  756. TransactionTypeEnum transactionType;
  757. String? keyword;
  758. QueryMessageListRequest({
  759. this.transactionType = TransactionTypeEnum.Consultion,
  760. this.keyword,
  761. int pageIndex = 0,
  762. int pageSize = 0,
  763. String? token,
  764. }) : super(
  765. pageIndex: pageIndex,
  766. pageSize: pageSize,
  767. token: token,
  768. );
  769. factory QueryMessageListRequest.fromJson(Map<String, dynamic> map) {
  770. return QueryMessageListRequest(
  771. transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
  772. keyword: map['Keyword'],
  773. pageIndex: map['PageIndex'],
  774. pageSize: map['PageSize'],
  775. token: map['Token'],
  776. );
  777. }
  778. Map<String, dynamic> toJson() {
  779. final map = super.toJson();
  780. map['TransactionType'] = transactionType.index;
  781. if (keyword != null)
  782. map['Keyword'] = keyword;
  783. return map;
  784. }
  785. }
  786. class SetMessageDeliveryRequest extends TokenRequest{
  787. String? messageCode;
  788. bool isReaded;
  789. SetMessageDeliveryRequest({
  790. this.messageCode,
  791. this.isReaded = false,
  792. String? token,
  793. }) : super(
  794. token: token,
  795. );
  796. factory SetMessageDeliveryRequest.fromJson(Map<String, dynamic> map) {
  797. return SetMessageDeliveryRequest(
  798. messageCode: map['MessageCode'],
  799. isReaded: map['IsReaded'],
  800. token: map['Token'],
  801. );
  802. }
  803. Map<String, dynamic> toJson() {
  804. final map = super.toJson();
  805. if (messageCode != null)
  806. map['MessageCode'] = messageCode;
  807. map['IsReaded'] = isReaded;
  808. return map;
  809. }
  810. }
  811. class SetMessageInfoReqeust extends TokenRequest{
  812. List<String>? messageCodes;
  813. SetMessageInfoReqeust({
  814. this.messageCodes,
  815. String? token,
  816. }) : super(
  817. token: token,
  818. );
  819. factory SetMessageInfoReqeust.fromJson(Map<String, dynamic> map) {
  820. return SetMessageInfoReqeust(
  821. messageCodes: map['MessageCodes']?.cast<String>().toList(),
  822. token: map['Token'],
  823. );
  824. }
  825. Map<String, dynamic> toJson() {
  826. final map = super.toJson();
  827. if (messageCodes != null)
  828. map['MessageCodes'] = messageCodes;
  829. return map;
  830. }
  831. }
  832. class AnnouncementExtendInfoDTO extends BaseDTO{
  833. String? announcementCode;
  834. AnnouncementTypeEnum announcementType;
  835. String? language;
  836. String? title;
  837. String? content;
  838. AnnouncementExtendInfoDTO({
  839. this.announcementCode,
  840. this.announcementType = AnnouncementTypeEnum.Broadcast,
  841. this.language,
  842. this.title,
  843. this.content,
  844. DateTime? createTime,
  845. DateTime? updateTime,
  846. }) : super(
  847. createTime: createTime,
  848. updateTime: updateTime,
  849. );
  850. factory AnnouncementExtendInfoDTO.fromJson(Map<String, dynamic> map) {
  851. return AnnouncementExtendInfoDTO(
  852. announcementCode: map['AnnouncementCode'],
  853. announcementType: AnnouncementTypeEnum.values.firstWhere((e) => e.index == map['AnnouncementType']),
  854. language: map['Language'],
  855. title: map['Title'],
  856. content: map['Content'],
  857. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  858. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  859. );
  860. }
  861. Map<String, dynamic> toJson() {
  862. final map = super.toJson();
  863. if (announcementCode != null)
  864. map['AnnouncementCode'] = announcementCode;
  865. map['AnnouncementType'] = announcementType.index;
  866. if (language != null)
  867. map['Language'] = language;
  868. if (title != null)
  869. map['Title'] = title;
  870. if (content != null)
  871. map['Content'] = content;
  872. return map;
  873. }
  874. }
  875. class QueryAnnouncementListRequest extends PageRequest{
  876. AnnouncementTypeEnum announcementType;
  877. String? language;
  878. String? keyword;
  879. DateTime? startTime;
  880. DateTime? endTime;
  881. QueryAnnouncementListRequest({
  882. this.announcementType = AnnouncementTypeEnum.Broadcast,
  883. this.language,
  884. this.keyword,
  885. this.startTime,
  886. this.endTime,
  887. int pageIndex = 0,
  888. int pageSize = 0,
  889. String? token,
  890. }) : super(
  891. pageIndex: pageIndex,
  892. pageSize: pageSize,
  893. token: token,
  894. );
  895. factory QueryAnnouncementListRequest.fromJson(Map<String, dynamic> map) {
  896. return QueryAnnouncementListRequest(
  897. announcementType: AnnouncementTypeEnum.values.firstWhere((e) => e.index == map['AnnouncementType']),
  898. language: map['Language'],
  899. keyword: map['Keyword'],
  900. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  901. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  902. pageIndex: map['PageIndex'],
  903. pageSize: map['PageSize'],
  904. token: map['Token'],
  905. );
  906. }
  907. Map<String, dynamic> toJson() {
  908. final map = super.toJson();
  909. map['AnnouncementType'] = announcementType.index;
  910. if (language != null)
  911. map['Language'] = language;
  912. if (keyword != null)
  913. map['Keyword'] = keyword;
  914. if (startTime != null)
  915. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  916. if (endTime != null)
  917. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  918. return map;
  919. }
  920. }
  921. class GetAnnouncementRequest extends TokenRequest{
  922. String? announcementCode;
  923. String? language;
  924. GetAnnouncementRequest({
  925. this.announcementCode,
  926. this.language,
  927. String? token,
  928. }) : super(
  929. token: token,
  930. );
  931. factory GetAnnouncementRequest.fromJson(Map<String, dynamic> map) {
  932. return GetAnnouncementRequest(
  933. announcementCode: map['AnnouncementCode'],
  934. language: map['Language'],
  935. token: map['Token'],
  936. );
  937. }
  938. Map<String, dynamic> toJson() {
  939. final map = super.toJson();
  940. if (announcementCode != null)
  941. map['AnnouncementCode'] = announcementCode;
  942. if (language != null)
  943. map['Language'] = language;
  944. return map;
  945. }
  946. }
  947. class NoReadMessagesDTO {
  948. int count;
  949. List<String>? noReadCodes;
  950. NoReadMessagesDTO({
  951. this.count = 0,
  952. this.noReadCodes,
  953. });
  954. factory NoReadMessagesDTO.fromJson(Map<String, dynamic> map) {
  955. return NoReadMessagesDTO(
  956. count: map['Count'],
  957. noReadCodes: map['NoReadCodes']?.cast<String>().toList(),
  958. );
  959. }
  960. Map<String, dynamic> toJson() {
  961. final map = Map<String, dynamic>();
  962. map['Count'] = count;
  963. if (noReadCodes != null) {
  964. map['NoReadCodes'] = noReadCodes;
  965. }
  966. return map;
  967. }
  968. }
  969. class GetNoReadMessagesRequest extends TokenRequest{
  970. TransactionTypeEnum transactionType;
  971. GetNoReadMessagesRequest({
  972. this.transactionType = TransactionTypeEnum.Consultion,
  973. String? token,
  974. }) : super(
  975. token: token,
  976. );
  977. factory GetNoReadMessagesRequest.fromJson(Map<String, dynamic> map) {
  978. return GetNoReadMessagesRequest(
  979. transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
  980. token: map['Token'],
  981. );
  982. }
  983. Map<String, dynamic> toJson() {
  984. final map = super.toJson();
  985. map['TransactionType'] = transactionType.index;
  986. return map;
  987. }
  988. }
  989. class RemoveUserSingleTokenRequest extends TokenRequest{
  990. String? wSToken;
  991. RemoveUserSingleTokenRequest({
  992. this.wSToken,
  993. String? token,
  994. }) : super(
  995. token: token,
  996. );
  997. factory RemoveUserSingleTokenRequest.fromJson(Map<String, dynamic> map) {
  998. return RemoveUserSingleTokenRequest(
  999. wSToken: map['WSToken'],
  1000. token: map['Token'],
  1001. );
  1002. }
  1003. Map<String, dynamic> toJson() {
  1004. final map = super.toJson();
  1005. if (wSToken != null)
  1006. map['WSToken'] = wSToken;
  1007. return map;
  1008. }
  1009. }
  1010. enum UserMigratoryRoleEnum {
  1011. Role_ExpertAssistant,
  1012. Role_CertifiedExpert,
  1013. Role_CertifiedPhysician,
  1014. Role_RemoteManager,
  1015. Role_UnSet,
  1016. }
  1017. class UserMigratoryInfo extends UserDTO{
  1018. bool isDelete;
  1019. String? secretPassword;
  1020. DateTime? passwordUpdateTime;
  1021. List<String>? passwordRecords;
  1022. UserMigratoryRoleEnum userRole;
  1023. String? remoteMainFeature;
  1024. bool isCertifiedInstructor;
  1025. UserMigratoryInfo({
  1026. this.isDelete = false,
  1027. this.secretPassword,
  1028. this.passwordUpdateTime,
  1029. this.passwordRecords,
  1030. this.userRole = UserMigratoryRoleEnum.Role_ExpertAssistant,
  1031. this.remoteMainFeature,
  1032. this.isCertifiedInstructor = false,
  1033. String? nickName,
  1034. String? organizationCode,
  1035. String? organizationName,
  1036. String? departmentCode,
  1037. String? departmentName,
  1038. String? departmentShortCode,
  1039. String? rootOrganizationCode,
  1040. String? rootOrganizationName,
  1041. List<String>? authorityGroups,
  1042. List<String>? bindDevices,
  1043. List<String>? bindDeviceOrganizations,
  1044. String? lastIP,
  1045. int logintimes = 0,
  1046. UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
  1047. List<String>? roleCodes,
  1048. List<String>? rankCodes,
  1049. List<String>? positionCodes,
  1050. ApplyStateEnum applyState = ApplyStateEnum.NotApply,
  1051. String? rankName,
  1052. String? positionName,
  1053. bool isDirector = false,
  1054. List<String>? fieldList,
  1055. List<String>? deletePatientCodes,
  1056. bool isBatchExportDiagnoseData = false,
  1057. String? bindAssistantUserCode,
  1058. String? bindAssistantDoctorUserCode,
  1059. LoginLockInfoDTO? loginLockInfo,
  1060. String? signature,
  1061. String? language,
  1062. bool enableReportLabel = false,
  1063. List<AssociatedInfoDTO>? associatedInfos,
  1064. String? commonPlatformUserId,
  1065. String? bindEmergencyDeviceCode,
  1066. String? bindEmergencyExpertCode,
  1067. List<String>? dashboardOrgCodes,
  1068. String? organizationShortCode,
  1069. String? rootOrganizationShortCode,
  1070. bool isOldAgent = false,
  1071. List<String>? userFeatureCodes,
  1072. String? openId,
  1073. String? phone,
  1074. String? email,
  1075. String? userCode,
  1076. String? userName,
  1077. String? fullName,
  1078. String? headImageUrl,
  1079. String? displayName,
  1080. DateTime? createTime,
  1081. DateTime? updateTime,
  1082. }) : super(
  1083. nickName: nickName,
  1084. organizationCode: organizationCode,
  1085. organizationName: organizationName,
  1086. departmentCode: departmentCode,
  1087. departmentName: departmentName,
  1088. departmentShortCode: departmentShortCode,
  1089. rootOrganizationCode: rootOrganizationCode,
  1090. rootOrganizationName: rootOrganizationName,
  1091. authorityGroups: authorityGroups,
  1092. bindDevices: bindDevices,
  1093. bindDeviceOrganizations: bindDeviceOrganizations,
  1094. lastIP: lastIP,
  1095. logintimes: logintimes,
  1096. userState: userState,
  1097. roleCodes: roleCodes,
  1098. rankCodes: rankCodes,
  1099. positionCodes: positionCodes,
  1100. applyState: applyState,
  1101. rankName: rankName,
  1102. positionName: positionName,
  1103. isDirector: isDirector,
  1104. fieldList: fieldList,
  1105. deletePatientCodes: deletePatientCodes,
  1106. isBatchExportDiagnoseData: isBatchExportDiagnoseData,
  1107. bindAssistantUserCode: bindAssistantUserCode,
  1108. bindAssistantDoctorUserCode: bindAssistantDoctorUserCode,
  1109. loginLockInfo: loginLockInfo,
  1110. signature: signature,
  1111. language: language,
  1112. enableReportLabel: enableReportLabel,
  1113. associatedInfos: associatedInfos,
  1114. commonPlatformUserId: commonPlatformUserId,
  1115. bindEmergencyDeviceCode: bindEmergencyDeviceCode,
  1116. bindEmergencyExpertCode: bindEmergencyExpertCode,
  1117. dashboardOrgCodes: dashboardOrgCodes,
  1118. organizationShortCode: organizationShortCode,
  1119. rootOrganizationShortCode: rootOrganizationShortCode,
  1120. isOldAgent: isOldAgent,
  1121. userFeatureCodes: userFeatureCodes,
  1122. openId: openId,
  1123. phone: phone,
  1124. email: email,
  1125. userCode: userCode,
  1126. userName: userName,
  1127. fullName: fullName,
  1128. headImageUrl: headImageUrl,
  1129. displayName: displayName,
  1130. createTime: createTime,
  1131. updateTime: updateTime,
  1132. );
  1133. factory UserMigratoryInfo.fromJson(Map<String, dynamic> map) {
  1134. return UserMigratoryInfo(
  1135. isDelete: map['IsDelete'],
  1136. secretPassword: map['SecretPassword'],
  1137. passwordUpdateTime: map['PasswordUpdateTime'] != null ? DateTime.parse(map['PasswordUpdateTime']) : null,
  1138. passwordRecords: map['PasswordRecords']?.cast<String>().toList(),
  1139. userRole: UserMigratoryRoleEnum.values.firstWhere((e) => e.index == map['UserRole']),
  1140. remoteMainFeature: map['RemoteMainFeature'],
  1141. isCertifiedInstructor: map['IsCertifiedInstructor'],
  1142. nickName: map['NickName'],
  1143. organizationCode: map['OrganizationCode'],
  1144. organizationName: map['OrganizationName'],
  1145. departmentCode: map['DepartmentCode'],
  1146. departmentName: map['DepartmentName'],
  1147. departmentShortCode: map['DepartmentShortCode'],
  1148. rootOrganizationCode: map['RootOrganizationCode'],
  1149. rootOrganizationName: map['RootOrganizationName'],
  1150. authorityGroups: map['AuthorityGroups']?.cast<String>().toList(),
  1151. bindDevices: map['BindDevices']?.cast<String>().toList(),
  1152. bindDeviceOrganizations: map['BindDeviceOrganizations']?.cast<String>().toList(),
  1153. lastIP: map['LastIP'],
  1154. logintimes: map['Logintimes'],
  1155. userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
  1156. roleCodes: map['RoleCodes']?.cast<String>().toList(),
  1157. rankCodes: map['RankCodes']?.cast<String>().toList(),
  1158. positionCodes: map['PositionCodes']?.cast<String>().toList(),
  1159. applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
  1160. rankName: map['RankName'],
  1161. positionName: map['PositionName'],
  1162. isDirector: map['IsDirector'],
  1163. fieldList: map['FieldList']?.cast<String>().toList(),
  1164. deletePatientCodes: map['DeletePatientCodes']?.cast<String>().toList(),
  1165. isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
  1166. bindAssistantUserCode: map['BindAssistantUserCode'],
  1167. bindAssistantDoctorUserCode: map['BindAssistantDoctorUserCode'],
  1168. loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null,
  1169. signature: map['Signature'],
  1170. language: map['Language'],
  1171. enableReportLabel: map['EnableReportLabel'],
  1172. associatedInfos: map['AssociatedInfos'] != null ? (map['AssociatedInfos'] as List).map((e)=>AssociatedInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1173. commonPlatformUserId: map['CommonPlatformUserId'],
  1174. bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'],
  1175. bindEmergencyExpertCode: map['BindEmergencyExpertCode'],
  1176. dashboardOrgCodes: map['DashboardOrgCodes']?.cast<String>().toList(),
  1177. organizationShortCode: map['OrganizationShortCode'],
  1178. rootOrganizationShortCode: map['RootOrganizationShortCode'],
  1179. isOldAgent: map['IsOldAgent'],
  1180. userFeatureCodes: map['UserFeatureCodes']?.cast<String>().toList(),
  1181. openId: map['OpenId'],
  1182. phone: map['Phone'],
  1183. email: map['Email'],
  1184. userCode: map['UserCode'],
  1185. userName: map['UserName'],
  1186. fullName: map['FullName'],
  1187. headImageUrl: map['HeadImageUrl'],
  1188. displayName: map['DisplayName'],
  1189. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1190. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1191. );
  1192. }
  1193. Map<String, dynamic> toJson() {
  1194. final map = super.toJson();
  1195. map['IsDelete'] = isDelete;
  1196. if (secretPassword != null)
  1197. map['SecretPassword'] = secretPassword;
  1198. if (passwordUpdateTime != null)
  1199. map['PasswordUpdateTime'] = JsonRpcUtils.dateFormat(passwordUpdateTime!);
  1200. if (passwordRecords != null)
  1201. map['PasswordRecords'] = passwordRecords;
  1202. map['UserRole'] = userRole.index;
  1203. if (remoteMainFeature != null)
  1204. map['RemoteMainFeature'] = remoteMainFeature;
  1205. map['IsCertifiedInstructor'] = isCertifiedInstructor;
  1206. return map;
  1207. }
  1208. }
  1209. class BatchInsertUserRequest extends TokenRequest{
  1210. SyncDBEnum syncType;
  1211. List<UserMigratoryInfo>? userMigratorys;
  1212. BatchInsertUserRequest({
  1213. this.syncType = SyncDBEnum.Migrate,
  1214. this.userMigratorys,
  1215. String? token,
  1216. }) : super(
  1217. token: token,
  1218. );
  1219. factory BatchInsertUserRequest.fromJson(Map<String, dynamic> map) {
  1220. return BatchInsertUserRequest(
  1221. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  1222. userMigratorys: map['UserMigratorys'] != null ? (map['UserMigratorys'] as List).map((e)=>UserMigratoryInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  1223. token: map['Token'],
  1224. );
  1225. }
  1226. Map<String, dynamic> toJson() {
  1227. final map = super.toJson();
  1228. map['SyncType'] = syncType.index;
  1229. if (userMigratorys != null)
  1230. map['UserMigratorys'] = userMigratorys;
  1231. return map;
  1232. }
  1233. }
  1234. enum MigrateRecordType {
  1235. Default,
  1236. MigrateDataCenter,
  1237. }
  1238. class MigrateRecordDTO {
  1239. DateTime? startTime;
  1240. DateTime? endTime;
  1241. MigrateRecordType type;
  1242. MigrateRecordDTO({
  1243. this.startTime,
  1244. this.endTime,
  1245. this.type = MigrateRecordType.Default,
  1246. });
  1247. factory MigrateRecordDTO.fromJson(Map<String, dynamic> map) {
  1248. return MigrateRecordDTO(
  1249. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  1250. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  1251. type: MigrateRecordType.values.firstWhere((e) => e.index == map['Type']),
  1252. );
  1253. }
  1254. Map<String, dynamic> toJson() {
  1255. final map = Map<String, dynamic>();
  1256. if (startTime != null) {
  1257. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  1258. }
  1259. if (endTime != null) {
  1260. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  1261. }
  1262. map['Type'] = type.index;
  1263. return map;
  1264. }
  1265. }
  1266. class QueryMigrateTimeRequest extends TokenRequest{
  1267. bool isInitMigreate;
  1268. QueryMigrateTimeRequest({
  1269. this.isInitMigreate = false,
  1270. String? token,
  1271. }) : super(
  1272. token: token,
  1273. );
  1274. factory QueryMigrateTimeRequest.fromJson(Map<String, dynamic> map) {
  1275. return QueryMigrateTimeRequest(
  1276. isInitMigreate: map['IsInitMigreate'],
  1277. token: map['Token'],
  1278. );
  1279. }
  1280. Map<String, dynamic> toJson() {
  1281. final map = super.toJson();
  1282. map['IsInitMigreate'] = isInitMigreate;
  1283. return map;
  1284. }
  1285. }
  1286. enum VerificationTypeEnum {
  1287. Password,
  1288. PhoneVerificationCode,
  1289. EmailVerificationCode,
  1290. }
  1291. class CommonLogOffRequest extends TokenRequest{
  1292. VerificationTypeEnum verificationType;
  1293. String? anyCode;
  1294. CommonLogOffRequest({
  1295. this.verificationType = VerificationTypeEnum.Password,
  1296. this.anyCode,
  1297. String? token,
  1298. }) : super(
  1299. token: token,
  1300. );
  1301. factory CommonLogOffRequest.fromJson(Map<String, dynamic> map) {
  1302. return CommonLogOffRequest(
  1303. verificationType: VerificationTypeEnum.values.firstWhere((e) => e.index == map['VerificationType']),
  1304. anyCode: map['AnyCode'],
  1305. token: map['Token'],
  1306. );
  1307. }
  1308. Map<String, dynamic> toJson() {
  1309. final map = super.toJson();
  1310. map['VerificationType'] = verificationType.index;
  1311. if (anyCode != null)
  1312. map['AnyCode'] = anyCode;
  1313. return map;
  1314. }
  1315. }
  1316. class GetUserGroupPagesRequest extends PageRequest{
  1317. String? keyword;
  1318. GetUserGroupPagesRequest({
  1319. this.keyword,
  1320. int pageIndex = 0,
  1321. int pageSize = 0,
  1322. String? token,
  1323. }) : super(
  1324. pageIndex: pageIndex,
  1325. pageSize: pageSize,
  1326. token: token,
  1327. );
  1328. factory GetUserGroupPagesRequest.fromJson(Map<String, dynamic> map) {
  1329. return GetUserGroupPagesRequest(
  1330. keyword: map['Keyword'],
  1331. pageIndex: map['PageIndex'],
  1332. pageSize: map['PageSize'],
  1333. token: map['Token'],
  1334. );
  1335. }
  1336. Map<String, dynamic> toJson() {
  1337. final map = super.toJson();
  1338. if (keyword != null)
  1339. map['Keyword'] = keyword;
  1340. return map;
  1341. }
  1342. }
  1343. class GetUserGroupRequest extends TokenRequest{
  1344. String? userGroupCode;
  1345. GetUserGroupRequest({
  1346. this.userGroupCode,
  1347. String? token,
  1348. }) : super(
  1349. token: token,
  1350. );
  1351. factory GetUserGroupRequest.fromJson(Map<String, dynamic> map) {
  1352. return GetUserGroupRequest(
  1353. userGroupCode: map['UserGroupCode'],
  1354. token: map['Token'],
  1355. );
  1356. }
  1357. Map<String, dynamic> toJson() {
  1358. final map = super.toJson();
  1359. if (userGroupCode != null)
  1360. map['UserGroupCode'] = userGroupCode;
  1361. return map;
  1362. }
  1363. }
  1364. class GetGroupUserInfosRequest extends PageRequest{
  1365. String? keyword;
  1366. String? userGroupCode;
  1367. String? languageCode;
  1368. GetGroupUserInfosRequest({
  1369. this.keyword,
  1370. this.userGroupCode,
  1371. this.languageCode,
  1372. int pageIndex = 0,
  1373. int pageSize = 0,
  1374. String? token,
  1375. }) : super(
  1376. pageIndex: pageIndex,
  1377. pageSize: pageSize,
  1378. token: token,
  1379. );
  1380. factory GetGroupUserInfosRequest.fromJson(Map<String, dynamic> map) {
  1381. return GetGroupUserInfosRequest(
  1382. keyword: map['Keyword'],
  1383. userGroupCode: map['UserGroupCode'],
  1384. languageCode: map['LanguageCode'],
  1385. pageIndex: map['PageIndex'],
  1386. pageSize: map['PageSize'],
  1387. token: map['Token'],
  1388. );
  1389. }
  1390. Map<String, dynamic> toJson() {
  1391. final map = super.toJson();
  1392. if (keyword != null)
  1393. map['Keyword'] = keyword;
  1394. if (userGroupCode != null)
  1395. map['UserGroupCode'] = userGroupCode;
  1396. if (languageCode != null)
  1397. map['LanguageCode'] = languageCode;
  1398. return map;
  1399. }
  1400. }
  1401. class GetGroupDeviceInfosRequest extends PageRequest{
  1402. String? keyword;
  1403. String? userGroupCode;
  1404. String? languageCode;
  1405. GetGroupDeviceInfosRequest({
  1406. this.keyword,
  1407. this.userGroupCode,
  1408. this.languageCode,
  1409. int pageIndex = 0,
  1410. int pageSize = 0,
  1411. String? token,
  1412. }) : super(
  1413. pageIndex: pageIndex,
  1414. pageSize: pageSize,
  1415. token: token,
  1416. );
  1417. factory GetGroupDeviceInfosRequest.fromJson(Map<String, dynamic> map) {
  1418. return GetGroupDeviceInfosRequest(
  1419. keyword: map['Keyword'],
  1420. userGroupCode: map['UserGroupCode'],
  1421. languageCode: map['LanguageCode'],
  1422. pageIndex: map['PageIndex'],
  1423. pageSize: map['PageSize'],
  1424. token: map['Token'],
  1425. );
  1426. }
  1427. Map<String, dynamic> toJson() {
  1428. final map = super.toJson();
  1429. if (keyword != null)
  1430. map['Keyword'] = keyword;
  1431. if (userGroupCode != null)
  1432. map['UserGroupCode'] = userGroupCode;
  1433. if (languageCode != null)
  1434. map['LanguageCode'] = languageCode;
  1435. return map;
  1436. }
  1437. }
  1438. class GetGroupOrganizationsRequest extends PageRequest{
  1439. String? keyword;
  1440. String? userGroupCode;
  1441. String? languageCode;
  1442. GetGroupOrganizationsRequest({
  1443. this.keyword,
  1444. this.userGroupCode,
  1445. this.languageCode,
  1446. int pageIndex = 0,
  1447. int pageSize = 0,
  1448. String? token,
  1449. }) : super(
  1450. pageIndex: pageIndex,
  1451. pageSize: pageSize,
  1452. token: token,
  1453. );
  1454. factory GetGroupOrganizationsRequest.fromJson(Map<String, dynamic> map) {
  1455. return GetGroupOrganizationsRequest(
  1456. keyword: map['Keyword'],
  1457. userGroupCode: map['UserGroupCode'],
  1458. languageCode: map['LanguageCode'],
  1459. pageIndex: map['PageIndex'],
  1460. pageSize: map['PageSize'],
  1461. token: map['Token'],
  1462. );
  1463. }
  1464. Map<String, dynamic> toJson() {
  1465. final map = super.toJson();
  1466. if (keyword != null)
  1467. map['Keyword'] = keyword;
  1468. if (userGroupCode != null)
  1469. map['UserGroupCode'] = userGroupCode;
  1470. if (languageCode != null)
  1471. map['LanguageCode'] = languageCode;
  1472. return map;
  1473. }
  1474. }
  1475. class GetUserGroupRecordPagesRequest extends PageRequest{
  1476. String? keyword;
  1477. String? userGroupCode;
  1478. DateTime? startDate;
  1479. DateTime? endDate;
  1480. List<String>? organizationCodes;
  1481. List<String>? deviceCodes;
  1482. RecordProcessStateEnum recordProcessState;
  1483. String? language;
  1484. GetUserGroupRecordPagesRequest({
  1485. this.keyword,
  1486. this.userGroupCode,
  1487. this.startDate,
  1488. this.endDate,
  1489. this.organizationCodes,
  1490. this.deviceCodes,
  1491. this.recordProcessState = RecordProcessStateEnum.All,
  1492. this.language,
  1493. int pageIndex = 0,
  1494. int pageSize = 0,
  1495. String? token,
  1496. }) : super(
  1497. pageIndex: pageIndex,
  1498. pageSize: pageSize,
  1499. token: token,
  1500. );
  1501. factory GetUserGroupRecordPagesRequest.fromJson(Map<String, dynamic> map) {
  1502. return GetUserGroupRecordPagesRequest(
  1503. keyword: map['Keyword'],
  1504. userGroupCode: map['UserGroupCode'],
  1505. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  1506. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  1507. organizationCodes: map['OrganizationCodes']?.cast<String>().toList(),
  1508. deviceCodes: map['DeviceCodes']?.cast<String>().toList(),
  1509. recordProcessState: RecordProcessStateEnum.values.firstWhere((e) => e.index == map['RecordProcessState']),
  1510. language: map['Language'],
  1511. pageIndex: map['PageIndex'],
  1512. pageSize: map['PageSize'],
  1513. token: map['Token'],
  1514. );
  1515. }
  1516. Map<String, dynamic> toJson() {
  1517. final map = super.toJson();
  1518. if (keyword != null)
  1519. map['Keyword'] = keyword;
  1520. if (userGroupCode != null)
  1521. map['UserGroupCode'] = userGroupCode;
  1522. if (startDate != null)
  1523. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  1524. if (endDate != null)
  1525. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  1526. if (organizationCodes != null)
  1527. map['OrganizationCodes'] = organizationCodes;
  1528. if (deviceCodes != null)
  1529. map['DeviceCodes'] = deviceCodes;
  1530. map['RecordProcessState'] = recordProcessState.index;
  1531. if (language != null)
  1532. map['Language'] = language;
  1533. return map;
  1534. }
  1535. }
  1536. class PackagesDTO extends BaseDTO{
  1537. String? code;
  1538. String? name;
  1539. String? version;
  1540. String? uniquedCode;
  1541. String? description;
  1542. String? fileUrl;
  1543. int fileSize;
  1544. String? uploadUserCode;
  1545. String? uploadUserName;
  1546. PackagesDTO({
  1547. this.code,
  1548. this.name,
  1549. this.version,
  1550. this.uniquedCode,
  1551. this.description,
  1552. this.fileUrl,
  1553. this.fileSize = 0,
  1554. this.uploadUserCode,
  1555. this.uploadUserName,
  1556. DateTime? createTime,
  1557. DateTime? updateTime,
  1558. }) : super(
  1559. createTime: createTime,
  1560. updateTime: updateTime,
  1561. );
  1562. factory PackagesDTO.fromJson(Map<String, dynamic> map) {
  1563. return PackagesDTO(
  1564. code: map['Code'],
  1565. name: map['Name'],
  1566. version: map['Version'],
  1567. uniquedCode: map['UniquedCode'],
  1568. description: map['Description'],
  1569. fileUrl: map['FileUrl'],
  1570. fileSize: map['FileSize'],
  1571. uploadUserCode: map['UploadUserCode'],
  1572. uploadUserName: map['UploadUserName'],
  1573. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1574. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1575. );
  1576. }
  1577. Map<String, dynamic> toJson() {
  1578. final map = super.toJson();
  1579. if (code != null)
  1580. map['Code'] = code;
  1581. if (name != null)
  1582. map['Name'] = name;
  1583. if (version != null)
  1584. map['Version'] = version;
  1585. if (uniquedCode != null)
  1586. map['UniquedCode'] = uniquedCode;
  1587. if (description != null)
  1588. map['Description'] = description;
  1589. if (fileUrl != null)
  1590. map['FileUrl'] = fileUrl;
  1591. map['FileSize'] = fileSize;
  1592. if (uploadUserCode != null)
  1593. map['UploadUserCode'] = uploadUserCode;
  1594. if (uploadUserName != null)
  1595. map['UploadUserName'] = uploadUserName;
  1596. return map;
  1597. }
  1598. }
  1599. class GetPackageByUniquedCodeRequest {
  1600. String? uniquedCode;
  1601. String? ipAddress;
  1602. GetPackageByUniquedCodeRequest({
  1603. this.uniquedCode,
  1604. this.ipAddress,
  1605. });
  1606. factory GetPackageByUniquedCodeRequest.fromJson(Map<String, dynamic> map) {
  1607. return GetPackageByUniquedCodeRequest(
  1608. uniquedCode: map['UniquedCode'],
  1609. ipAddress: map['IpAddress'],
  1610. );
  1611. }
  1612. Map<String, dynamic> toJson() {
  1613. final map = Map<String, dynamic>();
  1614. if (uniquedCode != null) {
  1615. map['UniquedCode'] = uniquedCode;
  1616. }
  1617. if (ipAddress != null) {
  1618. map['IpAddress'] = ipAddress;
  1619. }
  1620. return map;
  1621. }
  1622. }
  1623. class AddOrUpdatePackageRequest extends TokenRequest{
  1624. PackagesDTO? packageInfo;
  1625. AddOrUpdatePackageRequest({
  1626. this.packageInfo,
  1627. String? token,
  1628. }) : super(
  1629. token: token,
  1630. );
  1631. factory AddOrUpdatePackageRequest.fromJson(Map<String, dynamic> map) {
  1632. return AddOrUpdatePackageRequest(
  1633. packageInfo: map['PackageInfo'] != null ? PackagesDTO.fromJson(map['PackageInfo']) : null,
  1634. token: map['Token'],
  1635. );
  1636. }
  1637. Map<String, dynamic> toJson() {
  1638. final map = super.toJson();
  1639. if (packageInfo != null)
  1640. map['PackageInfo'] = packageInfo;
  1641. return map;
  1642. }
  1643. }