zly 1 month ago
parent
commit
91f6a14515

+ 9 - 0
.claude/settings.local.json

@@ -0,0 +1,9 @@
+{
+  "permissions": {
+    "allow": [
+      "Bash(git ls-tree *)",
+      "Bash(grep -n \"public float \\\\\\(R\\\\|H\\\\|A1\\\\|A2\\\\\\)$\" TeamAAS-VM/Models/Robot/RPoint.cs)",
+      "Bash(grep -cE \"public float A[1-6]$\" TeamAAS-VM/Models/Robot/RPoint.cs)"
+    ]
+  }
+}

+ 90 - 11
TeamAAS-VM/Core/Management.cs

@@ -1039,7 +1039,7 @@ namespace TeamAAS_VP.Core
                 addressConfig.In_QrCodePhotoRequest.Address,
                 addressConfig.In_PickINC.Address,
                 addressConfig.In_Throw.Address,
-               // addressConfig.RunMode.Address,
+               //addressConfig.RunMode.Address,
                 addressConfig.ManualMode.Address,
                 addressConfig.AutoRunning.Address,
                 addressConfig.ClearMode.Address,
@@ -1255,6 +1255,10 @@ namespace TeamAAS_VP.Core
         /// </summary>
         string PartSN = "";
         /// <summary>
+        /// 零件2SN
+        /// </summary>
+        string PartSN2 = "";
+        /// <summary>
         /// 产品SN
         /// </summary>
         string[] ProductMainSN = new string[10];//产品主sn
@@ -2584,6 +2588,7 @@ namespace TeamAAS_VP.Core
                             {
                                 SendTaskMessage($"未找到二维码视觉流程,流程ID: {qrCodeProcedureId}", MessageLevel.Alarm);
                                 await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)2);
+                                SendTaskMessage("1发送plc结果2", MessageLevel.Info);
                                 return;
                             }
 
@@ -2608,17 +2613,20 @@ namespace TeamAAS_VP.Core
                                         if (!isSuccess)//如果二维码已使用,则返回false
                                         {
                                             await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)3);
+                                            SendTaskMessage("发送plc结果3", MessageLevel.Info);
                                             return;
                                         }
                                     }
 
                                     await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)1);
+                                    SendTaskMessage("发送plc结果1", MessageLevel.Info);
                                 }
                                 else
                                 {
                                     PartSN = "";
                                     SendTaskMessage("二维码扫码失败", MessageLevel.Alarm);
                                     await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)2);
+                                    SendTaskMessage("2发送plc结果2", MessageLevel.Info);
                                     return;
                                 }
                             }
@@ -2627,6 +2635,71 @@ namespace TeamAAS_VP.Core
                                 PartSN = "";
                                 SendTaskMessage("二维码扫码失败", MessageLevel.Alarm);
                                 await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)2);
+                                SendTaskMessage("3发送plc结果2", MessageLevel.Info);
+                                return;
+                            }
+                        }
+                        else if (state == 2)
+                        {
+                            //相机的编号
+                            //Int16 cameraIndex = plc.ReadNode<Int16>(addressConfig.In_QrCodeCamera_ScanNum.Address);
+                            //SendTaskMessage(string.Format("扫码编号", cameraIndex), MessageLevel.Info);
+
+                            Guid qrCodeProcedureId = currentProduct.QrCodeProcedureId2;
+                            //视觉流程ID
+                            var qrCodeProcess = _productService.GetCurrentProductProcedureModelById(qrCodeProcedureId);
+                            if (qrCodeProcess == null)
+                            {
+                                SendTaskMessage($"未找到二维码视觉流程2,流程ID: {qrCodeProcedureId}", MessageLevel.Alarm);
+                                await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)2);
+                                SendTaskMessage("4发送plc结果2", MessageLevel.Info);
+                                return;
+                            }
+
+                            SendTaskMessage($"开始执行二维码扫码视觉流程2", MessageLevel.Debug);
+                            var _cts = new CancellationTokenSource();
+
+                            await _remoteCommandService.SetLightBeforePhoto(qrCodeProcess);
+                            var qrCodeResult = _remoteCommandService.ExecutePhoto(1, qrCodeProcess, out CogToolBlockTerminalCollection outputCollection);
+
+                            if (qrCodeResult && outputCollection.Contains("QR"))
+                            {
+                                PartSN2 = outputCollection["QR"].Value as string;
+                                if (!string.IsNullOrEmpty(PartSN2))
+                                {
+                                    await plc.WriteNodeAsync(addressConfig.Out_PartCode2.Address, PartSN2);
+                                    SendTaskMessage($"二维码扫码成功2:{PartSN2}", MessageLevel.Info);
+
+                                    var stationConfig = _configService.GetDeviceInfo(0);
+                                    if (stationConfig.EnableMES)
+                                    {
+                                        (bool isSuccess, string response) = await _mesService.StationGetEx2Async(0, PartSN2, "", 2);//询问零件码,是否可以使用
+                                        if (!isSuccess)//如果二维码已使用,则返回false
+                                        {
+                                            await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)3);
+                                            SendTaskMessage("2发送plc结果3", MessageLevel.Info);
+                                            return;
+                                        }
+                                    }
+
+                                    await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)1);
+                                    SendTaskMessage("2发送plc结果1", MessageLevel.Info);
+                                }
+                                else
+                                {
+                                    PartSN2 = "";
+                                    SendTaskMessage("二维码扫码失败", MessageLevel.Alarm);
+                                    await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)2);
+                                    SendTaskMessage("5发送plc结果2", MessageLevel.Info);
+                                    return;
+                                }
+                            }
+                            else
+                            {
+                                PartSN2 = "";
+                                SendTaskMessage("二维码扫码失败", MessageLevel.Alarm);
+                                await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)2);
+                                SendTaskMessage("6发送plc结果2", MessageLevel.Info);
                                 return;
                             }
                         }
