def shouldStartAfter(self):
if self.endDate:
return
tender = get_tender(self)
lot = self.__parent__
if tender.status not in ['active.tendering', 'active.pre-qualification.stand-still', 'active.auction'] or lot.status != 'active':
return
start_after = None
if tender.status == 'active.tendering' and tender.tenderPeriod.endDate:
start_after = calculate_business_date(tender.tenderPeriod.endDate, TENDERING_AUCTION, tender)
elif self.startDate and get_now() > calc_auction_end_time(lot.numberOfBids, self.startDate):
start_after = calc_auction_end_time(lot.numberOfBids, self.startDate)
elif tender.qualificationPeriod and tender.qualificationPeriod.endDate:
decision_dates = [
datetime.combine(complaint.dateDecision.date() + timedelta(days=3), time(0, tzinfo=complaint.dateDecision.tzinfo))
for qualification in tender.qualifications
for complaint in qualification.complaints
if complaint.dateDecision
]
decision_dates.append(tender.qualificationPeriod.endDate)
start_after = max(decision_dates)
if start_after:
return rounding_shouldStartAfter(start_after, tender).isoformat()
models.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录