Commit 60dedeae authored by 王琮's avatar 王琮

修改员工导出SQL

parent 3ddc7fe7
......@@ -48,6 +48,5 @@ public interface DoorRecordRepository extends CyBaseMapper<DoorRecord> {
List<DoorRecord> queryAttendance2(@Param("attendance") Attendance attendance);
List<DoorRecord> queryDoorRecordByUserIdOrderBy(Integer userId);
}
......@@ -210,8 +210,6 @@ public class DoorRecordServiceImpl extends ServiceImpl<DoorRecordRepository, Doo
//TODO 需要重写
//条件加上年份,默认查询当年的,因此代码里面需要判断是否传递有年代的逻辑
List<DoorRecord> doorRecordList = baseMapper.queryDoorRecords(doorRecord);
for (int i = 0; i < doorRecordList.size(); i++) {
//获取凭证类型
String cardType = doorRecordList.get(i).getCardType();
......
......@@ -225,25 +225,6 @@
and dr.cross_time = #{crossTime}
</select>
<select id="queryDoorRecordByUserIdOrderBy" resultMap="BaseResultMap">
SELECT dr.record_id,
su.name,
dr.cross_time,
dr.tenement_type,
dr.create_date,
dr.device_type,
dr.device_name,
dr.card_type,
dr.record_type,
dr.card_type_label,
dr.abnormal
FROM door_record dr
left JOIN sys_user su ON dr.person_id = su.person_id
WHERE dr.del_flag = 0
and user_id = #{userId}
and dr.cross_time between '2022-11-12 00:00:00' and '2023-11-12 00:00:00'
order by dr.cross_time
</select>
<update id="updateDoorRecordById" parameterType="org.rcisoft.sys.sysuser.entity.DoorRecord">
UPDATE door_record
......
......@@ -110,12 +110,43 @@
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="querySysUsers" resultMap="BaseResultMap">
select *
from sys_user
where del_flag = 0
and user_type = 0
and (identity = 2 or identity = 1)
from sys_user su
where su.del_flag = 0
and su.user_type = 0
and (su.identity = 2 or su.identity = 1)
<if test="entity.name !=null and entity.name != '' ">
and su.name like concat ("%",#{entity.name},"%")
</if>
<if test="entity.flag !=null and entity.flag != '' ">
and su.flag = #{entity.flag}
</if>
<if test="entity.position !=null and entity.position != '' ">
and su.position in(${entity.position})
</if>
<if test="entity.blacklistFlag == 1 || entity.blacklistFlag == 0">
and su.blacklist_flag = #{entity.blacklistFlag}
</if>
<if test="entity.deptId !=null and entity.deptId != '' ">
and su.dept_id in(${entity.deptId})
</if>
<if test="entity.phone !=null and entity.phone != '' ">
and phone = #{entity.phone}
and su.phone like concat ("%",#{entity.phone},"%")
</if>
<if test="entity.beginTime != null and entity.beginTime !='' "><!-- 开始时间检索 -->
and date_format(su.create_date,'%Y-%m-%d') &gt;= date_format(#{entity.beginTime},'%Y-%m-%d')
</if>
<if test="entity.endTime != null and entity.endTime !='' "><!-- 结束时间检索 -->
and date_format(su.create_date,'%Y-%m-%d') &lt;= date_format(#{entity.endTime},'%Y-%m-%d')
</if>
<if test="entity.px == '1'.toString() "><!-- 排序-->
order BY su.create_date desc
</if>
<if test="entity.px == '2'.toString() "><!-- 排序-->
order BY sdd.dict_sort desc
</if>
<if test="entity.px == '3'.toString() "><!-- 排序-->
order BY F_GET_PYJM(su.name)
</if>
</select>
......
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