@@ -2634,6 +2707,8 @@ namespace TeamAAS_VP.Core
                         {
                             SendTaskMessage("二维码拍照点位发送信号已关闭", MessageLevel.Alarm);
                             await plc.WriteNodeAsync(addressConfig.Out_QrCodePhotoResault.Address, (Int16)0);
+                            SendTaskMessage("发送plc结果0", MessageLevel.Info);
+
                         }
                     }
 
@@ -2766,7 +2841,8 @@ namespace TeamAAS_VP.Core
                                 }
                                 var code = plc.ReadNode<string>(string.Format(addressConfig.In_Code.Address, i));
                                 string comp = PartSN;
-                                SendTaskMessage($"产品sn:{code},辅料码:{comp}", MessageLevel.Info);
+                                string comp2 = PartSN2;
+                                SendTaskMessage($"产品sn:{code},辅料码:{comp},辅料码2:{comp2}", MessageLevel.Info);
                                 //询问mes
                                 if (state == 1)
                                 {
@@ -2796,7 +2872,7 @@ namespace TeamAAS_VP.Core
                                                 SendTaskMessage($"过度件sn:{ProductMainSN_Temp}", MessageLevel.Info);
                                             }
 
-                                            (bool isSuccess2, string response2) = await _mesService.StationGetAsync(i, ProductMainSN_Temp, PartSN, 2);//询问mes
+                                            (bool isSuccess2, string response2) = await _mesService.StationGetAsync(i, ProductMainSN_Temp, PartSN,PartSN2, 2);//询问mes
                                             if (isSuccess2)
                                             {
                                                 LogHelper.WriteLogMes($"第二次询问mes成功");
@@ -2908,7 +2984,7 @@ namespace TeamAAS_VP.Core
 
                                         LogHelper.WriteLogMes($"【mes开始QUERY】");
                                         SendTaskMessage($"mes开始QUERY", MessageLevel.Info);
-                                        (bool isSuccess, string response) = await _mesService.StationGetAsync(i, code, PartSN, 2);//询问mes
+                                        (bool isSuccess, string response) = await _mesService.StationGetAsync(i, code, PartSN,PartSN2 ,2);//询问mes
                                         if (isSuccess)
                                         {
                                             string[] item = response.Split('\n');
@@ -3034,7 +3110,9 @@ namespace TeamAAS_VP.Core
 
                                     //从PLC获取零件编号
                                     PartSN = plc.ReadNode<string>(addressConfig.In_PartCode.Address);
+                                    PartSN2 = plc.ReadNode<string>(addressConfig.In_PartCode2.Address);
                                     comp = PartSN;
+                                    comp2 = PartSN2;
 
                                     //读取产品结果
                                     Int16 resultIndex = plc.ReadNode<Int16>(string.Format(addressConfig.In_Result.Address, i));
@@ -3210,7 +3288,7 @@ namespace TeamAAS_VP.Core
                                                 ERROR_MESSAGE = "NA",
                                                 PD_ATTR_01 = midValue,
                                                 PD_ATTR_02 = ProductMainSN[i],
-                                                PD_ATTR_03 = PartSN,
+                                                PD_ATTR_03 = PartSN + "," + PartSN2,
                                                 PD_ATTR_04 = code,
                                                 PD_ATTR_05 = CTtime.ToString(),
                                                 PD_ATTR_06 = CTtime2.ToString(),
@@ -3240,7 +3318,7 @@ namespace TeamAAS_VP.Core
                                             ERROR_MESSAGE = assyPresRes ? "NA" : "Assy_Pressure OOS",
                                             PD_ATTR_01 = midValue,
                                             PD_ATTR_02 = ProductMainSN[i],
-                                            PD_ATTR_03 = PartSN,
+                                            PD_ATTR_03 = PartSN+","+PartSN2,
                                             PD_ATTR_04 = code,
                                             PD_ATTR_05 = CTtime.ToString(),
                                             PD_ATTR_06 = CTtime2.ToString(),
@@ -3391,7 +3469,7 @@ namespace TeamAAS_VP.Core
                                     }
 
                                     //gap-复检gap参数, press-保压站实际压力值, presstime-保压站保压时间, assypress-组装站实际压力值
-                                    (bool isSuccess, string response) = await _mesService.SubmitGetAsync(i, ProductMainSN[i], comp, resultIndex == 1 ? true : false, data, fileresult, _LastMesCheckTime[i], serverTimeResult.Now);
+                                    (bool isSuccess, string response) = await _mesService.SubmitGetAsync(i, ProductMainSN[i], comp,comp2, resultIndex == 1 ? true : false, data, fileresult, _LastMesCheckTime[i], serverTimeResult.Now);
                                     if (!stationConfig.EnableMES || isSuccess)
                                     {
                                         LogHelper.WriteLogMes($"上传mes成功");
@@ -3429,11 +3507,10 @@ namespace TeamAAS_VP.Core
                                                         var device = _configService.GetDeviceInfo(i);
                                                         var systemConfig = _configService.GetSystemConfiguration();
                                                         var pressureSensorConfig = systemConfig.PressureSensorConfig.FirstOrDefault();
-                                                        (bool isSuc, string resp) = await _mesService.SendFtpFileAsync(ProductMainSN[i], filename, device);
-                                                        if (isSuc)
+                                                       // (bool isSuc, string resp) = await _mesService.SendFtpFileAsync(ProductMainSN[i], filename, device);
+                                                        if (true)
                                                         {
-                                                            LogHelper.WriteLogMes($"上传数据成功");
-                                                            SendTaskMessage($"上传数据成功", MessageLevel.Debug);
+                                                           
                                                             string filePath = $"D:\\image\\Recored\\{dt.ToString("yyyy-MM")}\\{dt.ToString("MM-dd")}\\{currentProduct.Name}\\{ProductMainSN[i]}";
                                                             if (!Directory.Exists(filePath))
                                                             {
@@ -3471,6 +3548,8 @@ namespace TeamAAS_VP.Core
 
 
                                                             CompressionImage(filePath, filename, device.Station, device.FixtureId);
+                                                            LogHelper.WriteLogMes($"上传数据成功");
+                                                            SendTaskMessage($"上传数据成功", MessageLevel.Debug);
 
                                                             //上传csv
                                                             bool isAfter20 = dt.Hour >= 20;

+ 4 - 4
TeamAAS-VM/Interfaces/IMesService.cs

@@ -29,7 +29,7 @@ namespace TeamAAS_VP.Interfaces
         /// - 实现应尊重 <paramref name="cancellationToken"/>,在取消时尽早抛出 <see cref="OperationCanceledException"/> 或返回失败结果。
         /// - 若 <paramref name="sn"/> 无效,应抛出 <see cref="ArgumentNullException"/> 或 <see cref="ArgumentException"/>。
         /// </remarks>
-        Task<(bool IsSuccess, string Response)> StationGetAsync(int deviceNo, string sn, string comp, CancellationToken cancellationToken = default);
+        Task<(bool IsSuccess, string Response)> StationGetAsync(int deviceNo, string sn, string comp, string comp2, CancellationToken cancellationToken = default);
 
         /// <summary>
         /// 使用配置的过站(Station)URL 发起 GET 请求,携带序列号(sn)作为查询参数进行过站,并使用指定的超时时间(秒)。
@@ -45,7 +45,7 @@ namespace TeamAAS_VP.Interfaces
         /// - 此重载方便在不使用 <see cref="CancellationToken"/> 的场景中指定超时时间。
         /// - 实现应验证 <paramref name="timeoutInSeconds"/> 为合理值(例如 > 0),否则可抛出 <see cref="ArgumentOutOfRangeException"/>。
         /// </remarks>
-        Task<(bool IsSuccess, string Response)> StationGetAsync(int deviceNo, string sn, string comp, double timeoutInSeconds);
+        Task<(bool IsSuccess, string Response)> StationGetAsync(int deviceNo, string sn, string comp, string comp2, double timeoutInSeconds);
 
         /// <summary>
         /// 绑定交互
@@ -94,7 +94,7 @@ namespace TeamAAS_VP.Interfaces
         /// - 若 <paramref name="start_time"/> 晚于 <paramref name="stop_time"/>,实现应记录并视情况返回失败或抛出异常。
         /// - 实现应尊重 <paramref name="cancellationToken"/>,并在取消时尽早中止请求。
         /// </remarks>
-        Task<(bool IsSuccess, string Response)> SubmitGetAsync(int deviceNo, string sn, string comp, bool isSuccess, Dictionary<string, string> data, List<string> fieresult, DateTime start_time, DateTime stop_time, CancellationToken cancellationToken = default);
+        Task<(bool IsSuccess, string Response)> SubmitGetAsync(int deviceNo, string sn, string comp, string comp2, bool isSuccess, Dictionary<string, string> data, List<string> fieresult, DateTime start_time, DateTime stop_time, CancellationToken cancellationToken = default);
 
         /// <summary>
         /// 使用配置的提交(Submit)URL 发起 GET 请求,提交过站结果及时间信息,并使用指定的超时时间(秒)。
@@ -113,7 +113,7 @@ namespace TeamAAS_VP.Interfaces
         /// - 此重载用于在不传入 <see cref="CancellationToken"/> 的场景中指定超时时间。
         /// - 实现应确保对时间参数与布尔参数进行适当的 URL 编码或格式化。
         /// </remarks>
-        Task<(bool IsSuccess, string Response)> SubmitGetAsync(int deviceNo, string sn, string comp, bool isSuccess, Dictionary<string, string> data, List<string> fieresult, DateTime start_time, DateTime stop_time, double timeoutInSeconds);
+        Task<(bool IsSuccess, string Response)> SubmitGetAsync(int deviceNo, string sn, string comp, string comp2, bool isSuccess, Dictionary<string, string> data, List<string> fieresult, DateTime start_time, DateTime stop_time, double timeoutInSeconds);
 
         /// <summary>
         /// 获取服务器当前时间

+ 9 - 0
TeamAAS-VM/Models/DeviceInfo.cs

@@ -73,6 +73,13 @@ namespace TeamAAS_VP.Models
         /// </summary>
         public string comp { get => _comp; set => SetProperty(ref _comp, value); }
 
+        private string _comp2;
+        /// <summary>
+        /// 此参数只有包装站是必传,其他组装站不用传,格式是部件名:部件编码,多个时用英文逗号隔开
+        /// comp=battery1:B00012345,battery2:B00022355
+        /// </summary>
+        public string comp2 { get => _comp2; set => SetProperty(ref _comp2, value); }
+
         private bool _saveCsv;
         /// <summary>
         /// 是否保存CSV文件,默认不保存
@@ -124,6 +131,7 @@ namespace TeamAAS_VP.Models
             FixtureId = string.Empty;
             F = string.Empty;
             comp = string.Empty;
+            comp2 = string.Empty;
             MesUrl = string.Empty;
             LogUrl = string.Empty;
             ApiKey = string.Empty;
@@ -143,6 +151,7 @@ namespace TeamAAS_VP.Models
                 FixtureId = this.FixtureId,
                 F = this.F,
                 comp = this.comp,
+                comp2 = this.comp,
                 MesUrl = this.MesUrl,
                 EnableMES = this.EnableMES,
                 SaveCsv = this.SaveCsv,

+ 30 - 0
TeamAAS-VM/Models/PLC/PlcAddressConfig.cs

@@ -368,6 +368,16 @@ namespace TeamAAS_VP.Models.PLC
             set { SetProperty(ref _Out_PartCode, value); }
         }
 
+        private PlcAddress _Out_PartCode2;
+        /// <summary>
+        /// 零件的扫码编号2写入到PLC
+        /// </summary>
+        public PlcAddress Out_PartCode2
+        {
+            get { return _Out_PartCode2; }
+            set { SetProperty(ref _Out_PartCode2, value); }
+        }
+
         private PlcAddress _Out_RemovePos_Num = new PlcAddress();
         /// <summary>
         ///撕膜点位个数
@@ -731,6 +741,16 @@ namespace TeamAAS_VP.Models.PLC
             set { SetProperty(ref _In_PartCode, value); }
         }
 
+        private PlcAddress _In_PartCode2;
+        /// <summary>
+        /// 从PLC中读取当前产品上传对应的零件号
+        /// </summary>
+        public PlcAddress In_PartCode2
+        {
+            get { return _In_PartCode2; }
+            set { SetProperty(ref _In_PartCode2, value); }
+        }
+
         private PlcAddress _In_Throw;
         /// <summary>
         /// 抛料信号
@@ -1329,11 +1349,21 @@ namespace TeamAAS_VP.Models.PLC
             Out_PartCode.DataType = "string";
             Out_PartCode.Description = "零件的扫码编号写入到PLC";
 
+            Out_PartCode2 = Ensure(Out_PartCode2);
+            Out_PartCode2.Address = "ns=4;s=DB_Communication|FromPC_code2[0]";
+            Out_PartCode2.DataType = "string";
+            Out_PartCode2.Description = "零件的扫码编号写入到PLC";
+
             In_PartCode = Ensure(In_PartCode);
             In_PartCode.Address = "ns=4;s=DB_Communication|ToPC_code[0]";
             In_PartCode.DataType = "string";
             In_PartCode.Description = "从PLC中读取当前产品上传对应的零件号";
 
+            In_PartCode2 = Ensure(In_PartCode2);
+            In_PartCode2.Address = "ns=4;s=DB_Communication|ToPC_code2[0]";
+            In_PartCode2.DataType = "string";
+            In_PartCode2.Description = "从PLC中读取当前产品上传对应的零件号";
+
             In_Throw = Ensure(In_Throw);
             In_Throw.Address = "ns=4;s=DB_Communication|Throw[0]";
             In_Throw.DataType = "Bool";

+ 8 - 0
TeamAAS-VM/Models/Product/ProductModel.cs

@@ -185,6 +185,14 @@ namespace TeamAAS_VP.Models
             set { SetProperty(ref _QrCodeProcedureId, value); }
         }
 
+        // 二维码扫码流程ID2
+        private Guid _QrCodeProcedureId2;
+        public Guid QrCodeProcedureId2
+        {
+            get { return _QrCodeProcedureId2; }
+            set { SetProperty(ref _QrCodeProcedureId2, value); }
+        }
+
         /// <summary>
         /// 固定向上的相机模板角度
         /// </summary>

+ 10 - 1
TeamAAS-VM/Resources/Languages/Lang.Designer.cs

@@ -19,7 +19,7 @@ namespace TeamAAS_VP.Resources.Languages {
     // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
     // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
     // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     public class Lang {
@@ -6882,6 +6882,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 相机扫码2拍照流程ID 的本地化字符串。
+        /// </summary>
+        public static string 相机扫码2拍照流程ID {
+            get {
+                return ResourceManager.GetString("相机扫码2拍照流程ID", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 相机扫码拍照流程ID 的本地化字符串。
         /// </summary>

+ 3 - 0
TeamAAS-VM/Resources/Languages/Lang.en.resx

@@ -3237,4 +3237,7 @@
   <data name="获取" xml:space="preserve">
     <value>Get</value>
   </data>
+  <data name="相机扫码2拍照流程ID" xml:space="preserve">
+    <value>相机扫码2拍照流程ID</value>
+  </data>
 </root>

+ 3 - 0
TeamAAS-VM/Resources/Languages/Lang.ja-JP.resx

@@ -3237,4 +3237,7 @@
   <data name="获取" xml:space="preserve">
     <value>取得</value>
   </data>
+  <data name="相机扫码2拍照流程ID" xml:space="preserve">
+    <value>相机扫码2拍照流程ID</value>
+  </data>
 </root>

+ 4 - 0
TeamAAS-VM/Resources/Languages/Lang.resx

@@ -3332,4 +3332,8 @@
   <data name="获取" xml:space="preserve">
     <value>获取</value>
   </data>
+  <data name="相机扫码2拍照流程ID" xml:space="preserve">
+    <value>相机扫码2拍照流程ID</value>
+    <comment>相机扫码2拍照流程ID</comment>
+  </data>
 </root>

+ 3 - 0
TeamAAS-VM/Resources/Languages/Lang.vi.resx

@@ -3237,4 +3237,7 @@
   <data name="获取" xml:space="preserve">
     <value>Lấy</value>
   </data>
+  <data name="相机扫码2拍照流程ID" xml:space="preserve">
+    <value>相机扫码2拍照流程ID</value>
+  </data>
 </root>

+ 3 - 0
TeamAAS-VM/Resources/Languages/Lang.zh-TW.resx

@@ -3237,4 +3237,7 @@
   <data name="获取" xml:space="preserve">
     <value>取得</value>
   </data>
+  <data name="相机扫码2拍照流程ID" xml:space="preserve">
+    <value>相机扫码2拍照流程ID</value>
+  </data>
 </root>

+ 15 - 11
TeamAAS-VM/Services/MesService.cs

@@ -77,7 +77,7 @@ namespace TeamAAS_VP.Services
         /// - 捕获 <see cref="OperationCanceledException"/> 返回 "Canceled",捕获其它异常则返回异常消息。
         /// - 若实例已被释放则抛出 <see cref="ObjectDisposedException"/>。
         /// </remarks>
-        public async Task<(bool IsSuccess, string Response)> StationGetAsync(int deviceNo, string sn, string comp, CancellationToken cancellationToken = default)
+        public async Task<(bool IsSuccess, string Response)> StationGetAsync(int deviceNo, string sn, string comp, string comp2, CancellationToken cancellationToken = default)
         {
             // 如果已经释放,则抛出异常,防止在已释放资源上继续操作。
             if (_disposed) throw new ObjectDisposedException(nameof(MesService));
@@ -102,7 +102,7 @@ namespace TeamAAS_VP.Services
             string url = "";
             if (device.F == "PTL")
             {
-                url = $"{device.MesUrl}?c=QUERY_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&comp={device.comp}:{comp}&p=message,sn,wo,model_num,color,ppid,stage";
+                url = $"{device.MesUrl}?c=QUERY_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&comp={device.comp}:{comp},{device.comp2}:{comp2}&p=message,sn,wo,model_num,color,ppid,stage";
             }
             else
             {
@@ -152,11 +152,11 @@ namespace TeamAAS_VP.Services
         /// <param name="sn">序列号(SN)。</param>
         /// <param name="timeoutInSeconds">请求超时,单位为秒。</param>
         /// <returns>与 <see cref="StationGetAsync(string, CancellationToken)"/> 相同的返回语义。</returns>
-        public async Task<(bool IsSuccess, string Response)> StationGetAsync(int deviceNo, string sn, string comp, double timeoutInSeconds)
+        public async Task<(bool IsSuccess, string Response)> StationGetAsync(int deviceNo, string sn, string comp, string comp2, double timeoutInSeconds)
         {
             using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(timeoutInSeconds)))
             {
-                return await StationGetAsync(deviceNo, sn, comp, cts.Token);
+                return await StationGetAsync(deviceNo, sn, comp,comp2, cts.Token);
             }
         }
 
@@ -321,7 +321,7 @@ namespace TeamAAS_VP.Services
         }
 
 
-        public async Task<(bool IsSuccess, string Response)> StationGetExAsync(int deviceNo, string sn, string comp, double timeoutInSeconds)
+        public async Task<(bool IsSuccess, string Response)> StationGetExAsync(int deviceNo, string sn, string comp,  double timeoutInSeconds)
         {
             using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(timeoutInSeconds)))
             {
@@ -359,11 +359,11 @@ namespace TeamAAS_VP.Services
         /// - 捕获 <see cref="OperationCanceledException"/> 返回 "Canceled",捕获其它异常则返回异常消息。
         /// - 若实例已被释放则抛出 <see cref="ObjectDisposedException"/>。
         /// </remarks>
-        public async Task<(bool IsSuccess, string Response)> SubmitGetAsync(int deviceNo, string sn, string comp, bool isSuccess, Dictionary<string, string> data, List<string> fieresult, DateTime start_time, DateTime stop_time, CancellationToken cancellationToken = default)
+        public async Task<(bool IsSuccess, string Response)> SubmitGetAsync(int deviceNo, string sn, string comp, string comp2, bool isSuccess, Dictionary<string, string> data, List<string> fieresult, DateTime start_time, DateTime stop_time, CancellationToken cancellationToken = default)
         {
             // 如果已经释放,则抛出异常,防止在已释放资源上继续操作。
             if (_disposed) throw new ObjectDisposedException(nameof(MesService));
-
+            
             var device = _configService.GetDeviceInfo(deviceNo);
             if (device == null)
                 device = _configService.GetDeviceInfo();
@@ -379,6 +379,10 @@ namespace TeamAAS_VP.Services
                 {
                     return (false, "PTL模式下comp不能为空");
                 }
+                if (string.IsNullOrEmpty(device.comp2))
+                {
+                    return (false, "PTL模式下comp2不能为空");
+                }
             }
 
             string res = isSuccess ? "Pass" : "Fail";
@@ -389,7 +393,7 @@ namespace TeamAAS_VP.Services
             StringBuilder sb = new StringBuilder();
             if (device.F == "PTL")
             {
-                sb.Append($"{device.MesUrl}?c=ADD_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&f=PTL&comp={device.comp}:{comp}");
+                sb.Append($"{device.MesUrl}?c=ADD_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&f=PTL&comp={device.comp}:{comp},{device.comp2}:{comp2}");
                 foreach (var item in data)
                 {
                     sb.Append($"&{item.Key}={item.Value}");
@@ -536,11 +540,11 @@ namespace TeamAAS_VP.Services
         /// <param name="stop_time">结束时间。</param>
         /// <param name="timeoutInSeconds">请求超时,单位为秒。</param>
         /// <returns>与 <see cref="SubmitGetAsync(string, bool, DateTime, DateTime, CancellationToken)"/> 相同的返回语义。</returns>
-        public async Task<(bool IsSuccess, string Response)> SubmitGetAsync(int deviceNo, string sn, string comp, bool isSuccess, Dictionary<string, string> data, List<string> fieresult, DateTime start_time, DateTime stop_time, double timeoutInSeconds)
+        public async Task<(bool IsSuccess, string Response)> SubmitGetAsync(int deviceNo, string sn, string comp, string comp2, bool isSuccess, Dictionary<string, string> data, List<string> fieresult, DateTime start_time, DateTime stop_time, double timeoutInSeconds)
         {
             using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(timeoutInSeconds)))
             {
-                return await SubmitGetAsync(deviceNo, sn, comp, isSuccess, data,fieresult, start_time, stop_time, cts.Token);
+                return await SubmitGetAsync(deviceNo, sn, comp,comp2, isSuccess, data,fieresult, start_time, stop_time, cts.Token);
             }
         }
 
@@ -657,7 +661,7 @@ namespace TeamAAS_VP.Services
                 return (false, "Missing MES station LogUrl");
             }
 
-            string url = $"{device.LogUrl}?db=mysql&ApiKey={device.ApiKey}&jsondata={{\"SN\":\"{sn}\",\"LINE\":\"{device.Line}\",\"STATION\":\"{device.Station}\",\"TESTRESULT\":\"PASS\",\"FIXTUREID\":\"{device.FixtureId}\",\"TESTDATETIME\":\"{DateTime.Now.ToString()}\",\"LOGFILENAME\":\"{name}.zip\",\"STATIONTYPE\":\"AE\"}}";
+            string url = $"{device.LogUrl}?db=mysql&ApiKey={device.ApiKey}&jsondata={{\"SN\":\"{sn}\",\"LINE\":\"{device.Line}\",\"STATION\":\"{device.Station}\",\"TESTRESULT\":\"PASS\",\"FIXTUREID\":\"{device.FixtureId}\",\"TESTDATETIME\":\"{DateTime.Now.ToString()}\",\"LOGFILENAME\":\"{name}.zip\",\"STATIONTYPE\":\"aelog\"}}";
 
             LogHelper.WriteLogMes($"【上传LogData的URL】{url}");
             SendTaskMessage($"【上传LogData的URL】{url}", MessageLevel.Info);

+ 1 - 1
TeamAAS-VM/ViewModels/MainWindowViewModel.cs

@@ -58,7 +58,7 @@ namespace TeamAAS_VP.ViewModels
         /// 工程师和管理员权限的无操作超时时长。
         /// 超过该时长后自动切回操作员权限。
         /// </summary>
-        private TimeSpan PermissionIdleTimeout = TimeSpan.FromMinutes(0.5);
+        private TimeSpan PermissionIdleTimeout = TimeSpan.FromMinutes(999999);
 
         /// <summary>
         /// 权限空闲检测计时器。

+ 25 - 0
TeamAAS-VM/ViewModels/Product/ProductParamsViewModel.cs

@@ -119,6 +119,23 @@ namespace TeamAAS_VP.ViewModels.Product
             }
         }
 
+        private ProcedureModel _QrCodePhotoProcedure2;
+        /// <summary>
+        /// 移动向下扫码拍照流程ID
+        /// </summary>
+        public ProcedureModel QrCodePhotoProcedure2
+        {
+            get { return _QrCodePhotoProcedure2; }
+            set
+            {
+                SetProperty(ref _QrCodePhotoProcedure2, value);
+                if (value != null)
+                {
+                    SelectProduct.QrCodeProcedureId2 = value.Id;
+                }
+            }
+        }
+
         private ProcedureModel _FixedDownCamera1Procedure;
         /// <summary>
         /// 固定向下相机1取料流程ID
@@ -597,6 +614,10 @@ namespace TeamAAS_VP.ViewModels.Product
             {
                 SelectProduct.QrCodeProcedureId = Guid.Empty;
             }
+            if (QrCodePhotoProcedure2 == null)
+            {
+                SelectProduct.QrCodeProcedureId2 = Guid.Empty;
+            }
 
         }
 
@@ -740,6 +761,10 @@ namespace TeamAAS_VP.ViewModels.Product
                 {
                     QrCodePhotoProcedure = ProcedureModels.FirstOrDefault(p => p.Id == SelectProduct.QrCodeProcedureId);
                 }
+                if (SelectProduct.QrCodeProcedureId2 != Guid.Empty)
+                {
+                    QrCodePhotoProcedure2 = ProcedureModels.FirstOrDefault(p => p.Id == SelectProduct.QrCodeProcedureId2);
+                }
             }
             catch (Exception ex)
             {

+ 1 - 1
TeamAAS-VM/Views/Product/PlcPointParams.xaml.cs

@@ -43,7 +43,7 @@ namespace TeamAAS_VP.Views.Product
                     this.Dispatcher.BeginInvoke(new Action(() =>
                     {
                         if (colProcedure != null)
-                            colProcedure.Visibility = visible;
+                            colProcedure.Visibility = visible;                       
                     }));
                 }
                 catch { }

+ 37 - 240
TeamAAS-VM/Views/Product/ProductParams.xaml

@@ -477,6 +477,9 @@
                         <RowDefinition Height="auto" />
                         <RowDefinition Height="auto" />
                         <RowDefinition Height="auto" />
+                        <RowDefinition Height="auto" />
+                        <RowDefinition Height="auto" />
+                        <RowDefinition Height="auto" />
                     </Grid.RowDefinitions>
                     <Grid.ColumnDefinitions>
                         <ColumnDefinition Width="auto" />
@@ -635,14 +638,15 @@
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
                     </ComboBox>
-                    <!--固定向下相机1取料流程--><!--
+
+                    <!--独立向下相机1产品拍照流程ID-->
                     <TextBlock Grid.Row="3"
                                Grid.Column="0"
-                               Text="固定向下相机1取料流程ID: " />
+                               Text="{lex:Loc 独立向下相机1产品拍照流程ID}" />
                     <ComboBox Grid.Row="3"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding FixedDownCamera1Procedure}"
+                              SelectedItem="{Binding IndependentCamer1ProductProcedureId}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -658,14 +662,14 @@
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
                     </ComboBox>
-                    --><!--固定向下相机2取料流程--><!--
+                    <!--独立向下相机2产品拍照流程ID-->
                     <TextBlock Grid.Row="4"
                                Grid.Column="0"
-                               Text="固定向下相机2取料流程ID: " />
+                               Text="{lex:Loc 独立向下相机2产品拍照流程ID}" />
                     <ComboBox Grid.Row="4"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding FixedDownCamera2Procedure}"
+                              SelectedItem="{Binding IndependentCamer2ProductProcedureId}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -680,15 +684,15 @@
                                 </StackPanel>
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
-                    </ComboBox>-->
-                    <!--移动向下相机1锁付拍照流程--><!--
+                    </ComboBox>
+                    <!--独立向下相机3产品拍照流程ID-->
                     <TextBlock Grid.Row="5"
                                Grid.Column="0"
-                               Text="移动向下相机1锁付拍照流程ID: " />
+                               Text="{lex:Loc 独立向下相机3产品拍照流程ID}" />
                     <ComboBox Grid.Row="5"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding MoveDownCamera1LockPhotoProcedure}"
+                              SelectedItem="{Binding IndependentCamer3ProductProcedureId}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -704,14 +708,14 @@
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
                     </ComboBox>
-                    --><!--移动向下相机2锁付拍照流程--><!--
+                    <!--独立向下相机4产品拍照流程ID-->
                     <TextBlock Grid.Row="6"
                                Grid.Column="0"
-                               Text="移动向下相机2锁付拍照流程ID: " />
+                               Text="{lex:Loc 独立向下相机4产品拍照流程ID}" />
                     <ComboBox Grid.Row="6"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding MoveDownCamera2LockPhotoProcedure}"
+                              SelectedItem="{Binding IndependentCamer4ProductProcedureId}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -727,14 +731,15 @@
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
                     </ComboBox>
-                    --><!--移动向下相机1取料拍照流程--><!--
+
+                    <!--独立向下相机1检测拍照流程ID-->
                     <TextBlock Grid.Row="7"
                                Grid.Column="0"
-                               Text="移动向下相机1取料拍照流程ID: " />
+                               Text="{lex:Loc 独立向下相机1检测拍照流程ID}" />
                     <ComboBox Grid.Row="7"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding MoveDownCamer1PickPhotoProcedureId}"
+                              SelectedItem="{Binding IndependentCamer1CheckProcedureId}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -750,14 +755,14 @@
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
                     </ComboBox>
-                    --><!--移动向下相机2取料拍照流程--><!--
+                    <!--独立向下相机2检测拍照流程ID-->
                     <TextBlock Grid.Row="8"
                                Grid.Column="0"
-                               Text="移动向下相机2取料拍照流程ID: " />
+                               Text="{lex:Loc 独立向下相机2检测拍照流程ID}" />
                     <ComboBox Grid.Row="8"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding MoveDownCamer2PickPhotoProcedureId}"
+                              SelectedItem="{Binding IndependentCamer2CheckProcedureId}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -772,15 +777,15 @@
                                 </StackPanel>
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
-                    </ComboBox>-->
-                    <!--独立向下相机1取料拍照流程ID-->
+                    </ComboBox>
+                    <!--独立向下相机3检测拍照流程ID-->
                     <TextBlock Grid.Row="9"
                                Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机1取料拍照流程ID}" />
+                               Text="{lex:Loc 独立向下相机3检测拍照流程ID}" />
                     <ComboBox Grid.Row="9"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer1AuxProcedureId}"
+                              SelectedItem="{Binding IndependentCamer3CheckProcedureId}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -796,14 +801,14 @@
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
                     </ComboBox>
