Commit 2e35e668 authored by Alex朱枝文's avatar Alex朱枝文

在港记录汇总根据后端接口调整重新调整逻辑

parent 19dd8b6d
......@@ -29,8 +29,6 @@ class YHHKRecordsSummaryVC: YHBaseViewController {
view.separatorStyle = .none
view.rowHeight = UITableView.automaticDimension
view.estimatedRowHeight = 52.0
// view.layer.cornerRadius = 6
// view.clipsToBounds = true
view.dataSource = self
view.delegate = self
view.showsVerticalScrollIndicator = false
......@@ -124,25 +122,21 @@ extension YHHKRecordsSummaryVC {
let summaryItem = YHHKRecordItemDetailType.summaryItem("\(item.year)\(item.sum_days)天(\(item.sum_times)次)")
summaryItems.append(summaryItem)
}
var header = ""
var type: YHHKNonPresenceRecordType = .normal
var periodItems: [YHHKRecordItemDetailType] = []
if record.not_in_hk_days >= 90 && record.not_in_hk_days < 180 {
header = "超90天未在港"
type = .over90
//periodItems.append(.detailHeader(header))
} else if record.not_in_hk_days >= 180 {
header = "超180天未在港"
type = .over180
periodItems.append(.detailHeader(header))
}
// 产品定的显示超过180天的详细记录
if record.not_in_hk_days >= 180 {
if record.details.count > 0 {
periodItems.append(.detailHeader("超180天未在港"))
}
record.details.forEach { item in
let duration = YHHKRecordItemDetailType.duration(self.getShortDateString(item.start_date), self.getShortDateString(item.end_date), "\(item.days)天")
periodItems.append(duration)
}
}
let expandedSec1 = YHHKRecordsExpandedSection(title: record.username, type: type, summaryItems: summaryItems, periodItems: periodItems)
let section = YHHKRecordSectionType.expandedItem(expandedSec1)
......
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