""" 中标时间字段检查 """ class BidopentimeChecker(object): """ 中标时间字段检查 """ def __init__(self): self.errors_tables = { "0201": { "name": "发布时间 > 开标时间", "parent_name": "数据范围类型", "parent_code": "02", "checkFn": self.check0201 } } def check0201(self, subtype:str,bidopentime: int, publishtime:int ) -> bool: """ return true 代表返回异常 """ if subtype in ["招标", "邀标", "询价", "竞谈","单一","竞价","变更"]: if bidopentime and publishtime: if bidopentime < publishtime : return True else: return False else: # 两者中有一方为空不判断 return False else: return False