226 lines
14 KiB
XML
226 lines
14 KiB
XML
|
<?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.jh.project.mapper.SurProjectAttendanceUserMapper">
|
||
|
|
||
|
<resultMap type="SurProjectAttendanceUser" id="SurProjectAttendanceUserResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="workerId" column="workerId" />
|
||
|
<result property="laborWorkerId" column="laborWorkerId" />
|
||
|
<result property="workerCategory" column="workerCategory" />
|
||
|
<result property="qrCode" column="qrCode" />
|
||
|
<result property="name" column="name" />
|
||
|
<result property="ethnic" column="ethnic" />
|
||
|
<result property="nativePlace" column="nativePlace" />
|
||
|
<result property="gender" column="gender" />
|
||
|
<result property="birthDate" column="birthDate" />
|
||
|
<result property="phone" column="phone" />
|
||
|
<result property="degreeName" column="degreeName" />
|
||
|
<result property="photo" column="photo" />
|
||
|
<result property="recentPhoto" column="recentPhoto" />
|
||
|
<result property="groupId" column="groupId" />
|
||
|
<result property="groupName" column="groupName" />
|
||
|
<result property="leader" column="leader" />
|
||
|
<result property="workTypeCode" column="workTypeCode" />
|
||
|
<result property="workTypeName" column="workTypeName" />
|
||
|
<result property="specWorkType" column="specWorkType" />
|
||
|
<result property="hatCode" column="hatCode" />
|
||
|
<result property="state" column="state" />
|
||
|
<result property="enterDate" column="enterDate" />
|
||
|
<result property="exitDate" column="exitDate" />
|
||
|
<result property="companyId" column="companyId" />
|
||
|
<result property="companyName" column="companyName" />
|
||
|
<result property="vendorId" column="vendorId" />
|
||
|
<result property="teamId" column="teamId" />
|
||
|
<result property="teamName" column="teamName" />
|
||
|
<result property="enterType" column="enterType" />
|
||
|
<result property="other" column="other" />
|
||
|
<result property="remark" column="remark" />
|
||
|
<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" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectSurProjectAttendanceUserVo">
|
||
|
select id, workerId, laborWorkerId, workerCategory, qrCode, name, ethnic, nativePlace, gender, birthDate, phone, degreeName, photo, recentPhoto, groupId, groupName, leader, workTypeCode, workTypeName, specWorkType, hatCode, state, enterDate, exitDate, companyId, companyName, vendorId, teamId, teamName, enterType, other, remark, is_del, create_by, create_time, update_by, update_time from sur_project_attendance_user
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectSurProjectAttendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||
|
<include refid="selectSurProjectAttendanceUserVo"/>
|
||
|
<where>
|
||
|
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||
|
<if test="laborWorkerId != null "> and laborWorkerId = #{laborWorkerId}</if>
|
||
|
<if test="workerCategory != null "> and workerCategory = #{workerCategory}</if>
|
||
|
<if test="qrCode != null "> and qrCode = #{qrCode}</if>
|
||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||
|
<if test="ethnic != null and ethnic != ''"> and ethnic = #{ethnic}</if>
|
||
|
<if test="nativePlace != null and nativePlace != ''"> and nativePlace = #{nativePlace}</if>
|
||
|
<if test="gender != null "> and gender = #{gender}</if>
|
||
|
<if test="birthDate != null "> and birthDate = #{birthDate}</if>
|
||
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||
|
<if test="degreeName != null and degreeName != ''"> and degreeName like concat('%', #{degreeName}, '%')</if>
|
||
|
<if test="photo != null and photo != ''"> and photo = #{photo}</if>
|
||
|
<if test="recentPhoto != null and recentPhoto != ''"> and recentPhoto = #{recentPhoto}</if>
|
||
|
<if test="groupId != null "> and groupId = #{groupId}</if>
|
||
|
<if test="groupName != null and groupName != ''"> and groupName like concat('%', #{groupName}, '%')</if>
|
||
|
<if test="leader != null "> and leader = #{leader}</if>
|
||
|
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||
|
<if test="workTypeName != null and workTypeName != ''"> and workTypeName like concat('%', #{workTypeName}, '%')</if>
|
||
|
<if test="specWorkType != null "> and specWorkType = #{specWorkType}</if>
|
||
|
<if test="hatCode != null and hatCode != ''"> and hatCode = #{hatCode}</if>
|
||
|
<if test="state != null "> and state = #{state}</if>
|
||
|
<if test="enterDate != null and enterDate != ''"> and enterDate = #{enterDate}</if>
|
||
|
<if test="exitDate != null and exitDate != ''"> and exitDate = #{exitDate}</if>
|
||
|
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||
|
<if test="companyName != null and companyName != ''"> and companyName like concat('%', #{companyName}, '%')</if>
|
||
|
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||
|
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||
|
<if test="teamName != null and teamName != ''"> and teamName like concat('%', #{teamName}, '%')</if>
|
||
|
<if test="enterType != null and enterType != ''"> and enterType = #{enterType}</if>
|
||
|
<if test="other != null and other != ''"> and other = #{other}</if>
|
||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectSurProjectAttendanceUserById" parameterType="Long" resultMap="SurProjectAttendanceUserResult">
|
||
|
<include refid="selectSurProjectAttendanceUserVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertSurProjectAttendanceUser" parameterType="SurProjectAttendanceUser" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into sur_project_attendance_user
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="workerId != null">workerId,</if>
|
||
|
<if test="laborWorkerId != null">laborWorkerId,</if>
|
||
|
<if test="workerCategory != null">workerCategory,</if>
|
||
|
<if test="qrCode != null">qrCode,</if>
|
||
|
<if test="name != null">name,</if>
|
||
|
<if test="ethnic != null">ethnic,</if>
|
||
|
<if test="nativePlace != null">nativePlace,</if>
|
||
|
<if test="gender != null">gender,</if>
|
||
|
<if test="birthDate != null">birthDate,</if>
|
||
|
<if test="phone != null and phone != ''">phone,</if>
|
||
|
<if test="degreeName != null">degreeName,</if>
|
||
|
<if test="photo != null">photo,</if>
|
||
|
<if test="recentPhoto != null">recentPhoto,</if>
|
||
|
<if test="groupId != null">groupId,</if>
|
||
|
<if test="groupName != null">groupName,</if>
|
||
|
<if test="leader != null">leader,</if>
|
||
|
<if test="workTypeCode != null">workTypeCode,</if>
|
||
|
<if test="workTypeName != null">workTypeName,</if>
|
||
|
<if test="specWorkType != null">specWorkType,</if>
|
||
|
<if test="hatCode != null">hatCode,</if>
|
||
|
<if test="state != null">state,</if>
|
||
|
<if test="enterDate != null">enterDate,</if>
|
||
|
<if test="exitDate != null">exitDate,</if>
|
||
|
<if test="companyId != null">companyId,</if>
|
||
|
<if test="companyName != null">companyName,</if>
|
||
|
<if test="vendorId != null">vendorId,</if>
|
||
|
<if test="teamId != null">teamId,</if>
|
||
|
<if test="teamName != null">teamName,</if>
|
||
|
<if test="enterType != null">enterType,</if>
|
||
|
<if test="other != null and other != ''">other,</if>
|
||
|
<if test="remark != null">remark,</if>
|
||
|
<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>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="workerId != null">#{workerId},</if>
|
||
|
<if test="laborWorkerId != null">#{laborWorkerId},</if>
|
||
|
<if test="workerCategory != null">#{workerCategory},</if>
|
||
|
<if test="qrCode != null">#{qrCode},</if>
|
||
|
<if test="name != null">#{name},</if>
|
||
|
<if test="ethnic != null">#{ethnic},</if>
|
||
|
<if test="nativePlace != null">#{nativePlace},</if>
|
||
|
<if test="gender != null">#{gender},</if>
|
||
|
<if test="birthDate != null">#{birthDate},</if>
|
||
|
<if test="phone != null and phone != ''">#{phone},</if>
|
||
|
<if test="degreeName != null">#{degreeName},</if>
|
||
|
<if test="photo != null">#{photo},</if>
|
||
|
<if test="recentPhoto != null">#{recentPhoto},</if>
|
||
|
<if test="groupId != null">#{groupId},</if>
|
||
|
<if test="groupName != null">#{groupName},</if>
|
||
|
<if test="leader != null">#{leader},</if>
|
||
|
<if test="workTypeCode != null">#{workTypeCode},</if>
|
||
|
<if test="workTypeName != null">#{workTypeName},</if>
|
||
|
<if test="specWorkType != null">#{specWorkType},</if>
|
||
|
<if test="hatCode != null">#{hatCode},</if>
|
||
|
<if test="state != null">#{state},</if>
|
||
|
<if test="enterDate != null">#{enterDate},</if>
|
||
|
<if test="exitDate != null">#{exitDate},</if>
|
||
|
<if test="companyId != null">#{companyId},</if>
|
||
|
<if test="companyName != null">#{companyName},</if>
|
||
|
<if test="vendorId != null">#{vendorId},</if>
|
||
|
<if test="teamId != null">#{teamId},</if>
|
||
|
<if test="teamName != null">#{teamName},</if>
|
||
|
<if test="enterType != null">#{enterType},</if>
|
||
|
<if test="other != null and other != ''">#{other},</if>
|
||
|
<if test="remark != null">#{remark},</if>
|
||
|
<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>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateSurProjectAttendanceUser" parameterType="SurProjectAttendanceUser">
|
||
|
update sur_project_attendance_user
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="workerId != null">workerId = #{workerId},</if>
|
||
|
<if test="laborWorkerId != null">laborWorkerId = #{laborWorkerId},</if>
|
||
|
<if test="workerCategory != null">workerCategory = #{workerCategory},</if>
|
||
|
<if test="qrCode != null">qrCode = #{qrCode},</if>
|
||
|
<if test="name != null">name = #{name},</if>
|
||
|
<if test="ethnic != null">ethnic = #{ethnic},</if>
|
||
|
<if test="nativePlace != null">nativePlace = #{nativePlace},</if>
|
||
|
<if test="gender != null">gender = #{gender},</if>
|
||
|
<if test="birthDate != null">birthDate = #{birthDate},</if>
|
||
|
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||
|
<if test="degreeName != null">degreeName = #{degreeName},</if>
|
||
|
<if test="photo != null">photo = #{photo},</if>
|
||
|
<if test="recentPhoto != null">recentPhoto = #{recentPhoto},</if>
|
||
|
<if test="groupId != null">groupId = #{groupId},</if>
|
||
|
<if test="groupName != null">groupName = #{groupName},</if>
|
||
|
<if test="leader != null">leader = #{leader},</if>
|
||
|
<if test="workTypeCode != null">workTypeCode = #{workTypeCode},</if>
|
||
|
<if test="workTypeName != null">workTypeName = #{workTypeName},</if>
|
||
|
<if test="specWorkType != null">specWorkType = #{specWorkType},</if>
|
||
|
<if test="hatCode != null">hatCode = #{hatCode},</if>
|
||
|
<if test="state != null">state = #{state},</if>
|
||
|
<if test="enterDate != null">enterDate = #{enterDate},</if>
|
||
|
<if test="exitDate != null">exitDate = #{exitDate},</if>
|
||
|
<if test="companyId != null">companyId = #{companyId},</if>
|
||
|
<if test="companyName != null">companyName = #{companyName},</if>
|
||
|
<if test="vendorId != null">vendorId = #{vendorId},</if>
|
||
|
<if test="teamId != null">teamId = #{teamId},</if>
|
||
|
<if test="teamName != null">teamName = #{teamName},</if>
|
||
|
<if test="enterType != null">enterType = #{enterType},</if>
|
||
|
<if test="other != null and other != ''">other = #{other},</if>
|
||
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
<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>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteSurProjectAttendanceUserById" parameterType="Long">
|
||
|
delete from sur_project_attendance_user where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteSurProjectAttendanceUserByIds" parameterType="String">
|
||
|
delete from sur_project_attendance_user where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|