From 43b2af8956d54dc3a53f211c53d8af582806b6ba Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期二, 08 四月 2025 11:18:58 +0800
Subject: [PATCH] 备料任务合并发料只适用于包装车间工单发料 备料任务增加根据发料类型,调用相应发料单据的ERP接口

---
 Tiger.Business.WMS/iWMS/ProdMaterialReq.cs |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Tiger.Business.WMS/iWMS/ProdMaterialReq.cs b/Tiger.Business.WMS/iWMS/ProdMaterialReq.cs
index e0f4c49..5ddf9b0 100644
--- a/Tiger.Business.WMS/iWMS/ProdMaterialReq.cs
+++ b/Tiger.Business.WMS/iWMS/ProdMaterialReq.cs
@@ -216,15 +216,15 @@
                         entity_h.Add(prd_h);
                         list_dOld.AddRange(list_d);
                         //妫�鏌ユ湁娌℃湁璋冩嫧鍗曪紝鏈夊氨鏇存柊鐘舵�佷负瀹屾垚
-                        var transferList = db.Queryable<BIZ_WMS_TRANSFER>().Where(s => s.SOURCECODE == prd_h.BILLCODE).ToList();
+                        var transferList = db.Queryable<BIZ_WMS_TRANSFER>().Where(s => s.SOURCE_ORDER == prd_h.BILLCODE).ToList();
                         if (transferList.Any())
                         {
                             foreach (var item in transferList)
                             {
-                                item.STATUS = BIZ_WMS_TRANSFER.STATUSs.FINISHED.GetValue();
-                                item.SOURCECODE = prd_h.BILLCODE;
+                                item.STATUS = BIZ_WMS_TRANSFER.STATUSs.Finished.GetValue();
+                                item.SOURCE_ORDER = prd_h.BILLCODE;
                                 transferH.Add(item);
-                                action.Message += $"锛岄鏂欏崟[{prd_h.BILLCODE}]瀵瑰簲璋冩嫧鍗昜{item.BILLCODE}]瀹屾垚";
+                                action.Message += $"锛岄鏂欏崟[{prd_h.BILLCODE}]瀵瑰簲璋冩嫧鍗昜{item.ORDER_NO}]瀹屾垚";
                             }
                         }
                     }
@@ -332,16 +332,16 @@
         {
             var action = new ApiAction<PageAble<BIZ_WMS_TRANSFER>>();
             var query = Biz.Db.Queryable<BIZ_WMS_TRANSFER>().Where(x =>
-            (x.STATUS == BIZ_WMS_TRANSFER.STATUSs.INIT.GetValue()
-            || x.STATUS == BIZ_WMS_TRANSFER.STATUSs.MANUAL.GetValue()
-            || x.STATUS == BIZ_WMS_TRANSFER.STATUSs.WORKING.GetValue())
+            (x.STATUS == BIZ_WMS_TRANSFER.STATUSs.Init.GetValue()
+            || x.STATUS == BIZ_WMS_TRANSFER.STATUSs.Imported.GetValue()
+            || x.STATUS == BIZ_WMS_TRANSFER.STATUSs.Storing.GetValue())
             && x.AUTH_ORG == orgcode)
-                .WhereIF(!billcode.IsNullOrEmpty(), x => x.BILLCODE.Contains(billcode))
+                .WhereIF(!billcode.IsNullOrEmpty(), x => x.ORDER_NO.Contains(billcode))
                 .OrderByDescending(x => x.UPDATE_TIME.ToString("yyyy-MM-dd"))
                 //.OrderBy(x => x.REMARK == "L40774" ? 0 : 1)
                 //.OrderBy(x => x.SOURCECODE == null ? 1 : 0)
-                .OrderByDescending(x => x.BILLDATE)
-                .OrderBy(x => new { x.CREATE_TIME, x.BILLCODE})
+                .OrderByDescending(x => x.ORDER_DATE)
+                .OrderBy(x => new { x.CREATE_TIME, x.ORDER_NO})
                 
                 //.OrderBy(x => x.CREATE_TIME)
                 .ToPage(pageIndex, pageSize);

--
Gitblit v1.9.3