From ee6b82936b52250e46b57fcf12484a6f40c4dc50 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 02 十二月 2025 15:06:18 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBContext.cs                          |   32 +++++-
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs                |   94 ++++++++++++++++++
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs       |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs           |    1 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/DB/BaseDBConfig.cs                         |    7 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs              |   74 ++++++++++++++
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs       |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs |   19 ++-
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SqlsugarSetup.cs                |    7 
 项目代码/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue                            |   57 +++++++---
 10 files changed, 252 insertions(+), 43 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
index 47ab893..5a444d3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
@@ -54,14 +54,6 @@
     const editFormOptions = ref([
       [
         {
-          title: "鍗曟嵁绫诲瀷",
-          required: true,
-          field: "orderType",
-          type: "select",
-          dataKey: "outOrderType",
-          data: [],
-        },
-        {
         field: "orderNo",
         title: "鍗曟嵁缂栧彿",
         type: "string",
@@ -81,17 +73,37 @@
           readonly: true,
         },
         {
-          title: "浠撳簱",
-          field: "warehouseId",
-          type: "select",
-          dataKey: "warehouses",
-          data: [],
-          required: true,
+          title: "鍘傚尯",
+          field: "factoryArea",
+          type: "string",
         },
+      ],
+      [
         {
           title: "澶囨敞",
           field: "remark",
           type: "textarea",
+        },
+        {
+          title: "涓氬姟绫诲瀷",
+          field: "businessType",
+          type: "select",
+          dataKey: "businessType",
+          data: [],
+          require: true,
+        },
+        {
+          title: "鏄惁鍒嗘壒",
+          field: "isBatch",
+          type: "select",
+          dataKey: "enable",
+          data: [],
+          require: true,
+        },
+        {
+          title: "鎿嶄綔鑰�",
+          field: "operator",
+          type: "string",
         },
       ],
     ]);
@@ -153,7 +165,7 @@
         type: "string",
         width: 160,
         align: "left",
