|
@@ -0,0 +1,156 @@
|
|
|
+<?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.ruoyi.system.mapper.KaoqinRecordMapper">
|
|
|
+
|
|
|
+ <resultMap type="KaoqinRecord" id="KaoqinRecordResult">
|
|
|
+ <result property="recordId" column="record_id" />
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
+ <result property="kaYear" column="ka_year" />
|
|
|
+ <result property="kaMonth" column="ka_month" />
|
|
|
+ <result property="kaDay" column="ka_day" />
|
|
|
+ <result property="kaWeek" column="ka_week" />
|
|
|
+ <result property="kaTime" column="ka_time" />
|
|
|
+ <result property="kaAddress" column="ka_address" />
|
|
|
+ <result property="kaLog" column="ka_log" />
|
|
|
+ <result property="kaLat" column="ka_lat" />
|
|
|
+ <result property="kaSort" column="ka_sort" />
|
|
|
+ <result property="kaTimeAmIn" column="ka_time_am_in" />
|
|
|
+ <result property="kaTimeAmOut" column="ka_time_am_out" />
|
|
|
+ <result property="kaTimePmIn" column="ka_time_pm_in" />
|
|
|
+ <result property="kaTimePmOut" column="ka_time_pm_out" />
|
|
|
+ <result property="kaType" column="ka_type" />
|
|
|
+ <result property="kaStatus" column="ka_status" />
|
|
|
+ <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="selectKaoqinRecordVo">
|
|
|
+ select record_id, user_id, dept_id, ka_year, ka_month, ka_day, ka_week, ka_time, ka_address, ka_log, ka_lat, ka_sort, ka_time_am_in, ka_time_am_out, ka_time_pm_in, ka_time_pm_out, ka_type,ka_status, create_by, create_time, update_by, update_time, remark from kaoqin_record
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectKaoqinRecordList" parameterType="KaoqinRecord" resultMap="KaoqinRecordResult">
|
|
|
+ <include refid="selectKaoqinRecordVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
+ <if test="kaYear != null and kaYear != ''"> and ka_year = #{kaYear}</if>
|
|
|
+ <if test="kaMonth != null and kaMonth != ''"> and ka_month = #{kaMonth}</if>
|
|
|
+ <if test="kaDay != null and kaDay != ''"> and ka_day = #{kaDay}</if>
|
|
|
+ <if test="kaWeek != null and kaWeek != ''"> and ka_week = #{kaWeek}</if>
|
|
|
+ <if test="kaTime != null and kaTime != ''"> and ka_time = #{kaTime}</if>
|
|
|
+ <if test="kaAddress != null and kaAddress != ''"> and ka_address = #{kaAddress}</if>
|
|
|
+ <if test="kaLog != null and kaLog != ''"> and ka_log = #{kaLog}</if>
|
|
|
+ <if test="kaLat != null and kaLat != ''"> and ka_lat = #{kaLat}</if>
|
|
|
+ <if test="kaSort != null and kaSort != ''"> and ka_sort = #{kaSort}</if>
|
|
|
+ <if test="kaTimeAmIn != null "> and ka_time_am_in = #{kaTimeAmIn}</if>
|
|
|
+ <if test="kaTimeAmOut != null "> and ka_time_am_out = #{kaTimeAmOut}</if>
|
|
|
+ <if test="kaTimePmIn != null "> and ka_time_pm_in = #{kaTimePmIn}</if>
|
|
|
+ <if test="kaTimePmOut != null "> and ka_time_pm_out = #{kaTimePmOut}</if>
|
|
|
+ <if test="kaType != null and kaType != ''"> and ka_type = #{kaType}</if>
|
|
|
+ <if test="kaStatus != null and kaStatus != ''"> and ka_status = #{kaStatus}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectKaoqinRecordByRecordId" parameterType="Long" resultMap="KaoqinRecordResult">
|
|
|
+ <include refid="selectKaoqinRecordVo"/>
|
|
|
+ where record_id = #{recordId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertKaoqinRecord" parameterType="KaoqinRecord" useGeneratedKeys="true" keyProperty="recordId">
|
|
|
+ insert into kaoqin_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="kaYear != null and kaYear != ''">ka_year,</if>
|
|
|
+ <if test="kaMonth != null and kaMonth != ''">ka_month,</if>
|
|
|
+ <if test="kaDay != null and kaDay != ''">ka_day,</if>
|
|
|
+ <if test="kaWeek != null and kaWeek != ''">ka_week,</if>
|
|
|
+ <if test="kaTime != null and kaTime != ''">ka_time,</if>
|
|
|
+ <if test="kaAddress != null and kaAddress != ''">ka_address,</if>
|
|
|
+ <if test="kaLog != null and kaLog != ''">ka_log,</if>
|
|
|
+ <if test="kaLat != null and kaLat != ''">ka_lat,</if>
|
|
|
+ <if test="kaSort != null and kaSort != ''">ka_sort,</if>
|
|
|
+ <if test="kaTimeAmIn != null">ka_time_am_in,</if>
|
|
|
+ <if test="kaTimeAmOut != null">ka_time_am_out,</if>
|
|
|
+ <if test="kaTimePmIn != null">ka_time_pm_in,</if>
|
|
|
+ <if test="kaTimePmOut != null">ka_time_pm_out,</if>
|
|
|
+ <if test="kaType != null">ka_type,</if>
|
|
|
+ <if test="kaStatus != null">ka_status,</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=",">
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="kaYear != null and kaYear != ''">#{kaYear},</if>
|
|
|
+ <if test="kaMonth != null and kaMonth != ''">#{kaMonth},</if>
|
|
|
+ <if test="kaDay != null and kaDay != ''">#{kaDay},</if>
|
|
|
+ <if test="kaWeek != null and kaWeek != ''">#{kaWeek},</if>
|
|
|
+ <if test="kaTime != null and kaTime != ''">#{kaTime},</if>
|
|
|
+ <if test="kaAddress != null and kaAddress != ''">#{kaAddress},</if>
|
|
|
+ <if test="kaLog != null and kaLog != ''">#{kaLog},</if>
|
|
|
+ <if test="kaLat != null and kaLat != ''">#{kaLat},</if>
|
|
|
+ <if test="kaSort != null and kaSort != ''">#{kaSort},</if>
|
|
|
+ <if test="kaTimeAmIn != null">#{kaTimeAmIn},</if>
|
|
|
+ <if test="kaTimeAmOut != null">#{kaTimeAmOut},</if>
|
|
|
+ <if test="kaTimePmIn != null">#{kaTimePmIn},</if>
|
|
|
+ <if test="kaTimePmOut != null">#{kaTimePmOut},</if>
|
|
|
+ <if test="kaType != null">#{kaType},</if>
|
|
|
+ <if test="kaStatus != null">#{kaStatus},</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="updateKaoqinRecord" parameterType="KaoqinRecord">
|
|
|
+ update kaoqin_record
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="kaYear != null and kaYear != ''">ka_year = #{kaYear},</if>
|
|
|
+ <if test="kaMonth != null and kaMonth != ''">ka_month = #{kaMonth},</if>
|
|
|
+ <if test="kaDay != null and kaDay != ''">ka_day = #{kaDay},</if>
|
|
|
+ <if test="kaWeek != null and kaWeek != ''">ka_week = #{kaWeek},</if>
|
|
|
+ <if test="kaTime != null and kaTime != ''">ka_time = #{kaTime},</if>
|
|
|
+ <if test="kaAddress != null and kaAddress != ''">ka_address = #{kaAddress},</if>
|
|
|
+ <if test="kaLog != null and kaLog != ''">ka_log = #{kaLog},</if>
|
|
|
+ <if test="kaLat != null and kaLat != ''">ka_lat = #{kaLat},</if>
|
|
|
+ <if test="kaSort != null and kaSort != ''">ka_sort = #{kaSort},</if>
|
|
|
+ <if test="kaTimeAmIn != null">ka_time_am_in = #{kaTimeAmIn},</if>
|
|
|
+ <if test="kaTimeAmOut != null">ka_time_am_out = #{kaTimeAmOut},</if>
|
|
|
+ <if test="kaTimePmIn != null">ka_time_pm_in = #{kaTimePmIn},</if>
|
|
|
+ <if test="kaTimePmOut != null">ka_time_pm_out = #{kaTimePmOut},</if>
|
|
|
+ <if test="kaType != null">ka_type = #{kaType},</if>
|
|
|
+ <if test="kaStatus != null">ka_status = #{kaStatus},</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 record_id = #{recordId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteKaoqinRecordByRecordId" parameterType="Long">
|
|
|
+ delete from kaoqin_record where record_id = #{recordId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteKaoqinRecordByRecordIds" parameterType="String">
|
|
|
+ delete from kaoqin_record where record_id in
|
|
|
+ <foreach item="recordId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{recordId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|