From 7e8fbf96c0e985791b7aad451b1b33d933ba77df Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 29 七月 2024 16:56:11 +0800
Subject: [PATCH] 库存检验单 增加 批次号,检验数量,良品数量,报废数量,可疑数 HBatchNo varchar(200) --批号 HInSpectQty dec(18,8) --检验数量 HRightQty dec(18,8) --合格数量 HUnRightQty dec(18,8) --不合格数量 HUnKnowQty dec(18,8) --可疑数量 实验室 仪器检验时,扫码流转卡二维码的, 改为 可以扫 取样单 二维码(即 可以扫流转卡也可以扫取样单)。 检验单里 保存 对应的 取样单 内码; 首件单,巡检单,工序检验单 表头增加 字段 HTakeSampleCheckBillID int --取样单内码 HTakeSampleCheckBillNo int --取样单 出站单 :增加 字段: 返工数,工废数量,料废数量 ,料废返工数量 HBackWorkQty dec(18,8) -- 返工数 HBadByWorkQty dec(18,8) -- 工废数量 HBadByMaterQty dec(18,8) --料废数量 HBackWorkByMaterQty dec(18,8) --料废返工数量

---
 WebAPI/LogService.cs |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/WebAPI/LogService.cs b/WebAPI/LogService.cs
index 7762f83..113cc0d 100644
--- a/WebAPI/LogService.cs
+++ b/WebAPI/LogService.cs
@@ -69,5 +69,47 @@
             }
         }
         #endregion
+
+        #region 鑷畾涔夋枃浠跺悕
+        public static void CustomWriteLog(object obj, string FileName, string filePath = "Vlog" , bool isAppend = true)
+        {
+            try
+            {
+                lock (lockObj)
+                {
+                    filePath = $@"{filePath}\{FileName}.txt";
+
+                    filePath = AppDomain.CurrentDomain.BaseDirectory + filePath;
+
+                    if (!System.IO.Directory.Exists(Path.GetDirectoryName(filePath)))
+                    {
+                        System.IO.Directory.CreateDirectory(Path.GetDirectoryName(filePath));
+                    }
+
+                    bool fileExists = System.IO.File.Exists(filePath);
+                    //涓嶅瓨鍦� 鍒欏垱寤鸿鏂囦欢
+                    if (!fileExists)
+                    {
+                        System.IO.File.Create(filePath).Close();
+                    }
+
+                    using (StreamWriter writer = new StreamWriter(filePath, isAppend))
+                    {
+                        //瀛樺湪鐨勬椂鍊欐墠鍐欎竴琛�
+                        if (fileExists && isAppend)
+                        {
+                            writer.WriteLine();
+                        }
+
+                        var content = obj is string ? obj : JsonConvert.SerializeObject(obj);
+                        writer.WriteLine($"{DateTime.Now} {content}");
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+            }
+        }
+        #endregion
     }
 }

--
Gitblit v1.9.1