def act_isa_ins(isa_nm, c_arr, meet_seq, rcp_no, agno, seq, is_gagyul): # 회차 act_seq = c_arr[0] """보류 if '임시' in act_seq: act_seq = '0' else: act_seq = get_num(get_round(act_seq)) """ # 찬반여부 yn_num = 4 if is_gagyul == 0: yn_num = 3 appr_yn = c_arr[seq + yn_num] attn_yn = c_arr[seq + yn_num] """ 보류 if '찬성' in appr_yn or '가결' in appr_yn: appr_yn = 'Y' elif '반대' in appr_yn or '부결' in appr_yn: appr_yn = 'N' elif '보류' in appr_yn: appr_yn = 'B' elif '제한' in appr_yn: appr_yn = 'J' elif '해당' in appr_yn or '없음' in appr_yn or '퇴임' in appr_yn or '선임' in appr_yn or '만료' in appr_yn: appr_yn = '' else: appr_yn = 'E' # 참석여부 if '참석' in attn_yn or '찬성' in attn_yn or '반대' in attn_yn or '가결' in attn_yn or '부결' in attn_yn: attn_yn = 'Y' elif '불참' in attn_yn or '미참' in attn_yn or '-' == attn_yn: attn_yn = 'N' elif '해당' in attn_yn or '없음' in attn_yn or '퇴임' in attn_yn or '선임' in attn_yn or '만료' in attn_yn: attn_yn = '' else: attn_yn = 'E' """ # 성명 / 이물코드 name = get_nm(isa_nm.replace(" ", "")) jm_code = meet_seq[:6] pe_code = get_pecode(jm_code, name) in_qry = """insert into proxy013(meet_seq, rcp_no, act_seq, act_ymd, act_agno, pe_seq, pe_code, isa_nm, appr_yn, attn_yn, create_dt, modify_dt) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}') """.format(meet_seq, rcp_no, act_seq, make_ymd(c_arr[1]), agno, jm_code + str(seq + 1).zfill(4), pe_code, name, appr_yn, attn_yn, create_dt, create_dt) return in_qry
def isa_dup_ins(meet_seq, isa_arr, rcp_no, seq): # 인물코드 세팅 jm_code = meet_seq[:6] pe_code = get_pecode(jm_code, isa_arr[0]) if pe_code == '' or pe_code is None: pe_code = get_pecode_career(isa_arr[0], make_birth(isa_arr[1]), str(isa_arr[4]).replace("'", "")) in_arr = """insert into proxy005(meet_seq, rcp_no, pe_seq, pe_code, content, create_dt, modify_dt) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}') """.format(meet_seq, rcp_no, jm_code + str(seq + 1).zfill(4), pe_code, str(isa_arr[5]).replace("'", ""), create_dt, create_dt) return in_arr
def isa_rt_ins(meet_seq, rcp_no, rt, seq, isa_nm): rt = get_num_per(rt) if not rt.isdigit: rt = 'null' # 성명 / 이물코드 name = get_nm(isa_nm.replace(" ", "")) jm_code = meet_seq[:6] pe_code = get_pecode(jm_code, name) in_qry = """insert into proxy014(meet_seq, rcp_no, pe_seq, pe_code, chul_rt, create_dt, modify_dt) values('{0}', '{1}', '{2}', '{3}', {4}, '{5}', '{6}') """.format(meet_seq, rcp_no, jm_code + str(seq + 1).zfill(4), pe_code, rt, create_dt, create_dt) return in_qry
def isa_info_ins(meet_seq, isa_arr, rcp_no, seq): # 인물코드 세팅 jm_code = meet_seq[:6] pe_code = get_pecode(jm_code, isa_arr[0]) if pe_code == '' or pe_code is None: pe_code = get_pecode_career(isa_arr[0], make_birth(isa_arr[1]), str(isa_arr[4]).replace("'", "")) in_qry = """insert into proxy003(meet_seq, rcp_no, isa_gb, pe_seq, pe_code, pe_nm, pe_birth, pe_imgi, is_new, is_dup, is_fulltime, is_out, create_dt, modify_dt) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}') """.format(meet_seq, rcp_no, isa_arr[8], jm_code + str(seq + 1).zfill(4), pe_code, isa_arr[0], make_birth(isa_arr[1]), get_imgi(isa_arr[2]), get_new(isa_arr[3]), get_dup(isa_arr[5]), get_fulltime(isa_arr[7]), get_outYn(isa_arr[6]), create_dt, create_dt) return in_qry
def isa_comt_member_ins(arr, meet_seq, rcp_no, hold_seq): # 위원회명, 코드 comt_nm = arr[0].replace("\n", "").replace(" ", "") """보류 if comt_nm == '사외이사후보추천위원회': comt_nm = '사추위' comt_cd_sel = "select cd_val from ssg00011 where com_cd_tp_cd = 'comt_cd' and cd_nm = '{0}'".format(comt_nm) """ # 성명 / 이물코드 name = get_nm(arr[1].replace(" ", "")) jm_code = meet_seq[:6] pe_code = get_pecode(jm_code, name) in_qry = """insert into proxy016(meet_seq, rcp_no, comt_cd, pe_seq, pe_code, pe_nm, create_dt, modify_dt) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}') """.format(meet_seq, rcp_no, comt_nm, jm_code + str(hold_seq + 1).zfill(4), pe_code, name, create_dt, create_dt) return in_qry
def isa_career_ins(arr, meet_seq, rcp_no, job_is_new, seq): # 이름 띄어쓰기 제거 pe_nm = str(arr[0]).replace(" ", "") pe_nm = get_nm(pe_nm) jm_code = meet_seq[:6] pe_code = get_pecode(jm_code, pe_nm) if job_is_new: in_qry = """insert into proxy022(meet_seq, rcp_no, isa_gb, pe_seq, pe_code, pe_nm, main_job, career_period, career, deal_3y, bigo, create_dt, modify_dt) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}') """.format(meet_seq, rcp_no, arr[5], jm_code + str(seq + 1).zfill(4), pe_code, pe_nm, arr[1], arr[2], arr[3], arr[4], '', create_dt, create_dt) else: in_qry = """insert into proxy022(meet_seq, rcp_no, isa_gb, pe_seq, pe_code, pe_nm, main_job, career_period, career, deal_3y, bigo, create_dt, modify_dt) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}') """.format(meet_seq, rcp_no, arr[4], jm_code + str(seq + 1).zfill(4), pe_code, pe_nm, arr[1], '', arr[2], arr[3], '', create_dt, create_dt) return in_qry
def isa_elect_ins(arr, meet_seq, rcp_no, seq): # 개행 제거 for i in range(0, len(arr)): arr[i] = str(arr[i]).replace("\n", "") is_out = arr[2] if '사외이사' in is_out or is_out == '예' or is_out == 'Y' or is_out == 'y' or is_out == '해당' or is_out == 'O' or is_out == 'o' or is_out == '○': is_out = '2' elif '감사' == is_out: is_out = '3' elif '기타비상무' in is_out or '비상무' in is_out or '기타' in is_out: is_out = '4' else: is_out = '1' # 생년월/생년월일 구분 birth = arr[1] if len(get_num(birth)) < 7: birth = make_birth(birth) else: birth = make_birth_ymd(birth) # 이름 띄어쓰기 제거 pe_nm = str(arr[0]).replace(" ", "") pe_nm = get_nm(pe_nm) jm_code = meet_seq[:6] pe_code = get_pecode(jm_code, pe_nm) in_qry = """insert into proxy021(meet_seq, rcp_no, isa_gb, pe_seq, pe_code, pe_nm, pe_birth, is_out, juju_rel, recommender, bigo, create_dt, modify_dt) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}') """.format(meet_seq, rcp_no, arr[5], jm_code + str(seq + 1).zfill(4), pe_code, pe_nm, birth, is_out, arr[3], arr[4], '', create_dt, create_dt) return in_qry