将实体ID String 类型 改成Long类型

main
HUOJIN\92525 2025-11-14 13:35:40 +08:00
parent 6972fccd1c
commit eb01078c9b
25 changed files with 124 additions and 83 deletions

View File

@ -6,6 +6,8 @@ import java.sql.Timestamp;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.*; import lombok.*;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.aspect.annotation.Dict;
@ -36,14 +38,16 @@ public class AgvTask implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id") @Schema(description = "id")
private java.lang.String id; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long id;
/** /**
* ID * ID
*/ */
@Excel(name = "业务ID", width = 15) @Excel(name = "业务ID", width = 15)
@Schema(description = "业务ID") @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) @Excel(name = "租户ID", width = 15)
@Schema(description = "租户ID") @Schema(description = "租户ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -24,6 +24,6 @@ public interface IAgvTaskService extends IService<AgvTask> {
* @param type * @param type
* @param agvVendor * @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);
} }

View File

@ -24,7 +24,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl
@Override @Override
@Transactional(rollbackFor = Exception.class) @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; int priority = 99;
if (AgvVendorEnum.TES.getValue().equals(agvVendor)) { if (AgvVendorEnum.TES.getValue().equals(agvVendor)) {
priority = 3; priority = 3;

View File

@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic; 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.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils; import org.jeecg.common.util.SpringContextUtils;
import lombok.Data; import lombok.Data;
@ -39,7 +41,8 @@ public class Area implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @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) @Excel(name = "租户ID", width = 15)
@Schema(description = "租户ID") @Schema(description = "租户ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic; 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.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils; import org.jeecg.common.util.SpringContextUtils;
import lombok.Data; import lombok.Data;
@ -39,7 +41,8 @@ public class Item implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @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) @Excel(name = "租户ID", width = 15)
@Schema(description = "租户ID") @Schema(description = "租户ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic; 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 lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.aspect.annotation.AutoDict; import org.jeecg.common.aspect.annotation.AutoDict;
@ -35,14 +37,16 @@ public class Point implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @Schema(description = "主键")
private java.lang.String id; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long id;
/** /**
* ID * ID
*/ */
@Excel(name = "库区ID", width = 15) @Excel(name = "库区ID", width = 15)
@Schema(description = "库区ID") @Schema(description = "库区ID")
@Dict(dictTable = "base_area", dicCode = "id", dicText = "area_name") @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) @Excel(name = "租户ID", width = 15)
@Schema(description = "租户ID") @Schema(description = "租户ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -6,6 +6,8 @@ import java.util.Date;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*; 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.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils; import org.jeecg.common.util.SpringContextUtils;
import lombok.Data; import lombok.Data;
@ -36,7 +38,8 @@ public class Stock implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @Schema(description = "主键")
private java.lang.String id; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long id;
/** /**
* ID * ID
*/ */
@ -44,7 +47,8 @@ public class Stock implements Serializable {
@Schema(description = "库位ID") @Schema(description = "库位ID")
@Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code") @Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code")
@TableField(fill = FieldFill.INSERT_UPDATE) @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) @Excel(name = "租户ID", width = 15)
@Schema(description = "租户ID") @Schema(description = "租户ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.*; import lombok.*;
import org.jeecg.common.constant.ProvinceCityArea; import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils; import org.jeecg.common.util.SpringContextUtils;
@ -39,28 +41,32 @@ public class Inventory implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "ID") @Schema(description = "ID")
private java.lang.String id; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long id;
/** /**
* ID * ID
*/ */
@Excel(name = "物料ID", width = 15) @Excel(name = "物料ID", width = 15)
@Schema(description = "物料ID") @Schema(description = "物料ID")
@Dict(dictTable = "base_item", dicCode = "id", dicText = "item_code") @Dict(dictTable = "base_item", dicCode = "id", dicText = "item_code")
private java.lang.String itemId; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long itemId;
/** /**
* ID * ID
*/ */
@Excel(name = "库位ID", width = 15) @Excel(name = "库位ID", width = 15)
@Schema(description = "库位ID") @Schema(description = "库位ID")
@Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code") @Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code")
private java.lang.String pointId; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long pointId;
/** /**
* ID * ID
*/ */
@Excel(name = "容器ID", width = 15) @Excel(name = "容器ID", width = 15)
@Schema(description = "容器ID") @Schema(description = "容器ID")
@Dict(dictTable = "base_stock", dicCode = "id", dicText = "stock_code") @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) @Excel(name = "入库记录ID", width = 15)
@Schema(description = "入库记录ID") @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) @Excel(name = "租户ID", width = 15)
@Schema(description = "租户ID") @Schema(description = "租户ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -22,5 +22,5 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
* @return * @return
*/ */
@Select("select * from data_inventory where stock_id = #{stockId} and quantity>0 for update") @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);
} }

