116 lines
6.4 KiB
XML
116 lines
6.4 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.SurProjectAttendanceDataMapper">
|
||
|
|
||
|
<resultMap type="SurProjectAttendanceData" id="SurProjectAttendanceDataResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="vendorsCode" column="vendors_code" />
|
||
|
<result property="workerId" column="workerId" />
|
||
|
<result property="attendanceType" column="attendance_type" />
|
||
|
<result property="attendanceTime" column="attendance_time" />
|
||
|
<result property="deviceCode" column="device_code" />
|
||
|
<result property="workPointId" column="work_point_id" />
|
||
|
<result property="other" column="other" />
|
||
|
<result property="state" column="state" />
|
||
|
<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="selectSurProjectAttendanceDataVo">
|
||
|
select id, vendors_code, workerId, attendance_type, attendance_time, device_code, work_point_id, other, state, remark, is_del, create_by, create_time, update_by, update_time from sur_project_attendance_data
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectSurProjectAttendanceDataList" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||
|
<include refid="selectSurProjectAttendanceDataVo"/>
|
||
|
<where>
|
||
|
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||
|
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||
|
<if test="attendanceType != null and attendanceType != ''"> and attendance_type = #{attendanceType}</if>
|
||
|
<if test="attendanceTime != null and attendanceTime != ''"> and attendance_time = #{attendanceTime}</if>
|
||
|
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
|
||
|
<if test="workPointId != null and workPointId != ''"> and work_point_id = #{workPointId}</if>
|
||
|
<if test="other != null and other != ''"> and other = #{other}</if>
|
||
|
<if test="state != null "> and state = #{state}</if>
|
||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectSurProjectAttendanceDataById" parameterType="Long" resultMap="SurProjectAttendanceDataResult">
|
||
|
<include refid="selectSurProjectAttendanceDataVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertSurProjectAttendanceData" parameterType="SurProjectAttendanceData" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into sur_project_attendance_data
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="vendorsCode != null">vendors_code,</if>
|
||
|
<if test="workerId != null">workerId,</if>
|
||
|
<if test="attendanceType != null">attendance_type,</if>
|
||
|
<if test="attendanceTime != null">attendance_time,</if>
|
||
|
<if test="deviceCode != null">device_code,</if>
|
||
|
<if test="workPointId != null">work_point_id,</if>
|
||
|
<if test="other != null">other,</if>
|
||
|
<if test="state != null">state,</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="vendorsCode != null">#{vendorsCode},</if>
|
||
|
<if test="workerId != null">#{workerId},</if>
|
||
|
<if test="attendanceType != null">#{attendanceType},</if>
|
||
|
<if test="attendanceTime != null">#{attendanceTime},</if>
|
||
|
<if test="deviceCode != null">#{deviceCode},</if>
|
||
|
<if test="workPointId != null">#{workPointId},</if>
|
||
|
<if test="other != null">#{other},</if>
|
||
|
<if test="state != null">#{state},</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="updateSurProjectAttendanceData" parameterType="SurProjectAttendanceData">
|
||
|
update sur_project_attendance_data
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="vendorsCode != null">vendors_code = #{vendorsCode},</if>
|
||
|
<if test="workerId != null">workerId = #{workerId},</if>
|
||
|
<if test="attendanceType != null">attendance_type = #{attendanceType},</if>
|
||
|
<if test="attendanceTime != null">attendance_time = #{attendanceTime},</if>
|
||
|
<if test="deviceCode != null">device_code = #{deviceCode},</if>
|
||
|
<if test="workPointId != null">work_point_id = #{workPointId},</if>
|
||
|
<if test="other != null">other = #{other},</if>
|
||
|
<if test="state != null">state = #{state},</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="deleteSurProjectAttendanceDataById" parameterType="Long">
|
||
|
delete from sur_project_attendance_data where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteSurProjectAttendanceDataByIds" parameterType="String">
|
||
|
delete from sur_project_attendance_data where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|