|
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="recordId" column="record_id" />
|
|
|
<result property="userId" column="user_id" />
|
|
|
<result property="userName" column="user_name" />
|
|
|
+ <result property="phone" column="phone" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
<result property="ancestors" column="ancestors" />
|
|
@@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectKaoqinRecordVo">
|
|
|
- select record_id, user_id, user_name, dept_id, dept_name, ancestors, ka_year, ka_month, ka_day, ka_week, ka_time, ka_address_am_in, ka_log, ka_lat, ka_sort, ka_address_am_out, ka_address_pm_in, ka_address_pm_out, ka_time_am_in, ka_time_am_out, ka_time_pm_in, ka_time_pm_out, ka_type_am_in, ka_type_am_out, ka_type_pm_in, ka_type_pm_out,ka_am_in_photo,ka_am_out_photo,ka_pm_in_photo,ka_pm_out_photo, ka_status, create_by, create_time, update_by, update_time, remark_am_in, remark_am_out, remark_pm_in, remark_pm_out from kaoqin_record
|
|
|
+ select record_id, user_id, user_name,phone, dept_id, dept_name, ancestors, ka_year, ka_month, ka_day, ka_week, ka_time, ka_address_am_in, ka_log, ka_lat, ka_sort, ka_address_am_out, ka_address_pm_in, ka_address_pm_out, ka_time_am_in, ka_time_am_out, ka_time_pm_in, ka_time_pm_out, ka_type_am_in, ka_type_am_out, ka_type_pm_in, ka_type_pm_out,ka_am_in_photo,ka_am_out_photo,ka_pm_in_photo,ka_pm_out_photo, ka_status, create_by, create_time, update_by, update_time, remark_am_in, remark_am_out, remark_pm_in, remark_pm_out from kaoqin_record
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectKaoqinRecordList" parameterType="KaoqinRecord" resultMap="KaoqinRecordResult">
|
|
@@ -55,13 +56,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<where>
|
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
|
<if test="userName != null and userName != ''"> and user_name like concat( #{userName}, '%')</if>
|
|
|
+ <if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
<if test="deptName != null and deptName != ''"> and dept_name like concat( #{deptName}, '%')</if>
|
|
|
<if test="deptId != null and deptId != ''"> and find_in_set(#{deptId}, ancestors)</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="startTime != null and startTime != ''"><!-- 开始时间检索 -->
|
|
|
+ and date_format(kaTime,'%Y%m%d') >= date_format(#{startTime},'%Y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
|
+ and date_format(kaTime,'%Y%m%d') <= date_format(#{endTime},'%Y%m%d')
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="kaAddressAmIn != null and kaAddressAmIn != ''"> and ka_address_am_in = #{kaAddressAmIn}</if>
|
|
|
<if test="kaLog != null and kaLog != ''"> and ka_log = #{kaLog}</if>
|
|
|
<if test="kaLat != null and kaLat != ''"> and ka_lat = #{kaLat}</if>
|
|
@@ -96,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="userId != null">user_id,</if>
|
|
|
<if test="userName != null">user_name,</if>
|
|
|
+ <if test="phone != null "> phone,</if>
|
|
|
<if test="deptId != null">dept_id,</if>
|
|
|
<if test="deptName != null">dept_name,</if>
|
|
|
<if test="ancestors != null">ancestors,</if>
|
|
@@ -136,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
<if test="userName != null">#{userName},</if>
|
|
|
+ <if test="phone != null "> #{phone},</if>
|
|
|
<if test="deptId != null">#{deptId},</if>
|
|
|
<if test="deptName != null">#{deptName},</if>
|
|
|
<if test="ancestors != null">#{ancestors},</if>
|
|
@@ -180,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="userName != null">user_name = #{userName},</if>
|
|
|
+ <if test="phone != null ">phone = #{phone},</if>
|
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
<if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
<if test="ancestors != null">ancestors = #{ancestors},</if>
|