Commit 4e2dbeb7 authored by David黄金龙's avatar David黄金龙

Merge commit '61b406fd' into davidhuang

* commit '61b406fd':
  // 家庭信息
  // 家庭成员
  家庭信息
  // 家庭成员
parents 0f083f6c 61b406fd
......@@ -95,12 +95,12 @@ class YHChildBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
let item07 = YHFormDetailItem(type: .birthCity)
if child.isBirthOverSeas() {
item07.value = child.birthPlace?.foreign
item07.value = child.birthPlace.foreign
item07.placeHolder = "请输入".local
item07.tips = "请输入出生城市".local
} else {
item07.value = child.birthPlace?.area?.joined(separator: ",")
item07.value = child.birthPlace.area.joined(separator: ",")
item07.placeHolder = "请选择出生城市".local
item07.tips = "请选择出生城市".local
}
......@@ -270,19 +270,19 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
guard let self = self else { return }
if detailItem.type == .childName {
self.child?.subsetName = text
self.child?.subsetName = text ?? ""
} else if detailItem.type == .everName {
self.child?.usedName = text
self.child?.usedName = text ?? ""
} else if detailItem.type == .befourMarryFirstName {
self.child?.surname = text
self.child?.surname = text ?? ""
} else if detailItem.type == .birthCity {
self.child?.birthPlace?.foreign = text
self.child?.birthPlace.foreign = text ?? ""
} else if detailItem.type == .occupationName {
self.child?.occupationName = text
self.child?.occupationName = text ?? ""
} else if detailItem.type == .hkIdentityCardNumber {
self.child?.hkIdentityCard = text
......@@ -457,7 +457,7 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.child?.birthPlace?.area = [string2, string3, string4]
self.child?.birthPlace.area = [string2, string3, string4]
self.loadBasicInfo()
if let delegate = delegate {
delegate.saveInfo?()
......
......@@ -83,37 +83,35 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
if !child.isLiveTother() { // 不同住 才需填写国家/地区
let item21 = YHFormDetailItem(type: .nationOrArea)
item21.value = child.address?.country
item21.value = child.address.country
item21.placeHolder = "请选择".local
arr2.append(item21)
// 国家/地区已填写 才显示现居住城市和详细地址两行
if let address = child.address {
if let country = address.country, !country.isEmpty {
if !child.address.country.isEmpty {
// 居住信息中选择中国才会显示现居住城市
let isLiveInChina = country.contains("中国".local)
if isLiveInChina {
let item22 = YHFormDetailItem(type: .liveCity)
if let area = address.area {
item22.value = area.joined(separator: "/")
}
item22.placeHolder = "请选择城市".local
arr2.append(item22)
}
let item23 = YHFormDetailItem(type: .detailAddress)
item23.value = address.details
item23.placeHolder = (isLiveInChina ? "请填写小区、楼栋、单元室等".local : "请填写国外居住地".local)
arr2.append(item23)
if !isLiveInChina {// 在国外
// 是否在海外居住满1年及以上
let item24 = YHFormDetailItem(type: .isLiveOverSeasMore1Year)
item24.value = String(child.isOverSeasOver1Year())
arr2.append(item24)
// 居住信息中选择中国才会显示现居住城市
let isLiveInChina = child.address.country.contains("中国".local)
if isLiveInChina {
let item22 = YHFormDetailItem(type: .liveCity)
if !child.address.area.isEmpty {
item22.value = child.address.area.joined(separator: "/")
}
item22.placeHolder = "请选择城市".local
arr2.append(item22)
}
let item23 = YHFormDetailItem(type: .detailAddress)
item23.value = child.address.details
item23.placeHolder = (isLiveInChina ? "请填写小区、楼栋、单元室等".local : "请填写国外居住地".local)
arr2.append(item23)
if !isLiveInChina {// 在国外
// 是否在海外居住满1年及以上
let item24 = YHFormDetailItem(type: .isLiveOverSeasMore1Year)
item24.value = String(child.isOverSeasOver1Year())
arr2.append(item24)
}
}
}
......@@ -254,9 +252,9 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .isLiveTother { // 是否与主申请人同住
self.child?.setLiveTother(option)
if option {
self.child?.address?.country = nil
self.child?.address?.details = nil
self.child?.address?.area = nil
self.child?.address.country = ""
self.child?.address.details = ""
self.child?.address.area = []
}
} else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上
self.child?.setOverSearsOver1Year(option)
......@@ -289,7 +287,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
if detailItem.type == .detailAddress {
self.child?.address?.details = text
self.child?.address.details = text ?? ""
}
if isEditEnd {
......@@ -384,7 +382,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
self.child?.nationality = country
} else if title.type == .liveInfo {
self.child?.address?.country = country
self.child?.address.country = country
}
self.loadChildInfo()
......@@ -398,7 +396,7 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.child?.address?.area = [string2, string3, string4]
self.child?.address.area = [string2, string3, string4]
self.loadChildInfo()
}
self.present(vc, animated: true)
......@@ -450,13 +448,13 @@ extension YHChildPrimaryInfoVC {
if isEmptyString(child.nationality) {
return false
}
if isEmptyString(child.address?.country) {
if isEmptyString(child.address.country) {
return false
}
if isEmptyString(child.address?.details) {
if isEmptyString(child.address.details) {
return false
}
if child.isBirthOverSeas(), isEmptyArray(child.address?.area) {
if child.isBirthOverSeas(), isEmptyArray(child.address.area) {
return false
}
return true
......
......@@ -108,12 +108,12 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
let item05 = YHFormDetailItem(type: .birthCity)
if spouse.isBirthOverSeas() {
item05.value = spouse.birthPlace?.foreign
item05.value = spouse.birthPlace.foreign
item05.placeHolder = "请输入".local
item05.tips = "请输入出生城市".local
} else {
item05.value = spouse.birthPlace?.area?.joined(separator: ",")
item05.value = spouse.birthPlace.area.joined(separator: ",")
item05.placeHolder = "请选择".local
item05.tips = "请选择出生城市".local
......@@ -147,8 +147,8 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
var arr2:[YHFormItemProtocol] = [title2, item20]
if spouse.isHaveDegree() { // 选择了有学位
if let degreeArr = spouse.hasDegreeJson, !degreeArr.isEmpty {
for degreeInfo in degreeArr {
if !spouse.hasDegreeJson.isEmpty {
for degreeInfo in spouse.hasDegreeJson {
let item = YHFormDetailItem(type: .degreeDetailInfo)
arr2.append(item)
}
......@@ -215,12 +215,12 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
}
if spouse.isBirthOverSeas() {
if isEmptyString(spouse.birthPlace?.foreign) {
if isEmptyString(spouse.birthPlace.foreign) {
return false
}
} else {
if isEmptyArray(spouse.birthPlace?.area) {
if isEmptyArray(spouse.birthPlace.area) {
return false
}
}
......@@ -233,8 +233,8 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
}
if spouse.isHaveDegree() { // 选择了有学位
if let degreeArr = spouse.hasDegreeJson, !degreeArr.isEmpty {
for degreeInfo in degreeArr {
if !spouse.hasDegreeJson.isEmpty {
for degreeInfo in spouse.hasDegreeJson {
if isEmptyString(degreeInfo.degree) || isEmptyString(degreeInfo.address) {
return false
}
......@@ -348,7 +348,7 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] in
guard let self = self else { return }
let newDegree = YHHasDegreeJson()
self.spouse?.hasDegreeJson?.append(newDegree)
self.spouse?.hasDegreeJson.append(newDegree)
self.loadBasicInfo()
}
return cell
......@@ -380,15 +380,15 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
if detailItem.type == .spouseName {
self.spouse?.subsetName = text
self.spouse?.subsetName = text ?? ""
} else if detailItem.type == .everName {
self.spouse?.usedName = text
self.spouse?.usedName = text ?? ""
} else if detailItem.type == .befourMarryFirstName {
self.spouse?.surname = text
self.spouse?.surname = text ?? ""
} else if detailItem.type == .birthCity {
self.spouse?.birthPlace?.foreign = text
self.spouse?.birthPlace.foreign = text ?? ""
} else if detailItem.type == .occupationName {
self.spouse?.occupationName = text
self.spouse?.occupationName = text ?? ""
} else if detailItem.type == .hkIdentityCardNumber {
self.spouse?.hkIdentityCard = text
}
......@@ -481,8 +481,8 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
// 前两行是 学历学位信息标题 和 是否拥有学位
cell.showDeleteBtn(indexPath.row > 2)
if let degree = degreeInfo.degree {
if let degreeIndex = Int(degree), let subType = YHPickerViewDegreeType(rawValue: degreeIndex) {
if !degreeInfo.degree.isEmpty {
if let degreeIndex = Int(degreeInfo.degree), let subType = YHPickerViewDegreeType(rawValue: degreeIndex) {
cell.degree = YHFormPickerViewSubType.degree(subType).title
} else {
cell.degree = ""
......@@ -490,8 +490,8 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
} else {
cell.degree = ""
}
if let address = degreeInfo.address {
if let addressIndex = Int(address), let subType = YHPickerViewDegreeLocationType(rawValue: addressIndex) {
if !degreeInfo.address.isEmpty {
if let addressIndex = Int(degreeInfo.address), let subType = YHPickerViewDegreeLocationType(rawValue: addressIndex) {
cell.degreePlace = YHFormPickerViewSubType.degreeLocation(subType).title
} else {
cell.degreePlace = ""
......@@ -516,7 +516,7 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.deleteBlock = {
[weak self] in
guard let self = self else { return }
self.spouse?.hasDegreeJson?.remove(at: indexPath.row-2)
self.spouse?.hasDegreeJson.remove(at: indexPath.row-2)
self.loadBasicInfo()
}
}
......@@ -615,7 +615,7 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.spouse?.birthPlace?.area = [string2, string3, string4]
self.spouse?.birthPlace.area = [string2, string3, string4]
self.loadBasicInfo()
}
self.present(vc, animated: true)
......
......@@ -173,38 +173,51 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
}
extension YHSpouseInfoContainerVC {
func saveInfo() {
func saveInfo(isSubmit:Bool, callBack:((Bool, String?)->Void)?) {
guard let spouse = spouse else { return }
guard let info = spouse.toDictionary() else { return }
let dict:[String: Any] = ["orderId":spouse.orderId,
"relation":spouse.relationType.rawValue,
let dict:[String: Any] = ["order_id":spouse.orderId,
"relation":spouse.relation,
"step":spouse.step,
"next":false,
"next":isSubmit,
"info":info]
self.familyRequest.addOrSaveFamilyMember(params:dict) { [weak self] success, error in
guard let self = self else { return }
if success {
if let callBack = callBack {
callBack(success, error?.errorMsg)
}
}
}
func saveInfo() {
saveInfo(isSubmit: false, callBack:nil)
}
func submit() {
if let targetVC = getCurrentStepViewController() {
if targetVC.nextStep() {
// 当前步骤已是最后一步
if let vc = stepVCs.last, vc.step == currentStep {
YHHUD.flash(message: "已经是最后一步!")
return
}
if let cur = getArrayIndexOfCurrentStep(), let item = stepVCs[safe:cur+1] {
currentStep = item.step
saveInfo(isSubmit: true) {
[weak self] success, tips in
guard let self = self else { return }
if success {
// 当前步骤已是最后一步
if let vc = stepVCs.last, vc.step == currentStep {
YHHUD.flash(message: "已经是最后一步!")
return
}
if let cur = getArrayIndexOfCurrentStep(), let item = stepVCs[safe:cur+1] {
currentStep = item.step
}
print("currentIndex:\(currentStep)")
}
}
print("currentIndex:\(currentStep)")
}
}
}
......
......@@ -79,40 +79,38 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
if !spouse.isLiveTother() { // 不同住 才需填写国家/地区
let item21 = YHFormDetailItem(type: .nationOrArea)
item21.value = spouse.address?.country
item21.value = spouse.address.country
item21.placeHolder = "请选择".local
item21.tips = "请选择国家/地区".local
arr2.append(item21)
// 国家/地区已填写 才显示现居住城市和详细地址两行
if let address = spouse.address {
if let country = address.country, !country.isEmpty {
// 居住信息中选择中国才会显示现居住城市
let isLiveInChina = country.contains("中国".local)
if isLiveInChina {
let item22 = YHFormDetailItem(type: .liveCity)
if let area = address.area {
item22.value = area.joined(separator: "/")
}
item22.placeHolder = "请选择城市".local
item22.tips = "请请选择城市".local
arr2.append(item22)
}
let item23 = YHFormDetailItem(type: .detailAddress)
item23.value = address.details
item23.placeHolder = (isLiveInChina ? "请填写小区、楼栋、单元室等".local : "请填写国外居住地".local)
item23.tips = (isLiveInChina ? "请填写小区、楼栋、单元室等".local : "请填写国外居住地".local)
arr2.append(item23)
if !isLiveInChina {// 在国外
// 是否在海外居住满1年及以上
let item24 = YHFormDetailItem(type: .isLiveOverSeasMore1Year)
item24.value = String(spouse.isOverSeasOver1Year())
arr2.append(item24)
if !spouse.address.country.isEmpty {
// 居住信息中选择中国才会显示现居住城市
let isLiveInChina = spouse.address.country.contains("中国".local)
if isLiveInChina {
let item22 = YHFormDetailItem(type: .liveCity)
if !spouse.address.area.isEmpty {
item22.value = spouse.address.area.joined(separator: "/")
}
item22.placeHolder = "请选择城市".local
item22.tips = "请请选择城市".local
arr2.append(item22)
}
let item23 = YHFormDetailItem(type: .detailAddress)
item23.value = spouse.address.details
item23.placeHolder = (isLiveInChina ? "请填写小区、楼栋、单元室等".local : "请填写国外居住地".local)
item23.tips = (isLiveInChina ? "请填写小区、楼栋、单元室等".local : "请填写国外居住地".local)
arr2.append(item23)
if !isLiveInChina {// 在国外
// 是否在海外居住满1年及以上
let item24 = YHFormDetailItem(type: .isLiveOverSeasMore1Year)
item24.value = String(spouse.isOverSeasOver1Year())
arr2.append(item24)
}
}
}
......@@ -210,9 +208,9 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .isLiveTother { // 是否与主申请人同住
self.spouse?.setLiveTother(option)
if option {
self.spouse?.address?.country = nil
self.spouse?.address?.details = nil
self.spouse?.address?.area = nil
self.spouse?.address.country = ""
self.spouse?.address.details = ""
self.spouse?.address.area = []
}
self.loadSponseInfo()
......@@ -248,7 +246,7 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.textChange = {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
self.spouse?.address?.details = text
self.spouse?.address.details = text ?? ""
if isEditEnd {
self.loadSponseInfo()
if let delegate = delegate {
......@@ -338,7 +336,7 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
self.spouse?.nationality = country
} else if title.type == .liveInfo {
self.spouse?.address?.country = country
self.spouse?.address.country = country
}
self.loadSponseInfo()
......@@ -352,7 +350,7 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.spouse?.address?.area = [string2, string3, string4]
self.spouse?.address.area = [string2, string3, string4]
self.loadSponseInfo()
}
self.present(vc, animated: true)
......@@ -389,13 +387,13 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
if isEmptyString(spouse.nationality) {
return false
}
if isEmptyString(spouse.address?.country) {
if isEmptyString(spouse.address.country) {
return false
}
if isEmptyString(spouse.address?.details) {
if isEmptyString(spouse.address.details) {
return false
}
if spouse.isBirthOverSeas(), isEmptyArray(spouse.address?.area) {
if spouse.isBirthOverSeas(), isEmptyArray(spouse.address.area) {
return false
}
return true
......
......@@ -98,10 +98,10 @@ class YHBrotherInfoVC: YHBaseViewController {
let item13 = YHFormDetailItem(type: .birthCity)
if brotherInfo.isBirthOverSeas() {
item13.value = brotherInfo.birthPlace?.foreign
item13.value = brotherInfo.birthPlace.foreign
item13.placeHolder = "请输入".local
} else {
item13.value = brotherInfo.birthPlace?.area?.joined(separator: ",")
item13.value = brotherInfo.birthPlace.area.joined(separator: ",")
item13.placeHolder = "请选择".local
}
......@@ -237,16 +237,16 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
if detailItem.type == .brotherName {
self.brotherInfo?.subsetName = text
self.brotherInfo?.subsetName = text ?? ""
} else if detailItem.type == .birthCity {
self.brotherInfo?.birthPlace?.foreign = text
self.brotherInfo?.birthPlace.foreign = text ?? ""
} else if detailItem.type == .occupationName {
self.brotherInfo?.occupationName = text
self.brotherInfo?.occupationName = text ?? ""
} else if detailItem.type == .hkIdentityCardNumber {
self.brotherInfo?.hkIdentityCard = text
self.brotherInfo?.hkIdentityCard = text ?? ""
}
if isEditEnd {
......@@ -414,7 +414,7 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.brotherInfo?.birthPlace?.area = [string2, string3, string4]
self.brotherInfo?.birthPlace.area = [string2, string3, string4]
self.loadBasicInfo()
self.saveInfo()
}
......
......@@ -401,8 +401,8 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
if (indexPath.row-1 >= childCount) { return }
guard let child = self.familyMemberInfo?.child?[indexPath.row-1] else { return }
var name = String(format: "子女%d", indexPath.row)
if let subsetName = detailItem.subsetName, !subsetName.isEmpty {
name += "(\(subsetName))"
if !detailItem.subsetName.isEmpty {
name += "(\(detailItem.subsetName))"
}
let msg = String(format: "确定要删除%@吗?".local, name)
......@@ -429,8 +429,8 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
if (indexPath.row-1 >= brotherCount) { return }
guard let brother = self.familyMemberInfo?.brother?[indexPath.row-1] else { return }
var name = String(format: "兄弟姐妹%d", indexPath.row)
if let subsetName = detailItem.subsetName, !subsetName.isEmpty {
name += "(\(subsetName))"
if !detailItem.subsetName.isEmpty {
name += "(\(detailItem.subsetName))"
}
let msg = String(format: "确定要删除%@吗?".local, name)
......
......@@ -125,11 +125,11 @@ class YHParentInfoVC: YHBaseViewController {
let item13 = YHFormDetailItem(type: .birthCity)
if parentInfo.isBirthOverSeas() {
item13.value = parentInfo.birthPlace?.foreign
item13.value = parentInfo.birthPlace.foreign
item13.placeHolder = "请输入".local
item13.tips = "请输入城市".local
} else {
item13.value = parentInfo.birthPlace?.area?.joined(separator: ",")
item13.value = parentInfo.birthPlace.area.joined(separator: ",")
item13.placeHolder = "请选择".local
item13.tips = "请选择城市".local
......@@ -297,13 +297,13 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
if detailItem.type == .fatherName || detailItem.type == .motherName {
self.parentInfo?.subsetName = text
self.parentInfo?.subsetName = text ?? ""
} else if detailItem.type == .birthCity {
self.parentInfo?.birthPlace?.foreign = text
self.parentInfo?.birthPlace.foreign = text ?? ""
} else if detailItem.type == .occupationName {
self.parentInfo?.occupationName = text
self.parentInfo?.occupationName = text ?? ""
} else if detailItem.type == .hkIdentityCardNumber {
self.parentInfo?.hkIdentityCard = text
......@@ -471,7 +471,7 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
print("\(string1)\n\(string2)\n\(string3)\n\(string4)")
self.parentInfo?.birthPlace?.area = [string2, string3, string4]
self.parentInfo?.birthPlace.area = [string2, string3, string4]
self.loadBasicInfo()
}
self.present(vc, animated: true)
......@@ -540,11 +540,11 @@ extension YHParentInfoVC {
if parentInfo.isBirthOverSeas() {
if isEmptyString(parentInfo.birthPlace?.foreign) {
if isEmptyString(parentInfo.birthPlace.foreign) {
return false
}
} else {
if isEmptyArray(parentInfo.birthPlace?.area) {
if isEmptyArray(parentInfo.birthPlace.area) {
return false
}
}
......
......@@ -882,43 +882,43 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
var id: Int = 0
var deceased: Int = 0
var custody: Int = 0
var nationality: String?
var nationality: String = ""
var orderId: Int = 0
var relation: String?
var hasDegree: String?
var hasDegreeJson: [YHHasDegreeJson]?
var relation: String = ""
var hasDegree: String = ""
var hasDegreeJson: [YHHasDegreeJson] = []
var follow: Int = 0
var statement: Int = 0
var subsetName: String?
var subsetNamePinyin: YHSubsetNamePinyin?
var birthday: String?
var subsetName: String = ""
var subsetNamePinyin: YHSubsetNamePinyin = YHSubsetNamePinyin()
var birthday: String = ""
var birthPlaceAboard: Int = 0
var birthPlace: YHAddress? = YHAddress()
var occupation: String?
var occupationName: String?
var operatorName: String?
var birthPlace: YHAddress = YHAddress()
var occupation: String = ""
var occupationName: String = ""
var operatorName: String = ""
var childHasHkId: YHChildStepchildClass = YHChildStepchildClass()
var hkIdentityCard: String?
var sex: Int = 0
var married: String?
var married: String = ""
var nows: Int = 0
var address: YHAddress?
var address: YHAddress = YHAddress()
var childStepchild: YHChildStepchildClass = YHChildStepchildClass()
var childInHk: YHChildStepchildClass = YHChildStepchildClass()
var countryIdentity: YHChildStepchildClass?
var hkIdentity: String?
var liveCountry: String?
var countryIdentity: YHChildStepchildClass = YHChildStepchildClass()
var hkIdentity: String = ""
var liveCountry: String = ""
var finishFollow: Int = 0
var step: Int = 0
var isHandled: Int = 0
var notFillNumber: Int = 0
var certificates: YHCertificates?
var usedName: String?
var hkIdentityOther: String?
var usedName: String = ""
var hkIdentityOther: String = ""
var isHkHandled: Int = 0
var isInHk: Int = 0
var isLiveOverseaYear: Int = 0
var surname: String?
var surname: String = ""
enum CodingKeys: String, CodingKey {
case id = "id"
......@@ -1168,10 +1168,10 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
// MARK: - 居住地址信息 YHAddress
class YHAddress: SmartCodable {
var area: [String]?
var country: String?
var details: String?
var foreign: String?
var area: [String] = []
var country: String = ""
var details: String = ""
var foreign: String = ""
enum CodingKeys: String, CodingKey {
case area = "area"
......@@ -1280,9 +1280,8 @@ class YHCNIdentityCard: SmartCodable {
// MARK: - YHHasDegreeJson
class YHHasDegreeJson: SmartCodable {
var degree: String?
var address: String?
var degree: String = ""
var address: String = ""
enum CodingKeys: String, CodingKey {
case degree = "degree"
......
......@@ -7,7 +7,24 @@
//
import UIKit
import SmartCodable
class TestOne: SmartCodable {
var one: TestTwo = TestTwo()
var next:Int = 0
required init() {
}
}
class TestTwo: SmartCodable {
var id:Int = 1
var name:String = "dy"
required init() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment