瀏覽代碼

【软件版本】
V 3.0.6.3,状态:验证中
【模块名称】
G客户NTF统计功能
【问题原因】
添加日志,便于找问题。
【修改描述】

【测试结果】

sat23 3 年之前
父節點
當前提交
41946b9dc3
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      SCBC Factory Tools/BLL/NTFBLL.cs
  2. 0 0
      SCBC Factory Tools/LResource.zh-CN.Designer.cs

+ 7 - 0
SCBC Factory Tools/BLL/NTFBLL.cs

@@ -1,5 +1,6 @@
 using MOKA_Factory_Tools.DAL;
 using MOKA_Factory_Tools.Models;
+using SXLibrary;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -49,6 +50,8 @@ namespace MOKA_Factory_Tools.BLL
                 aMResult.SN = strSN;
                 #endregion
 
+                Log.WriteInfoLog(string.Format("上一次SN={0},当前SN={1}", strLastSN, aMResult.SN));
+
                 if (IsRecordExist(aMResult))
                 {
                     if ( !UpdateAMResults(aMResult, bResult, strErrMsg) )
@@ -114,9 +117,11 @@ namespace MOKA_Factory_Tools.BLL
             AMResult redo0Model = dalAMResult.GetModel(string.Format("Station='{0}' and SN='{1}' and ReDo='{2}'", model.Station, model.SN, "0"));
             if ( strLastSN == model.SN )
             {// 连接抄写数据,更新ReDo="0"的记录;
+                Log.WriteInfoLog(string.Format("上一次SN={0} 与当前SN={1} 相同,只更新数据", strLastSN, model.SN));
                 if ( !UpdateReDo0AMResult(redo0Model, TestResult, strErrMsg) )
                 {
                     // 更新失败;
+                    Log.WriteInfoLog(string.Format("AMResult更新SN={0},Station={1},TestTime={2},ReDo={3} 失败", redo0Model.SN, redo0Model.Station, redo0Model.TestTime, redo0Model.ReDo));
                     return false;
                 }
             }
@@ -127,6 +132,7 @@ namespace MOKA_Factory_Tools.BLL
                 if ( !dalAMResult.Update(redo0Model, string.Format("Station='{0}' and SN='{1}' and ReDo='{2}'", redo0Model.Station, redo0Model.SN, "0")) )
                 {
                     // 更新失败;
+                    Log.WriteInfoLog(string.Format("AMResult更新SN={0},Station={1},TestTime={2},ReDo={3} 失败", redo0Model.SN, redo0Model.Station, redo0Model.TestTime, redo0Model.ReDo));
                     return false;
                 }
 
@@ -134,6 +140,7 @@ namespace MOKA_Factory_Tools.BLL
                 if ( !AddAMResult(model, TestResult, strErrMsg) )
                 {
                     // 添加失败;
+                    Log.WriteInfoLog(string.Format("AMResult新增SN={0},Station={1},TestTime={2},ReDo={3} 失败", model.SN, model.Station, model.TestTime, model.ReDo));
                     return false;
                 }
             }

+ 0 - 0
SCBC Factory Tools/LResource.zh-CN.Designer.cs