fix(oms/wms): 出库明细出库时间过滤严格按出仓日期outbound_date(去除建档时间兜底),所见即所筛

This commit is contained in:
rcx
2026-09-10 16:38:34 +08:00
parent 0b45ad181f
commit e2da7177f0
2 changed files with 9 additions and 9 deletions
@@ -565,12 +565,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outOrderExpectEndTime != null">
and b.expect_time &lt;= #{outOrderExpectEndTime}
</if>
<!-- 出库时间区间(统计当天出库):优先实际出库时间OUTBOUND_TIME,为空按出仓日期OUTBOUND_DATE,再为空按建档时间兜底 -->
<!-- 出库时间区间(统计当天出库):严格按出仓日期OUTBOUND_DATE过滤(页面所见即所筛) -->
<if test="outboundDateStart != null and outboundDateStart != ''">
and date_format(IFNULL(b.OUTBOUND_TIME, IFNULL(b.OUTBOUND_DATE, b.create_time)), '%Y-%m-%d') &gt;= #{outboundDateStart}
and date_format(b.OUTBOUND_DATE, '%Y-%m-%d') &gt;= #{outboundDateStart}
</if>
<if test="outboundDateEnd != null and outboundDateEnd != ''">
and date_format(IFNULL(b.OUTBOUND_TIME, IFNULL(b.OUTBOUND_DATE, b.create_time)), '%Y-%m-%d') &lt;= #{outboundDateEnd}
and date_format(b.OUTBOUND_DATE, '%Y-%m-%d') &lt;= #{outboundDateEnd}
</if>
and a.del_flag = 1
and b.del_flag = 1