1. Packaging dump stored procedure
CREATE ?PROCEDURE `add_resident_portrait`()
BEGIN ?
?TRUNCATE TABLE resident_portrait;
? INSERT INTO resident_portrait (
?vehicleNumber,
? Parks,
?vehicleType,
?vehicleBrand,
?vehiclePhoto,
?vehicleColor,
?vehicleResidentFlag,
?estate_address,
?building_code,
?unit_code,
?floor,
?areasize,
?house_number,
?estate_type,
?delivery_time,
?checkin_time,
?rent_flag,
? VolResource
? VolIntro,
?checkStatus,
? Volunteer type,
?signTime,
?nation,
?marr_status,
?edu_status,
?belief,
?height,
?weight,
? Resddra,
? Restype,
?healths,
? Volunid,
?mail,
? WeChat,
? Huimg_url,
?blood,
?resimg_url,
?workplace,
?profession,
?address,
?phone_num,
? Mobnum,
?political,
?photo_url,
?street,
?with,
?area,
?pro,
?build,
?NAME,
?sex,
?birthday,
?idcard,
?fatherid,
?motherid
) SELECT
?#number plate
?vehicleinfo.vehicleNumber,
? # No Parking
? Vehicleinfo.parkid,
?#Vehicle Type
?vehicleinfo.vehicleType,
?#Vehicle Brands
?vehicleinfo.vehicleBrand,
? # Vehicle Photos
?vehicleinfo.vehiclePhoto,
? # Vehicle color
?vehicleinfo.vehicleColor,
? # Vehicle owners property
?vehicleinfo.vehicleResidentFlag,
? Property Address #
?pr_estate_info.estate_address,
?#Floor
?pr_estate_info.building_code,
?#unit number
?pr_estate_info.unit_code,
?#floor
?pr_estate_info.floor,
?#area
?pr_estate_info.area,
? House number #
?pr_estate_info.house_number,
? Property type #
?pr_estate_info.estate_type,
? # Launch time
?pr_estate_info.delivery_time,
?#check in time
?pr_estate_info.checkin_time,
? # Whether Rental
?pr_estate_info.rent_flag,
? # Qualified volunteers
? Volunteerinfo.volResource,
? # Volunteer can provide services Introduction
? Volunteerinfo.volIntro,
? # Volunteer approval status
?volunteerinfo.checkStatus,
? # Volunteer type
? Volunteerinfo.volunteerType,
? # Volunteer Member
? Volunteerinfo.signTime,
? # Nationality
? Cu_resinfo.nation,
? # Marital status
? Cu_resinfo.marr_status,
?#status of education
? Cu_resinfo.edu_status,
? # Religion
? Cu_resinfo.belief,
?#height
? Cu_resinfo.height,
?#body weight
?cu_resinfo.weight,
?#Residence address
? Cu_resinfo.resaddr,
? # Household type
? Cu_resinfo.restype,
?#health condition
?cu_resinfo.healths,
? # Id volunteers
? Cu_resinfo.volunid,
?#mailbox
? Cu_resinfo.mail,
? # Micro letter
? Cu_resinfo.wechat,
? # Real estate license address photo
? Cu_resinfo.huimg_url,
?#blood group
? Cu_resinfo.blood,
? # Accounts of the photo Address
? Cu_resinfo.resimg_url,
?#employer
? Cu_resinfo.workplace,
? # Profession
? Cu_resinfo.profession,
?#address
?cu_resinfo.address,
?#Fixed telephone
? Cu_resinfo.phone_num,
? # Phone
? Cu_resinfo.mobnum,
?#political status
? Cu_resinfo.political,
? # Photos Address
? Cu_resinfo.photo_url,
? #-Owned streets
? Cu_resinfo.street,
? #-Owned community
?cu_resinfo.cu,
? # Your cell
? Cu_resinfo.area,
? #-Owned property
?cu_resinfo.pro,
? #-Owned buildings
?cu_resinfo.build,
? # Name
? Cu_resinfo. NAME,
?#gender
?cu_resinfo.sex,
?#birthday
? Cu_resinfo.birthday,
?#identity number
? Cu_resinfo.idcard,
? Father id #
? Cu_resinfo.fatherid,
? Mother id #
? cu_resinfo.motherid
FROM
? Cu_resinfo,
? Pr_stet_info,
?vehicleinfo,
? volunteerinfo
WHERE
? = Cu_resinfo.id vehicleinfo.staffid
AND cu_resinfo.id = pr_estate_info.staffid
AND cu_resinfo.volunid = volunteerinfo.id;
END
2. Scheduled Task
CREATE EVENT
dump_resident_portrait
ON SCHEDULE EVERY 7 DAY
STARTS '2018-09-02 00:00:00' DO
?CALL add_resident_portrait;