将实体ID String 类型 改成Long类型
parent
6972fccd1c
commit
eb01078c9b
|
|
@ -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;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@ public interface IAgvTaskService extends IService<AgvTask> {
|
|||
* @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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> 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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
|
|||
* @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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ public interface IInventoryService extends IService<Inventory> {
|
|||
* @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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import java.util.Date;
|
|||
public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory> 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())
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public interface IInventoryLogService extends IService<InventoryLog> {
|
|||
* @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<InventoryLog> {
|
|||
* @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<InventoryLog> {
|
|||
* @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<InventoryLog> {
|
|||
* @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<InventoryLog> {
|
|||
* @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<InventoryLog> {
|
|||
* @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<InventoryLog> {
|
|||
* @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);
|
||||
|
||||
/**
|
||||
* 添加库存盘点库存日志
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
|
|||
|
||||
@Override
|
||||
@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.setLogType(InventoryLogEnum.INBOUND.getValue());
|
||||
|
|
@ -49,7 +49,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
|
|||
|
||||
@Override
|
||||
@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.setChangeQty(changeQty.negate());
|
||||
|
|
@ -61,7 +61,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
|
|||
|
||||
@Override
|
||||
@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.setLogType(InventoryLogEnum.ALLOC.getValue());
|
||||
|
|
@ -74,7 +74,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
|
|||
|
||||
@Override
|
||||
@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.setLogType(InventoryLogEnum.UNALLOC.getValue());
|
||||
// 实际数量不变
|
||||
|
|
@ -86,7 +86,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
|
|||
|
||||
@Override
|
||||
@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.setLogType(InventoryLogEnum.PICK.getValue());
|
||||
|
|
@ -98,7 +98,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
|
|||
|
||||
@Override
|
||||
@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.setLogType(InventoryLogEnum.UNPICK.getValue());
|
||||
|
|
@ -119,7 +119,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
|
|||
|
||||
@Override
|
||||
@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.setLogType(InventoryLogEnum.MOVE.getValue());
|
||||
//目标库位
|
||||
|
|
@ -154,7 +154,7 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
|
|||
* @param description 描述
|
||||
* @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()
|
||||
.inventoryId(inventory.getId())
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ public class AsnController {
|
|||
//@AutoLog(value = "入库明细通过主表ID查询")
|
||||
@Operation(summary="入库明细主表ID查询")
|
||||
@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);
|
||||
return Result.OK(asnDetailList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public interface AsnDetailMapper extends BaseMapper<AsnDetail> {
|
|||
* @param mainId 主表id
|
||||
* @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
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ public interface IAsnDetailService extends IService<AsnDetail> {
|
|||
* @param mainId 主表id
|
||||
* @return List<AsnDetail>
|
||||
*/
|
||||
public List<AsnDetail> selectByMainId(String mainId);
|
||||
public List<AsnDetail> selectByMainId(Long mainId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<Asn> {
|
|||
* @param asnDetailId 入库明细ID
|
||||
* @param pointCode 目标库位
|
||||
*/
|
||||
void receiveGoods(String asnDetailId, String pointCode);
|
||||
void receiveGoods(Long asnDetailId, String pointCode);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class AsnDetailServiceImpl extends ServiceImpl<AsnDetailMapper, AsnDetail
|
|||
private AsnDetailMapper asnDetailMapper;
|
||||
|
||||
@Override
|
||||
public List<AsnDetail> selectByMainId(String mainId) {
|
||||
public List<AsnDetail> selectByMainId(Long mainId) {
|
||||
return asnDetailMapper.selectByMainId(mainId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ public class AsnServiceImpl extends ServiceImpl<AsnMapper, Asn> 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<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()
|
||||
.asnDetailId(asnDetail.getId())
|
||||
.stockId(asnDetail.getStockId())
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue