| | |
| | | // 不是历史数据并且有未通过的,标记为false |
| | | allSuccess = false; |
| | | } |
| | | |
| | | |
| | | if (!properties[key].HistoryData && msgs != null && msgs.Count > 0) |
| | | { |
| | | foreach (string msg in msgs) |
| | |
| | | |
| | | ConcurrentQueue<string> errs = new ConcurrentQueue<string>(); |
| | | CountdownEvent counter = new CountdownEvent(boms.Count); |
| | | int successCount = 0; |
| | | foreach (PdmBom bom in boms) |
| | | { |
| | | Task.Run(() => |
| | |
| | | |
| | | Result<DrawAudit> res = Client.PostSyncAction<DrawAudit>("drawAudit/add", httpContent); |
| | | DrawAudit da = res.HandleResult(); |
| | | Interlocked.Increment(ref successCount); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | 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(); |