<?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>
|