|
@@ -879,6 +879,9 @@
|
|
<if test="projectId != null">
|
|
<if test="projectId != null">
|
|
and a.project_id = #{projectId}
|
|
and a.project_id = #{projectId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="userId != null and userId!=''">
|
|
|
|
+ and a.creator_id = #{userId}
|
|
|
|
+ </if>
|
|
<if test="startDate != null and endDate != null">
|
|
<if test="startDate != null and endDate != null">
|
|
AND a.create_date between #{startDate} and #{endDate}
|
|
AND a.create_date between #{startDate} and #{endDate}
|
|
</if>
|
|
</if>
|
|
@@ -1658,7 +1661,20 @@
|
|
WHERE report.state = 1
|
|
WHERE report.state = 1
|
|
AND p.is_public = 0
|
|
AND p.is_public = 0
|
|
AND report.company_id=#{companyId}
|
|
AND report.company_id=#{companyId}
|
|
- AND report.create_date BETWEEN #{startDate} AND #{endDate}
|
|
|
|
|
|
+ AND
|
|
|
|
+ (
|
|
|
|
+ IF(user.induction_date is not null AND user.induction_date > #{startDate} and user.inactive_date is not null AND user.inactive_date < #{endDate}
|
|
|
|
+ ,report.create_date BETWEEN user.induction_date AND user.inactive_date
|
|
|
|
+ ,report.create_date BETWEEN #{startDate} AND #{endDate} )
|
|
|
|
+ and
|
|
|
|
+ IF(user.induction_date is not null AND user.induction_date > #{startDate}
|
|
|
|
+ ,report.create_date BETWEEN user.induction_date AND #{endDate}
|
|
|
|
+ ,report.create_date BETWEEN #{startDate} AND #{endDate} )
|
|
|
|
+ and
|
|
|
|
+ IF(user.inactive_date is not null AND user.inactive_date < #{endDate}
|
|
|
|
+ ,report.create_date BETWEEN #{startDate} AND user.inactive_date
|
|
|
|
+ ,report.create_date BETWEEN #{startDate} AND #{endDate} )
|
|
|
|
+ )
|
|
GROUP BY user.id,p.id,user.plate1,p.project_name,p.project_code
|
|
GROUP BY user.id,p.id,user.plate1,p.project_name,p.project_code
|
|
) r
|
|
) r
|
|
ON u.id = r.creator_id
|
|
ON u.id = r.creator_id
|