-- 第一步用户表数据 -- 老OA里面stdq_oa.pre_oa_userinfo -- 商业版IMI中yx_user.user -- select * from yx_user.yx_os_user -- select * from yx_imi.yx_os_user where status=1 -- /* delete from yx_os_user where status='10' INSERT INTO yx_user.yx_os_user ( `uhash`, `username`, `password`, `email`, `nickname`, `avatar`, `usergroup`, `usercompany`, `salt`, `regip`, `regdate`, `lastloginip`, `lastlogintime`, `status`, `nick_py`) select '' ,username,password,user_email,display_name,uid ,'040a328e383138ed53c1bbd2bc73082e' ,'999' ,salt,regip,regdate,'127.0.0.1',lastlogintime,'10',to_pinyin (display_name) from yx_imi.yx_os_user where status=1; update yx_user.yx_os_user set uhash=md5(uid) where status='10'; */ -- 第二步客户档案 -- -- 客户档案[table]pre_oa_sale_v2_custom >> [table]yx_crm_custom /* select * from yx_imi_business.yx_crm_custom delete from yx_imi_business.yx_crm_custom where company_id='999' INSERT INTO `yx_imi_business`.`yx_crm_custom` ( `custom_name`, `create_uid`, `create_date`, `charge_uid`, `custom_address`, `custom_fax`, `custom_remark`, `custom_tag`, `custom_phone`, `custom_email`, `custom_website`, `custom_province_id`, `custom_city_id`, `custom_area_id`, `invoice_company`, `invoice_bank`, `invoice_bank_num`, `invoice_duty_num`, `invoice_address`, `invoice_phone`, `invoice_mailing_address`, `take_over_status`, `take_over_time`, `company_id`, `custom_hash`, `status`, `custom_type`, `custom_source`, `custom_status`, `custom_grade`, `first_level_industry`, `second_level_industry`, `update_date`, `update_uid`, `custom_lock`) select custom_company as custom_name, create_uid, create_date, create_uid, custom_address, custom_fax, custom_content, custom_tag, custom_phone, custom_email, custom_internet, '' as custom_province_id, '' as custom_city_id , '' as custom_area_id, invoice_company, invoice_bank, invoice_bank_num, invoice_duty_num, invoice_address, invoice_phone, invoice_mailing_addresss, '' as take_over_status, '' as take_over_time, '999' as company_id, '' as custom_hash, status, '' as custom_type,'' as custom_source, custom_status, '' as custom_grade, '' as first_level_industry, '' as second_level_industry, '' as update_date, custom_id as update_uid, '未锁定' as custom_lock from stdq_oa.pre_oa_sale_v2_custom */ -- 第三步联系人 -- -- 联系人[table]pre_oa_sale_v2_custom_contacts >> [table]yx_crm_custom_contact -- select * from yx_imi_business.yx_crm_custom_contact where company_id='999' -- delete from yx_imi_business.yx_crm_custom_contact where company_id='999' /* INSERT INTO `yx_imi_business`.`yx_crm_custom_contact` (`custom_id`, `contact_name`, `contact_phone`, `contact_email`, `contact_qq`, `contact_status`, `contact_job`, `custom_name`, `add_img`, `dept_name`, `contact_mobile_1`, `contact_mobile_2`, `contact_mobile_3`, `contact_mobile_4`, `contact_mobile_5`, `contact_phone_1`, `contact_phone_2`, `contact_phone_3`, `contact_phone_4`, `contact_phone_5`, `contact_birthday`, `contact_sex`, `contact_introducer`, `contact_role_relationship`, `contact_hobby`, `contact_wechat`, `contact_remark`, `contact_fax`, `contact_place`, `contact_relation`, `bank_deposit`, `bank_card`, `id_card`, `contact_key_maker`, `contact_hash`, `status`, `create_date`, `create_uid`, `charge_uid`, `update_date`, `update_uid`, `company_id`, `company_name`, `oppty_id`, `company_website`, `contact_weibo`, `contact_msn`) select custom_id, contacts_name, contacts_phone, contacts_email, contacts_qq, contacts_status, contacts_job, custom_name, add_img, dept_name, contacts_moblie_1, contacts_moblie_2, '' as contact_mobile_3, '' as contact_mobile_4, '' as contact_mobile_5, contacts_phone_1, contacts_phone_2,'' as contact_phone_3, '' as contact_phone_4, '' as contact_phone_5, contacts_birthday, contacts_sex, contacts_introducer, '' as contact_role_relationship, contacts_hobby, contacts_wechat, contacts_remark, contacts_fax, contacts_place, contacts_relation, bank_deposit, bank_card, id_card, '是' as contact_key_maker, contacts_hash, status, '' as create_date, custom_id as create_uid, '' as charge_uid, '' as update_date, '' as update_uid, '999' as company_id, contacts_id as company_name, '' as oppty_id, '' as company_website, '' as contact_weibo, '' as contact_msn from stdq_oa.pre_oa_sale_v2_custom_contacts */