Jelajahi Sumber

补充调休前端,调休逻辑适配转义

zhouyy 5 bulan lalu
induk
melakukan
8379ba3c51

+ 9 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -1583,10 +1583,16 @@
                 </where>
             )tmp1
                 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
-                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
     </select>