-                    <!--独立向下相机2取料拍照流程ID-->
+                    <!--独立向下相机4检测拍照流程ID-->
                     <TextBlock Grid.Row="10"
                                Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机2取料拍照流程ID}" />
+                               Text="{lex:Loc 独立向下相机4检测拍照流程ID}" />
                     <ComboBox Grid.Row="10"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer2AuxProcedureId}"
+                              SelectedItem="{Binding IndependentCamer4CheckProcedureId}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -819,14 +824,14 @@
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
                     </ComboBox>
-                    <!--独立向下相机3取料拍照流程ID-->
+                    <!--相机扫码拍照流程-->
                     <TextBlock Grid.Row="11"
                                Grid.Column="0"
-                               Text="独立向下相机3取料拍照流程ID: " />
+                               Text="{lex:Loc 相机扫码拍照流程ID}" />
                     <ComboBox Grid.Row="11"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer3AuxProcedureId}"
+                              SelectedItem="{Binding QrCodePhotoProcedure}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>
@@ -842,222 +847,14 @@
                             </DataTemplate>
                         </ComboBox.ItemTemplate>
                     </ComboBox>
-                    <!--独立向下相机4取料拍照流程ID-->
+                    <!--相机扫码2拍照流程-->
                     <TextBlock Grid.Row="12"
                                Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机4取料拍照流程ID}" />
+                               Text="相机扫码2拍照流程ID" />
                     <ComboBox Grid.Row="12"
                               Grid.Column="1"
                               ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer4AuxProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-                    <!--独立向下相机1产品拍照流程ID-->
