프로젝트

일반

사용자정보

개정판 705e8bab

ID705e8bab98bad46c5704aaf17a8015376c3d5951
상위 2936baab
하위 7a387d52

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

issue #563: change and add size attrs

Change-Id: Iec759fa3f11f224a55920b8cb20ac5b4710d6862

차이점 보기:

DTI_PID/DTI_PID/Scripts/MSSQL/ID2.sql
2285 2285
INSERT INTO SymbolAttribute (UID,SymbolType_UID,"Attribute",DisplayAttribute,AttributeType,Expression,"index",AttrAt,"Length",Target,Property) VALUES (
2286 2286
'0cd32053-c458-4c39-9b4c-f26bd2d14a05','35','Size','Size','Size Text Item','self.EvaluatedSize',1,0,NULL,'ALL',1);
2287 2287
INSERT INTO SymbolAttribute (UID,SymbolType_UID,"Attribute",DisplayAttribute,AttributeType,Expression,"index",AttrAt,"Length",Target,Property) VALUES (
2288
'805bcf6e-19c7-4b84-82e2-6c5eff48bfcd','36','Main Size','Main Size','Size Text Item','self.EvaluatedMainSize',0,0,NULL,'ALL',1);
2288
'805bcf6e-19c7-4b84-82e2-6c5eff48bfcd','36','Main Size','Main Size','Size Text Item','item.mainSize',0,0,NULL,'ALL',1);
2289 2289
INSERT INTO SymbolAttribute (UID,SymbolType_UID,"Attribute",DisplayAttribute,AttributeType,Expression,"index",AttrAt,"Length",Target,Property) VALUES (
2290
'8c0a0f8c-983a-4eeb-af7a-8c46070c5447','36','Sub Size','Sub Size','Size Text Item','self.EvaluatedSubSize',1,0,NULL,'ALL',1);
2290
'8c0a0f8c-983a-4eeb-af7a-8c46070c5447','36','Sub Size','Sub Size','Size Text Item','item.subSize',1,0,NULL,'ALL',1);
2291 2291
INSERT INTO SymbolAttribute (UID,SymbolType_UID,"Attribute",DisplayAttribute,AttributeType,Expression,"index",AttrAt,"Length",Target,Property) VALUES (
2292 2292
'7c2c7a3c-934c-4a70-98d6-5aece3557596','12','Size','Size','Size Text Item','self.EvaluatedSize',0,0,NULL,'ALL',1);
2293 2293
INSERT INTO SymbolAttribute (UID,SymbolType_UID,"Attribute",DisplayAttribute,AttributeType,Expression,"index",AttrAt,"Length",Target,Property) VALUES (
......
2388 2388
'28c6bda1-e02a-4473-aa71-ee5f45dbbe5b','39','Tag Seq No','Tag Seq No','Tag No','item.text().split('-')[1][:5] if item and '-' in item.text() and len(item.text().split('-')[1]) > 4 else ''',2,0,NULL,'ALL',0);
2389 2389
INSERT INTO SymbolAttribute (UID,SymbolType_UID,"Attribute",DisplayAttribute,AttributeType,Expression,"index",AttrAt,"Length",Target,Property) VALUES (
2390 2390
'258e8b06-21bd-4c5b-901b-7abdbb2d0dca','39','Tag Suffix','Tag Suffix','Tag No','item.text().split('-')[1][5:] if item and '-' in item.text() and len(item.text().split('-')[1]) > 4 else ''',3,0,NULL,'ALL',0);
2391
INSERT INTO SymbolAttribute (UID, SymbolType_UID, "Attribute", DisplayAttribute, AttributeType, Expression, "index", AttrAt, "Length", Target, Property)
2392
VALUES('3cbbffc0-9f60-4d6c-9c64-e5983adac9c0', '22', 'Outlet Size', 'Outlet Size', 'Size Text Item', 'item.mainSize', 3, 0, NULL, 'ALL', 1);
2393
INSERT INTO SymbolAttribute (UID, SymbolType_UID, "Attribute", DisplayAttribute, AttributeType, Expression, "index", AttrAt, "Length", Target, Property)
2394
VALUES('cd89a739-66f8-433a-9043-aa2c9ddcb611', '22', 'Inlet Size', 'Inlet Size', 'Size Text Item', 'item.subSize', 1, 0, NULL, 'ALL', 1);
2395
INSERT INTO SymbolAttribute (UID, SymbolType_UID, "Attribute", DisplayAttribute, AttributeType, Expression, "index", AttrAt, "Length", Target, Property)
2396
VALUES('ea98eb26-f79d-4d15-9c97-4375353c3bc7', '22', 'Size Delimiter', 'Size Delimiter', 'Size Text Item', 'item.sizeDelimiter', 2, 0, NULL, 'ALL', 1);
2397
INSERT INTO SymbolAttribute (UID, SymbolType_UID, "Attribute", DisplayAttribute, AttributeType, Expression, "index", AttrAt, "Length", Target, Property)
2398
VALUES('d863d5b6-0054-4476-8eed-2884dcfdd96f', '22', 'Set Pressure', 'Set Pressure', 'Text Item', 'item.text().replace('' '', '''').replace(''SET'', '''').replace(''@'', '''').replace(''\n'', '''').replace(''Barg'', '''')', 0, 0, NULL, 'ALL', 1);
2391 2399

  
2392 2400

  
2393 2401
CREATE TABLE Attributes (
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py
147 147
                for item in upstream:
148 148
                    if type(item) is QEngineeringReducerItem:
149 149
                        if item.connectors[0].connectedItem is prev:  ### Main Size
150
                            if item.MainSubSize: return item.MainSubSize[0]
150
                            if item.MainSubSize: return item.mainSize[0]
151 151
                        elif item.connectors[1].connectedItem is prev:  ### Sub Size
152
                            if item.MainSubSize: return item.MainSubSize[1]
152
                            if item.MainSubSize: return item.subSize[1]
153 153
                    else:
154 154
                        if item.Size: return item.Size
155 155
                    prev = item
......
159 159
                for item in downstream:
160 160
                    if type(item) is QEngineeringReducerItem:
161 161
                        if item.connectors[0].connectedItem is prev:  ### Main Size
162
                            if item.MainSubSize: return item.MainSubSize[0]
162
                            if item.MainSubSize: return item.mainSize[0]
163 163
                        elif item.connectors[1].connectedItem is prev:  ### Sub Size
164
                            if item.MainSubSize: return item.MainSubSize[1]
164
                            if item.MainSubSize: return item.subSize[1]
165 165
                    else:
166 166
                        if item.Size: return item.Size
167 167
                    prev = item
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py
201 201

  
202 202
        matches = [assoc for assoc in self.associations() if type(assoc) is QEngineeringSizeTextItem]
203 203
        if matches:
204
            return matches[0].text()
204
            return matches[0].mainSize
205 205
        else:
206 206
            return None
207 207

  
......
222 222
                    for item in upstream:
223 223
                        if type(item) is QEngineeringReducerItem:
224 224
                            if item.connectors[0].connectedItem is prev:  ### Main Size
225
                                if item.MainSubSize: return item.MainSubSize[0]
225
                                if item.MainSubSize: return item.mainSize[0]
226 226
                            elif item.connectors[1].connectedItem is prev:  ### Sub Size
227
                                if item.MainSubSize: return item.MainSubSize[1]
227
                                if item.MainSubSize: return item.subSize[1]
228 228
                        else:
229 229
                            if item.Size: return item.Size
230 230
                        prev = item
......
234 234
                    for item in downstream:
235 235
                        if type(item) is QEngineeringReducerItem:
236 236
                            if item.connectors[0].connectedItem is prev:  ### Main Size
237
                                if item.MainSubSize: return item.MainSubSize[0]
237
                                if item.MainSubSize: return item.mainSize[0]
238 238
                            elif item.connectors[1].connectedItem is prev:  ### Sub Size
239
                                if item.MainSubSize: return item.MainSubSize[1]
239
                                if item.MainSubSize: return item.subSize[1]
240 240
                        else:
241 241
                            if item.Size: return item.Size
242 242
                        prev = item

내보내기 Unified diff

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