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

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

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