feat(oms/wms): 出入库明细货物种类改显物料分类名称、单据类型回显与查询条件

一、货物种类
- O/W出入库明细查询新增返回materialClassifyName(物料分类名称,多个逗号分隔)
- WMS入库导出"货物种类"列、出库导出"种类"列改为物料分类名称(原为goodsType编码转文字)
- OMS出入库导出新增"货物种类"列,货物类型列加字典转换不再显示0/1/2编码

二、单据类型
- O/W入库明细查询新增orderTypeCode/orderTypeName回显与查询条件(编码精确/名称模糊)
- WMS入库明细导出新增"业务单据类型"列(第31列)

三、时间字段
- OMS出库明细查询返回增加completeTime完成时间
- OMS orderOutboundDate出仓日期格式恢复为yyyy-MM-dd HH:mm:ss
- OMS出库时间过滤改为三级兜底:出库时间OUTBOUND_TIME→出仓日期→建档时间

四、修复
- WMS出库导出SQL修复TOTAL_PRICE列不存在(总价改用TOTAL_AMOUNT),总价值暂无来源占位空列
This commit is contained in:
rcx
2026-09-10 11:35:30 +08:00
parent 12f1d99e02
commit 8af8197901
15 changed files with 96 additions and 18 deletions
@@ -86,8 +86,8 @@ public class InMaterialDetailExportPO {
@Excel(name = "备注", sort = 23)
private String remark;
@Excel(name = "货物种类", sort = 24, readConverterExp = "0=物料,1=半成品,2=成品")
private Integer goodsType;
@Excel(name = "货物种类", sort = 24)
private String materialClassifyName;
@Excel(name = "总重量", sort = 25)
private BigDecimal totalGrossWeight;
@@ -106,4 +106,7 @@ public class InMaterialDetailExportPO {
@Excel(name = "单据状态", sort = 30, readConverterExp = "5=已入库")
private Integer inOrderStatus;
@Excel(name = "业务单据类型", sort = 31)
private String orderTypeName;
}
@@ -41,4 +41,7 @@ public class InMaterialDetailWithOrderPO extends InMaterialDetailPO {
@ApiModelProperty("货物类型: 0-物料 1-半成品 2-成品")
@Excel(name = "货物类型: 0-物料 1-半成品 2-成品")
private Integer goodsType;
@ApiModelProperty("货物种类(物料分类名称,多个逗号分隔)")
private String materialClassifyName;
}
@@ -97,8 +97,8 @@ public class OutMaterialDetailExportPO {
@Excel(name = "入库单号", sort = 27)
private String inOrderNumber;
@Excel(name = "种类", sort = 28, readConverterExp = "0=物料,1=半成品,2=成品")
private Integer goodsType;
@Excel(name = "种类", sort = 28)
private String materialClassifyName;
@Excel(name = "总价值", sort = 29)
private BigDecimal totalAmount;
@@ -38,6 +38,9 @@ public class OutMaterialDetailWithOrderPO extends OutMaterialDetailPO {
@ApiModelProperty("出库单状态(与outOrderStatus同值,便于前端按status字段名绑定)")
private Integer status;
@ApiModelProperty("货物种类(物料分类名称,多个逗号分隔)")
private String materialClassifyName;
@ApiModelProperty("出库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
@Excel(name = "出库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
private Integer outOrderAuditStatus;
@@ -48,6 +51,11 @@ public class OutMaterialDetailWithOrderPO extends OutMaterialDetailPO {
@Excel(name = "出仓日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date outboundDate;
@ApiModelProperty("完成时间(出库完成时间,Excel导入/录单时填写)")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date completeTime;
@ApiModelProperty("保额")
@Excel(name = "保额")
private BigDecimal insureAmount;
@@ -78,6 +78,12 @@ public class QueryOrderOverStockDO extends BaseVOEntity {
@Excel(name = "入库单类型编码")
private String inOrderTypeCode;
@ApiModelProperty("入库单类型编码(与inOrderTypeCode同义)")
private String orderTypeCode;
@ApiModelProperty("入库单类型名称")
private String orderTypeName;
@ApiModelProperty("入库单类型名称")
@Excel(name = "入库单类型名称")
private String inOrderTypeName;
@@ -41,6 +41,12 @@ public class InMaterialDetailQueryDTO extends BaseVOEntity {
@ApiModelProperty("入库单类型编码(如退货入库 tui_huo_ru_ku")
private String inOrderTypeCode;
@ApiModelProperty("入库单类型编码(与inOrderTypeCode同义)")
private String orderTypeCode;
@ApiModelProperty("入库单类型名称(模糊查询)")
private String orderTypeName;
@ApiModelProperty("物料基础信息id")
private Long materialBaseInfoId;
@@ -391,10 +391,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="directWarehouse" column="direct_warehouse" />
<result property="annexUrl" column="annex_url" />
<result property="outOrderStatus" column="out_order_status" />
<result property="status" column="status" />
<result property="outOrderAuditStatus" column="out_order_audit_status"/>
<result property="outboundDate" column="outbound_date" />
<result property="completeTime" column="complete_time" />
<result property="insureAmount" column="insure_amount" />
<result property="goodsType" column="goods_type" />
<result property="materialClassifyName" column="material_classify_name" />
</resultMap>
<!--
@@ -418,9 +421,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
, b.direct_warehouse
, b.annex_url
, b.status as out_order_status
, b.status as status
, b.audit_status as out_order_audit_status
, b.outbound_date
, c.insure_amount, c.goods_type
, b.complete_time
, c.insure_amount, c.goods_type, c.material_classify_name
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
@@ -506,7 +511,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.weight_limit as weightLimit,
a.single_volume as singleVolume,
a.unit_price as unitPrice,
a.TOTAL_PRICE as totalPrice,
a.TOTAL_AMOUNT as totalPrice,
a.discount_rate as discountRate,
a.monthly_warehouse_fee as monthlyWarehouseFee,
a.half_month_wh_fee as halfMonthWhFee,
@@ -516,8 +521,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.TOTAL_GROSS_WEIGHT as totalGrossWeight,
a.storage_name as storageName,
a.in_order_number as inOrderNumber,
c.goods_type as goodsType,
a.TOTAL_AMOUNT as totalAmount,
c.material_classify_name as materialClassifyName,
CAST(NULL AS DECIMAL) as totalAmount,
b.status as outOrderStatus
from out_material_detail a
join stock_out_order b on a.out_order_number = b.out_order_number
@@ -380,6 +380,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="warehouseDate" column="warehouse_date" />
<result property="insureAmount" column="insure_amount" />
<result property="goodsType" column="goods_type" />
<result property="materialClassifyName" column="material_classify_name" />
</resultMap>
<!--
@@ -407,6 +408,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
, b.audit_status as in_order_audit_status
, b.warehouse_date
, c.insure_amount, c.goods_type
, c.material_classify_name
from in_material_detail a
join stock_in_order b on a.in_order_number = b.in_order_number
left join material_base_info c on a.material_base_info_id = c.material_base_info_id
@@ -447,6 +449,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inOrderTypeCode != null and inOrderTypeCode != ''">
and b.order_type_code = #{inOrderTypeCode}
</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-已关闭,只统计已入库(5)的明细 -->
and b.status = 5
<!-- 实际入仓日期区间(为空的历史单按建档时间兜底),用于统计当天入库 -->
@@ -494,13 +502,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.contract_fee as contractFee,
CAST(NULL AS DECIMAL) as fireInsureFee,
a.remark as remark,
c.goods_type as goodsType,
c.material_classify_name as materialClassifyName,
a.TOTAL_GROSS_WEIGHT as totalGrossWeight,
c.insure_amount as insureAmount,
a.storage_name as storageName,
c.charge_standard as chargeStandard,
a.EXPIRY_DATE as expiryDate,
b.status as inOrderStatus
b.status as inOrderStatus,
b.order_type_name as orderTypeName
from in_material_detail a
join stock_in_order b on a.in_order_number = b.in_order_number
left join material_base_info c on a.material_base_info_id = c.material_base_info_id
@@ -542,6 +551,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inOrderTypeCode != null and inOrderTypeCode != ''">
and b.order_type_code = #{inOrderTypeCode}
</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 = 5
<if test="warehouseDateStart != null and warehouseDateStart != ''">
and date_format(IFNULL(b.warehouse_date, b.create_time), '%Y-%m-%d') &gt;= #{warehouseDateStart}