diff --git a/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs b/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs
index 3995e10..541bc54 100644
--- a/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs
+++ b/WCS.BLL/DbModels/STZL/MatDetailCurrentInfo.cs
@@ -44,32 +44,31 @@ namespace WCS.BLL.DbModels
///
[SugarColumn(ColumnName = "shelf_area", Length = 64, IsNullable = true, ColumnDescription = "货架区域")]
public string ShelfArea { get; set; }
-
#endregion
#region 物料属性
///
/// 物料编码
///
- [SugarColumn(ColumnName = "mat_code", Length = 100, IsNullable = true, ColumnDescription = "物料编号")]
+ [SugarColumn(ColumnName = "mat_code", Length = 128, IsNullable = true, ColumnDescription = "物料编号")]
public string MatCode { get; set; }
///
/// 物料名称
///
- [SugarColumn(ColumnName = "mat_name", Length = 150, IsNullable = true, ColumnDescription = "物料名称")]
+ [SugarColumn(ColumnName = "mat_name", Length = 128, IsNullable = true, ColumnDescription = "物料名称")]
public string MatName { get; set; }
///
/// 物料规格
///
- [SugarColumn(ColumnName = "mat_spec", Length = 150, IsNullable = true, ColumnDescription = "物料规格")]
+ [SugarColumn(ColumnName = "mat_spec", Length = 128, IsNullable = true, ColumnDescription = "物料规格")]
public string MatSpec { get; set; }
///
- /// 物料数量
- ///
- [SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量")]
- public int MatQty { get; set; }
+ /// 物料单位
+ ///
+ [SugarColumn(ColumnName = "mat_unit", Length = 64, IsNullable = true, ColumnDescription = "物料单位")]
+ public string? MatUnit { get; set; }
///
/// 物料供应商
@@ -82,6 +81,12 @@ namespace WCS.BLL.DbModels
///
[SugarColumn(ColumnName = "mat_customer", Length = 128, IsNullable = true, ColumnDescription = "物料客户")]
public string? MatCustomer { get; set; }
+
+ ///
+ /// 物料数量
+ ///
+ [SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量")]
+ public int MatQty { get; set; }
#endregion
///
diff --git a/WCS.BLL/DbModels/STZL/ShelfInfo.cs b/WCS.BLL/DbModels/STZL/ShelfInfo.cs
index 73f14e9..d9ef57d 100644
--- a/WCS.BLL/DbModels/STZL/ShelfInfo.cs
+++ b/WCS.BLL/DbModels/STZL/ShelfInfo.cs
@@ -63,14 +63,32 @@ namespace WCS.DAL.DbModels
///
/// 当前位置ID
///
- [SugarColumn(ColumnName = "current_location_id", IsNullable = true, ColumnDescription = "当前位置ID")]
+ [SugarColumn(ColumnName = "current_location_id", IsNullable = false, ColumnDescription = "当前位置ID")]
public int CurrentLocationId { get; set; } = 0;
///
/// 当前位置编码
///
- [SugarColumn(ColumnName = "current_location_code", Length = 64, IsNullable = true, ColumnDescription = "当前位置编码")]
+ [SugarColumn(ColumnName = "current_location_code", Length = 64, IsNullable = false, ColumnDescription = "当前位置编码")]
public string CurrentLocaiotnCode { get; set; } = string.Empty;
+
+ ///
+ /// 目的地位置Id
+ ///
+ [SugarColumn(ColumnName = "destination_location_id", IsNullable = false, ColumnDescription = "当前位置ID")]
+ public int DestinationLocationId { get; set; } = 0;
+
+ ///
+ /// 目的地位置物料编码
+ ///
+ [SugarColumn(ColumnName = "destination_location_code", Length = 64, IsNullable = false, ColumnDescription = "当前位置编码")]
+ public string DestinationLocaiotnCode { get; set; } = string.Empty;
+
+ ///
+ /// 货架运输状态
+ ///
+ [SugarColumn(ColumnName = "trans_status", IsNullable = false, ColumnDescription = "货架运输状态")]
+ public TransStatusEnum TransStatus { get; set; } = TransStatusEnum.静止;
#endregion
///
@@ -116,9 +134,21 @@ namespace WCS.DAL.DbModels
public bool IsSelected { get; set; }
}
+ ///
+ /// 货架绑定物料的状态
+ ///
public enum ShelfStatusEnum
{
空货架 = 0,
非空货架 = 1,
}
+
+ ///
+ /// 货架运输状态
+ ///
+ public enum TransStatusEnum
+ {
+ 静止 = 0,
+ 运输中 = 1
+ }
}
diff --git a/WCS.BLL/Manager/DbInit.cs b/WCS.BLL/Manager/DbInit.cs
index 1f70a39..7b2f53c 100644
--- a/WCS.BLL/Manager/DbInit.cs
+++ b/WCS.BLL/Manager/DbInit.cs
@@ -62,7 +62,7 @@ namespace WCS.BLL.Manager
}
//手动修改后台配置后再进行CodeFirst 数据库的生成、表的生成
//如果不配置此参数 每次启动都会持续几十秒才能成功启动后端
- if (LocalFile.Config.IsResetDBOrTable)
+ //if (LocalFile.Config.IsResetDBOrTable)//开发阶段暂时屏蔽初始化限制
{
#region 建库建表 只在表有变动时运行
DbHelp.db.DbMaintenance.CreateDatabase();
@@ -71,7 +71,7 @@ namespace WCS.BLL.Manager
Logs.Write("【初始化数据库】创建数据库", LogsType.StartBoot);
DbHelp.db.CodeFirst.InitTables(typeof(ShelfInfo), typeof(MatBaseInfo), typeof(ShelfTypeInfo)
- ,typeof(LocationInfo), typeof(LocationAreaInfo)
+ ,typeof(LocationInfo), typeof(LocationAreaInfo),typeof(MatDetailCurrentInfo)
, typeof(InventoryDetail), typeof(OutOrder), typeof(OutOrderDetail), typeof(OutOrderMatDetail)
, typeof(MatInfo), typeof(StoreInfo)
, typeof(StockTakingOrder), typeof(StockTakingOrderMatDetail), typeof(InOutRecord)
diff --git a/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs b/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs
new file mode 100644
index 0000000..da94c27
--- /dev/null
+++ b/WCS.BLL/Services/IService/IMatDetailCurrentInfoService.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WCS.Model.ApiModel.User;
+using WCS.Model;
+using WCS.DAL.DbModels;
+using WCS.Model.ApiModel.StoreInfo;
+using WCS.BLL.DbModels;
+using WCS.Model.ApiModel.MatBaseInfo;
+
+namespace WCS.BLL.Services.IService
+{
+ public interface IMatDetailCurrentInfoService
+ {
+ ///
+ /// 查询货架存量列表
+ ///
+ ///
+ ///
+ public Task> GetMatDetailCurrentInfos(GetMatDetailCurrentInfosRequest request);
+
+ ///
+ /// 更新货架存量
+ ///
+ ///
+ ///
+ public Task> updateMatDetailCurrentInfo(AddLocaionInfoRequest request);
+
+ ///
+ /// 删除货架存量数据
+ ///
+ ///
+ ///
+ public Task> deleteMatDetailCurrentInfo(DeleteInfosRequest request);
+ }
+}
diff --git a/WCS.BLL/Services/Service/LocationInfoService.cs b/WCS.BLL/Services/Service/LocationInfoService.cs
index 895b242..46cab19 100644
--- a/WCS.BLL/Services/Service/LocationInfoService.cs
+++ b/WCS.BLL/Services/Service/LocationInfoService.cs
@@ -92,7 +92,7 @@ namespace WCS.BLL.Services.Service
Data = null
};
}
- else if (existId != locationInfo.Id)
+ else if (existId != 0 && existId != locationInfo.Id)
{
return new ResponseCommon