Commit 6d485f98 authored by David黄金龙's avatar David黄金龙

处理 可能的bug

parent ebc26a6f
...@@ -276,44 +276,44 @@ private extension YHPreviewViewModel { ...@@ -276,44 +276,44 @@ private extension YHPreviewViewModel {
var title = "-" // var title = "-"
if let item = model.location { // if let item = model.location {
if item.country.contains("中国") { // if item.country.contains("中国") {
title = "国内 " // title = "国内 "
if item.area.count > 1 { // if item.area.count > 1 {
title = title + item.area[0] + "/" + item.area[1] // title = title + item.area[0] + "/" + item.area[1]
} // }
} else { // } else {
title = "国外 " + item.country + "-" + item.foreign // title = "国外 " + item.country + "-" + item.foreign
} // }
} // }
//
//
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "入职年月:", answer: model.enter_time) // let tmp7 = YHPreviewQuestionAndAnswerModel(question: "入职年月:", answer: model.enter_time)
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "离职年月:", answer: model.leave_time) // let tmp8 = YHPreviewQuestionAndAnswerModel(question: "离职年月:", answer: model.leave_time)
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "工作证明文件:", answer: model.work_certificate) // let tmp9 = YHPreviewQuestionAndAnswerModel(question: "工作证明文件:", answer: model.work_certificate)
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "职责性质:", answer: model.duty)
title = model.international_work_experience == 0 ? "否" : "是"
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "相关工作是否属国际工作经验:", answer:title)
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "企业人数规模:", answer:String(model.company_member_total))
let tempppp = YHConstantArrayData.getShowNameBy(indexStr: String(model.administrative_level), type: .structure)
let tmp13 = YHPreviewQuestionAndAnswerModel(question: "行政架构层级:", answer:tempppp)
let tmp14 = YHPreviewQuestionAndAnswerModel(question: "下属管理人数:", answer:String(model.company_manage_total))
var ttt = "" // let tmp10 = YHPreviewQuestionAndAnswerModel(question: "职责性质:", answer: model.duty)
if model.turnover == 0 { // title = model.international_work_experience == 0 ? "否" : "是"
ttt = "0" // let tmp11 = YHPreviewQuestionAndAnswerModel(question: "相关工作是否属国际工作经验:", answer:title)
} else { // let tmp12 = YHPreviewQuestionAndAnswerModel(question: "企业人数规模:", answer:String(model.company_member_total))
ttt = String(model.turnover).defaultStringIfEmpty() //
} // let tempppp = YHConstantArrayData.getShowNameBy(indexStr: String(model.administrative_level), type: .structure)
let tmp15 = YHPreviewQuestionAndAnswerModel(question: "公司营业额/港元(近一年):", answer:ttt) // let tmp13 = YHPreviewQuestionAndAnswerModel(question: "行政架构层级:", answer:tempppp)
// let tmp14 = YHPreviewQuestionAndAnswerModel(question: "下属管理人数:", answer:String(model.company_manage_total))
let tempppp0 = YHConstantArrayData.getShowNameBy(indexStr: String(model.professional_level), type: .level) //
let tmp16 = YHPreviewQuestionAndAnswerModel(question: "职业水平类别:", answer:tempppp0) // var ttt = ""
arr1.append(contentsOf: [tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12,tmp13,tmp14,tmp15,tmp16]) // if model.turnover == 0 {
// ttt = "0"
// } else {
// ttt = String(model.turnover).defaultStringIfEmpty()
// }
// let tmp15 = YHPreviewQuestionAndAnswerModel(question: "公司营业额/港元(近一年):", answer:ttt)
//
// let tempppp0 = YHConstantArrayData.getShowNameBy(indexStr: String(model.professional_level), type: .level)
// let tmp16 = YHPreviewQuestionAndAnswerModel(question: "职业水平类别:", answer:tempppp0)
// arr1.append(contentsOf: [tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12,tmp13,tmp14,tmp15,tmp16])
} }
let dataModel1 = YHWorkExpDataModel(title: "", data: arr1) let dataModel1 = YHWorkExpDataModel(title: "", data: arr1)
...@@ -321,45 +321,45 @@ private extension YHPreviewViewModel { ...@@ -321,45 +321,45 @@ private extension YHPreviewViewModel {
var arr2 : [YHPreviewQuestionAndAnswerModel] = [] var arr2 : [YHPreviewQuestionAndAnswerModel] = []
do { do {
//2. //2.
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "公司业务性质/范畴/所属行业:", answer:model.business_nature.defaultStringIfEmpty()) // let tmp1 = YHPreviewQuestionAndAnswerModel(question: "公司业务性质/范畴/所属行业:", answer:model.business_nature.defaultStringIfEmpty())
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "工作职责:", answer:model.wduty) // let tmp2 = YHPreviewQuestionAndAnswerModel(question: "工作职责:", answer:model.wduty)
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "工作亮点:", answer:model.highlights) // let tmp3 = YHPreviewQuestionAndAnswerModel(question: "工作亮点:", answer:model.highlights)
//
arr2.append(contentsOf: [tmp1,tmp2,tmp3]) // arr2.append(contentsOf: [tmp1,tmp2,tmp3])
} }
let dataModel2 = YHWorkExpDataModel(title: "", data: arr2) let dataModel2 = YHWorkExpDataModel(title: "", data: arr2)
var arr3 : [Any] = [] var arr3 : [Any] = []
do { do {
//3.项目介绍 //3.项目介绍
if let items = model.projects,items.isEmpty == false { // if let items = model.projects,items.isEmpty == false {
for(index,item) in items.enumerated() { // for(index,item) in items.enumerated() {
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "项目名称", answer:item.project_name) // let tmp1 = YHPreviewQuestionAndAnswerModel(question: "项目名称", answer:item.project_name)
let title = item.project_start_time + "-" + item.project_end_time // let title = item.project_start_time + "-" + item.project_end_time
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "项目时间", answer:title) // let tmp2 = YHPreviewQuestionAndAnswerModel(question: "项目时间", answer:title)
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "项目业绩/亮点", answer:item.project_highlights) // let tmp3 = YHPreviewQuestionAndAnswerModel(question: "项目业绩/亮点", answer:item.project_highlights)
let arrT : [YHPreviewQuestionAndAnswerModel] = [tmp1,tmp2,tmp3] // let arrT : [YHPreviewQuestionAndAnswerModel] = [tmp1,tmp2,tmp3]
//
//
let addationIndex = list.count > 1 ? String(index + 1) : "" // let addationIndex = list.count > 1 ? String(index + 1) : ""
let dataModelTemp = YHWorkExpDataModel(title: "项目介绍" + addationIndex, data: arrT) // let dataModelTemp = YHWorkExpDataModel(title: "项目介绍" + addationIndex, data: arrT)
arr3.append(dataModelTemp) // arr3.append(dataModelTemp)
} // }
} // }
} }
let dataModel3 = YHWorkExpDataModel(title: "", data: arr3) let dataModel3 = YHWorkExpDataModel(title: "", data: arr3)
var arr4 : [Any] = [] var arr4 : [Any] = []
do { do {
//4.简历/工作总结: //4.简历/工作总结:
if let items = model.file,items.isEmpty == false { // if let items = model.file,items.isEmpty == false {
var arrT : [Any] = [] // var arrT : [Any] = []
for(_,item) in items.enumerated() { // for(_,item) in items.enumerated() {
arrT.append(item) // arrT.append(item)
} // }
let dataModelTemp = YHWorkExpDataModel(title: "简历/工作总结:", data: arrT) // let dataModelTemp = YHWorkExpDataModel(title: "简历/工作总结:", data: arrT)
arr4.append(dataModelTemp) // arr4.append(dataModelTemp)
} // }
} }
let dataModel4 = YHWorkExpDataModel(title: "", data: arr4) let dataModel4 = YHWorkExpDataModel(title: "", data: arr4)
......
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