| | |
| | | using Bro.Common.Helper; |
| | | using Bro.Common.Interface; |
| | | using Bro.Common.Model; |
| | | using Bro.M135.DBManager; |
| | | using Newtonsoft.Json; |
| | | using static System.Windows.Forms.VisualStyles.VisualStyleElement.ListView; |
| | | |
| | | namespace Bro.M135.Common |
| | | { |
| | |
| | | { |
| | | if (!string.IsNullOrWhiteSpace(d.FAIData)) |
| | | { |
| | | d.SpecList = JsonConvert.DeserializeObject<List<Spec>>(d.FAIData); |
| | | d.SpecList = JsonConvert.DeserializeObject<List<ISpec>>(d.FAIData); |
| | | } |
| | | else |
| | | { |
| | | d.SpecList = new List<Spec>(); |
| | | d.SpecList = new List<ISpec>(); |
| | | } |
| | | |
| | | if (!string.IsNullOrWhiteSpace(d.DefectDesc)) |
| | |
| | | }); |
| | | }); |
| | | |
| | | allSpecs.RemoveAll(u => (u.Code.ToLower() == "ngspec" || u.Code == "检测TBD")); |
| | | |
| | | head = $"时间,PID,栏具码,物料码,条码,汇总检测结果,"; |
| | | |
| | | positionList = new List<string>(); |
| | | Details = Details.OrderBy(u => u.PositionName).ToList(); |
| | | Details = Details.OrderBy(u => u.STATION_CODE).ThenBy(u => u.PositionName).ToList(); |
| | | foreach (var d in Details) |
| | | { |
| | | positionList.Add($"{d.STATION_CODE}_{d.PositionName}"); |
| | |
| | | }); |
| | | }); |
| | | |
| | | allSpecs.RemoveAll(u => u.Code.ToLower() == "ngspec" || u.Code == "检测TBD"); |
| | | |
| | | head = $"时间,栏具码,PID,序号,条码,"; |
| | | |
| | | foreach (var d in positionDetail) |
| | |
| | | } |
| | | }); |
| | | |
| | | positionDetail.ForEach(detail => |
| | | { |
| | | if (detail.IsDone) |
| | | { |
| | | //positionDetail.ForEach(detail => |
| | | //{ |
| | | // if (detail.IsDone) |
| | | // { |
| | | |
| | | var results = detail.ResultList; |
| | | // var results = detail.ResultList; |
| | | |
| | | var list = results.Where((DetectResult u) => u.ResultState != EnumHelper.ResultState.OK).SelectMany((DetectResult u) => u.NetResults.Where((NetResult m) => !m.IsAbandoned && m.CurResult != EnumHelper.ResultState.OK).SelectMany((NetResult m) => from n in m.DetectDetails where !n.IsAbandoned && n.FinalResult != EnumHelper.ResultState.OK select n)).ToList(); |
| | | // var list = results.Where((DetectResult u) => u.ResultState != EnumHelper.ResultState.OK).SelectMany((DetectResult u) => u.NetResults.Where((NetResult m) => !m.IsAbandoned && m.CurResult != EnumHelper.ResultState.OK).SelectMany((NetResult m) => from n in m.DetectDetails where !n.IsAbandoned && n.FinalResult != EnumHelper.ResultState.OK select n)).ToList(); |
| | | |
| | | list.ForEach(d => |
| | | { |
| | | data += $"{(d.Rect.Height * d.PixelSize).ToString("f4")},"; |
| | | data += $"{(d.Rect.Width * d.PixelSize).ToString("f4")},"; |
| | | }); |
| | | } |
| | | }); |
| | | // list.ForEach(d => |
| | | // { |
| | | // data += $"{(d.Rect.Height * d.PixelSize).ToString("f4")},"; |
| | | // data += $"{(d.Rect.Width * d.PixelSize).ToString("f4")},"; |
| | | // }); |
| | | // } |
| | | //}); |
| | | |
| | | |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region PositionCheckTimes |
| | | public void InitialPositionCheckList(string positionName, List<int> checkTimes) |
| | | public void InitialPositionCheckList(string positionName, List<int> checkTimes,string stationName) |
| | | { |
| | | lock (_checkResultLock) |
| | | { |
| | | PositionCheckList[positionName] = new List<int>(checkTimes); |
| | | Details.RemoveAll(u => u.PositionName == positionName); |
| | | |
| | | |
| | | P_PRODUCT_DETAIL detail = new P_PRODUCT_DETAIL(); |
| | | detail.STATION_CODE = stationName; |
| | | detail.PositionName = positionName; |
| | | detail.PID = PID; |
| | | detail.IsDone = false; |
| | | Details.Add(detail); |
| | | } |
| | | } |
| | | |