feat(oms/wms): 出库明细单据类型回显/查询条件/导出列补齐

- 出库明细查询新增orderTypeCode(精确)/orderTypeName(模糊)查询条件
- OMS出库明细SQL补查b.order_type_code/name,响应回显orderTypeCode/orderTypeName(原恒为null)
- WMS出库明细导出新增"业务单据类型"列(第31列)
This commit is contained in:
rcx
2026-09-10 16:18:11 +08:00
parent 260ec1f369
commit 0b45ad181f
6 changed files with 45 additions and 1 deletions
@@ -45,6 +45,12 @@ public class ExecutionOutMaterialDetailQueryDTO extends BaseVOEntity {
@ApiModelProperty("出库单类型编码")
private String outOrderTypeCode;
@ApiModelProperty("出库单类型编码(与outOrderTypeCode同义)")
private String orderTypeCode;
@ApiModelProperty("出库单类型名称(模糊查询)")
private String orderTypeName;
@ApiModelProperty("出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-拣货中 6-波次中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭")
private Integer outStatus;
@@ -102,6 +102,12 @@ public class QueryOrderOverStockDO extends BaseVOEntity {
@Excel(name = "出库单类型编码")
private String outOrderTypeCode;
@ApiModelProperty("出库单类型编码(与outOrderTypeCode同义)")
private String orderTypeCode;
@ApiModelProperty("出库单类型名称")
private String orderTypeName;
@ApiModelProperty("出库单类型名称")
@Excel(name = "出库单类型名称")
private String outOrderTypeName;
@@ -456,6 +456,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="outOrderAuditStatus" column="out_order_audit_status" />
<result property="issueStatus" column="issue_status" />
<result property="materialClassifyName" column="material_classify_name" />
<result property="orderTypeCode" column="order_type_code" />
<result property="orderTypeName" column="order_type_name" />
<result property="orderShipperId" column="order_shipper_id" />
<result property="orderShipperCode" column="order_shipper_code" />
<result property="orderShipperName" column="order_shipper_name" />
@@ -501,6 +503,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.shipper_id as order_shipper_id,
b.shipper_code as order_shipper_code,
b.shipper_name as order_shipper_name,
b.order_type_code,
b.order_type_name,
b.OUTBOUND_DATE as order_outbound_date,
b.OUTBOUND_TIME as order_outbound_time,
b.status as out_order_status,
@@ -546,6 +550,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outOrderTypeCode != null and outOrderTypeCode != ''">
and b.order_type_code = #{outOrderTypeCode}
</if>
<if test="orderTypeCode != null and orderTypeCode != ''">
and b.order_type_code = #{orderTypeCode}
</if>
<if test="orderTypeName != null and orderTypeName != ''">
and b.order_type_name like concat('%', #{orderTypeName}, '%')
</if>
<!-- 出库单展示状态issue_status: 0-已创建 2-已审核 3-已驳回 4-已出库;
执行出库单status不随WMS出库完成流转(回写被注释)"已出库"以issue_status=4为准 -->
and b.issue_status = 4
@@ -105,4 +105,7 @@ public class OutMaterialDetailExportPO {
@Excel(name = "单据状态", sort = 30, readConverterExp = "9=已出库,12=已复核,13=已交接")
private Integer outOrderStatus;
@Excel(name = "业务单据类型", sort = 31)
private String orderTypeName;
}
@@ -41,6 +41,12 @@ public class OutMaterialDetailQueryDTO extends BaseVOEntity {
@ApiModelProperty("出库单类型编码")
private String outOrderTypeCode;
@ApiModelProperty("出库单类型编码(与outOrderTypeCode同义)")
private String orderTypeCode;
@ApiModelProperty("出库单类型名称(模糊查询)")
private String orderTypeName;
@ApiModelProperty("物料基础信息id")
private Long materialBaseInfoId;
@@ -466,6 +466,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outOrderTypeCode != null and outOrderTypeCode != ''">
and b.order_type_code = #{outOrderTypeCode}
</if>
<if test="orderTypeCode != null and orderTypeCode != ''">
and b.order_type_code = #{orderTypeCode}
</if>
<if test="orderTypeName != null and orderTypeName != ''">
and b.order_type_name like concat('%', #{orderTypeName}, '%')
</if>
<!-- 出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核 13-已交接,只统计已出库(9/12/13)的明细 -->
and b.status in (9, 12, 13)
<!-- 实际出仓日期区间(为空的历史单按建档时间兜底),用于统计当天出库 -->
@@ -523,7 +529,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.in_order_number as inOrderNumber,
c.material_classify_name as materialClassifyName,
CAST(NULL AS DECIMAL) as totalAmount,
b.status as outOrderStatus
b.status as outOrderStatus,
b.order_type_name as orderTypeName
from out_material_detail a
join stock_out_order b on a.out_order_number = b.out_order_number
left join material_base_info c on a.material_base_info_id = c.material_base_info_id
@@ -565,6 +572,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outOrderTypeCode != null and outOrderTypeCode != ''">
and b.order_type_code = #{outOrderTypeCode}
</if>
<if test="orderTypeCode != null and orderTypeCode != ''">
and b.order_type_code = #{orderTypeCode}
</if>
<if test="orderTypeName != null and orderTypeName != ''">
and b.order_type_name like concat('%', #{orderTypeName}, '%')
</if>
and b.status in (9, 12, 13)
<if test="outboundDateStart != null and outboundDateStart != ''">
and date_format(IFNULL(b.outbound_date, b.create_time), '%Y-%m-%d') &gt;= #{outboundDateStart}