|
@@ -172,18 +172,34 @@
|
|
|
and a.create_time <= DATE_ADD(#{loginLogDto.endTime},INTERVAL 1 DAY)
|
|
|
</if>
|
|
|
<if test="loginLogDto.programItems != null and loginLogDto.programItems.size() > 0">
|
|
|
- and
|
|
|
- (com.id in
|
|
|
- <foreach item="item" index="index" collection="loginLogDto.programItems"
|
|
|
- open="(" separator="," close=")">
|
|
|
- #{item.orgId}
|
|
|
- </foreach>
|
|
|
- or dep.id in
|
|
|
- <foreach item="item" index="index" collection="loginLogDto.programItems"
|
|
|
- open="(" separator="," close=")">
|
|
|
- #{item.orgId}
|
|
|
- </foreach>
|
|
|
- )
|
|
|
+ <if test="loginLogDto.permissonType == 5 or loginLogDto.permissonType == 2">
|
|
|
+ and (a.company_id in
|
|
|
+ <foreach item="item" index="index" collection="loginLogDto.programItems"
|
|
|
+ open="(" separator="," close=")">
|
|
|
+ #{item.orgId}
|
|
|
+ </foreach>
|
|
|
+ or a.DEPARTMENT_ID in
|
|
|
+ <foreach item="item" index="index" collection="loginLogDto.programItems"
|
|
|
+ open="(" separator="," close=")">
|
|
|
+ #{item.orgId}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="loginLogDto.permissonType == 4 or loginLogDto.permissonType == 3">
|
|
|
+ and a.DEPARTMENT_ID in
|
|
|
+ <foreach item="item" index="index" collection="loginLogDto.programItems"
|
|
|
+ open="(" separator="," close=")">
|
|
|
+ #{item.orgId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="loginLogDto.permissonType == 1">
|
|
|
+ and a.company_id in
|
|
|
+ <foreach item="item" index="index" collection="loginLogDto.programItems"
|
|
|
+ open="(" separator="," close=")">
|
|
|
+ #{item.orgId}
|
|
|
+ </foreach>
|
|
|
+ and (a.DEPARTMENT_ID is null or a.DEPARTMENT_ID=0)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|