From b4c61b31b6b377af1598856da060635bb84333a2 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期六, 03 五月 2025 18:54:43 +0800
Subject: [PATCH] 优化了一些已知问题

---
 Tiger.Business.WMS/Transaction/In_SemiProd.cs |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/In_SemiProd.cs b/Tiger.Business.WMS/Transaction/In_SemiProd.cs
index 17dbcef..8b103a4 100644
--- a/Tiger.Business.WMS/Transaction/In_SemiProd.cs
+++ b/Tiger.Business.WMS/Transaction/In_SemiProd.cs
@@ -19,6 +19,8 @@
 using static Microsoft.CodeAnalysis.CSharp.SyntaxTokenParser;
 using Tiger.Model.Entitys.MES.U9C;
 using Tiger.Model.Entitys.MES.BizPrintInstoreDoc;
+using Tiger.Model.Entitys.MES.Position;
+using IronPython.Runtime.Operations;
 
 namespace Tiger.Business.WMS.Transaction
 {
@@ -79,7 +81,7 @@
                 {
                     action.IsSuccessed = false;
                     action.LocaleMsg = Biz.L("WMS.InSemiProd.ScanItem.WoEmptyFailure", input.SN); // $"宸ュ崟[{input.SN}]涓嶅瓨鍦�"
-                    return action;
+                    return SetOutPutMqttMsg(action, input.Locale);
                 }
 
                 var semiTemplateQty = (input.Data ?? "").JsonToObject<SemiTemplateQty>() ?? new SemiTemplateQty();
@@ -470,6 +472,35 @@
                 ErpProdInSns = new();
                 inStoreInfos = new() { };
 
+                //涓存椂浠g爜锛屾祴璇曠敤
+                //DbClient _db = Biz.DataSource["YadaU9C"].Client;
+                //var items = Biz.Db.Queryable<WMS_ITEM>().Where(q => SqlFunc.IsNullOrEmpty(q.SUPP_LOTNO)).ToList();
+                //var snlist = items.Select(q => q.SN).ToList();
+                ////var list = _db.Ado.SqlQuery<mes_MaterialBarCodeByBin>($"select *,cast('{DateTime.Now.ToString("yyyy-MM-dd")}' as DATETIME) as PROD_DATE,'' as Unit,'' as LotNo from mes_MaterialBarCodeByBin where Code in ({string.Join(',', snlist.Select(x=> $"'{x}'"))})");
+                //var list = _db.Queryable<mes_MaterialBarCode>().Where(q => snlist.Contains(q.Code)).ToList();
+                //foreach (var item in list)
+                //{
+                //    var wmsitem = items.Where(q => q.SN == item.Code).FirstOrDefault();
+                //    if (!wmsitem.IsNullOrEmpty())
+                //    {
+                //        wmsitem.SUPP_LOTNO = item.Segment7;
+                //    }
+                //}
+
+
+                ////淇濆瓨鏁版嵁搴�
+                //var db = Business.Biz.Db;
+                //var dbTran = db.UseTran(() =>
+                //{
+                //    db.Updateable(items).UpdateColumns(q => new { q.SUPP_LOTNO }).ExecuteCommand();
+                //});
+                //if (!dbTran.IsSuccess)
+                //{
+                //    Logger.Default.Fatal(dbTran.ErrorException, "Database transaction save exception");
+                //    this.Close(!dbTran.IsSuccess);
+                //    throw dbTran.ErrorException;
+                //}
+
                 //淇濆瓨鏁版嵁搴�
                 var db = Business.Biz.Db;
                 var dbTran = db.UseTran(() =>

--
Gitblit v1.9.3