From 0eb47793a8c78d087d34a8665f3fa1fb9ca8b249 Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Thu, 3 Sep 2026 18:00:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=BA=93=E5=AD=98):=20OMS/WMS=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=9F=A5=E8=AF=A2=E5=85=A5=E5=BA=93=E6=97=B6=E9=97=B4?= =?UTF-8?q?/=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E5=8F=AA=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E5=B9=B4=E6=9C=88=E6=97=A5=EF=BC=8C=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E6=97=B6=E5=88=86=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 入库时间(createTime)/更新时间(updateTime)继承自全系统基类 BaseVOEntity,默认序列化带时分秒;库存查询导出复用 /list 接口,前端取 JSON 值直接进 Excel,导出后无法在 Excel 里修改格式 - 两个库存 PO 覆盖 getCreateTime/getUpdateTime 并收窄 @JsonFormat 为 yyyy-MM-dd,仅影响 OMS/WMS 库存查询的显示与导出,不改动 BaseVOEntity 全局行为 - 页面列表/详情回显同步变为纯年月日;排序仍按原始时间值,逻辑不变 --- .../po/ReservationMaterialInventoryPO.java | 15 +++++++++++++++ .../repository/po/MaterialInventoryPO.java | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationMaterialInventory/repository/po/ReservationMaterialInventoryPO.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationMaterialInventory/repository/po/ReservationMaterialInventoryPO.java index 364e0bb55..175f9f3dc 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationMaterialInventory/repository/po/ReservationMaterialInventoryPO.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationMaterialInventory/repository/po/ReservationMaterialInventoryPO.java @@ -232,4 +232,19 @@ public class ReservationMaterialInventoryPO extends MaterialBasePO { @ApiModelProperty("LOT编号") @Excel(name = "LOT编号") private String lotNumber; + + // 入库时间(createTime)/更新时间(updateTime)继承自 BaseVOEntity,默认带时分秒; + // 库存查询导出复用 /list 接口,前端取 JSON 值直接进 Excel,这里覆盖 getter 只保留年月日。 + // 不改 BaseVOEntity(全系统基类,其他模块时间列仍需时分秒),仅收窄本 PO 的序列化格式(与 WMS 库存查询一致) + @Override + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + public Date getCreateTime() { + return super.getCreateTime(); + } + + @Override + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + public Date getUpdateTime() { + return super.getUpdateTime(); + } } \ No newline at end of file diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/materialInventory/repository/po/MaterialInventoryPO.java b/mhd_wms/src/main/java/com/mhd/wms/domain/materialInventory/repository/po/MaterialInventoryPO.java index f785b7190..6a1bc7539 100644 --- a/mhd_wms/src/main/java/com/mhd/wms/domain/materialInventory/repository/po/MaterialInventoryPO.java +++ b/mhd_wms/src/main/java/com/mhd/wms/domain/materialInventory/repository/po/MaterialInventoryPO.java @@ -240,4 +240,19 @@ public class MaterialInventoryPO extends MaterialBasePO { @ApiModelProperty("规格型号") @Excel(name = "规格型号") private String specificationModel; + + // 入库时间(createTime)/更新时间(updateTime)继承自 BaseVOEntity,默认带时分秒; + // 库存查询导出复用 /list 接口,前端取 JSON 值直接进 Excel,这里覆盖 getter 只保留年月日。 + // 不改 BaseVOEntity(全系统基类,其他模块时间列仍需时分秒),仅收窄本 PO 的序列化格式(与 OMS 库存查询一致) + @Override + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + public Date getCreateTime() { + return super.getCreateTime(); + } + + @Override + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + public Date getUpdateTime() { + return super.getUpdateTime(); + } } \ No newline at end of file