diff --git a/SlnMesnac.Model/domain/WmsBaseLocation.cs b/SlnMesnac.Model/domain/WmsBaseLocation.cs
new file mode 100644
index 0000000..f415789
--- /dev/null
+++ b/SlnMesnac.Model/domain/WmsBaseLocation.cs
@@ -0,0 +1,255 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+#region << 版 本 注 释 >>
+/*--------------------------------------------------------------------
+* 版权所有 (c) 2024 WenJY 保留所有权利。
+* CLR版本:4.0.30319.42000
+* 机器名称:LAPTOP-E0N2L34V
+* 命名空间:SlnMesnac.Model.domain
+* 唯一标识:8c0a747f-0ee1-4c2a-957a-95ff8345896f
+*
+* 创建者:WenJY
+* 电子邮箱:wenjy@mesnac.com
+* 创建时间:2024-04-09 16:17:47
+* 版本:V1.0.0
+* 描述:
+*
+*--------------------------------------------------------------------
+* 修改人:
+* 时间:
+* 修改说明:
+*
+* 版本:V1.0.0
+*--------------------------------------------------------------------*/
+#endregion << 版 本 注 释 >>
+namespace SlnMesnac.Model.domain
+{
+ [SugarTable("wms_base_location"), TenantAttribute("mes")]
+ public class WmsBaseLocation
+ {
+ ///
+ /// 库位ID
+ ///
+ [SugarColumn(ColumnName = "location_id", IsPrimaryKey = true, IsIdentity = true)]
+ public long LocationId { get; set; }
+
+ ///
+ /// 仓库ID
+ ///
+ [SugarColumn(ColumnName = "warehouse_id")]
+ public long WarehouseId { get; set; }
+
+ ///
+ /// AGV位置代码
+ ///
+ [SugarColumn(ColumnName = "agv_position_code")]
+ public string AgvPositionCode { get; set; }
+
+ ///
+ /// 仓库楼层
+ ///
+ [SugarColumn(ColumnName = "warehouse_floor")]
+ public int WarehouseFloor { get; set; }
+
+ ///
+ /// 库位代码
+ ///
+ [SugarColumn(ColumnName = "location_code")]
+ public string LocationCode { get; set; }
+
+ ///
+ /// 容器代码
+ ///
+ [SugarColumn(ColumnName = "container_code")]
+ public string ContainerCode { get; set; }
+
+ ///
+ /// 行
+ ///
+ [SugarColumn(ColumnName = "loc_row")]
+ public int? LocRow { get; set; }
+
+ ///
+ /// 列
+ ///
+ [SugarColumn(ColumnName = "loc_column")]
+ public int? LocColumn { get; set; }
+
+ ///
+ /// 层数
+ ///
+ [SugarColumn(ColumnName = "layer_num")]
+ public int? LayerNum { get; set; }
+
+ ///
+ /// 深位1 浅位2
+ ///
+ [SugarColumn(ColumnName = "loc_deep")]
+ public int? LocDeep { get; set; }
+
+ ///
+ /// 是否启用
+ ///
+ [SugarColumn(ColumnName = "active_flag")]
+ public string ActiveFlag { get; set; } // '1' or other values
+
+ ///
+ /// 手动标记
+ ///
+ [SugarColumn(ColumnName = "manual_flag")]
+ public string ManualFlag { get; set; }
+
+ ///
+ /// 返回标记
+ ///
+ [SugarColumn(ColumnName = "return_flag")]
+ public string ReturnFlag { get; set; }
+
+ ///
+ /// 数量限制
+ ///
+ [SugarColumn(ColumnName = "qty_limit")]
+ public decimal? QtyLimit { get; set; }
+
+ ///
+ /// 入库标记
+ ///
+ [SugarColumn(ColumnName = "instock_flag")]
+ public string InstockFlag { get; set; }
+
+ ///
+ /// 出库标记
+ ///
+ [SugarColumn(ColumnName = "outstock_flag")]
+ public string OutstockFlag { get; set; }
+
+ ///
+ /// 库位状态
+ ///
+ [SugarColumn(ColumnName = "location_status")]
+ public string LocationStatus { get; set; } // '1' or other values
+
+ ///
+ /// 批次混合
+ ///
+ [SugarColumn(ColumnName = "batch_mix")]
+ public string BatchMix { get; set; } // '0' or other values
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "create_by")]
+ public string CreateBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "create_time")]
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ [SugarColumn(ColumnName = "update_by")]
+ public string UpdateBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "update_time")]
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [SugarColumn(ColumnName = "remark")]
+ public string Remark { get; set; }
+
+ ///
+ /// 删除标记
+ ///
+ [SugarColumn(ColumnName = "del_flag")]
+ public string DelFlag { get; set; } // '0' or other values
+
+ ///
+ /// 货架排序
+ ///
+ [SugarColumn(ColumnName = "shelf_order")]
+ public string ShelfOrder { get; set; }
+
+ ///
+ /// 检查排序
+ ///
+ [SugarColumn(ColumnName = "check_order")]
+ public string CheckOrder { get; set; }
+
+ ///
+ /// 拣货排序
+ ///
+ [SugarColumn(ColumnName = "pick_order")]
+ public string PickOrder { get; set; }
+
+ ///
+ /// 拣货标记
+ ///
+ [SugarColumn(ColumnName = "pick_flag")]
+ public string PickFlag { get; set; }
+
+ ///
+ /// 是否开启KN标记
+ ///
+ [SugarColumn(ColumnName = "is_open_kn_flag")]
+ public string IsOpenKnFlag { get; set; }
+
+ ///
+ /// 库位报废类型
+ ///
+ [SugarColumn(ColumnName = "location_scrap_type")]
+ public string LocationScrapType { get; set; }
+
+ ///
+ /// 体积限制
+ ///
+ [SugarColumn(ColumnName = "volume_limit")]
+ public decimal? VolumeLimit { get; set; }
+
+ ///
+ /// 重量限制
+ ///
+ [SugarColumn(ColumnName = "weight_limit")]
+ public decimal? WeightLimit { get; set; }
+
+ ///
+ /// 长度
+ ///
+ [SugarColumn(ColumnName = "length")]
+ public decimal? Length { get; set; }
+
+ ///
+ /// 宽度
+ ///
+ [SugarColumn(ColumnName = "width")]
+ public decimal? Width { get; set; }
+
+ ///
+ /// 高度
+ ///
+ [SugarColumn(ColumnName = "height")]
+ public decimal? Height { get; set; }
+
+ ///
+ /// 容器状态
+ ///
+ [SugarColumn(ColumnName = "container_status")]
+ public string ContainerStatus { get; set; } // '1' or '2'
+
+ ///
+ /// 异常描述
+ ///
+ [SugarColumn(ColumnName = "exception_desc")]
+ public string ExceptionDesc { get; set; }
+ }
+}
diff --git a/SlnMesnac.Model/domain/WmsRawPreferredOut.cs b/SlnMesnac.Model/domain/WmsRawPreferredOut.cs
new file mode 100644
index 0000000..88c519a
--- /dev/null
+++ b/SlnMesnac.Model/domain/WmsRawPreferredOut.cs
@@ -0,0 +1,78 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Security.Principal;
+using System.Text;
+
+namespace SlnMesnac.Model.domain
+{
+ [SugarTable("wms_raw_preferred_out"), TenantAttribute("mes")]
+ public class WmsRawPreferredOut
+ {
+ ///
+ /// 优先出库ID
+ ///
+ [SugarColumn(ColumnName = "raw_preferred_out_id", IsPrimaryKey = true, IsIdentity = true)]
+ public long RawPreferredOutId { get; set; }
+
+ ///
+ /// 仓库ID
+ ///
+ [SugarColumn(ColumnName = "warehouse_id")]
+ public long WarehouseId { get; set; }
+
+ ///
+ /// 仓库楼层
+ ///
+ [SugarColumn(ColumnName = "warehouse_floor")]
+ public int? WarehouseFloor { get; set; }
+
+ ///
+ /// 库位编码
+ ///
+ [SugarColumn(ColumnName = "location_code")]
+ public string LocationCode { get; set; }
+
+ ///
+ /// 库存类型:1原材料,2成品
+ ///
+ [SugarColumn(ColumnName = "stock_type")]
+ public string StockType { get; set; }
+
+ ///
+ /// 物料ID
+ ///
+ [SugarColumn(ColumnName = "material_id")]
+ public long MaterialId { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "create_by")]
+ public string CreateBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "create_date")]
+ public DateTime? CreateDate { get; set; }
+
+ ///
+ /// 最后更新人
+ ///
+ [SugarColumn(ColumnName = "update_by")]
+ public string UpdateBy { get; set; }
+
+ ///
+ /// 最后更新时间
+ ///
+ [SugarColumn(ColumnName = "update_date")]
+ public DateTime? UpdateDate { get; set; }
+
+ ///
+ /// 有效标记
+ ///
+ [SugarColumn(ColumnName = "use_flag", DefaultValue = "1")]
+ public string UseFlag { get; set; }
+ }
+}
diff --git a/SlnMesnac.Model/domain/WmsRawStock.cs b/SlnMesnac.Model/domain/WmsRawStock.cs
new file mode 100644
index 0000000..7c2da08
--- /dev/null
+++ b/SlnMesnac.Model/domain/WmsRawStock.cs
@@ -0,0 +1,150 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Security.Principal;
+using System.Text;
+
+namespace SlnMesnac.Model.domain
+{
+ [SugarTable("wms_raw_stock"), TenantAttribute("mes")]
+ public class WmsRawStock
+ {
+ ///
+ /// 原材料库存ID
+ ///
+ [SugarColumn(ColumnName = "raw_stock_id", IsPrimaryKey = true, IsIdentity = true)]
+ public long RawStockId { get; set; }
+
+ ///
+ /// 仓库ID
+ ///
+ [SugarColumn(ColumnName = "warehouse_id")]
+ public long WarehouseId { get; set; }
+
+ ///
+ /// 仓库楼层
+ ///
+ [SugarColumn(ColumnName = "warehouse_floor")]
+ public int? WarehouseFloor { get; set; }
+
+ ///
+ /// 库位编码
+ ///
+ [SugarColumn(ColumnName = "location_code", Length = 64)]
+ public string LocationCode { get; set; }
+
+ ///
+ /// 库存类型:1原材料
+ ///
+ [SugarColumn(ColumnName = "stock_type", Length = 1)]
+ public string StockType { get; set; }
+
+ ///
+ /// 物料ID
+ ///
+ [SugarColumn(ColumnName = "material_id")]
+ public long MaterialId { get; set; }
+
+ ///
+ /// 物料条码,非批次号;当柜体不完整时存物料条码
+ ///
+ [SugarColumn(ColumnName = "instock_batch", Length = 64)]
+ public string InstockBatch { get; set; }
+
+ ///
+ /// 托盘RFID代码
+ ///
+ [SugarColumn(ColumnName = "pallet_info_code", Length = 64, IsNullable = true)]
+ public string PalletInfoCode { get; set; }
+
+ ///
+ /// 销售订单ID
+ ///
+ [SugarColumn(ColumnName = "sale_order_id", DefaultValue = "0")]
+ public long SaleOrderId { get; set; }
+
+ ///
+ /// 安全库存标识(1是,0否)
+ ///
+ [SugarColumn(ColumnName = "safe_flag", Length = 1)]
+ public string SafeFlag { get; set; }
+
+ ///
+ /// 入库时间;此入库时间从批次信息中获取,accepted_date
+ ///
+ [SugarColumn(ColumnName = "instock_date")]
+ public DateTime? InstockDate { get; set; }
+
+ ///
+ /// 最晚出库时间;根据物料信“存放周期“计算出来的时间
+ ///
+ [SugarColumn(ColumnName = "last_outstock_time")]
+ public DateTime? LastOutstockTime { get; set; }
+
+ ///
+ /// 质检状态(0待质检,1检验中,2质检通过,3质检不通过)
+ ///
+ [SugarColumn(ColumnName = "quality_status", Length = 1, IsNullable = true)]
+ public string QualityStatus { get; set; }
+
+ ///
+ /// 完整标识(1是0否)拆分后为0
+ ///
+ [SugarColumn(ColumnName = "complete_flag", Length = 1, DefaultValue = "1")]
+ public string CompleteFlag { get; set; }
+
+ ///
+ /// 总数量;库位存放的总数量
+ ///
+ [SugarColumn(ColumnName = "total_amount", DecimalDigits = 6)]
+ public decimal TotalAmount { get; set; }
+
+ ///
+ /// 冻结数量;手动冻结的,暂时可不用
+ ///
+ [SugarColumn(ColumnName = "frozen_amount", DecimalDigits = 6, DefaultValue = "0.000000")]
+ public decimal FrozenAmount { get; set; }
+
+ ///
+ /// 占用数量;申请时占用的数量,在出库时要减去出库数量,并且总数量要同步更新;
+ ///
+ [SugarColumn(ColumnName = "occupy_amount", DecimalDigits = 6, DefaultValue = "0.000000")]
+ public decimal OccupyAmount { get; set; }
+
+ ///
+ /// 供应商ID
+ ///
+ [SugarColumn(ColumnName = "supplier_id", IsNullable = true)]
+ public long? SupplierId { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "create_by", Length = 64, IsNullable = true)]
+ public string CreateBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "create_date")]
+ public DateTime? CreateDate { get; set; }
+
+ ///
+ /// 最后更新人
+ ///
+ [SugarColumn(ColumnName = "update_by", Length = 64, IsNullable = true)]
+ public string UpdateBy { get; set; }
+
+ ///
+ /// 最后更新时间
+ ///
+ [SugarColumn(ColumnName = "update_date")]
+ public DateTime? UpdateDate { get; set; }
+
+ ///
+ /// 有效标记
+ ///
+ [SugarColumn(ColumnName = "active_flag", Length = 1, DefaultValue = "1")]
+ public string ActiveFlag { get; set; }
+ }
+}
diff --git a/SlnMesnac.Repository/service/IWmsRawPreferredOutService.cs b/SlnMesnac.Repository/service/IWmsRawPreferredOutService.cs
new file mode 100644
index 0000000..48bb44e
--- /dev/null
+++ b/SlnMesnac.Repository/service/IWmsRawPreferredOutService.cs
@@ -0,0 +1,12 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface IWmsRawPreferredOutService : IBaseService
+ {
+ }
+}
diff --git a/SlnMesnac.Repository/service/Impl/WmsRawPreferredOutServiceImpl.cs b/SlnMesnac.Repository/service/Impl/WmsRawPreferredOutServiceImpl.cs
new file mode 100644
index 0000000..887539a
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/WmsRawPreferredOutServiceImpl.cs
@@ -0,0 +1,37 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+#region << 版 本 注 释 >>
+/*--------------------------------------------------------------------
+* 版权所有 (c) 2024 WenJY 保留所有权利。
+* CLR版本:4.0.30319.42000
+* 机器名称:LAPTOP-E0N2L34V
+* 命名空间:SlnMesnac.Repository.service.Impl
+* 唯一标识:4775f606-89b8-4dba-88da-4920de3e1559
+*
+* 创建者:WenJY
+* 电子邮箱:wenjy@mesnac.com
+* 创建时间:2024-04-09 16:21:05
+* 版本:V1.0.0
+* 描述:
+*
+*--------------------------------------------------------------------
+* 修改人:
+* 时间:
+* 修改说明:
+*
+* 版本:V1.0.0
+*--------------------------------------------------------------------*/
+#endregion << 版 本 注 释 >>
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class WmsRawPreferredOutServiceImpl : BaseServiceImpl, IWmsRawPreferredOutService
+ {
+ public WmsRawPreferredOutServiceImpl(Repository rep) : base(rep)
+ {
+ }
+ }
+}
diff --git a/SlnMesnac.TouchSocket/UdpServer.cs b/SlnMesnac.TouchSocket/UdpServer.cs
index b8b5fd4..58736e2 100644
--- a/SlnMesnac.TouchSocket/UdpServer.cs
+++ b/SlnMesnac.TouchSocket/UdpServer.cs
@@ -113,10 +113,7 @@ namespace SlnMesnac.TouchSocket
udpService.Send(new IPHost("192.168.2.51:3000").EndPoint, str);
}
-
-
-
-
+
}
}
diff --git a/SlnMesnac.WPF/Page/ManualDeliveryWindow.xaml b/SlnMesnac.WPF/Page/ManualDeliveryWindow.xaml
index 10f1d0f..3c60a32 100644
--- a/SlnMesnac.WPF/Page/ManualDeliveryWindow.xaml
+++ b/SlnMesnac.WPF/Page/ManualDeliveryWindow.xaml
@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:SlnMesnac.WPF.Page"
xmlns:local1="clr-namespace:SlnMesnac.WPF.Converter.ProdMgmt"
mc:Ignorable="d"
- Title="手动叫料" Height="750" Width="1000" Background="White" Name="window">
+ Title="手动叫料" Height="750" Width="1000" Background="White" Name="window" WindowStartupLocation="CenterOwner">
@@ -19,22 +19,22 @@
-
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/SlnMesnac.WPF/ViewModel/ManualDeliveryViewModel.cs b/SlnMesnac.WPF/ViewModel/ManualDeliveryViewModel.cs
index b88d3be..e6ad6fd 100644
--- a/SlnMesnac.WPF/ViewModel/ManualDeliveryViewModel.cs
+++ b/SlnMesnac.WPF/ViewModel/ManualDeliveryViewModel.cs
@@ -2,10 +2,12 @@
using GalaSoft.MvvmLight.Command;
using Microsoft.Extensions.DependencyInjection;
using SlnMesnac.Business;
+using SlnMesnac.Model.domain;
using SlnMesnac.Model.dto;
using SlnMesnac.Model.enums;
using SlnMesnac.Plc;
using SlnMesnac.Repository.service;
+using SqlSugar;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -41,30 +43,46 @@ namespace SlnMesnac.WPF.ViewModel
{
public class ManualDeliveryViewModel : ViewModelBase
{
- private readonly ProdMgmtBusiness? _prodMgmtBusiness;
+
+ private readonly IWmsRawPreferredOutService? wmsRawPreferredOutService;
+ private readonly ISqlSugarClient? sqlSugarClient;
public ManualDeliveryViewModel()
{
- _prodMgmtBusiness = App.ServiceProvider.GetService();
-
+ wmsRawPreferredOutService = App.ServiceProvider.GetService();
+ sqlSugarClient = App.ServiceProvider.GetService();
QueryStringCommand = new RelayCommand(Query);
- this.Query(string.Empty);
+ Init();
+
+ // ConfirmCommand = new RelayCommand