|
@@ -1583,10 +1583,16 @@
|
|
</where>
|
|
</where>
|
|
)tmp1
|
|
)tmp1
|
|
left join (
|
|
left join (
|
|
- select creator_id userId,IFNULL(sum(overtime_hours),0) as overTimeHour
|
|
|
|
|
|
+ select report.creator_id userId,IFNULL(sum(overtime_hours),0) as overTimeHour
|
|
from report
|
|
from report
|
|
- where company_id = #{companyId}
|
|
|
|
- group by creator_id
|
|
|
|
|
|
+ LEFT JOIN report_write_off rwo ON rwo.`report_id`=report.id
|
|
|
|
+ <where>
|
|
|
|
+ company_id = #{companyId} AND (rwo.`write_off` IS NULL OR rwo.`write_off`=0)
|
|
|
|
+ <if test="userId != null and userId !='' ">
|
|
|
|
+ and report.creator_id=#{userId}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ group by report.creator_id
|
|
) tmp2 on tmp1.id = tmp2.userId
|
|
) tmp2 on tmp1.id = tmp2.userId
|
|
</select>
|
|
</select>
|
|
|
|
|