-        // link: true,
+        link: true,
       },
       {
         field: "upperOrderNo",
@@ -255,7 +267,7 @@
     ]);
     const detail = ref({
       cnName: "鍑哄簱鏄庣粏鍗�",
-      table: "OnboundOrderDetail",
+      table: "Details",
       columns: [
         {
           field: "id",
@@ -320,13 +332,20 @@
           required: true,
         },
         {
-          field: "rowNo",
+          field: "lineNo",
           title: "琛屽彿",
           type: "string",
           width: 90,
           align: "left",
           edit: { type: "number" },
-          required: true,
+        },
+        {
+          field: "rowNo",
+          title: "琛屽彿2",
+          type: "int",
+          width: 90,
+          align: "left",
+          edit: { type: "number" },
         },
         {
           field: "lockQuantity",
@@ -348,7 +367,9 @@
           type: "string",
           width: 180,
           align: "left",
+          edit: { type: "select" },
           bind: { key: "orderDetailStatusEnum", data: [] },
+          required: true,
         },
         {
           field: "creater",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs"
index dabfebd..2a28e3e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs"
@@ -5,7 +5,9 @@
 using SqlSugar.Extensions;
 using System;
 using System.Collections.Generic;
+using System.Dynamic;
 using System.Linq;
+using System.Reflection;
 using System.Text;
 using System.Threading.Tasks;
 using WIDESEA_Common.AllocateEnum;
@@ -16,6 +18,7 @@
 using WIDESEA_Core.CodeConfigEnum;
 using WIDESEA_Core.DB;
 using WIDESEA_Core.Enums;
+using WIDESEA_Core.Helper;
 using WIDESEA_Core.Seed;
 using WIDESEA_IAllocateService;
 using WIDESEA_IInboundService;
@@ -34,6 +37,8 @@
         public readonly IRepository<Dt_AllocateOrder> _allocateOrderRepository;
         public readonly IRepository<Dt_AllocateOrderDetail> _allocateOrderDetailRepository;
 
+        public readonly IRepository<Dt_InboundOrderDetail> _inboundOrderDetailRepository;
+
         private readonly ILogger<AllocateService> _logger;
         public AllocateService(IRepository<Dt_AllocateOrder> BaseDal,
             IUnitOfWorkManage unitOfWorkManage,
@@ -41,6 +46,7 @@
             IOutboundService outboundService,
             IRepository<Dt_AllocateOrder> allocateOrderRepository,
             IRepository<Dt_AllocateOrderDetail> allocateOrderDetailRepository,
+            IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository,
             ILogger<AllocateService> logger) : base(BaseDal)
         {
             _unitOfWorkManage = unitOfWorkManage;
@@ -49,6 +55,7 @@
             _allocateOrderRepository = allocateOrderRepository;
             _allocateOrderDetailRepository = allocateOrderDetailRepository;
             _logger = logger;
+            _inboundOrderDetailRepository = inboundOrderDetailRepository;
         }
 
         public IRepository<Dt_AllocateOrder> Repository => BaseDal;
@@ -99,7 +106,7 @@
             {
                 if (businessType == BusinessTypeEnum.澶栭儴浠撳簱璋冩櫤浠�)
                 {
-                    allocateOrder.OrderType = InOrderTypeEnum.AllocatInbound.ObjToInt();
+                    allocateOrder.OrderType = (int)InOrderTypeEnum.AllocatInbound;
                     var inboundOrders = ConvertToInboundOrders(allocateOrder);
                     await _inboundService.InbounOrderService.ReceiveInboundOrder(inboundOrders, 1);
                 }
@@ -107,11 +114,11 @@
                 {
                     if (businessType == BusinessTypeEnum.鏅轰粨璋冨閮ㄤ粨搴�)
                     {
-                        allocateOrder.OrderType = InOrderTypeEnum.AllocatOutbound.ObjToInt();
+                        allocateOrder.OrderType = (int)InOrderTypeEnum.AllocatOutbound;
                     }
                     else if (businessType == BusinessTypeEnum.鏅轰粨璋冩櫤浠�)
                     {
-                        allocateOrder.OrderType = InOrderTypeEnum.InternalAllocat.ObjToInt();
+                        allocateOrder.OrderType = (int)InOrderTypeEnum.InternalAllocat;
                     }
 
                     var outboundOrders = ConvertToOutboundOrders(allocateOrder);
@@ -431,5 +438,66 @@
                 return code;
             }
         }
+
+        public override PageGridData<Dt_InboundOrderDetail> GetDetailPage(PageDataOptions options)
+        {
+            string wheres = ValidatePageOptions(options);
+            //鑾峰彇鎺掑簭瀛楁
+            Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
+            List<OrderByModel> orderByModels = new List<OrderByModel>();
+            foreach (var item in orderbyDic)
+            {
+                OrderByModel orderByModel = new()
+                {
+                    FieldName = item.Key,
+                    OrderByType = item.Value
+                };
+                orderByModels.Add(orderByModel);
+            }
+
+
+            int totalCount = 0;
+            List<SearchParameters> searchParametersList = new List<SearchParameters>();
+            if (!string.IsNullOrEmpty(options.Wheres))
+            {
+                try
+                {
+                    searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
+                    options.Filter = searchParametersList;
+                }
+                catch { }
+            }
+            //var data = BaseDal.Db.Queryable<Dt_AllocateOrderDetail>()
+            //    .WhereIF(!wheres.IsNullOrEmpty(), wheres)
+            //    .OrderBy(orderByModels)
+            //    .ToPageList(options.Page, options.Rows, ref totalCount);
+            //Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.Id == (int)options.Value);
+            //Dt_InboundOrder _InboundOrder = SqlSugarHelper.DbWMS.Queryable<Dt_InboundOrder>().Where(x => x.UpperOrderNo == allocateOrder.UpperOrderNo).First();
+            //var details = _inboundOrderDetailRepository.QueryData(x => x.OrderId == _InboundOrder.Id );
+            //foreach (var item in data)
+            //{
+            //    var detail = details.Where(x => x.MaterielCode == item.MaterielCode).FirstOrDefault();
+            //    if (detail != null)
+            //    {
+            //        item.OrderQuantity = detail.OrderQuantity;
+            //        item.ReceiptQuantity = detail.ReceiptQuantity;
+            //        item.OverInQuantity = detail.OverInQuantity;
+            //        item.OrderDetailStatus = detail.OrderDetailStatus;
+            //    }
+            //}
+            //return new PageGridData<Dt_AllocateOrderDetail>(totalCount, data);
+
+            Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.Id == (int)options.Value);
+            Dt_InboundOrder _InboundOrder = SqlSugarHelper.DbWMS.Queryable<Dt_InboundOrder>().Where(x => x.UpperOrderNo == allocateOrder.UpperOrderNo).First();
+
+            var data = BaseDal.Db.Queryable<Dt_InboundOrderDetail>()
+                .WhereIF(!wheres.IsNullOrEmpty(), wheres)
+                .WhereIF(!_InboundOrder.IsNullOrEmpty(), x => x.OrderId == _InboundOrder.Id)
+                .OrderBy(orderByModels)
+                .ToPageList(options.Page, options.Rows, ref totalCount);
+
+
+            return new PageGridData<Dt_InboundOrderDetail>(totalCount, data);
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
index 6f32ad7..2b0a3fe 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
@@ -150,6 +150,100 @@
             }
         }
 
+        protected string ValidatePageOptions(PageDataOptions options)
+        {
+            options = options ?? new PageDataOptions();
+            string where = "";
+            List<SearchParameters> searchParametersList = new List<SearchParameters>();
+            if (options.Filter != null && options.Filter.Count > 0)
+            {
+                searchParametersList.AddRange(options.Filter);
+            }
+            else if (!string.IsNullOrEmpty(options.Wheres))
+            {
+                try
+                {
+                    searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
+                    options.Filter = searchParametersList;
+                }
+                catch { }
+            }
+            QueryRelativeList?.Invoke(searchParametersList);
+
+            for (int i = 0; i < searchParametersList.Count; i++)
+            {
+                if (string.IsNullOrEmpty(searchParametersList[i].Value))
+                {
+                    continue;
+                }
+
+                PropertyInfo property = TProperties.Where(c => c.Name.ToUpper() == searchParametersList[i].Name.ToUpper()).FirstOrDefault();
+
+                if (property == null) continue;
+
+                (bool, string, object) result = property.ValidationVal(searchParametersList[i].Value);
+                if (!result.Item1)
+                {
+                    continue;
+                }
+
+                LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
+                if (expressionType == LinqExpressionType.Equal)
+                {
+                    if (string.IsNullOrEmpty(where))
+                    {
+                        // 閽堝瀛楃涓茬被鍨嬬殑瀛楁浣跨敤妯$硦鏌ヨ
+                        //where += $"{searchParametersList[i].Name} like '%{searchParametersList[i].Value}%'";
+                        if (searchParametersList[i].Value.ToLower() == "true" || searchParametersList[i].Value.ToLower() == "false")
+                        {
+                            where += $" {searchParametersList[i].Name} = '{searchParametersList[i].Value.ToLower()}'";
+                        }
+                        else
+                        {
+                            where += $"[{searchParametersList[i].Name}] like '%{searchParametersList[i].Value}%'";
+                        }
+                    }
+                    else
+                    {
+                        // 閽堝甯冨皵绫诲瀷瀛楁杩涜绮剧‘鏌ヨ
+                        if (searchParametersList[i].Value.ToLower() == "true" || searchParametersList[i].Value.ToLower() == "false")
+                        {
+                            where += $" and {searchParametersList[i].Name} = '{searchParametersList[i].Value.ToLower()}'";
+                        }
+                        else
+                        {
+                            where += $" and [{searchParametersList[i].Name}] like '%{searchParametersList[i].Value}%'";
+                        }
+                    }
+                }
+                else
+                {
+                    if (searchParametersList[i].DisplayType.GetLinqCondition() == LinqExpressionType.ThanOrEqual)
+                    {
+                        if (string.IsNullOrEmpty(where))
+                            where += $"{searchParametersList[i].Name} >= '{searchParametersList[i].Value}'";
+                        else
+                            where += $" and {searchParametersList[i].Name} {searchParametersList[i].DisplayType.GetLinqCondition()} '{searchParametersList[i].Value}'";
+                    }
+                    else if (searchParametersList[i].DisplayType.GetLinqCondition() == LinqExpressionType.LessThanOrEqual)
+                    {
+                        if (string.IsNullOrEmpty(where))
+                            where += $"{searchParametersList[i].Name} <= '{searchParametersList[i].Value}'";
+                        else
+                            where += $" and {searchParametersList[i].Name} <= '{searchParametersList[i].Value}'";
+                    }
+                    else
+                    {
+                        if (string.IsNullOrEmpty(where))
+                            where += $"{searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{searchParametersList[i].Value}'";
+                        else
+                            where += $" and {searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{searchParametersList[i].Value}'";
+                    }
+                }
+            }
+            return where;
+        }
+
         protected Expression<Func<TEntity, bool>> GetWhereExpression(string propertyName, object propertyValue, ParameterExpression parameter, LinqExpressionType expressionType)
         {
             Type? proType = typeof(TEntity).GetProperty(propertyName)?.PropertyType;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/DB/BaseDBConfig.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/DB/BaseDBConfig.cs"
index 1382e3e..f49e47a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/DB/BaseDBConfig.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/DB/BaseDBConfig.cs"
@@ -7,6 +7,7 @@
 using System.Threading.Tasks;
 using WIDESEA_Core.Const;
 using WIDESEA_Core.Helper;
+using WIDESEA_Core.Seed;
 using WIDESEA_Core.Tenants;
 
 namespace WIDESEA_Core.DB
@@ -60,7 +61,7 @@
             {
                 Connection = AppSettings.Get(MainDb.ConnectionString).DecryptDES(AppSecret.DB),
                 ConnId = MainDb.CurrentDbConnId,
-                DbType = DataBaseType.SqlServer
+                DbType = DBContext.DbType,
             };
             listdatabaseSlaveDB.Add(mainDb);
             for (int i = 0; i < list.Count; i++)
@@ -70,7 +71,7 @@
                 {
                     Connection = data.ConnectionString,
                     ConnId = data.TenantId + "",
-                    DbType = (DataBaseType)data.DbType,
+                    DbType = data.DbType,
                 };
                 mutiDBOperate.Connection = mutiDBOperate.Connection.DecryptDES(AppSecret.DB);
                 listdatabaseSlaveDB.Add(mutiDBOperate);
@@ -116,6 +117,6 @@
         /// <summary>
         /// 鏁版嵁搴撶被鍨�
         /// </summary>
-        public DataBaseType DbType { get; set; }
+        public DbType DbType { get; set; }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SqlsugarSetup.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SqlsugarSetup.cs"
index f2bb02c..b985f1f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SqlsugarSetup.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SqlsugarSetup.cs"
@@ -35,7 +35,6 @@
             {
                 var memoryCache = o.GetRequiredService<IMemoryCache>();
 
-                // 杩炴帴瀛楃涓�
                 var listConfig = new List<ConnectionConfig>
                 {
                     new ConnectionConfig
@@ -43,7 +42,9 @@
                         ConfigId = MainDb.CurrentDbConnId,
                         ConnectionString = DBContext.GetMainConnectionDb().Connection,
                         IsAutoCloseConnection = true,
-                        DbType = MainDb.DbType,
+                        //DbType = MainDb.DbType,
+                        DbType = DBContext.GetMainConnectionDb().DbType,
+
                         AopEvents = new AopEvents
                         {
                             OnLogExecuting = (sql, p) =>
@@ -51,7 +52,7 @@
                                   Parallel.For(0, 1, e =>
                                   {
                                         MiniProfiler.Current.CustomTiming("SQL锛�", GetParas(p) + "銆怱QL璇彞銆戯細" + sql);
-                                     
+
                                   });
                                  if(AppSettings.GetValue("PrintSql").ObjToBool())
                                 {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBContext.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBContext.cs"
index 14df465..83f41a0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBContext.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBContext.cs"
@@ -1,4 +1,5 @@
-锘縰sing SqlSugar;
+锘縰sing Microsoft.Extensions.Logging;
+using SqlSugar;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -23,14 +24,31 @@
         /// </summary>
         public static MutiDBOperate GetMainConnectionDb()
         {
-            MutiDBOperate mainDb = new MutiDBOperate()
+            string dbType = AppSettings.GetValue("DBType");
+            if(Enum.TryParse(typeof(DbType),dbType,out object? result) && result != null)
             {
-                Connection = AppSettings.Get(MainDb.ConnectionString).DecryptDES(AppSecret.DB),
-                ConnId = MainDb.CurrentDbConnId,
-                DbType = DataBaseType.SqlServer
-            };
+                DbType dataBaseType = (DbType)result;
+                MutiDBOperate mainDb = new MutiDBOperate()
+                {
+                    Connection = AppSettings.Get(MainDb.ConnectionString).DecryptDES(AppSecret.DB),
+                    ConnId = MainDb.CurrentDbConnId,
+                    DbType = dataBaseType
+                };
+                return mainDb;
+            }
+            else
+            {
+                throw new Exception("鏁版嵁搴撹繛鎺ラ厤缃敊璇�");
+            }
 
-            return mainDb;
+            //MutiDBOperate mainDb = new MutiDBOperate()
+            //{
+            //    Connection = AppSettings.Get(MainDb.ConnectionString).DecryptDES(AppSecret.DB),
+            //    ConnId = MainDb.CurrentDbConnId,
+            //    DbType = DataBaseType.SqlServer
+            //};
+
+            //return mainDb;
         }
         /// <summary>
         /// 杩炴帴瀛楃涓� 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index f65373c..7d1508b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -1,5 +1,6 @@
 锘縰sing AutoMapper;
 using SqlSugar;
+using System.Dynamic;
 using System.Threading.Tasks;
 using WIDESEA_Common.CommonEnum;
 using WIDESEA_Common.OrderEnum;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
index 7b5bfc7..998b8d8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
@@ -32,7 +32,7 @@
         /// 鍗曟嵁缂栧彿
         /// </summary>
         [CodeRule(RuleCodeEnum.OutboundOrderRule)]
-        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)]
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")]
         public string OrderNo { get; set; }
 
         /// <summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs"
index b4f2ab7..af9e5f0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs"
@@ -83,35 +83,35 @@
         /// 琛屽彿
         /// 榛樿鍊�:
         ///</summary>
-        [SugarColumn(ColumnName = "lineNo", ColumnDescription = "琛屽彿")]
+        [SugarColumn(ColumnName = "lineNo", ColumnDescription = "琛屽彿", DefaultValue= "0")]
         public string? lineNo { get; set; }
 
         /// <summary>
         /// 鎸枡鏁伴噺
         /// 榛樿鍊�:
         ///</summary>
-        [SugarColumn(ColumnName = "MoveQty", ColumnDescription = "鎸枡鏁伴噺")]
+        [SugarColumn(ColumnName = "MoveQty", ColumnDescription = "鎸枡鏁伴噺",IsNullable = true)]
         public decimal MoveQty { get; set; }
 
         /// <summary>
         /// 渚涘簲鍟嗙紪鍙�
         /// 榛樿鍊�:
         ///</summary>
-        [SugarColumn(ColumnName = "supplyCode", ColumnDescription = "渚涘簲鍟嗙紪鍙�")]
+        [SugarColumn(ColumnName = "supplyCode", ColumnDescription = "渚涘簲鍟嗙紪鍙�", IsNullable = true)]
         public string? SupplyCode { get; set; }
 
         /// <summary>
         /// 鏁伴噺
         /// 榛樿鍊�:
         ///</summary>
-        [SugarColumn(ColumnName = "barcodeQty", ColumnDescription = "鏁伴噺")]
+        [SugarColumn(ColumnName = "barcodeQty", ColumnDescription = "鏁伴噺", DefaultValue = "0", IsNullable = true)]
         public decimal BarcodeQty { get; set; }
 
         /// <summary>
         /// 鍗曚綅
         /// 榛樿鍊�:
         ///</summary>
-        [SugarColumn(ColumnName = "barcodeUnit", ColumnDescription = "鍗曚綅")]
+        [SugarColumn(ColumnName = "barcodeUnit", ColumnDescription = "鍗曚綅", IsNullable = true    )]
         public string BarcodeUnit { get; set; } = null!;
 
 
@@ -119,13 +119,13 @@
         ///  
         /// 榛樿鍊�:
         ///</summary>
-        [SugarColumn(ColumnName = "barcodemoveQty", ColumnDescription = "鏁伴噺")]
+        [SugarColumn(ColumnName = "barcodemoveQty", ColumnDescription = "鏁伴噺" , DefaultValue = "0", IsNullable = true)]
         public decimal BarcodeMoveQty { get; set; } 
         /// <summary>
         /// 浠撳簱
         /// 榛樿鍊�:
         ///</summary>
-        [SugarColumn(ColumnName = "warehouseCode", ColumnDescription = "浠撳簱")]
+        [SugarColumn(ColumnName = "warehouseCode", ColumnDescription = "浠撳簱", IsNullable = true)]
         public string? WarehouseCode { get; set; }
 
         /// <summary>
@@ -142,17 +142,22 @@
         [SugarColumn(IsIgnore = true)]
         public decimal NeedOutQuantity => OrderQuantity - MoveQty;
 
+        [SugarColumn(IsNullable = true, ColumnDescription = "")]
         public decimal PickedQty { get; set; }
 
+        [SugarColumn(IsNullable = true, ColumnDescription = "")]
         public string documentsNO { get; set; }
 
+        [SugarColumn(IsNullable = true, ColumnDescription = "")]
         public decimal AllocatedQuantity { get; set; }
 
+        [SugarColumn(IsNullable = true, ColumnDescription = "")]
         public int BatchAllocateStatus { get; set; }
 
         /// <summary>
         /// 铏氭嫙鍑哄叆搴撴暟閲�
         /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "铏氭嫙鍑哄叆搴撴暟閲�")]
         public decimal NoStockOutQty { get; set; }
 
     }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
index 7a128b6..aaf10c0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
@@ -2807,7 +2807,7 @@
                         business_type = outboundOrder.BusinessType,
                         factoryArea = outboundOrder.FactoryArea,
                         operationType = 1,
-                        Operator = outboundOrder.Operator,
+                        Operator = App.User.UserName,
                         orderNo = outboundOrder.UpperOrderNo,
                         documentsNO = outboundOrder.OrderNo,
                         status = outboundOrder.OrderStatus,

--
Gitblit v1.9.3