chr
2024-08-21 04504670fcafceb4e9d8a660d5db3f65bc135455
PdmSwPlugin.PDM/PdmControl.xaml.cs
@@ -1080,7 +1080,7 @@
                    // 不是历史数据并且有未通过的,标记为false
                    allSuccess = false;
                }
                if (!properties[key].HistoryData && msgs != null && msgs.Count > 0)
                {
                    foreach (string msg in msgs)
@@ -1245,6 +1245,7 @@
                    ConcurrentQueue<string> errs = new ConcurrentQueue<string>();
                    CountdownEvent counter = new CountdownEvent(boms.Count);
                    int successCount = 0;
                    foreach (PdmBom bom in boms)
                    {
                        Task.Run(() =>
@@ -1275,6 +1276,7 @@
                                Result<DrawAudit> res = Client.PostSyncAction<DrawAudit>("drawAudit/add", httpContent);
                                DrawAudit da = res.HandleResult();
                                Interlocked.Increment(ref successCount);
                            }
                            catch (Exception ex)
                            {
@@ -1289,18 +1291,22 @@
                    }
                    counter.Wait();
                    counter.Dispose();
                    try
                    if (successCount > 0)
                    {
                        var param = new DrawAudit
                        try
                        {
                            count = boms.Count
                        };
                        var msgRes = Client.PostSyncAction<object>(param, "drawAudit/sendToAuditor");
                        msgRes.HandleResult();
                    }
                    catch (Exception ig)
                    {
                        Logger.Error("发送送审消息异常", ig);
                            var param = new DrawAudit
                            {
                                orderId = daOrder.id,
                                count = successCount
                            };
                            var msgRes = Client.PostSyncAction<object>(param, "drawAudit/sendToAuditor");
                            msgRes.HandleResult();
                        }
                        catch (Exception ig)
                        {
                            Logger.Error("发送送审消息异常", ig);
                        }
                    }
                    // 刷新服务器上的BOM信息
                    RefreshWebBomInfo();