コード例 #1
0
    def flange2(self):
        product_master_data = []
        master_dict = {}

        product_name = 'flange2_part'
        product_code = 'flange2'  # PK
        product_class = 'N03'
        product_num = 'PART6'

        product_target_l = 'flange2_l_30'
        product_target_w = 'flange2_w_50'
        product_target_h = 'flange2_h_30'

        master_dict['product_name'] = product_name
        master_dict['product_code'] = product_code  # PK
        master_dict['product_class'] = product_class
        master_dict['product_num'] = product_num

        master_dict['product_target_l'] = product_target_l
        master_dict['product_target_w'] = product_target_w
        master_dict['product_target_h'] = product_target_h

        product_master_data.append(master_dict)
        MySQL_query.insert_product_master(product_master_data)
        return master_dict
コード例 #2
0
    def op30_WIP(self):
        master_dict = {}
        product_master_data = []

        product_name = 'WIP30'
        product_code = 'op30_WIP'  # PK
        product_class = 'N02'
        product_num = 'WIP3'

        product_target_l = 'op30_l_200'
        product_target_w = 'op30_w_180'
        product_target_h = 'op30_h_60'

        master_dict['product_name'] = product_name
        master_dict['product_code'] = product_code  # PK
        master_dict['product_class'] = product_class
        master_dict['product_num'] = product_num

        master_dict['product_target_l'] = product_target_l
        master_dict['product_target_w'] = product_target_w
        master_dict['product_target_h'] = product_target_h

        product_master_data.append(master_dict)
        MySQL_query.insert_product_master(product_master_data)
        return master_dict
コード例 #3
0
    def wavyfin(self):
        product_master_data = []
        master_dict = {}

        product_name = 'wavyfin_part'
        product_code = 'wavyfin'  # PK
        product_class = 'N03'
        product_num = 'PART2'

        product_target_l = 'wavyfin_l_100'
        product_target_w = 'wavyfin_w_50'
        product_target_h = 'wavyfin_h_60'

        master_dict['product_name'] = product_name
        master_dict['product_code'] = product_code  # PK
        master_dict['product_class'] = product_class
        master_dict['product_num'] = product_num

        master_dict['product_target_l'] = product_target_l
        master_dict['product_target_w'] = product_target_w
        master_dict['product_target_h'] = product_target_h

        product_master_data.append(master_dict)
        MySQL_query.insert_product_master(product_master_data)
        return master_dict
コード例 #4
0
    def body(self):
        product_master_data = []
        master_dict = {}

        product_name = 'body_part'
        product_code = 'body'  # PK
        product_class = 'N03'
        product_num = 'PART1'

        product_target_l = 'body_l_200'
        product_target_w = 'body_w_100'
        product_target_h = 'body_h_50'

        master_dict['product_name'] = product_name
        master_dict['product_code'] = product_code  # PK
        master_dict['product_class'] = product_class
        master_dict['product_num'] = product_num

        master_dict['product_target_l'] = product_target_l
        master_dict['product_target_w'] = product_target_w
        master_dict['product_target_h'] = product_target_h

        product_master_data.append(master_dict)
        MySQL_query.insert_product_master(product_master_data)
        return master_dict
コード例 #5
0
    def EGRC(self):  # EGR Cooler 제품
        master_dict = {}
        product_master_data = []
        product_name = 'EGR_Cooler'
        product_code = 'EGRC'  # PK
        product_class = 'N01'
        product_num = 'P01'

        product_target_l = 'op60_l_260'
        product_target_w = 'op60_w_180'
        product_target_h = 'op60_h_60'

        master_dict['product_name'] = product_name
        master_dict['product_code'] = product_code  # PK
        master_dict['product_class'] = product_class
        master_dict['product_num'] = product_num
        master_dict['product_target_l'] = product_target_l
        master_dict['product_target_w'] = product_target_w
        master_dict['product_target_h'] = product_target_h

        product_master_data.append(master_dict)
        MySQL_query.insert_product_master(product_master_data)
        return master_dict
