2024-08-25 13:31:15 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper">
|
|
|
|
|
|
|
|
<resultMap type="ProProjectInfoSubdeptsUsers" id="ProProjectInfoSubdeptsUsersResult">
|
|
|
|
<result property="id" column="id" />
|
2024-09-09 23:58:23 +08:00
|
|
|
<result property="comId" column="com_id" />
|
2024-08-25 13:31:15 +08:00
|
|
|
<result property="projectId" column="project_id" />
|
2024-08-25 21:25:51 +08:00
|
|
|
<result property="projectName" column="project_name" />
|
2024-08-25 13:31:15 +08:00
|
|
|
<result property="subDeptId" column="sub_dept_id" />
|
2024-09-09 23:58:23 +08:00
|
|
|
<result property="subDeptType" column="sub_dept_type" />
|
2024-08-25 13:31:15 +08:00
|
|
|
<result property="subDeptName" column="sub_dept_name" />
|
|
|
|
<result property="userId" column="user_id" />
|
2024-09-09 23:58:23 +08:00
|
|
|
<result property="userType" column="user_type" />
|
2024-08-25 13:31:15 +08:00
|
|
|
<result property="userName" column="user_name" />
|
2024-10-01 16:35:07 +08:00
|
|
|
<result property="userPhone" column="user_phone" />
|
|
|
|
<result property="certificateType" column="certificate_type" />
|
|
|
|
<result property="certificateCode" column="certificate_code" />
|
|
|
|
<result property="subDeptGroup" column="sub_dept_group" />
|
|
|
|
<result property="subDeptGroupName" column="sub_dept_group_name"/>
|
2024-08-25 13:31:15 +08:00
|
|
|
<result property="craftType" column="craft_type" />
|
|
|
|
<result property="craftPost" column="craft_post" />
|
2024-10-01 16:35:07 +08:00
|
|
|
<result property="nation" column="nation" />
|
|
|
|
<result property="age" column="age" />
|
|
|
|
<result property="sex" column="sex" />
|
|
|
|
<result property="educationalType" column="educational_type" />
|
|
|
|
<result property="birthDay" column="birth_day" />
|
|
|
|
<result property="nativePlace" column="native_place" />
|
|
|
|
<result property="address" column="address" />
|
|
|
|
<result property="emergencyContact" column="emergency_contact" />
|
|
|
|
<result property="contactPhone" column="contact_phone" />
|
|
|
|
<result property="bankName" column="bank_name" />
|
|
|
|
<result property="bankCardNo" column="bank_card_no" />
|
|
|
|
<result property="bankOffice" column="bank_office" />
|
|
|
|
<result property="certificatePhoto1" column="certificate_photo1" />
|
|
|
|
<result property="certificatePhoto2" column="certificate_photo2" />
|
2024-10-02 00:26:14 +08:00
|
|
|
<result property="admitGuid" column="admit_guid"/>
|
2024-10-01 16:35:07 +08:00
|
|
|
<result property="faceImage" column="face_image" />
|
2024-08-25 13:31:15 +08:00
|
|
|
<result property="eduStatus" column="edu_status" />
|
|
|
|
<result property="eduFilePath" column="edu_file_path" />
|
|
|
|
<result property="eduSignPath" column="edu_sign_path" />
|
|
|
|
<result property="eduDate" column="edu_date" />
|
|
|
|
<result property="approveStatus" column="approve_status" />
|
|
|
|
<result property="useStatus" column="use_status" />
|
|
|
|
<result property="subStep" column="sub_step" />
|
|
|
|
<result property="illnessStatus" column="illness_status" />
|
|
|
|
<result property="supIllnessStatus" column="sup_illness_status" />
|
2024-10-04 18:47:45 +08:00
|
|
|
<result property="hasRegister" column="has_register"/>
|
2024-08-25 13:31:15 +08:00
|
|
|
<result property="isDel" column="is_del" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectProProjectInfoSubdeptsUsersVo">
|
2024-10-01 16:35:07 +08:00
|
|
|
select psu.id, psu.com_id, psu.project_id, pi.project_name, psu.sub_dept_id, psu.sub_dept_type,
|
|
|
|
psu.sub_dept_name, psu.user_id, psu.user_type, psu.user_name, psu.craft_type, psu.craft_post, psu.edu_status,
|
|
|
|
psu.edu_file_path, psu.edu_sign_path, psu.edu_date, psu.approve_status, psu.use_status, psu.sub_step, psu.illness_status,
|
|
|
|
psu.sup_illness_status, psu.is_del, psu.create_by, psu.create_time, psu.update_by, psu.update_time,
|
|
|
|
psu.user_phone,psu.certificate_type,psu.certificate_code,psu.sub_dept_group,psu.sub_dept_group_name,psu.nation,psu.age,psu.sex,
|
|
|
|
psu.educational_type,psu.birth_day,psu.native_place,psu.address,psu.emergency_contact,psu.contact_phone,
|
2024-10-04 18:47:45 +08:00
|
|
|
psu.bank_name,psu.bank_card_no,psu.bank_office,psu.certificate_photo1,psu.certificate_photo2,psu.face_image,psu.admit_guid,psu.has_register,
|
2024-10-01 16:35:07 +08:00
|
|
|
psu.remark
|
|
|
|
from pro_project_info_subdepts_users psu
|
2024-08-25 21:25:51 +08:00
|
|
|
left join pro_project_info pi on pi.id = psu.project_id
|
2024-09-21 21:58:31 +08:00
|
|
|
left join sys_dept sd on sd.dept_id = pi.com_id
|
2024-08-25 13:31:15 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectProProjectInfoSubdeptsUsersList" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult">
|
|
|
|
<include refid="selectProProjectInfoSubdeptsUsersVo"/>
|
2024-08-25 21:25:51 +08:00
|
|
|
<where>
|
2024-09-09 23:58:23 +08:00
|
|
|
<if test="comId != null "> and psu.com_id = #{comId}</if>
|
2024-08-25 21:25:51 +08:00
|
|
|
<if test="projectId != null "> and psu.project_id = #{projectId}</if>
|
|
|
|
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
|
|
|
|
<if test="subDeptId != null "> and psu.sub_dept_id = #{subDeptId}</if>
|
|
|
|
<if test="subDeptName != null and subDeptName != ''"> and psu.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
|
|
|
|
<if test="userId != null "> and psu.user_id = #{userId}</if>
|
|
|
|
<if test="userName != null and userName != ''"> and psu.user_name like concat('%', #{userName}, '%')</if>
|
2024-10-01 23:55:58 +08:00
|
|
|
<if test="userPhone != null and userPhone != ''"> and psu.user_phone like concat('%', #{userPhone}, '%')</if>
|
2024-08-25 21:25:51 +08:00
|
|
|
<if test="craftType != null and craftType != ''"> and psu.craft_type = #{craftType}</if>
|
2024-10-04 18:47:45 +08:00
|
|
|
<if test="hasRegister != null and hasRegister != ''"> and psu.has_register = #{hasRegister}</if>
|
2024-10-01 23:55:58 +08:00
|
|
|
<if test="subDeptGroup != null and subDeptGroup != ''"> and psu.sub_dept_group = #{subDeptGroup}</if>
|
2024-08-25 21:25:51 +08:00
|
|
|
<if test="craftPost != null and craftPost != ''"> and psu.craft_post = #{craftPost}</if>
|
|
|
|
<if test="eduStatus != null and eduStatus != ''"> and psu.edu_status = #{eduStatus}</if>
|
|
|
|
<if test="approveStatus != null "> and psu.approve_status = #{approveStatus}</if>
|
|
|
|
<if test="useStatus != null and useStatus != ''"> and psu.use_status = #{useStatus}</if>
|
|
|
|
<if test="subStep != null "> and psu.sub_step = #{subStep}</if>
|
|
|
|
<if test="illnessStatus != null "> and psu.illness_status = #{illnessStatus}</if>
|
|
|
|
<if test="supIllnessStatus != null "> and psu.sup_illness_status = #{supIllnessStatus}</if>
|
|
|
|
<if test="isDel != null "> and psu.is_del = #{isDel}</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
</where>
|
2024-08-25 21:25:51 +08:00
|
|
|
order by psu.id desc
|
2024-08-25 13:31:15 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectProProjectInfoSubdeptsUsersById" parameterType="Long" resultMap="ProProjectInfoSubdeptsUsersResult">
|
|
|
|
<include refid="selectProProjectInfoSubdeptsUsersVo"/>
|
2024-08-25 21:25:51 +08:00
|
|
|
where psu.id = #{id}
|
2024-08-25 13:31:15 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertProProjectInfoSubdeptsUsers" parameterType="ProProjectInfoSubdeptsUsers" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
insert into pro_project_info_subdepts_users
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
2024-09-09 23:58:23 +08:00
|
|
|
<if test="comId != null">com_id,</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="projectId != null">project_id,</if>
|
|
|
|
<if test="subDeptId != null">sub_dept_id,</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="subDeptType != null">sub_dept_type,</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="subDeptName != null">sub_dept_name,</if>
|
|
|
|
<if test="userId != null">user_id,</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="userType != null">user_type,</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="userName != null">user_name,</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="userPhone != null">user_phone,</if>
|
|
|
|
<if test="certificateType != null">certificate_type,</if>
|
|
|
|
<if test="certificateCode != null">certificate_code,</if>
|
|
|
|
<if test="subDeptGroup != null">sub_dept_group,</if>
|
|
|
|
<if test="subDeptGroupName != null">sub_dept_group_name,</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="craftType != null">craft_type,</if>
|
|
|
|
<if test="craftPost != null">craft_post,</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="nation != null">nation,</if>
|
|
|
|
<if test="age != null">age,</if>
|
|
|
|
<if test="sex != null">sex,</if>
|
|
|
|
<if test="educationalType != null">educational_type,</if>
|
|
|
|
<if test="birthDay != null">birth_day,</if>
|
|
|
|
<if test="nativePlace != null">native_place,</if>
|
|
|
|
<if test="address != null">address,</if>
|
|
|
|
<if test="emergencyContact != null">emergency_contact,</if>
|
|
|
|
<if test="contactPhone != null">contact_phone,</if>
|
|
|
|
<if test="bankName != null">bank_name,</if>
|
|
|
|
<if test="bankCardNo != null">bank_card_no,</if>
|
|
|
|
<if test="bankOffice != null">bank_office,</if>
|
|
|
|
<if test="certificatePhoto1 != null">certificate_photo1,</if>
|
|
|
|
<if test="certificatePhoto2 != null">certificate_photo2,</if>
|
2024-10-02 00:26:14 +08:00
|
|
|
<if test="admitGuid != null">admit_guid,</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="faceImage != null">face_image,</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="eduStatus != null">edu_status,</if>
|
|
|
|
<if test="eduFilePath != null">edu_file_path,</if>
|
|
|
|
<if test="eduSignPath != null">edu_sign_path,</if>
|
|
|
|
<if test="eduDate != null">edu_date,</if>
|
|
|
|
<if test="approveStatus != null">approve_status,</if>
|
|
|
|
<if test="useStatus != null">use_status,</if>
|
|
|
|
<if test="subStep != null">sub_step,</if>
|
|
|
|
<if test="illnessStatus != null">illness_status,</if>
|
|
|
|
<if test="supIllnessStatus != null">sup_illness_status,</if>
|
2024-10-04 18:47:45 +08:00
|
|
|
<if test="hasRegister != null">has_register,</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="isDel != null">is_del,</if>
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
2024-09-09 23:58:23 +08:00
|
|
|
<if test="comId != null">#{comId},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="projectId != null">#{projectId},</if>
|
|
|
|
<if test="subDeptId != null">#{subDeptId},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="subDeptType != null">#{subDeptType},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="subDeptName != null">#{subDeptName},</if>
|
|
|
|
<if test="userId != null">#{userId},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="userType != null">#{userType},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="userName != null">#{userName},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="userPhone != null">#{userPhone},</if>
|
|
|
|
<if test="certificateType != null">#{certificateType},</if>
|
|
|
|
<if test="certificateCode != null">#{certificateCode},</if>
|
|
|
|
<if test="subDeptGroup != null">#{subDeptGroup},</if>
|
|
|
|
<if test="subDeptGroupName != null">#{subDeptGroupName},</if>
|
2024-10-02 00:26:14 +08:00
|
|
|
<if test="admitGuid != null">#{admitGuid},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="craftType != null">#{craftType},</if>
|
|
|
|
<if test="craftPost != null">#{craftPost},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="nation != null">#{nation},</if>
|
|
|
|
<if test="age != null">#{age},</if>
|
|
|
|
<if test="sex != null">#{sex},</if>
|
|
|
|
<if test="educationalType != null">#{educationalType},</if>
|
|
|
|
<if test="birthDay != null">#{birthDay},</if>
|
|
|
|
<if test="nativePlace != null">#{nativePlace},</if>
|
|
|
|
<if test="address != null">#{address},</if>
|
|
|
|
<if test="emergencyContact != null">#{emergencyContact},</if>
|
|
|
|
<if test="contactPhone != null">#{contactPhone},</if>
|
|
|
|
<if test="bankName != null">#{bankName},</if>
|
|
|
|
<if test="bankCardNo != null">#{bankCardNo},</if>
|
|
|
|
<if test="bankOffice != null">#{bankOffice},</if>
|
|
|
|
<if test="certificatePhoto1 != null">#{certificatePhoto1},</if>
|
|
|
|
<if test="certificatePhoto2 != null">#{certificatePhoto2},</if>
|
|
|
|
<if test="faceImage != null">#{faceImage},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="eduStatus != null">#{eduStatus},</if>
|
|
|
|
<if test="eduFilePath != null">#{eduFilePath},</if>
|
|
|
|
<if test="eduSignPath != null">#{eduSignPath},</if>
|
|
|
|
<if test="eduDate != null">#{eduDate},</if>
|
|
|
|
<if test="approveStatus != null">#{approveStatus},</if>
|
|
|
|
<if test="useStatus != null">#{useStatus},</if>
|
|
|
|
<if test="subStep != null">#{subStep},</if>
|
|
|
|
<if test="illnessStatus != null">#{illnessStatus},</if>
|
|
|
|
<if test="supIllnessStatus != null">#{supIllnessStatus},</if>
|
2024-10-04 18:47:45 +08:00
|
|
|
<if test="hasRegister != null">#{hasRegister},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="isDel != null">#{isDel},</if>
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateProProjectInfoSubdeptsUsers" parameterType="ProProjectInfoSubdeptsUsers">
|
|
|
|
update pro_project_info_subdepts_users
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
2024-09-09 23:58:23 +08:00
|
|
|
<if test="comId != null">com_id = #{comId},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="projectId != null">project_id = #{projectId},</if>
|
|
|
|
<if test="subDeptId != null">sub_dept_id = #{subDeptId},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="subDeptType != null">sub_dept_type = #{subDeptType},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="subDeptName != null">sub_dept_name = #{subDeptName},</if>
|
|
|
|
<if test="userId != null">user_id = #{userId},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="userType != null">user_type = #{userType},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="userName != null">user_name = #{userName},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="userPhone != null">user_phone = #{userPhone},</if>
|
|
|
|
<if test="certificateType != null">certificate_type = #{certificateType},</if>
|
|
|
|
<if test="certificateCode != null">certificate_code = #{certificateCode},</if>
|
|
|
|
<if test="subDeptGroup != null">sub_dept_group = #{subDeptGroup},</if>
|
|
|
|
<if test="subDeptGroupName != null">sub_dept_group_name = #{subDeptGroupName},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="craftType != null">craft_type = #{craftType},</if>
|
|
|
|
<if test="craftPost != null">craft_post = #{craftPost},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="nation != null">nation = #{nation},</if>
|
|
|
|
<if test="age != null">age = #{age},</if>
|
|
|
|
<if test="sex != null">sex = #{sex},</if>
|
|
|
|
<if test="educationalType != null">educational_type = #{educationalType},</if>
|
|
|
|
<if test="birthDay != null">birth_day = #{birthDay},</if>
|
|
|
|
<if test="nativePlace != null">native_place = #{nativePlace},</if>
|
|
|
|
<if test="address != null">address = #{address},</if>
|
|
|
|
<if test="emergencyContact != null">emergency_contact = #{emergencyContact},</if>
|
|
|
|
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
|
|
|
<if test="bankName != null">bank_name = #{bankName},</if>
|
|
|
|
<if test="bankCardNo != null">bank_card_no = #{bankCardNo},</if>
|
|
|
|
<if test="bankOffice != null">bank_office = #{bankOffice},</if>
|
|
|
|
<if test="certificatePhoto1 != null">certificate_photo1 = #{certificatePhoto1},</if>
|
|
|
|
<if test="certificatePhoto2 != null">certificate_photo2 = #{certificatePhoto2},</if>
|
2024-10-02 00:26:14 +08:00
|
|
|
<if test="admitGuid != null">admit_guid = #{admitGuid},</if>
|
2024-10-01 16:35:07 +08:00
|
|
|
<if test="faceImage != null">face_image = #{faceImage},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="eduStatus != null">edu_status = #{eduStatus},</if>
|
|
|
|
<if test="eduFilePath != null">edu_file_path = #{eduFilePath},</if>
|
|
|
|
<if test="eduSignPath != null">edu_sign_path = #{eduSignPath},</if>
|
|
|
|
<if test="eduDate != null">edu_date = #{eduDate},</if>
|
|
|
|
<if test="approveStatus != null">approve_status = #{approveStatus},</if>
|
|
|
|
<if test="useStatus != null">use_status = #{useStatus},</if>
|
|
|
|
<if test="subStep != null">sub_step = #{subStep},</if>
|
|
|
|
<if test="illnessStatus != null">illness_status = #{illnessStatus},</if>
|
|
|
|
<if test="supIllnessStatus != null">sup_illness_status = #{supIllnessStatus},</if>
|
2024-10-04 18:47:45 +08:00
|
|
|
<if test="hasRegister != null">has_register = #{hasRegister},</if>
|
2024-08-25 13:31:15 +08:00
|
|
|
<if test="isDel != null">is_del = #{isDel},</if>
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
</trim>
|
|
|
|
where id = #{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteProProjectInfoSubdeptsUsersById" parameterType="Long">
|
|
|
|
delete from pro_project_info_subdepts_users where id = #{id}
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteProProjectInfoSubdeptsUsersByIds" parameterType="String">
|
|
|
|
delete from pro_project_info_subdepts_users where id in
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
2024-09-22 21:18:11 +08:00
|
|
|
|
|
|
|
<select id="findUserByUserPhone" parameterType="String" resultType="int">
|
|
|
|
select count(1) from sys_user where phonenumber=#{phonenumber}
|
|
|
|
</select>
|
|
|
|
|
2024-08-25 13:31:15 +08:00
|
|
|
</mapper>
|