-                    <TextBlock Grid.Row="13"
-                               Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机1产品拍照流程ID}" />
-                    <ComboBox Grid.Row="13"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer1ProductProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-                    <!--独立向下相机2产品拍照流程ID-->
-                    <TextBlock Grid.Row="14"
-                               Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机2产品拍照流程ID}" />
-                    <ComboBox Grid.Row="14"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer2ProductProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-                    <!--独立向下相机3产品拍照流程ID-->
-                    <TextBlock Grid.Row="15"
-                               Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机3产品拍照流程ID}" />
-                    <ComboBox Grid.Row="15"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer3ProductProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-                    <!--独立向下相机4产品拍照流程ID-->
-                    <TextBlock Grid.Row="16"
-                               Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机4产品拍照流程ID}" />
-                    <ComboBox Grid.Row="16"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer4ProductProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-
-                    <!--独立向下相机1检测拍照流程ID-->
-                    <TextBlock Grid.Row="17"
-                               Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机1检测拍照流程ID}" />
-                    <ComboBox Grid.Row="17"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer1CheckProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-                    <!--独立向下相机2检测拍照流程ID-->
-                    <TextBlock Grid.Row="18"
-                               Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机2检测拍照流程ID}" />
-                    <ComboBox Grid.Row="18"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer2CheckProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-                    <!--独立向下相机3检测拍照流程ID-->
-                    <TextBlock Grid.Row="19"
-                               Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机3检测拍照流程ID}" />
-                    <ComboBox Grid.Row="19"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer3CheckProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-                    <!--独立向下相机4检测拍照流程ID-->
-                    <TextBlock Grid.Row="20"
-                               Grid.Column="0"
-                               Text="{lex:Loc 独立向下相机4检测拍照流程ID}" />
-                    <ComboBox Grid.Row="20"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding IndependentCamer4CheckProcedureId}"
-                              materialDesign:TextFieldAssist.HasClearButton="True"
-                              materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
-                        <ComboBox.ItemTemplate>
-                            <DataTemplate>
-                                <StackPanel Orientation="Horizontal">
-                                    <materialDesign:PackIcon Kind="VideoOutline" />
-                                    <TextBlock Text="{Binding CameraName}"
-                                               Margin="6,0" />
-                                    <materialDesign:PackIcon Kind="ProgressWrench" />
-                                    <TextBlock Text="{Binding Name}"
-                                               Margin="6,0" />
-                                </StackPanel>
-                            </DataTemplate>
-                        </ComboBox.ItemTemplate>
-                    </ComboBox>
-                    <!--相机扫码拍照流程-->
-                    <TextBlock Grid.Row="21"
-                               Grid.Column="0"
-                               Text="{lex:Loc 相机扫码拍照流程ID}" />
-                    <ComboBox Grid.Row="21"
-                              Grid.Column="1"
-                              ItemsSource="{Binding ProcedureModels}"
-                              SelectedItem="{Binding QrCodePhotoProcedure}"
+                              SelectedItem="{Binding QrCodePhotoProcedure2}"
                               materialDesign:TextFieldAssist.HasClearButton="True"
                               materialDesign:HintAssist.Hint="{lex:Loc 选择需要配置的流程}">
                         <ComboBox.ItemTemplate>

+ 21 - 11
TeamAAS-VM/Views/SettingView.xaml

@@ -456,41 +456,51 @@
 
                                 <TextBlock Grid.Row="9"
                                            Grid.Column="0"
-                                           Text="LogUrl:"
+                                           Text="comp2:"
                                            HorizontalAlignment="Right"
                                            VerticalAlignment="Center" />
                                 <TextBox Grid.Row="9"
                                          Grid.Column="1"
-                                         Text="{Binding SelectDeviceInfo.LogUrl, Mode=TwoWay}"
+                                         Text="{Binding SelectDeviceInfo.comp2, Mode=TwoWay}"
                                          Margin="6,2" />
 
                                 <TextBlock Grid.Row="10"
                                            Grid.Column="0"
-                                           Text="apikey:"
+                                           Text="LogUrl:"
                                            HorizontalAlignment="Right"
                                            VerticalAlignment="Center" />
                                 <TextBox Grid.Row="10"
                                          Grid.Column="1"
-                                         Text="{Binding SelectDeviceInfo.ApiKey, Mode=TwoWay}"
+                                         Text="{Binding SelectDeviceInfo.LogUrl, Mode=TwoWay}"
                                          Margin="6,2" />
 
                                 <TextBlock Grid.Row="11"
+                                           Grid.Column="0"
+                                           Text="apikey:"
+                                           HorizontalAlignment="Right"
+                                           VerticalAlignment="Center" />
+                                <TextBox Grid.Row="11"
+                                         Grid.Column="1"
+                                         Text="{Binding SelectDeviceInfo.ApiKey, Mode=TwoWay}"
+                                         Margin="6,2" />
+
+                                <TextBlock Grid.Row="12"
                                            Grid.Column="0"
                                            Text="{lex:Loc 启用 MES}"
                                            HorizontalAlignment="Right"
                                            VerticalAlignment="Center" />
-                                <CheckBox Grid.Row="11"
+                                <CheckBox Grid.Row="12"
                                           Grid.Column="1"
                                           IsChecked="{Binding SelectDeviceInfo.EnableMES, Mode=TwoWay}"
                                           Command="{Binding CheckStatusCommand}"
                                           Margin="6,2" />
-                                <CheckBox Grid.Row="12"
+                                <CheckBox Grid.Row="13"
                                           Grid.Column="1"
                                           Content="{lex:Loc 是否启用两次产品编号}"
                                           IsChecked="{Binding SelectDeviceInfo.EnableDoubleMes, Mode=TwoWay}"
                                           Command="{Binding CheckStatusCommand}"
                                           Margin="6,2" />
-                                <StackPanel Grid.Row="13"
+                                <StackPanel Grid.Row="14"
                                             Grid.Column="1"
                                             Orientation="Horizontal">
                                     <CheckBox Content="{lex:Loc 是否保存CSV文件}"
@@ -502,13 +512,13 @@
                                               Margin="6,2" />
                                 </StackPanel>
                                 
-                                <TextBlock Grid.Row="14"
+                                <TextBlock Grid.Row="15"
                                            Grid.Column="0"
                                            Text="{lex:Loc 保存的CSV文件路径}"
                                            HorizontalAlignment="Right"
                                            VerticalAlignment="Center" />
                                 <DockPanel HorizontalAlignment="Stretch"
-                                           Grid.Row="14"
+                                           Grid.Row="15"
                                            Grid.Column="1"
                                            Margin="6,2">
                                     <Button DockPanel.Dock="Right"
@@ -523,12 +533,12 @@
 
                                 </DockPanel>
                                 <!--CTQ 数据信息-->
-                                <TextBlock Grid.Row="15"
+                                <TextBlock Grid.Row="16"
                                            Grid.Column="0"
                                            Text="PROCESS_NAME:"
                                            HorizontalAlignment="Right"
                                            VerticalAlignment="Center" />
-                                <TextBox Grid.Row="15"
+                                <TextBox Grid.Row="16"
                                          Grid.Column="1"
                                          Text="{Binding SelectDeviceInfo.DataInfo.PROCESS_NAME, Mode=TwoWay}"
                                          Margin="6,2" />