コード例 #6
0
def product_master():
    product_master_data = []

    # EGR Cooler 제품
    master_dict = {}

    product_name = 'EGR_Cooler'
    product_code = 'EGRC'  # PK
    product_class = 'N01'
    product_num = 'P01'

    product_target_l = 'op60_l_260'
    product_target_w = 'op60_w_180'
    product_target_h = 'op60_h_60'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num
    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # op10 반제품
    master_dict = {}

    product_name = 'WIP10'
    product_code = 'op10_WIP'  # PK
    product_class = 'N02'
    product_num = 'WIP1'

    product_target_l = 'op10_l_200'
    product_target_w = 'op10_w_100'
    product_target_h = 'op10_h_60'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # op20 반제품
    master_dict = {}

    product_name = 'WIP20'
    product_code = 'op20_WIP'  # PK
    product_class = 'N02'
    product_num = 'WIP2'

    product_target_l = 'op20_l_200'
    product_target_w = 'op20_w_140'
    product_target_h = 'op20_h_60'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # op30 반제품
    master_dict = {}

    product_name = 'WIP30'
    product_code = 'op30_WIP'  # PK
    product_class = 'N02'
    product_num = 'WIP3'

    product_target_l = 'op30_l_200'
    product_target_w = 'op30_w_180'
    product_target_h = 'op30_h_60'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # op40 반제품
    master_dict = {}

    product_name = 'WIP40'
    product_code = 'op40_WIP'  # PK
    product_class = 'N02'
    product_num = 'WIP4'

    product_target_l = 'op40_l_230'
    product_target_w = 'op40_w_180'
    product_target_h = 'op40_h_60'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # op50 반제품
    master_dict = {}

    product_name = 'WIP50'
    product_code = 'op50_WIP'  # PK
    product_class = 'N02'
    product_num = 'WIP5'

    product_target_l = 'op50_l_260'
    product_target_w = 'op50_w_180'
    product_target_h = 'op50_h_60'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # body 부품
    master_dict = {}

    product_name = 'body_part'
    product_code = 'body'  # PK
    product_class = 'N03'
    product_num = 'PART1'

    product_target_l = 'body_l_200'
    product_target_w = 'body_w_100'
    product_target_h = 'body_h_50'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # wavyfin 부품
    master_dict = {}

    product_name = 'wavyfin_part'
    product_code = 'wavyfin'  # PK
    product_class = 'N03'
    product_num = 'PART2'

    product_target_l = 'wavyfin_l_100'
    product_target_w = 'wavyfin_w_50'
    product_target_h = 'wavyfin_h_60'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # pipe1 부품
    master_dict = {}

    product_name = 'pipe1_part'
    product_code = 'pipe1'  # PK
    product_class = 'N03'
    product_num = 'PART3'

    product_target_l = 'pipe1_l_30'
    product_target_w = 'pipe1_w_50'
    product_target_h = 'pipe1_h_30'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # pipe2 부품
    master_dict = {}

    product_name = 'pipe2_part'
    product_code = 'pipe2'  # PK
    product_class = 'N03'
    product_num = 'PART4'

    product_target_l = 'pipe2_l_30'
    product_target_w = 'pipe2_w_50'
    product_target_h = 'pipe2_h_30'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # flange1 부품
    master_dict = {}

    product_name = 'flange1_part'
    product_code = 'flange1'  # PK
    product_class = 'N03'
    product_num = 'PART5'

    product_target_l = 'flange1_l_30'
    product_target_w = 'flange1_w_50'
    product_target_h = 'flange1_h_30'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    # flange2 부품
    master_dict = {}

    product_name = 'flange2_part'
    product_code = 'flange2'  # PK
    product_class = 'N03'
    product_num = 'PART6'

    product_target_l = 'flange2_l_30'
    product_target_w = 'flange2_w_50'
    product_target_h = 'flange2_h_30'

    master_dict['product_name'] = product_name
    master_dict['product_code'] = product_code  # PK
    master_dict['product_class'] = product_class
    master_dict['product_num'] = product_num

    master_dict['product_target_l'] = product_target_l
    master_dict['product_target_w'] = product_target_w
    master_dict['product_target_h'] = product_target_h

    product_master_data.append(master_dict)

    MySQL_query.insert_product_master(product_master_data)

    return product_master_data
from product_master_table import product_master

EGRC_master = product_master.EGRC(1)
op10_WIP = product_master.op10_WIP(1)
op20_WIP = product_master.op20_WIP(1)
op30_WIP = product_master.op30_WIP(1)
op40_WIP = product_master.op40_WIP(1)
op50_WIP = product_master.op50_WIP(1)

body = product_master.body(1)
wavyfin = product_master.wavyfin(1)
pipe1 = product_master.pipe1(1)
pipe2 = product_master.pipe2(1)
flange1 = product_master.flange1(1)
flange2 = product_master.flange2(1)

MySQL_query.insert_product_master(EGRC_master)
MySQL_query.insert_product_master(op10_WIP)
MySQL_query.insert_product_master(op20_WIP)
MySQL_query.insert_product_master(op30_WIP)
MySQL_query.insert_product_master(op40_WIP)
MySQL_query.insert_product_master(op50_WIP)

MySQL_query.insert_product_master(body)
MySQL_query.insert_product_master(wavyfin)
MySQL_query.insert_product_master(pipe1)
MySQL_query.insert_product_master(pipe2)
MySQL_query.insert_product_master(flange1)
MySQL_query.insert_product_master(flange2)