프로젝트

일반

사용자정보

개정판 4ff391bd

ID4ff391bd2c42c95348b04c080e42ae836ed14ad2
상위 cd3f9b9e
하위 3fd0fa7f

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

issue #000: hmb mssql

Change-Id: Iac9fdf4c14d28040f5dcee4945c3a359cca12fd8

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
2503 2503
                    """save hmb data catalog""" 
2504 2504
                    for data in hmb_list[0].datas[0]:
2505 2505
                        sql = f"insert into HMB_LIST(UID, Name, Unit, [index], [Type]) values(?,?,?,?,?)"
2506
                        sql = self.project.database.to_sql(sql)
2506 2507
                        list_uid = str(uuid.uuid4())
2507 2508
                        params = (list_uid, data.name, data.unit, data.index, data.phase)
2508 2509
                        list_uids.append(list_uid)
......
2511 2512
                for hmb in hmb_list:
2512 2513
                    """stream no save"""
2513 2514
                    sql = f'insert into Stream_No(UID, Stream_No, [From], [To]) values(?,?,?,?)'
2515
                    sql = self.project.database.to_sql(sql)
2514 2516
                    hmb.uid = hmb.uid if hmb.uid else str(uuid.uuid4())
2515 2517
                    params = (str(hmb.uid), hmb.stream_no, hmb.hfrom, hmb.hto)
2516 2518
                    cursor.execute(sql, params)
......
2713 2715
                cursor = conn.cursor()
2714 2716
                """delete stream line which has stream number is given data"""
2715 2717
                sql = "delete from HMB_From_To where Stream_No=?"
2718
                sql = self.project.database.to_sql(sql)
2716 2719
                params = (stream_line_list[0],)
2717 2720
                cursor.execute(sql, params)
2718 2721
                """up to here"""
......
2720 2723
                for stream_line in stream_line_list[1]:
2721 2724
                    sql = f"insert into HMB_From_To(UID,[Drawing_UID],[From_Component_UID],[To_Component_UID],[Stream_No],[Case]) values" \
2722 2725
                          f"(?,?,?,?,?,?)"
2726
                    sql = self.project.database.to_sql(sql)
2723 2727
                    params = (str(uuid.uuid4()), stream_line[0], stream_line[1], stream_line[2], stream_line[3], stream_line[4])
2724 2728
                    cursor.execute(sql, params)
2725 2729
            except Exception as ex:
......
4116 4120
                for model_data in self._streamLineListModelDatas:
4117 4121
                    sql = f"insert into Stream_Line_List (UID, Drawing_UID, PnIDNumber, Tag_Seq_No, PipingMaterialsClass, InsulationPurpose, FluidCode, " \
4118 4122
                          f"UnitNumber, NominalDiameter, [From], [To], Stream_No, [Case], [Index]) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
4123
                    sql = self.project.database.to_sql(sql)
4119 4124
                    params = (str(uuid.uuid4()), drawing_uid, model_data['PnIDNumber'], model_data['Tag Seq No'], model_data['PipingMaterialsClass'], model_data['InsulationPurpose'], \
4120 4125
                              model_data['FluidCode'], model_data['UnitNumber'], model_data['NominalDiameter'], model_data['FROM'], model_data['TO'], model_data['Stream No'], model_data['Case'], index)
4121 4126
                    cursor.execute(sql, params)

내보내기 Unified diff

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