liyong
2026-04-30 c2ad2126d6f8423e0a5e6e20bbb91ef6bb1cffc0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.production.mapper.ProductionProductReportDailyMapper">
 
    <select id="listDailySummary" resultType="com.ruoyi.production.dto.ProductionReportDailySummaryDto">
        select
        report_date as reportDate,
        sum(duration_minutes) as durationMinutes
        from production_product_report_daily
        where 1=1
        <if test="workOrderId != null">
            and work_order_id = #{workOrderId}
        </if>
        <if test="productProcessRouteItemId != null">
            and product_process_route_item_id = #{productProcessRouteItemId}
        </if>
        <if test="userId != null">
            and user_id = #{userId}
        </if>
        <if test="startDate != null">
            and report_date <![CDATA[ >= ]]> #{startDate}
        </if>
        <if test="endDate != null">
            and report_date <![CDATA[ <= ]]> #{endDate}
        </if>
        group by report_date
        order by report_date
    </select>
 
</mapper>