| | |
| | | left join unit d on a.UNIT_ID = d.ID |
| | | left join procedures f on a.PROCEDURE_ID =f.ID |
| | | where a.DELETED = 0 |
| | | and a.TYPE = 1 |
| | | <if test="rootDepartId != null"> |
| | | AND a.`ROOT_DEPART_ID` = #{rootDepartId} |
| | | </if> |
| | |
| | | <if test="userId != null"> |
| | | AND `CREATE_USER` = #{userId} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND `CREATE_TIME` >= #{startDate} |
| | | <if test="startDate != null and startDate != ''"> |
| | | AND `CREATE_TIME` >= concat(#{startDate},' 00:00:00') |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND #{endDate} >= `CREATE_TIME` |
| | | <if test="endDate != null and endDate != ''"> |
| | | AND concat(#{endDate},' 23:59:59') >= `CREATE_TIME` |
| | | </if> |
| | | group by `CREATE_USER` |
| | | <!-- order by `CREATE_TIME` desc--> |