|
@@ -5,9 +5,8 @@
|
|
|
select * from
|
|
|
(
|
|
|
SELECT c.firstDepartName,c.secondDepartName, c.userId, c.name, '状态' as type, ${reportDaySql}
|
|
|
- from wx_user c left join sap_check_report a on a.userId = c.userId
|
|
|
- and a.checkinDay >= #{startDate} and a.checkinDay <= #{endDate}
|
|
|
- where 1=1
|
|
|
+ from wx_user c, sap_check_report a
|
|
|
+ where a.userId = c.userId and a.checkinDay >= #{startDate} and a.checkinDay <= #{endDate}
|
|
|
<if test="name != null and name != ''">
|
|
|
and a.name like CONCAT(CONCAT('%', #{name}),'%')
|
|
|
</if>
|
|
@@ -17,9 +16,8 @@
|
|
|
group by c.firstDepartName,c.secondDepartName, c.userId, c.name
|
|
|
union all
|
|
|
SELECT c.firstDepartName,c.secondDepartName, c.userId, c.name, '备注信息' as type, ${reportDayRemarkSql}
|
|
|
- from wx_user c left join sap_check_report a on a.userId = c.userId
|
|
|
- and a.checkinDay >= #{startDate} and a.checkinDay <= #{endDate}
|
|
|
- where 1=1
|
|
|
+ from wx_user c, sap_check_report a
|
|
|
+ where a.userId = c.userId and a.checkinDay >= #{startDate} and a.checkinDay <= #{endDate}
|
|
|
<if test="name != null and name != ''">
|
|
|
and a.name like CONCAT(CONCAT('%', #{name}),'%')
|
|
|
</if>
|