From eb01078c9b0c3f33c680c187ab2f7412f459a1ee Mon Sep 17 00:00:00 2001 From: "HUOJIN\\92525" Date: Fri, 14 Nov 2025 13:35:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=AE=9E=E4=BD=93ID=20String=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=20=E6=94=B9=E6=88=90Long=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cpte/modules/agvTask/entity/AgvTask.java | 10 +++++-- .../agvTask/service/IAgvTaskService.java | 2 +- .../service/impl/AgvTaskServiceImpl.java | 2 +- .../org/cpte/modules/base/entity/Area.java | 7 +++-- .../org/cpte/modules/base/entity/Item.java | 7 +++-- .../org/cpte/modules/base/entity/Point.java | 10 +++++-- .../org/cpte/modules/base/entity/Stock.java | 10 +++++-- .../modules/inventory/entity/Inventory.java | 19 ++++++++---- .../inventory/mapper/InventoryMapper.java | 2 +- .../inventory/service/IInventoryService.java | 2 +- .../service/impl/InventoryServiceImpl.java | 2 +- .../inventoryLog/entity/InventoryLog.java | 19 +++++++----- .../service/IInventoryLogService.java | 14 ++++----- .../service/impl/InventoryLogServiceImpl.java | 16 +++++----- .../receive/controller/AsnController.java | 2 +- .../org/cpte/modules/receive/entity/Asn.java | 9 ++++-- .../modules/receive/entity/AsnDetail.java | 29 +++++++++++-------- .../modules/receive/entity/ReceiveRecord.java | 23 ++++++++++----- .../receive/mapper/AsnDetailMapper.java | 4 +-- .../receive/service/IAsnDetailService.java | 2 +- .../modules/receive/service/IAsnService.java | 3 +- .../service/impl/AsnDetailServiceImpl.java | 2 +- .../receive/service/impl/AsnServiceImpl.java | 4 +-- .../service/impl/ISaiWmsServiceImpl.java | 5 ++-- .../service/impl/ITesAgvServiceImpl.java | 2 +- 25 files changed, 124 insertions(+), 83 deletions(-) diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/entity/AgvTask.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/entity/AgvTask.java index 3fc67fc..022be68 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/entity/AgvTask.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/entity/AgvTask.java @@ -6,6 +6,8 @@ import java.sql.Timestamp; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.*; import com.fasterxml.jackson.annotation.JsonFormat; import org.jeecg.common.aspect.annotation.Dict; @@ -36,14 +38,16 @@ public class AgvTask implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "id") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 业务ID */ @Excel(name = "业务ID", width = 15) @Schema(description = "业务ID") - private java.lang.String businessDetailId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long businessDetailId; /** * 载具编号 @@ -142,7 +146,7 @@ public class AgvTask implements Serializable { */ @Excel(name = "租户ID", width = 15) @Schema(description = "租户ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 创建人 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/service/IAgvTaskService.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/service/IAgvTaskService.java index d82784a..7fec850 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/service/IAgvTaskService.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/service/IAgvTaskService.java @@ -24,6 +24,6 @@ public interface IAgvTaskService extends IService { * @param type 业务类型 * @param agvVendor 供应商 */ - AgvTask createAgvTask(String businessDetailId, Integer status, String carrierCode, String startCode, String endCode, String taskType, String type, String agvVendor); + AgvTask createAgvTask(Long businessDetailId, Integer status, String carrierCode, String startCode, String endCode, String taskType, String type, String agvVendor); } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/service/impl/AgvTaskServiceImpl.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/service/impl/AgvTaskServiceImpl.java index e57bf34..0cb8c54 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/service/impl/AgvTaskServiceImpl.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/agvTask/service/impl/AgvTaskServiceImpl.java @@ -24,7 +24,7 @@ public class AgvTaskServiceImpl extends ServiceImpl impl @Override @Transactional(rollbackFor = Exception.class) - public AgvTask createAgvTask(String businessDetailId, Integer status, String carrierCode, String startCode, String endCode, String taskType, String type, String agvVendor) { + public AgvTask createAgvTask(Long businessDetailId, Integer status, String carrierCode, String startCode, String endCode, String taskType, String type, String agvVendor) { int priority = 99; if (AgvVendorEnum.TES.getValue().equals(agvVendor)) { priority = 3; diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Area.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Area.java index de90a35..6c7709e 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Area.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Area.java @@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import org.jeecg.common.constant.ProvinceCityArea; import org.jeecg.common.util.SpringContextUtils; import lombok.Data; @@ -39,7 +41,8 @@ public class Area implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 库区编码 */ @@ -81,7 +84,7 @@ public class Area implements Serializable { */ @Excel(name = "租户ID", width = 15) @Schema(description = "租户ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 创建人 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Item.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Item.java index 04f60d0..63c7de2 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Item.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Item.java @@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import org.jeecg.common.constant.ProvinceCityArea; import org.jeecg.common.util.SpringContextUtils; import lombok.Data; @@ -39,7 +41,8 @@ public class Item implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 物料编码 */ @@ -82,7 +85,7 @@ public class Item implements Serializable { */ @Excel(name = "租户ID", width = 15) @Schema(description = "租户ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 创建人 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Point.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Point.java index 42646ce..635742a 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Point.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Point.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; import org.jeecg.common.aspect.annotation.AutoDict; @@ -35,14 +37,16 @@ public class Point implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 库区ID */ @Excel(name = "库区ID", width = 15) @Schema(description = "库区ID") @Dict(dictTable = "base_area", dicCode = "id", dicText = "area_name") - private java.lang.String areaId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long areaId; /** * 库位编码 */ @@ -103,7 +107,7 @@ public class Point implements Serializable { */ @Excel(name = "租户ID", width = 15) @Schema(description = "租户ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 创建人 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Stock.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Stock.java index c206184..a3e5e05 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Stock.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/base/entity/Stock.java @@ -6,6 +6,8 @@ import java.util.Date; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import org.jeecg.common.constant.ProvinceCityArea; import org.jeecg.common.util.SpringContextUtils; import lombok.Data; @@ -36,7 +38,8 @@ public class Stock implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 库位ID */ @@ -44,7 +47,8 @@ public class Stock implements Serializable { @Schema(description = "库位ID") @Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code") @TableField(fill = FieldFill.INSERT_UPDATE) - private java.lang.String pointId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long pointId; /** * 容器编码 */ @@ -97,7 +101,7 @@ public class Stock implements Serializable { */ @Excel(name = "租户ID", width = 15) @Schema(description = "租户ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 创建人 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/entity/Inventory.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/entity/Inventory.java index 36b9684..cd825c5 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/entity/Inventory.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/entity/Inventory.java @@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.*; import org.jeecg.common.constant.ProvinceCityArea; import org.jeecg.common.util.SpringContextUtils; @@ -39,28 +41,32 @@ public class Inventory implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "ID") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 物料ID */ @Excel(name = "物料ID", width = 15) @Schema(description = "物料ID") @Dict(dictTable = "base_item", dicCode = "id", dicText = "item_code") - private java.lang.String itemId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long itemId; /** * 库位ID */ @Excel(name = "库位ID", width = 15) @Schema(description = "库位ID") @Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code") - private java.lang.String pointId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long pointId; /** * 容器ID */ @Excel(name = "容器ID", width = 15) @Schema(description = "容器ID") @Dict(dictTable = "base_stock", dicCode = "id", dicText = "stock_code") - private java.lang.String stockId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long stockId; /** * 数量 */ @@ -78,7 +84,8 @@ public class Inventory implements Serializable { */ @Excel(name = "入库记录ID", width = 15) @Schema(description = "入库记录ID") - private java.lang.String receiveRecordId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long receiveRecordId; /** * 外部仓库 */ @@ -134,7 +141,7 @@ public class Inventory implements Serializable { */ @Excel(name = "租户ID", width = 15) @Schema(description = "租户ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 创建人 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/mapper/InventoryMapper.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/mapper/InventoryMapper.java index 89e2056..aa09efc 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/mapper/InventoryMapper.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/mapper/InventoryMapper.java @@ -22,5 +22,5 @@ public interface InventoryMapper extends BaseMapper { * @return 库存数据 */ @Select("select * from data_inventory where stock_id = #{stockId} and quantity>0 for update") - Inventory queryByStockId(@Param("stockId") String stockId); + Inventory queryByStockId(@Param("stockId") Long stockId); } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/service/IInventoryService.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/service/IInventoryService.java index af8a6e4..4146c0a 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/service/IInventoryService.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/service/IInventoryService.java @@ -25,5 +25,5 @@ public interface IInventoryService extends IService { * @param receiveRecord 入库记录 * @return Inventory */ - Inventory createInventory(String stockId, BigDecimal receivedQty, Asn asn, AsnDetail asnDetail, ReceiveRecord receiveRecord); + Inventory createInventory(Long stockId, BigDecimal receivedQty, Asn asn, AsnDetail asnDetail, ReceiveRecord receiveRecord); } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/service/impl/InventoryServiceImpl.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/service/impl/InventoryServiceImpl.java index 4bbd7c8..e944274 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/service/impl/InventoryServiceImpl.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventory/service/impl/InventoryServiceImpl.java @@ -26,7 +26,7 @@ import java.util.Date; public class InventoryServiceImpl extends ServiceImpl implements IInventoryService { @Override @Transactional(rollbackFor = Exception.class) - public Inventory createInventory(String stockId, BigDecimal receivedQty, Asn asn, AsnDetail asnDetail, ReceiveRecord receiveRecord) { + public Inventory createInventory(Long stockId, BigDecimal receivedQty, Asn asn, AsnDetail asnDetail, ReceiveRecord receiveRecord) { Inventory inventory = Inventory.builder() .itemId(asnDetail.getItemId()) .pointId(receiveRecord.getPointId()) diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/entity/InventoryLog.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/entity/InventoryLog.java index 2ff49c0..aa51681 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/entity/InventoryLog.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/entity/InventoryLog.java @@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.*; import org.jeecg.common.constant.ProvinceCityArea; import org.jeecg.common.util.SpringContextUtils; @@ -39,7 +41,8 @@ public class InventoryLog implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "id") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 日志类型:1入库,2分配,3取消分配,4拣货,5退拣,6.出库,7库存调整,8库位转移,9盘点调整 */ @@ -58,27 +61,27 @@ public class InventoryLog implements Serializable { */ @Excel(name = "业务明细ID", width = 15) @Schema(description = "业务明细ID") - private java.lang.String businessDetailId; + private java.lang.Long businessDetailId; /** * 库存ID */ @Excel(name = "库存ID", width = 15) @Schema(description = "库存ID") - private java.lang.String inventoryId; + private java.lang.Long inventoryId; /** * 物料ID */ @Excel(name = "物料ID", width = 15) @Schema(description = "物料ID") @Dict(dictTable = "base_item", dicCode = "id", dicText = "item_code") - private java.lang.String itemId; + private java.lang.Long itemId; /** * 原库位置 */ @Excel(name = "原库位置", width = 15) @Schema(description = "原库位置") @Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code") - private java.lang.String fromPointId; + private java.lang.Long fromPointId; /** * 目标库位 @@ -86,14 +89,14 @@ public class InventoryLog implements Serializable { @Excel(name = "目标库位", width = 15) @Schema(description = "目标库位") @Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code") - private java.lang.String toPointId; + private java.lang.Long toPointId; /** * 容器ID */ @Excel(name = "容器ID", width = 15) @Schema(description = "容器ID") @Dict(dictTable = "base_stock", dicCode = "id", dicText = "stock_code") - private java.lang.String stockId; + private java.lang.Long stockId; /** * 批次号 */ @@ -146,7 +149,7 @@ public class InventoryLog implements Serializable { */ @Excel(name = "租户ID", width = 15) @Schema(description = "租户ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 创建人 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/IInventoryLogService.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/IInventoryLogService.java index 64329ca..0b2c110 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/IInventoryLogService.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/IInventoryLogService.java @@ -31,7 +31,7 @@ public interface IInventoryLogService extends IService { * @param businessDetailId 业务明细ID * @param description 描述 */ - void addInboundInventoryLog(Inventory inventory, String srcPointId, BigDecimal changeQty, String businessNo, String businessDetailId, String description); + void addInboundInventoryLog(Inventory inventory, Long srcPointId, BigDecimal changeQty, String businessNo, Long businessDetailId, String description); /** * 添加出库库存日志 @@ -42,7 +42,7 @@ public interface IInventoryLogService extends IService { * @param businessDetailId 业务明细ID * @param description 描述 */ - void addOutboundInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, String businessDetailId, String description); + void addOutboundInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, Long businessDetailId, String description); /** @@ -54,7 +54,7 @@ public interface IInventoryLogService extends IService { * @param businessDetailId 业务明细ID * @param description 描述 */ - void addAllocInventoryLog(Inventory inventory, BigDecimal AllocatedQty, String businessNo, String businessDetailId, String description); + void addAllocInventoryLog(Inventory inventory, BigDecimal AllocatedQty, String businessNo, Long businessDetailId, String description); /** @@ -66,7 +66,7 @@ public interface IInventoryLogService extends IService { * @param businessDetailId 业务明细ID * @param description 描述 */ - void addUnAllocInventoryLog(Inventory inventory, BigDecimal cancelQty, String businessNo, String businessDetailId, String description); + void addUnAllocInventoryLog(Inventory inventory, BigDecimal cancelQty, String businessNo, Long businessDetailId, String description); /** @@ -78,7 +78,7 @@ public interface IInventoryLogService extends IService { * @param businessDetailId 业务明细ID * @param description 描述 */ - void addPickInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, String businessDetailId, String description); + void addPickInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, Long businessDetailId, String description); /** * 添加退拣库存日志-拣货后取消,库存回退 @@ -89,7 +89,7 @@ public interface IInventoryLogService extends IService { * @param businessDetailId 业务明细ID * @param description 描述 */ - void addUnPickInventoryLog(Inventory inventory, BigDecimal returnQty, String businessNo, String businessDetailId, String description); + void addUnPickInventoryLog(Inventory inventory, BigDecimal returnQty, String businessNo, Long businessDetailId, String description); /** * 添加库存调整库存日志 @@ -110,7 +110,7 @@ public interface IInventoryLogService extends IService { * @param businessNo 业务单号 * @param description 描述 */ - void addMoveInventoryLog(Inventory inventory, String toPointId, BigDecimal moveQty, String businessNo, String description); + void addMoveInventoryLog(Inventory inventory, Long toPointId, BigDecimal moveQty, String businessNo, String description); /** * 添加库存盘点库存日志 diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/impl/InventoryLogServiceImpl.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/impl/InventoryLogServiceImpl.java index 62a213a..b696c40 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/impl/InventoryLogServiceImpl.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/impl/InventoryLogServiceImpl.java @@ -39,7 +39,7 @@ public class InventoryLogServiceImpl extends ServiceImpl> queryAsnDetailListByMainId(@RequestParam(name="id",required=true) String id) { + public Result> queryAsnDetailListByMainId(@RequestParam(name="id",required=true) Long id) { List asnDetailList = asnDetailService.selectByMainId(id); return Result.OK(asnDetailList); } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/Asn.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/Asn.java index 0f483ac..a9a3ab7 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/Asn.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/Asn.java @@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.NoArgsConstructor; @@ -41,7 +43,8 @@ public class Asn implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 系统单号 */ @@ -53,7 +56,7 @@ public class Asn implements Serializable { */ @Excel(name = "外部单号", width = 15) @Schema(description = "外部单号") - private java.lang.String thirdPartyOrderNo; + private java.lang.String thirdOrderNo; /** * 任务号 */ @@ -118,7 +121,7 @@ public class Asn implements Serializable { */ @Excel(name = "仓库ID", width = 15) @Schema(description = "仓库ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 创建人 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/AsnDetail.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/AsnDetail.java index 4b57409..aef54e0 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/AsnDetail.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/AsnDetail.java @@ -3,6 +3,8 @@ package org.cpte.modules.receive.entity; import java.io.Serializable; import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.NoArgsConstructor; @@ -40,31 +42,36 @@ public class AsnDetail implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 入库单 */ @Schema(description = "入库单") - private java.lang.String asnId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long asnId; /** * 物料 */ @Excel(name = "物料", width = 15) @Schema(description = "物料") - private java.lang.String itemId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long itemId; /** * 容器 */ @Excel(name = "容器", width = 15) @Schema(description = "容器") - private java.lang.String stockId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long stockId; /** * 库位 */ @Excel(name = "库位", width = 15) @Schema(description = "库位") - private java.lang.String pointId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long pointId; /** * 行号 */ @@ -122,10 +129,10 @@ public class AsnDetail implements Serializable { @Schema(description = "序列号") private java.lang.String propC2; /** - * 库存状态 + * 外部库存状态 */ - @Excel(name = "库存状态", width = 15) - @Schema(description = "库存状态") + @Excel(name = "外部库存状态", width = 15) + @Schema(description = "外部库存状态") private java.lang.String propC3; /** * 扩展字段 @@ -152,7 +159,7 @@ public class AsnDetail implements Serializable { */ @Excel(name = "来源ID", width = 15) @Schema(description = "来源ID") - private java.lang.String sourceId; + private java.lang.Long sourceId; /** * 来源 */ @@ -164,7 +171,7 @@ public class AsnDetail implements Serializable { */ @Excel(name = "仓库ID", width = 15) @Schema(description = "仓库ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 所属部门 */ @@ -195,6 +202,4 @@ public class AsnDetail implements Serializable { @Schema(description = "更新日期") private java.util.Date updateTime; - @Version - private Integer updateCount; } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/ReceiveRecord.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/ReceiveRecord.java index 733026a..e3372dc 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/ReceiveRecord.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/entity/ReceiveRecord.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; @@ -28,27 +30,32 @@ public class ReceiveRecord implements Serializable { */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键") - private java.lang.String id; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long id; /** * 入库明细 */ @Schema(description = "入库明细") - private java.lang.String asnDetailId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long asnDetailId; /** * 容器 */ @Schema(description = "容器") - private java.lang.String stockId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long stockId; /** * 库位 */ @Schema(description = "库位") - private java.lang.String pointId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long pointId; /** * 物料 */ @Schema(description = "物料") - private java.lang.String itemId; + @JsonSerialize(using = ToStringSerializer.class) + private java.lang.Long itemId; /** * 收货数量 */ @@ -65,9 +72,9 @@ public class ReceiveRecord implements Serializable { @Schema(description = "序列号") private java.lang.String propC2; /** - * 库存状态 + * 外部库存状态 */ - @Schema(description = "库存状态") + @Schema(description = "外部库存状态") private java.lang.String propC3; /** * 生产日期 @@ -85,7 +92,7 @@ public class ReceiveRecord implements Serializable { * 仓库ID */ @Schema(description = "仓库ID") - private java.lang.Integer tenantId; + private java.lang.Long tenantId; /** * 所属部门 */ diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/mapper/AsnDetailMapper.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/mapper/AsnDetailMapper.java index b586d2d..47b0abf 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/mapper/AsnDetailMapper.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/mapper/AsnDetailMapper.java @@ -30,7 +30,7 @@ public interface AsnDetailMapper extends BaseMapper { * @param mainId 主表id * @return List */ - public List selectByMainId(@Param("mainId") String mainId); + public List selectByMainId(@Param("mainId") Long mainId); /** @@ -41,5 +41,5 @@ public interface AsnDetailMapper extends BaseMapper { * @return AsnDetail */ @Select("select * from data_asn_detail where stock_id = #{stockId} and status = #{status} for update") - AsnDetail queryByStockCode(@Param("stockId") String stockId, @Param("status") Integer status); + AsnDetail queryByStockCode(@Param("stockId") Long stockId, @Param("status") Integer status); } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/IAsnDetailService.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/IAsnDetailService.java index 26ff73f..eaf0e4b 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/IAsnDetailService.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/IAsnDetailService.java @@ -18,5 +18,5 @@ public interface IAsnDetailService extends IService { * @param mainId 主表id * @return List */ - public List selectByMainId(String mainId); + public List selectByMainId(Long mainId); } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/IAsnService.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/IAsnService.java index 957d488..5d29f0c 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/IAsnService.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/IAsnService.java @@ -5,7 +5,6 @@ import org.cpte.modules.receive.entity.Asn; import com.baomidou.mybatisplus.extension.service.IService; import java.io.Serializable; -import java.math.BigDecimal; import java.util.Collection; import java.util.List; @@ -53,6 +52,6 @@ public interface IAsnService extends IService { * @param asnDetailId 入库明细ID * @param pointCode 目标库位 */ - void receiveGoods(String asnDetailId, String pointCode); + void receiveGoods(Long asnDetailId, String pointCode); } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/impl/AsnDetailServiceImpl.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/impl/AsnDetailServiceImpl.java index 58a47b1..766dad5 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/impl/AsnDetailServiceImpl.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/impl/AsnDetailServiceImpl.java @@ -21,7 +21,7 @@ public class AsnDetailServiceImpl extends ServiceImpl selectByMainId(String mainId) { + public List selectByMainId(Long mainId) { return asnDetailMapper.selectByMainId(mainId); } } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/impl/AsnServiceImpl.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/impl/AsnServiceImpl.java index 703b55b..7bd4ebb 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/impl/AsnServiceImpl.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/receive/service/impl/AsnServiceImpl.java @@ -160,7 +160,7 @@ public class AsnServiceImpl extends ServiceImpl implements IAsnS @Override @Transactional(rollbackFor = Exception.class) - public void receiveGoods(String asnDetailId, String pointCode) { + public void receiveGoods(Long asnDetailId, String pointCode) { //入库明细任务 AsnDetail asnDetail = asnDetailMapper.selectById(asnDetailId); if (asnDetail == null) { @@ -214,7 +214,7 @@ public class AsnServiceImpl extends ServiceImpl implements IAsnS /** * 创建入库记录 */ - public ReceiveRecord createReceiveRecord(AsnDetail asnDetail, BigDecimal receivedQty, String dstPointId) { + public ReceiveRecord createReceiveRecord(AsnDetail asnDetail, BigDecimal receivedQty, Long dstPointId) { ReceiveRecord receiveRecord = ReceiveRecord.builder() .asnDetailId(asnDetail.getId()) .stockId(asnDetail.getStockId()) diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/saiWms/service/impl/ISaiWmsServiceImpl.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/saiWms/service/impl/ISaiWmsServiceImpl.java index 9613499..6c44a15 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/saiWms/service/impl/ISaiWmsServiceImpl.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/saiWms/service/impl/ISaiWmsServiceImpl.java @@ -110,11 +110,10 @@ public class ISaiWmsServiceImpl implements ISaiWmsService { * 构建入库单 */ private Asn buildAsn(InboundRequest inboundRequest) { - int tenantId = oConvertUtils.getInt(TenantContext.getTenant(), 1000); String orderNo = (codeGeneratorUtil.generateSerialNumber("RK")); return Asn.builder() .orderNo(orderNo) - .thirdPartyOrderNo(inboundRequest.getOrderNo()) + .thirdOrderNo(inboundRequest.getOrderNo()) .no(inboundRequest.getNo()) .whCode(inboundRequest.getWhCode()) .supplierCode(inboundRequest.getSupplierCode()) @@ -122,7 +121,7 @@ public class ISaiWmsServiceImpl implements ISaiWmsService { .status(AsnStatusEnum.CREATED.getValue()) .orderDate(new Date()) .sysOrgCode("A05") - .tenantId(tenantId) + .tenantId(1000L) .createBy("赛意") .build(); } diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/tesAgv/service/impl/ITesAgvServiceImpl.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/tesAgv/service/impl/ITesAgvServiceImpl.java index 5da7785..3ffee93 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/tesAgv/service/impl/ITesAgvServiceImpl.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/tesAgv/service/impl/ITesAgvServiceImpl.java @@ -157,7 +157,7 @@ public class ITesAgvServiceImpl implements ITesAgvService { * * @param agvTask 任务 */ - private void handleEnd(String asnDetailId, AgvTask agvTask) { + private void handleEnd(Long asnDetailId, AgvTask agvTask) { //确认收货 iAsnService.receiveGoods(asnDetailId, agvTask.getEndCode()); agvTask.setStatus(AgvStatusEnum.COMPLETED.getValue());