View File

@ -25,5 +25,5 @@ public interface IInventoryService extends IService<Inventory> {
* @param receiveRecord * @param receiveRecord
* @return Inventory * @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);
} }

View File

@ -26,7 +26,7 @@ import java.util.Date;
public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory> implements IInventoryService { public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory> implements IInventoryService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @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() Inventory inventory = Inventory.builder()
.itemId(asnDetail.getItemId()) .itemId(asnDetail.getItemId())
.pointId(receiveRecord.getPointId()) .pointId(receiveRecord.getPointId())

View File

@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.*; import lombok.*;
import org.jeecg.common.constant.ProvinceCityArea; import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils; import org.jeecg.common.util.SpringContextUtils;
@ -39,7 +41,8 @@ public class InventoryLog implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "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 * :1,2,3,4,5退,6.,7,8,9
*/ */
@ -58,27 +61,27 @@ public class InventoryLog implements Serializable {
*/ */
@Excel(name = "业务明细ID", width = 15) @Excel(name = "业务明细ID", width = 15)
@Schema(description = "业务明细ID") @Schema(description = "业务明细ID")
private java.lang.String businessDetailId; private java.lang.Long businessDetailId;
/** /**
* ID * ID
*/ */
@Excel(name = "库存ID", width = 15) @Excel(name = "库存ID", width = 15)
@Schema(description = "库存ID") @Schema(description = "库存ID")
private java.lang.String inventoryId; private java.lang.Long inventoryId;
/** /**
* ID * ID
*/ */
@Excel(name = "物料ID", width = 15) @Excel(name = "物料ID", width = 15)
@Schema(description = "物料ID") @Schema(description = "物料ID")
@Dict(dictTable = "base_item", dicCode = "id", dicText = "item_code") @Dict(dictTable = "base_item", dicCode = "id", dicText = "item_code")
private java.lang.String itemId; private java.lang.Long itemId;
/** /**
* *
*/ */
@Excel(name = "原库位置", width = 15) @Excel(name = "原库位置", width = 15)
@Schema(description = "原库位置") @Schema(description = "原库位置")
@Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code") @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) @Excel(name = "目标库位", width = 15)
@Schema(description = "目标库位") @Schema(description = "目标库位")
@Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code") @Dict(dictTable = "base_point", dicCode = "id", dicText = "point_code")
private java.lang.String toPointId; private java.lang.Long toPointId;
/** /**
* ID * ID
*/ */
@Excel(name = "容器ID", width = 15) @Excel(name = "容器ID", width = 15)
@Schema(description = "容器ID") @Schema(description = "容器ID")
@Dict(dictTable = "base_stock", dicCode = "id", dicText = "stock_code") @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) @Excel(name = "租户ID", width = 15)
@Schema(description = "租户ID") @Schema(description = "租户ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -31,7 +31,7 @@ public interface IInventoryLogService extends IService<InventoryLog> {
* @param businessDetailId ID * @param businessDetailId ID
* @param description * @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<InventoryLog> {
* @param businessDetailId ID * @param businessDetailId ID
* @param description * @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<InventoryLog> {
* @param businessDetailId ID * @param businessDetailId ID
* @param description * @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<InventoryLog> {
* @param businessDetailId ID * @param businessDetailId ID
* @param description * @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<InventoryLog> {
* @param businessDetailId ID * @param businessDetailId ID
* @param description * @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<InventoryLog> {
* @param businessDetailId ID * @param businessDetailId ID
* @param description * @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<InventoryLog> {
* @param businessNo * @param businessNo
* @param description * @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);
/** /**
* *

View File

@ -39,7 +39,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addInboundInventoryLog(Inventory inventory,String srcPointId, BigDecimal changeQty, String businessNo, String businessDetailId, String description) { public void addInboundInventoryLog(Inventory inventory,Long srcPointId, BigDecimal changeQty, String businessNo, Long businessDetailId, String description) {
InventoryLog inventoryLog = buildInventoryLog(inventory, changeQty, businessNo, businessDetailId, description); InventoryLog inventoryLog = buildInventoryLog(inventory, changeQty, businessNo, businessDetailId, description);
// 入库类型 // 入库类型
inventoryLog.setLogType(InventoryLogEnum.INBOUND.getValue()); inventoryLog.setLogType(InventoryLogEnum.INBOUND.getValue());
@ -49,7 +49,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addOutboundInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, String businessDetailId, String description) { public void addOutboundInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, Long businessDetailId, String description) {
InventoryLog inventoryLog = buildInventoryLog(inventory, changeQty, businessNo, businessDetailId, description); InventoryLog inventoryLog = buildInventoryLog(inventory, changeQty, businessNo, businessDetailId, description);
// 出库数量为负数 // 出库数量为负数
inventoryLog.setChangeQty(changeQty.negate()); inventoryLog.setChangeQty(changeQty.negate());
@ -61,7 +61,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addAllocInventoryLog(Inventory inventory, BigDecimal AllocatedQty, String businessNo, String businessDetailId, String description) { public void addAllocInventoryLog(Inventory inventory, BigDecimal AllocatedQty, String businessNo, Long businessDetailId, String description) {
InventoryLog inventoryLog = buildInventoryLog(inventory, AllocatedQty, businessNo, businessDetailId, description); InventoryLog inventoryLog = buildInventoryLog(inventory, AllocatedQty, businessNo, businessDetailId, description);
//出库分配 //出库分配
inventoryLog.setLogType(InventoryLogEnum.ALLOC.getValue()); inventoryLog.setLogType(InventoryLogEnum.ALLOC.getValue());
@ -74,7 +74,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addUnAllocInventoryLog(Inventory inventory, BigDecimal cancelQuantity, String businessNo, String businessDetailId, String description) { public void addUnAllocInventoryLog(Inventory inventory, BigDecimal cancelQuantity, String businessNo, Long businessDetailId, String description) {
InventoryLog inventoryLog = buildInventoryLog(inventory, BigDecimal.ZERO, businessNo, businessDetailId, description); InventoryLog inventoryLog = buildInventoryLog(inventory, BigDecimal.ZERO, businessNo, businessDetailId, description);
inventoryLog.setLogType(InventoryLogEnum.UNALLOC.getValue()); inventoryLog.setLogType(InventoryLogEnum.UNALLOC.getValue());
// 实际数量不变 // 实际数量不变
@ -86,7 +86,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addPickInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, String businessDetailId, String description) { public void addPickInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, Long businessDetailId, String description) {
InventoryLog inventoryLog = buildInventoryLog(inventory, changeQty, businessNo, businessDetailId, description); InventoryLog inventoryLog = buildInventoryLog(inventory, changeQty, businessNo, businessDetailId, description);
// 拣货类型 // 拣货类型
inventoryLog.setLogType(InventoryLogEnum.PICK.getValue()); inventoryLog.setLogType(InventoryLogEnum.PICK.getValue());
@ -98,7 +98,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addUnPickInventoryLog(Inventory inventory, BigDecimal returnQuantity, String businessNo, String businessDetailId, String description) { public void addUnPickInventoryLog(Inventory inventory, BigDecimal returnQuantity, String businessNo, Long businessDetailId, String description) {
InventoryLog inventoryLog = buildInventoryLog(inventory, returnQuantity, businessNo, businessDetailId, description); InventoryLog inventoryLog = buildInventoryLog(inventory, returnQuantity, businessNo, businessDetailId, description);
//退拣 //退拣
inventoryLog.setLogType(InventoryLogEnum.UNPICK.getValue()); inventoryLog.setLogType(InventoryLogEnum.UNPICK.getValue());
@ -119,7 +119,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addMoveInventoryLog(Inventory inventory, String toPointId, BigDecimal moveQty, String businessNo, String description) { public void addMoveInventoryLog(Inventory inventory, Long toPointId, BigDecimal moveQty, String businessNo, String description) {
InventoryLog inventoryLog = buildInventoryLog(inventory, BigDecimal.ZERO, businessNo, null, description); InventoryLog inventoryLog = buildInventoryLog(inventory, BigDecimal.ZERO, businessNo, null, description);
inventoryLog.setLogType(InventoryLogEnum.MOVE.getValue()); inventoryLog.setLogType(InventoryLogEnum.MOVE.getValue());
//目标库位 //目标库位
@ -154,7 +154,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
* @param description * @param description
* @return InventoryLog * @return InventoryLog
*/ */
private InventoryLog buildInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, String businessDetailId, String description) { private InventoryLog buildInventoryLog(Inventory inventory, BigDecimal changeQty, String businessNo, Long businessDetailId, String description) {
return InventoryLog.builder() return InventoryLog.builder()
.inventoryId(inventory.getId()) .inventoryId(inventory.getId())

View File

@ -183,7 +183,7 @@ public class AsnController {
//@AutoLog(value = "入库明细通过主表ID查询") //@AutoLog(value = "入库明细通过主表ID查询")
@Operation(summary="入库明细主表ID查询") @Operation(summary="入库明细主表ID查询")
@GetMapping(value = "/queryAsnDetailByMainId") @GetMapping(value = "/queryAsnDetailByMainId")
public Result<List<AsnDetail>> queryAsnDetailListByMainId(@RequestParam(name="id",required=true) String id) { public Result<List<AsnDetail>> queryAsnDetailListByMainId(@RequestParam(name="id",required=true) Long id) {
List<AsnDetail> asnDetailList = asnDetailService.selectByMainId(id); List<AsnDetail> asnDetailList = asnDetailService.selectByMainId(id);
return Result.OK(asnDetailList); return Result.OK(asnDetailList);
} }

View File

@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic; 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.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -41,7 +43,8 @@ public class Asn implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @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) @Excel(name = "外部单号", width = 15)
@Schema(description = "外部单号") @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) @Excel(name = "仓库ID", width = 15)
@Schema(description = "仓库ID") @Schema(description = "仓库ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -3,6 +3,8 @@ package org.cpte.modules.receive.entity;
import java.io.Serializable; import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*; 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.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -40,31 +42,36 @@ public class AsnDetail implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @Schema(description = "主键")
private java.lang.String id; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long id;
/** /**
* *
*/ */
@Schema(description = "入库单") @Schema(description = "入库单")
private java.lang.String asnId; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long asnId;
/** /**
* *
*/ */
@Excel(name = "物料", width = 15) @Excel(name = "物料", width = 15)
@Schema(description = "物料") @Schema(description = "物料")
private java.lang.String itemId; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long itemId;
/** /**
* *
*/ */
@Excel(name = "容器", width = 15) @Excel(name = "容器", width = 15)
@Schema(description = "容器") @Schema(description = "容器")
private java.lang.String stockId; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long stockId;
/** /**
* *
*/ */
@Excel(name = "库位", width = 15) @Excel(name = "库位", width = 15)
@Schema(description = "库位") @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 = "序列号") @Schema(description = "序列号")
private java.lang.String propC2; private java.lang.String propC2;
/** /**
* *
*/ */
@Excel(name = "库存状态", width = 15) @Excel(name = "外部库存状态", width = 15)
@Schema(description = "库存状态") @Schema(description = "外部库存状态")
private java.lang.String propC3; private java.lang.String propC3;
/** /**
* *
@ -152,7 +159,7 @@ public class AsnDetail implements Serializable {
*/ */
@Excel(name = "来源ID", width = 15) @Excel(name = "来源ID", width = 15)
@Schema(description = "来源ID") @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) @Excel(name = "仓库ID", width = 15)
@Schema(description = "仓库ID") @Schema(description = "仓库ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */
@ -195,6 +202,4 @@ public class AsnDetail implements Serializable {
@Schema(description = "更新日期") @Schema(description = "更新日期")
private java.util.Date updateTime; private java.util.Date updateTime;
@Version
private Integer updateCount;
} }

View File

@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; 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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
@ -28,27 +30,32 @@ public class ReceiveRecord implements Serializable {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @Schema(description = "主键")
private java.lang.String id; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long id;
/** /**
* *
*/ */
@Schema(description = "入库明细") @Schema(description = "入库明细")
private java.lang.String asnDetailId; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long asnDetailId;
/** /**
* *
*/ */
@Schema(description = "容器") @Schema(description = "容器")
private java.lang.String stockId; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long stockId;
/** /**
* *
*/ */
@Schema(description = "库位") @Schema(description = "库位")
private java.lang.String pointId; @JsonSerialize(using = ToStringSerializer.class)
private java.lang.Long pointId;
/** /**
* *
*/ */
@Schema(description = "物料") @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 = "序列号") @Schema(description = "序列号")
private java.lang.String propC2; private java.lang.String propC2;
/** /**
* *
*/ */
@Schema(description = "库存状态") @Schema(description = "外部库存状态")
private java.lang.String propC3; private java.lang.String propC3;
/** /**
* *
@ -85,7 +92,7 @@ public class ReceiveRecord implements Serializable {
* ID * ID
*/ */
@Schema(description = "仓库ID") @Schema(description = "仓库ID")
private java.lang.Integer tenantId; private java.lang.Long tenantId;
/** /**
* *
*/ */

View File

@ -30,7 +30,7 @@ public interface AsnDetailMapper extends BaseMapper<AsnDetail> {
* @param mainId id * @param mainId id
* @return List<AsnDetail> * @return List<AsnDetail>
*/ */
public List<AsnDetail> selectByMainId(@Param("mainId") String mainId); public List<AsnDetail> selectByMainId(@Param("mainId") Long mainId);
/** /**
@ -41,5 +41,5 @@ public interface AsnDetailMapper extends BaseMapper<AsnDetail> {
* @return AsnDetail * @return AsnDetail
*/ */
@Select("select * from data_asn_detail where stock_id = #{stockId} and status = #{status} for update") @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);
} }

View File

@ -18,5 +18,5 @@ public interface IAsnDetailService extends IService<AsnDetail> {
* @param mainId id * @param mainId id
* @return List<AsnDetail> * @return List<AsnDetail>
*/ */
public List<AsnDetail> selectByMainId(String mainId); public List<AsnDetail> selectByMainId(Long mainId);
} }

View File

@ -5,7 +5,6 @@ import org.cpte.modules.receive.entity.Asn;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -53,6 +52,6 @@ public interface IAsnService extends IService<Asn> {
* @param asnDetailId ID * @param asnDetailId ID
* @param pointCode * @param pointCode
*/ */
void receiveGoods(String asnDetailId, String pointCode); void receiveGoods(Long asnDetailId, String pointCode);
} }

View File

@ -21,7 +21,7 @@ public class AsnDetailServiceImpl extends ServiceImpl<AsnDetailMapper, AsnDetail
private AsnDetailMapper asnDetailMapper; private AsnDetailMapper asnDetailMapper;
@Override @Override
public List<AsnDetail> selectByMainId(String mainId) { public List<AsnDetail> selectByMainId(Long mainId) {
return asnDetailMapper.selectByMainId(mainId); return asnDetailMapper.selectByMainId(mainId);
} }
} }

