From 0b5ccdca6263cf7a2cee460f30c76ef1efea2811 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期六, 27 四月 2024 17:47:27 +0800
Subject: [PATCH] 人工出库,人工入库,人工移库,PDA扫码确认外协物料已被取走接口

---
 代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_equipmentinfoService.cs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_equipmentinfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_equipmentinfoService.cs"
index d34772e..12eb0bd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_equipmentinfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_equipmentinfoService.cs"
@@ -20,6 +20,7 @@
 using WIDESEA_Core.FreeDB;
 using WIDESEA_Comm.LogInfo;
 using WIDESEA_Core.ManageUser;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
 
 namespace WIDESEA_WCS.Services
 {
@@ -49,6 +50,7 @@
         public WebResponseContent ChangEquipmentState(SaveModel model)
         {
             WebResponseContent content = new WebResponseContent();
+            List<dt_equipmentinfo> equipmentinfos = new List<dt_equipmentinfo>();
             try
             {
                 FreeDB freeDB = new FreeDB();
@@ -58,12 +60,15 @@
                     keys.Add(Guid.Parse(item.ToString()));
                 }
                 int res = freeDB.Update<dt_equipmentinfo>().Set(t => t.equipment_state == model.Extra.ToString()).Where(t => keys.Contains(t.equipment_id)).ExecuteAffrows();
+                equipmentinfos = freeDB.Select<dt_equipmentinfo>().Where(x => keys.Contains(x.equipment_id)).ToList();
                 content.OK();
-                WriteLog.Write_Log("鍩虹淇℃伅淇敼", "updateEqState", UserContext.Current.UserName + "淇敼鎴愬姛," + res, model);
+                //WriteLog.Write_Log("鍩虹淇℃伅淇敼", "updateEqState", UserContext.Current.UserName + "淇敼鎴愬姛," + res, model);
+                WriteDBLog.Success($"{(model.Extra.ToString() == "Enable" ? "鍚敤璁惧" : "绂佺敤璁惧")}", new { 鏁版嵁 = equipmentinfos }, "PCS", UserContext.Current.UserTrueName);
             }
             catch (Exception ex)
             {
-                WriteLog.Write_Log("鍩虹淇℃伅淇敼", "updateEqState", UserContext.Current.UserName + "淇敼寮傚父," + ex.Message, model);
+                //WriteLog.Write_Log("鍩虹淇℃伅淇敼", "updateEqState", UserContext.Current.UserName + "淇敼寮傚父," + ex.Message, model);
+                WriteDBLog.Error($"{(model.Extra.ToString() == "Enable" ? "鍚敤璁惧" : "绂佺敤璁惧")}", new { 鏁版嵁 = equipmentinfos }, "PCS", UserContext.Current.UserTrueName);
                 content.Error(ex.Message);
             }
             return content;

--
Gitblit v1.9.3