|
|
|
@ -31,11 +31,11 @@ class DeptInfo { |
|
|
|
|
parentID = json['parentID']; |
|
|
|
|
order = json['order']; |
|
|
|
|
departmentType = json['departmentType']; |
|
|
|
|
createTime = json['createTime ']; |
|
|
|
|
subDepartmentNum = json['subDepartmentNum ']; |
|
|
|
|
memberNum = json['memberNum ']; |
|
|
|
|
ex = json['ex ']; |
|
|
|
|
attachedInfo = json['attachedInfo ']; |
|
|
|
|
createTime = json['createTime']; |
|
|
|
|
subDepartmentNum = json['subDepartmentNum']; |
|
|
|
|
memberNum = json['memberNum']; |
|
|
|
|
ex = json['ex']; |
|
|
|
|
attachedInfo = json['attachedInfo']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
@ -46,13 +46,23 @@ class DeptInfo { |
|
|
|
|
data['parentID'] = this.parentID; |
|
|
|
|
data['order'] = this.order; |
|
|
|
|
data['departmentType'] = this.departmentType; |
|
|
|
|
data['createTime '] = this.createTime; |
|
|
|
|
data['subDepartmentNum '] = this.subDepartmentNum; |
|
|
|
|
data['memberNum '] = this.memberNum; |
|
|
|
|
data['ex '] = this.ex; |
|
|
|
|
data['attachedInfo '] = this.attachedInfo; |
|
|
|
|
data['createTime'] = this.createTime; |
|
|
|
|
data['subDepartmentNum'] = this.subDepartmentNum; |
|
|
|
|
data['memberNum'] = this.memberNum; |
|
|
|
|
data['ex'] = this.ex; |
|
|
|
|
data['attachedInfo'] = this.attachedInfo; |
|
|
|
|
return data; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
bool operator ==(Object other) => |
|
|
|
|
identical(this, other) || |
|
|
|
|
other is DeptInfo && |
|
|
|
|
runtimeType == other.runtimeType && |
|
|
|
|
departmentID == other.departmentID; |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
int get hashCode => departmentID.hashCode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class DeptMemberInfo { |
|
|
|
@ -97,20 +107,20 @@ class DeptMemberInfo { |
|
|
|
|
userID = json['userID']; |
|
|
|
|
nickname = json['nickname']; |
|
|
|
|
englishName = json['englishName']; |
|
|
|
|
faceURL = json['faceURL ']; |
|
|
|
|
gender = json['gender ']; |
|
|
|
|
mobile = json['mobile ']; |
|
|
|
|
telephone = json['telephone ']; |
|
|
|
|
birth = json['birth ']; |
|
|
|
|
email = json['email ']; |
|
|
|
|
departmentID = json['departmentID ']; |
|
|
|
|
order = json['order ']; |
|
|
|
|
position = json['position ']; |
|
|
|
|
leader = json['leader ']; |
|
|
|
|
status = json['status ']; |
|
|
|
|
createTime = json['createTime ']; |
|
|
|
|
ex = json['ex ']; |
|
|
|
|
attachedInfo = json['attachedInfo ']; |
|
|
|
|
faceURL = json['faceURL']; |
|
|
|
|
gender = json['gender']; |
|
|
|
|
mobile = json['mobile']; |
|
|
|
|
telephone = json['telephone']; |
|
|
|
|
birth = json['birth']; |
|
|
|
|
email = json['email']; |
|
|
|
|
departmentID = json['departmentID']; |
|
|
|
|
order = json['order']; |
|
|
|
|
position = json['position']; |
|
|
|
|
leader = json['leader']; |
|
|
|
|
status = json['status']; |
|
|
|
|
createTime = json['createTime']; |
|
|
|
|
ex = json['ex']; |
|
|
|
|
attachedInfo = json['attachedInfo']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
@ -118,24 +128,35 @@ class DeptMemberInfo { |
|
|
|
|
data['userID'] = this.userID; |
|
|
|
|
data['nickname'] = this.nickname; |
|
|
|
|
data['englishName'] = this.englishName; |
|
|
|
|
data['faceURL '] = this.faceURL; |
|
|
|
|
data['gender '] = this.gender; |
|
|
|
|
data['mobile '] = this.mobile; |
|
|
|
|
data['telephone '] = this.telephone; |
|
|
|
|
data['birth '] = this.birth; |
|
|
|
|
data['email '] = this.email; |
|
|
|
|
data['departmentID '] = this.departmentID; |
|
|
|
|
data['order '] = this.order; |
|
|
|
|
data['position '] = this.position; |
|
|
|
|
data['leader '] = this.leader; |
|
|
|
|
data['status '] = this.status; |
|
|
|
|
data['createTime '] = this.createTime; |
|
|
|
|
data['ex '] = this.ex; |
|
|
|
|
data['attachedInfo '] = this.attachedInfo; |
|
|
|
|
data['faceURL'] = this.faceURL; |
|
|
|
|
data['gender'] = this.gender; |
|
|
|
|
data['mobile'] = this.mobile; |
|
|
|
|
data['telephone'] = this.telephone; |
|
|
|
|
data['birth'] = this.birth; |
|
|
|
|
data['email'] = this.email; |
|
|
|
|
data['departmentID'] = this.departmentID; |
|
|
|
|
data['order'] = this.order; |
|
|
|
|
data['position'] = this.position; |
|
|
|
|
data['leader'] = this.leader; |
|
|
|
|
data['status'] = this.status; |
|
|
|
|
data['createTime'] = this.createTime; |
|
|
|
|
data['ex'] = this.ex; |
|
|
|
|
data['attachedInfo'] = this.attachedInfo; |
|
|
|
|
return data; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
bool operator ==(Object other) => |
|
|
|
|
identical(this, other) || |
|
|
|
|
other is DeptMemberInfo && |
|
|
|
|
runtimeType == other.runtimeType && |
|
|
|
|
userID == other.userID; |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
int get hashCode => userID.hashCode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// 用户所在的部门 |
|
|
|
|
class UserInDept { |
|
|
|
|
DeptInfo? department; |
|
|
|
|
DeptMemberInfo? member; |
|
|
|
@ -162,6 +183,7 @@ class UserInDept { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// 部门下的子部门跟员工 |
|
|
|
|
class DeptMemberAndSubDept { |
|
|
|
|
List<DeptInfo>? departmentList; |
|
|
|
|
List<DeptMemberInfo>? departmentMemberList; |
|
|
|
|