프로젝트

일반

사용자정보

개정판 b048d967

IDb048d967f82bb991cb030a8eea026776876c3a99
상위 0860c756
하위 5483ff95

함의성이(가) 5년 이상 전에 추가함

issue #000: add find code table item, match exactly same

Change-Id: If36994c70a8624eb34106bd86258b6ba8fb0f09f

차이점 보기:

DTI_PID/DTI_PID/CodeTables.py
38 38

  
39 39
            return None
40 40

  
41
    def find_match_exactly(self, text):
42
        for value in self.values:
43
            if text == value[1]:
44
                return value[1]
45
            else:
46
                matches = [x for x in value[3] if x and text == x]
47
                if matches: return value[1]
48

  
41 49
    @staticmethod
42 50
    def instance(table_name):
43 51
        """ return instance has given table name """
DTI_PID/DTI_PID/TextItemFactory.py
314 314
    def isTagNoText(self, text):
315 315
        from CodeTables import CodeTable
316 316

  
317
        found = CodeTable.instance('EqpTagNames').find_starts_with(text)
317
        found = CodeTable.instance('EqpTagNames').find_match_exactly(text)
318 318

  
319 319
        return True if found else False
320 320

  
......
324 324
        """
325 325
        from CodeTables import CodeTable
326 326

  
327
        found = CodeTable.instance('ValveOperCodes').find_starts_with(text)
327
        found = CodeTable.instance('ValveOperCodes').find_match_exactly(text)
328 328

  
329 329
        return True if found else False
330 330

  
......
332 332
        """ check if given text is reserved words """
333 333
        from CodeTables import CodeTable
334 334

  
335
        found = CodeTable.instance('ReservedWords').find_starts_with(text)
335
        found = CodeTable.instance('ReservedWords').find_match_exactly(text)
336 336

  
337 337
        return True if found else False

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)