|
@@ -4,31 +4,57 @@ import 'package:fis_jsonrpc/utils.dart';
enum ApplyStateEnum {
|
|
|
Passed,
|
|
|
}
|
|
|
|
|
|
+class IdentityApplyStateInfo {
|
|
|
+ String? applyPosition;
|
|
|
+ ApplyStateEnum applyState;
|
|
|
+ String? applyNote;
|
|
|
+ DateTime? createTime;
|
|
|
+ DateTime? updateTime;
|
|
|
+
|
|
|
+ IdentityApplyStateInfo({
|
|
|
+ this.applyPosition,
|
|
|
+ this.applyState=ApplyStateEnum.Applying,
|
|
|
+ this.applyNote,
|
|
|
+ this.createTime,
|
|
|
+ this.updateTime,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory IdentityApplyStateInfo.fromJson(Map<String, dynamic> map) {
|
|
|
+ return IdentityApplyStateInfo(
|
|
|
+ applyPosition: map['ApplyPosition'],
|
|
|
+ applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
|
|
|
+ applyNote: map['ApplyNote'],
|
|
|
+ createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
+ updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(applyPosition != null)
|
|
|
+ map['ApplyPosition'] = applyPosition;
|
|
|
+ map['ApplyState'] = applyState.index;
|
|
|
+ if(applyNote != null)
|
|
|
+ map['ApplyNote'] = applyNote;
|
|
|
+ if(createTime != null)
|
|
|
+ map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
|
|
|
+ if(updateTime != null)
|
|
|
+ map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
class IdentityApplyInfo {
|
|
|
- String? identityApplyCode;
|
|
|
- String? userCode;
|
|
|
- String? realName;
|
|
|
- String? emailAddress;
|
|
|
- String? organizationCode;
|
|
|
String? applyPosition;
|
|
|
List<String>? identityCard;
|
|
|
List<String>? licenseCard;
|
|
|
- ApplyStateEnum applyState;
|
|
|
- String? applyNote;
|
|
|
DateTime? createTime;
|
|
|
DateTime? updateTime;
|
|
|
|
|
|
IdentityApplyInfo({
|
|
|
- this.identityApplyCode,
|
|
|
- this.userCode,
|
|
|
- this.realName,
|
|
|
- this.emailAddress,
|
|
|
- this.organizationCode,
|
|
|
this.applyPosition,
|
|
|
this.identityCard,
|
|
|
this.licenseCard,
|
|
|
- this.applyState=ApplyStateEnum.Applying,
|
|
|
- this.applyNote,
|
|
|
this.createTime,
|
|
|
this.updateTime,
|
|
|
});
|
|
@@ -37,16 +63,9 @@ class IdentityApplyInfo {
|
|
|
final identityCardData = map['IdentityCard'];
|
|
|
final licenseCardData = map['LicenseCard'];
|
|
|
return IdentityApplyInfo(
|
|
|
- identityApplyCode: map['IdentityApplyCode'],
|
|
|
- userCode: map['UserCode'],
|
|
|
- realName: map['RealName'],
|
|
|
- emailAddress: map['EmailAddress'],
|
|
|
- organizationCode: map['OrganizationCode'],
|
|
|
applyPosition: map['ApplyPosition'],
|
|
|
identityCard: identityCardData != null ? (identityCardData as List).map((e) => e as String).toList(): null,
|
|
|
licenseCard: licenseCardData != null ? (licenseCardData as List).map((e) => e as String).toList(): null,
|
|
|
- applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
|
|
|
- applyNote: map['ApplyNote'],
|
|
|
createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
|
|
|
updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
|
|
|
);
|
|
@@ -54,25 +73,12 @@ class IdentityApplyInfo {
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
final map = Map<String, dynamic>();
|
|
|
- if(identityApplyCode != null)
|
|
|
- map['IdentityApplyCode'] = identityApplyCode;
|
|
|
- if(userCode != null)
|
|
|
- map['UserCode'] = userCode;
|
|
|
- if(realName != null)
|
|
|
- map['RealName'] = realName;
|
|
|
- if(emailAddress != null)
|
|
|
- map['EmailAddress'] = emailAddress;
|
|
|
- if(organizationCode != null)
|
|
|
- map['OrganizationCode'] = organizationCode;
|
|
|
if(applyPosition != null)
|
|
|
map['ApplyPosition'] = applyPosition;
|
|
|
if(identityCard != null)
|
|
|
map['IdentityCard'] = identityCard;
|
|
|
if(licenseCard != null)
|
|
|
map['LicenseCard'] = licenseCard;
|
|
|
- map['ApplyState'] = applyState.index;
|
|
|
- if(applyNote != null)
|
|
|
- map['ApplyNote'] = applyNote;
|
|
|
if(createTime != null)
|
|
|
map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
|
|
|
if(updateTime != null)
|