View File

@ -160,7 +160,7 @@ public class AsnServiceImpl extends ServiceImpl<AsnMapper, Asn> implements IAsnS
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void receiveGoods(String asnDetailId, String pointCode) { public void receiveGoods(Long asnDetailId, String pointCode) {
//入库明细任务 //入库明细任务
AsnDetail asnDetail = asnDetailMapper.selectById(asnDetailId); AsnDetail asnDetail = asnDetailMapper.selectById(asnDetailId);
if (asnDetail == null) { if (asnDetail == null) {
@ -214,7 +214,7 @@ public class AsnServiceImpl extends ServiceImpl<AsnMapper, Asn> implements IAsnS
/** /**
* *
*/ */
public ReceiveRecord createReceiveRecord(AsnDetail asnDetail, BigDecimal receivedQty, String dstPointId) { public ReceiveRecord createReceiveRecord(AsnDetail asnDetail, BigDecimal receivedQty, Long dstPointId) {
ReceiveRecord receiveRecord = ReceiveRecord.builder() ReceiveRecord receiveRecord = ReceiveRecord.builder()
.asnDetailId(asnDetail.getId()) .asnDetailId(asnDetail.getId())
.stockId(asnDetail.getStockId()) .stockId(asnDetail.getStockId())

View File

@ -110,11 +110,10 @@ public class ISaiWmsServiceImpl implements ISaiWmsService {
* *
*/ */
private Asn buildAsn(InboundRequest inboundRequest) { private Asn buildAsn(InboundRequest inboundRequest) {
int tenantId = oConvertUtils.getInt(TenantContext.getTenant(), 1000);
String orderNo = (codeGeneratorUtil.generateSerialNumber("RK")); String orderNo = (codeGeneratorUtil.generateSerialNumber("RK"));
return Asn.builder() return Asn.builder()
.orderNo(orderNo) .orderNo(orderNo)
.thirdPartyOrderNo(inboundRequest.getOrderNo()) .thirdOrderNo(inboundRequest.getOrderNo())
.no(inboundRequest.getNo()) .no(inboundRequest.getNo())
.whCode(inboundRequest.getWhCode()) .whCode(inboundRequest.getWhCode())
.supplierCode(inboundRequest.getSupplierCode()) .supplierCode(inboundRequest.getSupplierCode())
@ -122,7 +121,7 @@ public class ISaiWmsServiceImpl implements ISaiWmsService {
.status(AsnStatusEnum.CREATED.getValue()) .status(AsnStatusEnum.CREATED.getValue())
.orderDate(new Date()) .orderDate(new Date())
.sysOrgCode("A05") .sysOrgCode("A05")
.tenantId(tenantId) .tenantId(1000L)
.createBy("赛意") .createBy("赛意")
.build(); .build();
} }

View File

@ -157,7 +157,7 @@ public class ITesAgvServiceImpl implements ITesAgvService {
* *
* @param agvTask * @param agvTask
*/ */
private void handleEnd(String asnDetailId, AgvTask agvTask) { private void handleEnd(Long asnDetailId, AgvTask agvTask) {
//确认收货 //确认收货
iAsnService.receiveGoods(asnDetailId, agvTask.getEndCode()); iAsnService.receiveGoods(asnDetailId, agvTask.getEndCode());
agvTask.setStatus(AgvStatusEnum.COMPLETED.getValue()); agvTask.setStatus(AgvStatusEnum.COMPLETED.getValue());