From 52adedb218549cde2bdc60c3b338e360e72d94a6 Mon Sep 17 00:00:00 2001
From: 杨张扬 <634643841@qq.com>
Date: 星期四, 12 六月 2025 17:44:03 +0800
Subject: [PATCH] 双钱-修改库存记录BUG

---
 api/ApiHelper.cs |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/api/ApiHelper.cs b/api/ApiHelper.cs
index a9ae649..8732fdf 100644
--- a/api/ApiHelper.cs
+++ b/api/ApiHelper.cs
@@ -248,7 +248,13 @@
                     LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿�                     LogHelper.Info($"鐢熸垚{typeName}浠诲姟鎴愬姛锛屽鍣ㄥ彿{locCnt.S_CNTR_CODE}锛岃捣鐐箋startLoc.S_CODE}锛岀粓鐐箋endLoc.S_CODE}");
 
-                    db.Updateable<TN_CG_Detail>().UpdateColumns(it => new { it.S_ITEM_STATE, it.N_ITEM_STATE }).ExecuteCommand();
+                    if( db.Updateable<TN_CG_Detail>(cG_Detail).UpdateColumns(it => new { it.S_ITEM_STATE, it.N_ITEM_STATE }).ExecuteCommand() <= 0)
+                    {
+                        result.resultCode = 5;
+                        result.resultMsg = $"鏇存柊瀹瑰櫒{locCnt.S_CNTR_CODE}鐨勮揣鍝佹槑缁嗗け璐�;
+                        LogHelper.Info(result.resultMsg);
+                        return result;
+                    }
 
                     Task task99 = Task.Run(() =>
                     {
@@ -678,15 +684,15 @@
             LogHelper.Info("瑙﹀彂API锛歅DA婊℃墭涓嬬嚎鍏ュ簱" + JsonConvert.SerializeObject(model), "API");
             try
             {
-                if( model.RfId.Length < 16)
-                {
-                    result.resultCode = 1;
-                    result.resultMsg = $"杈撳叆鐨凴FID锛岄暱搴︿笉澶燂紝瑕佸ぇ浜�6浣�;
-                    LogHelper.Info(result.resultMsg);
-                    return result;
-                }
+                //if( model.RfId.Length < 16)
+                //{
+                //    result.resultCode = 1;
+                //    result.resultMsg = $"杈撳叆鐨凴FID锛岄暱搴︿笉澶燂紝瑕佸ぇ浜�6浣�;
+                //    LogHelper.Info(result.resultMsg);
+                //    return result;
+                //}
 
-                model.RfId = WMSHelper.ConvertHexToAscii(model.RfId);
+                //model.RfId = WMSHelper.ConvertHexToAscii(model.RfId);
 
                 //璇ヤ骇绾跨殑婊℃墭涓嬬嚎浣嶇疆锛岃捣鐐�                 var startPoint = Settings.ProductionLines.FirstOrDefault(a => a.PointOut == model.StartLoc);

--
Gitblit v1.9.1