Commit cb881cd9 authored by 罗可心's avatar 罗可心 😕

小程序查找员工信息添加班次 修改查找考勤sql问题

parent 9fbd85ac
......@@ -16,4 +16,8 @@ public class UserDto extends SysUserRbac {
//黑名单状态(0不存在1存在)
@Transient
private String blacklistFlag;
// 班次中文
@Transient
private String nltBzLabel;
}
......@@ -34,6 +34,9 @@
left join sys_dept sd on su.dept_id = sd.business_id
where 1=1
and su.attendance_show = '0'
<if test="entity.userId !=null and entity.userId != '' ">
and attendance_sync.user_id = #{entity.userId}
</if>
<if test="entity.delFlag !=null and entity.delFlag != '' ">
and attendance_sync.del_flag = #{entity.delFlag}
</if>
......@@ -52,15 +55,15 @@
<if test="entity.name != null and entity.name != ''">
and attendance_sync.name like concat('%', #{entity.name}, '%' )
</if>
order by IF(ISNULL(sd.weight),1,0) , sd.weight, IF(ISNULL(su.sort),1,0) ,su.sort , attendance_sync.date_of_attendance desc ,
order by IF(ISNULL(sd.weight),1,0) , sd.weight, IF(ISNULL(su.sort),1,0) ,su.sort , attendance_sync.date_of_attendance desc
<if test="entity.sort == '0'.toString()">
attendance_sync.work_hours desc
, attendance_sync.work_hours desc
</if>
<if test="entity.sort == '1'.toString()">
attendance_sync.off_hours desc
, attendance_sync.off_hours desc
</if>
<if test="entity.sort == '2'.toString()">
attendance_sync.time_on_job + 0
, attendance_sync.time_on_job + 0
</if>
</select>
......
......@@ -110,6 +110,8 @@
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="nlt_bz_label" jdbcType="VARCHAR" property="nltBzLabel"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="querySysUsers" resultMap="BaseResultMap">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment