INSERT INTO employee_info
(id_,real_name_,mobile_no_,wechat_no_,id_card_,age_,gender_,birthdate_,emergency_contact_name_,emergency_contact_relation_,emergency_contact_phone_,live_city_,intention_city_,educational_background_,subject_id_list_,assessment_result_,other_comment_,entry_date_,organ_id_,position_,status_,is_probation_period_,bank_card_no_,bank_address_,resignation_date_,operator_id_,source_from_,create_time_,update_time_)
VALUES(#{id},#{realName},#{mobileNo},#{wechatNo},#{idCard},#{age},#{gender},#{birthdate},#{emergencyContactName},#{emergencyContactRelation},#{emergencyContactPhone},#{liveCity},#{intentionCity},#{educationalBackground},#{subjectIdList},#{assessmentResult},#{otherComment},#{entryDate},#{organId},#{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isProbationPeriod},#{bankCardNo},#{bankAddress},#{resignationDate},#{operatorId},#{sourceFrom},#{createTime},#{updateTime})
UPDATE employee_info
is_probation_period_ = #{isProbationPeriod},
subject_id_list_ = #{subjectIdList},
gender_ = #{gender},
entry_date_ = #{entryDate},
other_comment_ = #{otherComment},
status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
educational_background_ = #{educationalBackground},
emergency_contact_phone_ = #{emergencyContactPhone},
resignation_date_ = #{resignationDate},
position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
update_time_ = #{updateTime},
emergency_contact_relation_ = #{emergencyContactRelation},
id_ = #{id},
bank_card_no_ = #{bankCardNo},
real_name_ = #{realName},
id_card_ = #{idCard},
age_ = #{age},
live_city_ = #{liveCity},
intention_city_ = #{intentionCity},
create_time_ = #{createTime},
wechat_no_ = #{wechatNo},
assessment_result_ = #{assessmentResult},
mobile_no_ = #{mobileNo},
emergency_contact_name_ = #{emergencyContactName},
birthdate_ = #{birthdate},
bank_address_ = #{bankAddress},
organ_id_ = #{organId},
operator_id_ = #{operatorId},
source_from_ = #{sourceFrom}
WHERE id_ = #{id}
DELETE FROM employee_info WHERE id_ = #{id}
AND ei.organ_id_ = #{organId}
AND (ei.real_name_ LIKE CONCAT('%',#{userNameOrIdOrMobile},'%') OR ei.mobile_no_ LIKE CONCAT('%',#{userNameOrIdOrMobile},'%') OR ei.id_ = #{userNameOrIdOrMobile})
AND find_in_set(#{subjectId},ei.subject_id_list_)
AND ei.source_from_ = #{sourceFrom}
AND ei.intention_city_ LIKE CONCAT('%',#{intentionCity},'%')
AND ei.position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
AND ei.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
AND ei.update_time_ >= #{startDate}
AND ei.update_time_ <= #{endDate}
AND (ei.operator_id_ like concat('%',#{operator},'%') or u.real_name_ like concat('%',#{operator},'%'))