feat(oms/wms): 出入库明细查询-已入库/已出库状态过滤、WMS新增出入库明细查询页面及专用导出

一、OMS 入库/出库明细查询(修复+导出)
- 出库明细SQL状态过滤由=9改为in(9,12,13):已出库/已复核/已交接均算已出库,与出库排名统计口径一致
- 入库明细SQL固定只统计已入库(status=5)单据
- 入/出库明细SQL新增实际入仓/出仓日期区间过滤(IFNULL(实际日期,建档时间)兜底),支持统计当天
- 新增Excel导出接口 /executionInMaterialDetailApi/exportWithOrder、/executionOutMaterialDetailApi/exportWithOrder(全量不分页)
- 退货回仓统计:通过入库单类型 inOrderTypeCode=tui_huo_ru_ku(退货入库)过滤

二、WMS 新增入库/出库明细查询页面
- 入库明细查询:GET /materialDetailApi/listWithOrder(明细关联入库单,固定已入库(5),level=1防父子行重复计数)
- 出库明细查询:GET /outMaterialDetailApi/listWithOrder(新建OutMaterialDetailApi,关联出库单,固定in(9,12,13))
- 返回单头字段:单据状态/审核状态/货主/供应商/客户/单据类型/实际入仓出仓日期/保额/货物类型等
- 入库客户编号/名称/客户预约名称经通知单号关联notice_order取得(入库单表无客户字段)

三、WMS 明细导出专用列集
- 出库导出/exportWithOrder:按客户要求30列导出,含出库单号/出库日期/客户信息/LOT号/费用组(单价、总价、折扣、仓租、合同收费)等
- 入库导出/exportWithOrder:按客户要求30列导出,含客户信息/入库日期/每件保额/收费标准/有效期等
- 单据状态、货物种类导出时自动转文字;导出列顺序与客户清单一致
- 火险保费、入库单件净重(KG)暂无数据来源,导出空列占位,待确认数据来源后补充

四、其他
- 查询条件不传日期时默认查全部日期,统计当天由前端传当天日期区间实现
- 数据权限:非平台超管按登录人一级组织过滤
This commit is contained in:
rcx
2026-09-09 15:49:09 +08:00
parent b7cacaeb8d
commit e58b6cb9ce
33 changed files with 1314 additions and 6 deletions
@@ -543,15 +543,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outOrderTypeCode != null and outOrderTypeCode != ''">
and b.order_type_code = #{outOrderTypeCode}
</if>
<if test="outStatus != null ">
and b.status = #{outStatus}
</if>
<!-- 出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-拣货中 6-波次中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核 13-已交接,只统计已出库(9/12/13)的明细 -->
and b.status in (9, 12, 13)
<if test="outOrderExpectStartTime != null">
and b.expect_time &gt;= #{outOrderExpectStartTime}
</if>
<if test="outOrderExpectEndTime != null">
and b.expect_time &lt;= #{outOrderExpectEndTime}
</if>
<!-- 实际出仓日期区间(为空的历史单按建档时间兜底),用于统计当天出库 -->
<if test="outboundDateStart != null and outboundDateStart != ''">
and date_format(IFNULL(b.OUTBOUND_DATE, b.create_time), '%Y-%m-%d') &gt;= #{outboundDateStart}
</if>
<if test="outboundDateEnd != null and outboundDateEnd != ''">
and date_format(IFNULL(b.OUTBOUND_DATE, b.create_time), '%Y-%m-%d') &lt;= #{outboundDateEnd}
</if>
and a.del_flag = 1
and b.del_flag = 1
</where>