| @@ -194,6 +194,7 @@ | |||
| <Compile Include="SysCtrl\ConfMgr.cs" /> | |||
| <Compile Include="SysCtrl\SysEnum.cs" /> | |||
| <Compile Include="SysCtrl\SysMgr.cs" /> | |||
| <Compile Include="SysCtrl\SysUpdata.cs" /> | |||
| <Compile Include="SysUI\DefectPicShow\AmendantRecordFrm.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| @@ -31,9 +31,12 @@ namespace MaiMuAOI.ImageProcessing | |||
| //private System.Timers.Timer timer = new System.Timers.Timer(); | |||
| private Yolo_Class yolo1; | |||
| private InferenceSession _onnxSession; | |||
| private Yolo_Class yolo2; | |||
| private InferenceSession _onnxSession2; | |||
| private Yolo_Class yolo3; | |||
| private InferenceSession _onnxSession3; | |||
| // | |||
| private Thread t_task, t_task_operation, t_task_operation2, t_task_tag; | |||
| private Thread t_task, t_task_operation, t_task_operation2, t_task_operation3, t_task_tag; | |||
| //=======task list | |||
| private List<DefectTask> taskList = new List<DefectTask>(); | |||
| private List<DefectTask> taskOperationList = new List<DefectTask>(); | |||
| @@ -46,10 +49,12 @@ namespace MaiMuAOI.ImageProcessing | |||
| try | |||
| { | |||
| yolo1 = new Yolo_Class(); | |||
| yolo2 = new Yolo_Class(); | |||
| yolo3 = new Yolo_Class(); | |||
| //加载模型(只加载一次即可) | |||
| //string modelFilePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\DevCfg\\best.onnx"; | |||
| //_onnxSession = yolo1.LoadModel(modelFilePath, true);//false-CPU true-显卡 | |||
| IsInit = true; | |||
| //timer.Elapsed += Timer_Elapsed; | |||
| //timer.Interval = 100; | |||
| @@ -66,10 +71,14 @@ namespace MaiMuAOI.ImageProcessing | |||
| t_task_operation.IsBackground = true; | |||
| t_task_operation.Start(); | |||
| t_task_operation2 = new System.Threading.Thread(run2); | |||
| t_task_operation2 = new System.Threading.Thread(run3); | |||
| t_task_operation2.IsBackground = true; | |||
| t_task_operation2.Start(); | |||
| t_task_operation3 = new System.Threading.Thread(run4); | |||
| t_task_operation3.IsBackground = true; | |||
| t_task_operation3.Start(); | |||
| return true; | |||
| } | |||
| catch (Exception ex) | |||
| @@ -92,6 +101,16 @@ namespace MaiMuAOI.ImageProcessing | |||
| _onnxSession.Dispose(); | |||
| _onnxSession = null; | |||
| } | |||
| if (_onnxSession2 != null) | |||
| { | |||
| _onnxSession2.Dispose(); | |||
| _onnxSession2 = null; | |||
| } | |||
| if (_onnxSession3 != null) | |||
| { | |||
| _onnxSession3.Dispose(); | |||
| _onnxSession3 = null; | |||
| } | |||
| _preLoadONNXFilePath = null; | |||
| if (t_task != null) | |||
| @@ -113,6 +132,12 @@ namespace MaiMuAOI.ImageProcessing | |||
| if (!b) t_task_operation2.Abort(); | |||
| t_task_operation2 = null; | |||
| } | |||
| if (t_task_operation3 != null) | |||
| { | |||
| bool b = t_task_operation3.Join(5000); | |||
| if (!b) t_task_operation3.Abort(); | |||
| t_task_operation3 = null; | |||
| } | |||
| if (t_task_tag != null) | |||
| { | |||
| bool b = t_task_tag.Join(5000); | |||
| @@ -148,6 +173,21 @@ namespace MaiMuAOI.ImageProcessing | |||
| _onnxSession = null; | |||
| } | |||
| _onnxSession = yolo1.LoadModel(onnxFilePath, true);//false-CPU true-显卡 | |||
| if (_onnxSession2 != null) | |||
| { | |||
| _onnxSession2.Dispose(); | |||
| _onnxSession2 = null; | |||
| } | |||
| _onnxSession2 = yolo2.LoadModel(onnxFilePath, true);//false-CPU true-显卡 | |||
| if (_onnxSession3 != null) | |||
| { | |||
| _onnxSession3.Dispose(); | |||
| _onnxSession3 = null; | |||
| } | |||
| _onnxSession3 = yolo3.LoadModel(onnxFilePath, true);//false-CPU true-显卡 | |||
| _preLoadONNXFilePath = onnxFilePath; | |||
| } | |||
| /// <summary> | |||
| @@ -315,10 +355,162 @@ namespace MaiMuAOI.ImageProcessing | |||
| } | |||
| } | |||
| } | |||
| private void run3() | |||
| { | |||
| while (IsInit) | |||
| { | |||
| if (taskOperationList.Count < 1) | |||
| { | |||
| Thread.Sleep(5); | |||
| continue; | |||
| } | |||
| // | |||
| var task = pop2(); | |||
| int liStep = 0; | |||
| try | |||
| { | |||
| if (task != null) | |||
| { | |||
| Stopwatch stopwatch = Stopwatch.StartNew(); | |||
| //====运行推理(必需单队列) | |||
| stopwatch.Start(); | |||
| IDisposableReadOnlyCollection<DisposableNamedOnnxValue>[] results = yolo2.RunModlel(_onnxSession2, task.tensors); | |||
| liStep = 1; | |||
| task.informationList = yolo2.ScreeningResults_YD(results, task.bmps_resize, task.thresholds, task.thresholdsClass, task.recAreaThreshold); | |||
| liStep = 2; | |||
| //当前大图上缺陷个数 | |||
| int currPicDefectCount = 0; | |||
| for (int x = 0; x < task.informationList.Count(); x++) | |||
| currPicDefectCount += task.informationList[x].Count(); | |||
| task.defectCount = currPicDefectCount; | |||
| stopwatch.Stop(); | |||
| task.stopwatch[3] = stopwatch.ElapsedMilliseconds; | |||
| liStep = 3; | |||
| if (task.informationList.Count > 0) | |||
| { | |||
| liStep = 4; | |||
| //lock (taskTagList) | |||
| // taskTagList.Add(task); | |||
| //====打标 ,有缺陷返回缺陷图片数组,没缺陷返回所有图片数组 | |||
| stopwatch.Restart(); | |||
| task.bmps_tag = yolo2.DrawYoloPrediction2Mat(task.bmps_cut, task.informationList, 27, SixLabors.ImageSharp.Color.OrangeRed, task.resize.Width, | |||
| task.Xmm, task.Ymm, out task.defectInfor2RestorationDesk); | |||
| liStep = 5; | |||
| if (ConfMgr.Instance.SysConfigParams.OpenFlawDistribution) | |||
| { | |||
| //大图缺陷坐标转换到图纸坐标 | |||
| if (!string.IsNullOrWhiteSpace(task.drawingPagePath) && task.defectInfor2RestorationDesk != null && task.defectInfor2RestorationDesk.Count > 0) | |||
| task.defectInfor2RestorationDeskPage = yolo2.DefectDrawGerberImage(task.drawingPagePath, task.defectInfor2RestorationDesk); | |||
| } | |||
| stopwatch.Stop(); | |||
| task.stopwatch[4] = stopwatch.ElapsedMilliseconds; | |||
| liStep = 6; | |||
| task.bmpCompress = yolo2.ResizesMat_4(task.bmp); | |||
| task.isSucceed = true; | |||
| callback(task); | |||
| } | |||
| else | |||
| { | |||
| task.isSucceed = true; | |||
| callback(task); | |||
| } | |||
| } | |||
| Thread.Sleep(5); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| WarningEvent?.Invoke(WarningEnum.Low, $"DefectLib task3 err({liStep}):" + ex.Message); | |||
| task.isSucceed = false; | |||
| task.resultInfo = ex.Message; | |||
| callback(task); | |||
| } | |||
| } | |||
| } | |||
| private void run4() | |||
| { | |||
| while (IsInit) | |||
| { | |||
| if (taskOperationList.Count < 1) | |||
| { | |||
| Thread.Sleep(5); | |||
| continue; | |||
| } | |||
| // | |||
| var task = pop2(); | |||
| int liStep = 0; | |||
| try | |||
| { | |||
| if (task != null) | |||
| { | |||
| Stopwatch stopwatch = Stopwatch.StartNew(); | |||
| //====运行推理(必需单队列) | |||
| stopwatch.Start(); | |||
| IDisposableReadOnlyCollection<DisposableNamedOnnxValue>[] results = yolo3.RunModlel(_onnxSession3, task.tensors); | |||
| liStep = 1; | |||
| task.informationList = yolo3.ScreeningResults_YD(results, task.bmps_resize, task.thresholds, task.thresholdsClass, task.recAreaThreshold); | |||
| liStep = 2; | |||
| //当前大图上缺陷个数 | |||
| int currPicDefectCount = 0; | |||
| for (int x = 0; x < task.informationList.Count(); x++) | |||
| currPicDefectCount += task.informationList[x].Count(); | |||
| task.defectCount = currPicDefectCount; | |||
| stopwatch.Stop(); | |||
| task.stopwatch[3] = stopwatch.ElapsedMilliseconds; | |||
| liStep = 3; | |||
| if (task.informationList.Count > 0) | |||
| { | |||
| liStep = 4; | |||
| //lock (taskTagList) | |||
| // taskTagList.Add(task); | |||
| //====打标 ,有缺陷返回缺陷图片数组,没缺陷返回所有图片数组 | |||
| stopwatch.Restart(); | |||
| task.bmps_tag = yolo3.DrawYoloPrediction2Mat(task.bmps_cut, task.informationList, 27, SixLabors.ImageSharp.Color.OrangeRed, task.resize.Width, | |||
| task.Xmm, task.Ymm, out task.defectInfor2RestorationDesk); | |||
| liStep = 5; | |||
| if (ConfMgr.Instance.SysConfigParams.OpenFlawDistribution) | |||
| { | |||
| //大图缺陷坐标转换到图纸坐标 | |||
| if (!string.IsNullOrWhiteSpace(task.drawingPagePath) && task.defectInfor2RestorationDesk != null && task.defectInfor2RestorationDesk.Count > 0) | |||
| task.defectInfor2RestorationDeskPage = yolo3.DefectDrawGerberImage(task.drawingPagePath, task.defectInfor2RestorationDesk); | |||
| } | |||
| stopwatch.Stop(); | |||
| task.stopwatch[4] = stopwatch.ElapsedMilliseconds; | |||
| liStep = 6; | |||
| task.bmpCompress = yolo3.ResizesMat_4(task.bmp); | |||
| task.isSucceed = true; | |||
| callback(task); | |||
| } | |||
| else | |||
| { | |||
| task.isSucceed = true; | |||
| callback(task); | |||
| } | |||
| } | |||
| Thread.Sleep(5); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| WarningEvent?.Invoke(WarningEnum.Low, $"DefectLib task4 err({liStep}):" + ex.Message); | |||
| task.isSucceed = false; | |||
| task.resultInfo = ex.Message; | |||
| callback(task); | |||
| } | |||
| } | |||
| } | |||
| /// <summary> | |||
| /// 已不用 | |||
| /// </summary> | |||
| private void run3() | |||
| private void run5() | |||
| { | |||
| while (IsInit) | |||
| { | |||
| @@ -272,16 +272,16 @@ | |||
| // | |||
| this.web数据查询ToolStripMenuItem.Image = global::MaiMuAOI.Properties.Resources.web; | |||
| this.web数据查询ToolStripMenuItem.Name = "web数据查询ToolStripMenuItem"; | |||
| this.web数据查询ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); | |||
| this.web数据查询ToolStripMenuItem.Text = "Web数据查询"; | |||
| this.web数据查询ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); | |||
| this.web数据查询ToolStripMenuItem.Text = "数据报表"; | |||
| this.web数据查询ToolStripMenuItem.Click += new System.EventHandler(this.web数据查询ToolStripMenuItem_Click); | |||
| // | |||
| // 本地数据库查询ToolStripMenuItem | |||
| // | |||
| this.本地数据库查询ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("本地数据库查询ToolStripMenuItem.Image"))); | |||
| this.本地数据库查询ToolStripMenuItem.Name = "本地数据库查询ToolStripMenuItem"; | |||
| this.本地数据库查询ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); | |||
| this.本地数据库查询ToolStripMenuItem.Text = "本地数据库查询"; | |||
| this.本地数据库查询ToolStripMenuItem.Size = new System.Drawing.Size(148, 22); | |||
| this.本地数据库查询ToolStripMenuItem.Text = "生成数据查询"; | |||
| this.本地数据库查询ToolStripMenuItem.Click += new System.EventHandler(this.本地数据库查询ToolStripMenuItem_Click); | |||
| // | |||
| // tsmSysUserMgr | |||
| @@ -373,27 +373,28 @@ | |||
| // | |||
| this.tsmReadLog.Image = ((System.Drawing.Image)(resources.GetObject("tsmReadLog.Image"))); | |||
| this.tsmReadLog.Name = "tsmReadLog"; | |||
| this.tsmReadLog.Size = new System.Drawing.Size(124, 22); | |||
| this.tsmReadLog.Size = new System.Drawing.Size(180, 22); | |||
| this.tsmReadLog.Text = "日志查询"; | |||
| this.tsmReadLog.Click += new System.EventHandler(this.tsmReadLog_Click); | |||
| // | |||
| // toolStripSeparator6 | |||
| // | |||
| this.toolStripSeparator6.Name = "toolStripSeparator6"; | |||
| this.toolStripSeparator6.Size = new System.Drawing.Size(121, 6); | |||
| this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6); | |||
| // | |||
| // tsmHelpInfo | |||
| // | |||
| this.tsmHelpInfo.Image = ((System.Drawing.Image)(resources.GetObject("tsmHelpInfo.Image"))); | |||
| this.tsmHelpInfo.Name = "tsmHelpInfo"; | |||
| this.tsmHelpInfo.Size = new System.Drawing.Size(124, 22); | |||
| this.tsmHelpInfo.Size = new System.Drawing.Size(180, 22); | |||
| this.tsmHelpInfo.Text = "帮助"; | |||
| this.tsmHelpInfo.Click += new System.EventHandler(this.tsmHelpInfo_Click); | |||
| // | |||
| // tsmInfoUS | |||
| // | |||
| this.tsmInfoUS.Image = ((System.Drawing.Image)(resources.GetObject("tsmInfoUS.Image"))); | |||
| this.tsmInfoUS.Name = "tsmInfoUS"; | |||
| this.tsmInfoUS.Size = new System.Drawing.Size(124, 22); | |||
| this.tsmInfoUS.Size = new System.Drawing.Size(180, 22); | |||
| this.tsmInfoUS.Text = "关于"; | |||
| this.tsmInfoUS.Click += new System.EventHandler(this.tsmInfoUS_Click); | |||
| // | |||
| @@ -1306,6 +1307,7 @@ | |||
| this.tabPage2.Size = new System.Drawing.Size(448, 252); | |||
| this.tabPage2.TabIndex = 1; | |||
| this.tabPage2.Text = "新流程"; | |||
| this.tabPage2.Resize += new System.EventHandler(this.tabPage2_Resize); | |||
| // | |||
| // gpbProcessList | |||
| // | |||
| @@ -1337,6 +1339,7 @@ | |||
| this.flpProcessStep.Size = new System.Drawing.Size(439, 227); | |||
| this.flpProcessStep.TabIndex = 0; | |||
| this.flpProcessStep.WrapContents = false; | |||
| this.flpProcessStep.SizeChanged += new System.EventHandler(this.flpProcessStep_SizeChanged); | |||
| // | |||
| // newStepShow1 | |||
| // | |||
| @@ -432,6 +432,11 @@ namespace MaiMuAOI | |||
| SysLogFrm frm = new SysLogFrm(); | |||
| frm.ShowDialog(); | |||
| } | |||
| private void tsmHelpInfo_Click(object sender, EventArgs e) | |||
| { | |||
| MessageBox.Show(SysUpdata.Updata, "更新信息"); | |||
| } | |||
| #endregion | |||
| #region 显示图像和消息 | |||
| @@ -1406,6 +1411,12 @@ namespace MaiMuAOI | |||
| kanban1.Width = kanban2.Width = kanban3.Width = kanban4.Width = kanban5.Width = kanban6.Width = (flpnlResultData.Width - 30) / 6; | |||
| tabControl1.Region = new Region(new RectangleF(this.tabPage1.Left, this.tabPage1.Top, this.tabPage1.Width, this.tabPage1.Height)); | |||
| } | |||
| private void tabPage2_Resize(object sender, EventArgs e) | |||
| { | |||
| int allWidth = this.tabPage2.Width; | |||
| tabControl1.Region = new Region(new RectangleF(this.tabPage2.Left, this.tabPage2.Top, this.tabPage2.Width, this.tabPage2.Height)); | |||
| } | |||
| private void MainFrm_Paint(object sender, PaintEventArgs e) | |||
| { | |||
| this.tsbtnReset.Visible = ConfMgr.Instance.SysConfigParams.ShowResetBtn; | |||
| @@ -1413,6 +1424,17 @@ namespace MaiMuAOI | |||
| this.chkDoorSensor.Visible = ConfMgr.Instance.SysConfigParams.ShowDoorAlm; | |||
| } | |||
| private void flpProcessStep_SizeChanged(object sender, EventArgs e) | |||
| { | |||
| int splitWidth = 5; | |||
| foreach (Control item in this.flpProcessStep.Controls) | |||
| { | |||
| item.Width = flpProcessStep.Width - splitWidth * 2 - 30; | |||
| } | |||
| this.flpProcessStep.Refresh(); | |||
| this.gpbProcessList.Refresh(); | |||
| } | |||
| } | |||
| } | |||
| @@ -1834,7 +1834,7 @@ namespace MaiMuAOI.SysCtrl | |||
| Remind(sn); | |||
| //查询SN是否重复 | |||
| var findSN = OrderService.GetModelNav(sn); | |||
| if (findSN != null) | |||
| if ((findSN != null)&&(findSN.ProductInfo.Code == model.Code)) | |||
| { | |||
| Log("运行", $"网版编码:{sn}, 已经存在检测数据!"); | |||
| if(FrmDialog.ShowDialog(fatherFrm, $"网版编码:{sn}, 已经存在检测数据!", "提示", true) != DialogResult.OK) | |||
| @@ -2934,7 +2934,7 @@ namespace MaiMuAOI.SysCtrl | |||
| } | |||
| int CmdPos = processParam.Value<int>("CmdPos"); //命令脉冲 | |||
| Log($"{stepIndex + 1}-{processName}", $"开始由起始位置{lensMotorDev.GetFeedbackPos(0)}运动到{CmdPos}..."); | |||
| lensMotorDev.MoveAbsValue(0, new VelocityCurveParams(), CmdPos); | |||
| lensMotorDev.MoveAbsPulse(0, new VelocityCurveParams(), CmdPos); | |||
| lensMotorDev.CheckDone(0, 10000); | |||
| Log($"{stepIndex + 1}-{processName}", $"运动完成,当前位置:{lensMotorDev.GetFeedbackPos(0)}"); | |||
| #endregion | |||
| @@ -4184,6 +4184,7 @@ namespace MaiMuAOI.SysCtrl | |||
| return stepIndex; | |||
| } | |||
| Log($"{stepIndex + 1}-{processName}", $"轴组运行完成"); | |||
| Thread.Sleep(markParam.WaitTime); | |||
| //自动聚焦? | |||
| if (markParam.MarkType == MarkCam.尺寸检测Mark) | |||
| { | |||
| @@ -4805,6 +4806,7 @@ namespace MaiMuAOI.SysCtrl | |||
| return stepIndex; | |||
| } | |||
| Log($"{stepIndex + 1}-{processName}", $"轴组运行完成"); | |||
| Thread.Sleep(defectParam.WaitTime); | |||
| //拍照 | |||
| Log($"{stepIndex + 1}-{processName}", $"相机开始采集照片..."); | |||
| @@ -5898,8 +5900,18 @@ namespace MaiMuAOI.SysCtrl | |||
| else | |||
| judgData = Math.Round(lstTestData.Average(), 4); | |||
| double PtUpper = model.PTBaseValue + model.PTUpFloatValue; | |||
| double PtLower = model.PTBaseValue - model.PTDownFloatValue; | |||
| double PtUpper = 0; | |||
| double PtLower = 0; | |||
| if (res.index == 8202) | |||
| { | |||
| PtUpper = model.PTXBaseValue + model.PTXUpFloatValue; | |||
| PtLower = model.PTXBaseValue - model.PTXDownFloatValue; | |||
| } | |||
| else | |||
| { | |||
| PtUpper = model.PTBaseValue + model.PTUpFloatValue; | |||
| PtLower = model.PTBaseValue - model.PTDownFloatValue; | |||
| } | |||
| if (PtUpper + PtLower > 0 && (judgData > PtUpper || judgData < PtLower)) | |||
| { | |||
| order.Qualified = false; | |||
| @@ -5913,7 +5925,7 @@ namespace MaiMuAOI.SysCtrl | |||
| result = CurrStepResult == 2 ? 2 : 1, | |||
| X = res.posX, | |||
| Y = res.posY, | |||
| PointCode = "Y轴方向PT值检测", | |||
| PointCode = (res.index == 8102)?"Y轴方向PT值检测" : "X轴方向PT值检测", | |||
| Data = Math.Round(res.PT1 + testParam.OffsetValue, 4), | |||
| ModifyUserCode = SysMgr.Instance.UserMgr.LoginUser.Code, | |||
| CreateUserCode = SysMgr.Instance.UserMgr.LoginUser.Code | |||
| @@ -6024,7 +6036,7 @@ namespace MaiMuAOI.SysCtrl | |||
| result = CurrStepResult == 2 ? 2 : 1, | |||
| X = res.posX, | |||
| Y = res.posY, | |||
| PointCode = "Y轴方向PT值检测", | |||
| PointCode = (res.index == 8102) ? "Y轴方向PT值检测" : "X轴方向PT值检测", | |||
| Data = 0, | |||
| ModifyUserCode = SysMgr.Instance.UserMgr.LoginUser.Code, | |||
| CreateUserCode = SysMgr.Instance.UserMgr.LoginUser.Code | |||
| @@ -0,0 +1,29 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace MaiMuAOI.SysCtrl | |||
| { | |||
| public class SysUpdata | |||
| { | |||
| public static string Updata = "V2.0:\r\n" + | |||
| "\t新版本,新流程,兼容老流程\r\n" + | |||
| "\t修复SN重复bug,只有相同料号的sn重复。\r\n" + | |||
| "\t新增本地数据查询功能。\r\n" + | |||
| "\t详细:\r\n" + | |||
| "\t1.增加检测单号,可不填。方便记录批次工单\r\n" + | |||
| "\t2.兼容老的流程。老的产品。不需要新建\r\n" + | |||
| "\t3.新增快速流程,方便新建流程,流程运行速度更快。\r\n" + | |||
| "\t4.快速流程新增取值,可以多次采集一点数据,取均值,最大值或最小值判断。\r\n" + | |||
| "\t5.快速流程新增结果判断,可以进行单点判断或多点均值判断\r\n" + | |||
| "\t6.快速流程加入自动聚焦功能。\r\n" + | |||
| "\t7.快速流程功能可以在产品的图纸功能上选择需要测试的点位\r\n" + | |||
| "\t8.新增X方向PT测试功能\r\n" + | |||
| "\t9.新增http上传数据功能\r\n" + | |||
| "\t10.新增标签打印,excel打印功能(需要安装标签打印软件和excel软件)\r\n" + | |||
| "\t11.快速流程张力,厚度,pt,线宽等测试不设测试次数上限,可自由设置\r\n" + | |||
| "\t12.提升了缺陷检测处理速度"; | |||
| } | |||
| } | |||
| @@ -442,7 +442,7 @@ namespace MaiMuAOI.SysUI.DefectPicShow | |||
| dr["料号"] = item.ProductInfo.Code; | |||
| dr["网版编码"] = item.SN; | |||
| dr["批次"] = item.BatchId; | |||
| dr["合格"] = item.Qualified ? "不合格": "合格"; | |||
| dr["合格"] = item.Qualified ? "合格": "不合格"; | |||
| dr["修复"] = item.State == 10 ? "异常" : item.State == 5 ? "修复" : "待修复"; | |||
| dr["异常情况"] = item.Abnormalities; | |||
| dr["修复人员"] = item.RepairCode; | |||
| @@ -592,7 +592,7 @@ namespace MaiMuAOI.SysUI.DefectPicShow | |||
| { | |||
| domainItem CompareResult = new domainItem(); | |||
| CompareResult.FieldName = "Qualified"; | |||
| CompareResult.FieldValue = comboBox2.Text == "合格"? "0":"1"; | |||
| CompareResult.FieldValue = comboBox2.Text == "合格"? "1":"0"; | |||
| CompareResult.ConditionalType = 0; | |||
| queryOrderData.domain.Add(CompareResult); | |||
| } | |||
| @@ -37,6 +37,9 @@ namespace MaiMuAOI.SysUI.ProcessStep | |||
| model.ProcessList = new List<Models.StepProcess>(); | |||
| else | |||
| model = m; | |||
| dataGridView1.DefaultCellStyle.ForeColor = Color.Black; | |||
| dataGridView2.DefaultCellStyle.ForeColor = Color.Black; | |||
| } | |||
| private void InitDataView() | |||
| @@ -311,7 +311,8 @@ namespace MaiMuAOI.UI.SysSet | |||
| ////////////////////Print////////////////////////// | |||
| configParams.EnableLabelPrint = this.cbOpenBarTenderPrint.Checked; | |||
| configParams.LabelPrinterName = this.cboPrinters.SelectedItem.ToString(); | |||
| if(this.cboPrinters.SelectedItem != null) | |||
| configParams.LabelPrinterName = this.cboPrinters.SelectedItem.ToString(); | |||
| configParams.LabelTempPath = this.tbBarTenderTempPath.Text; | |||
| Dictionary<string, string> labeldata = new Dictionary<string, string>(); | |||
| for (int i = 0; i < this.dataGridView1.RowCount; i++) | |||
| @@ -322,7 +323,8 @@ namespace MaiMuAOI.UI.SysSet | |||
| configParams.LabelData = labeldata; | |||
| configParams.EnableExcelPrint = this.cbOpenExcelPrint.Checked; | |||
| configParams.ExcelPrinterName = this.cboPrinters2.SelectedItem.ToString(); | |||
| if (this.cboPrinters2.SelectedItem != null) | |||
| configParams.ExcelPrinterName = this.cboPrinters2.SelectedItem.ToString(); | |||
| configParams.ExcelTempPath = this.tbExcelTempPath.Text; | |||
| labeldata = new Dictionary<string, string>(); | |||
| for (int i = 0; i < this.dataGridView2.RowCount; i++) | |||
| @@ -56,6 +56,7 @@ namespace Models | |||
| public double LineWidthValue { get; set; } | |||
| public double PTValue { get; set; } | |||
| [SugarColumn(IsNullable = true)] | |||
| public double XPTValue { get; set; } | |||
| //N次 | |||
| #region 张力5次 | |||
| @@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssistClient", "AssistClien | |||
| EndProject | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BanBoShi", "BanBoShi\BanBoShi.csproj", "{5AF7027F-7A05-454F-AD26-A63630F09E69}" | |||
| EndProject | |||
| Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "SetupExe", "SetupExe\SetupExe.vdproj", "{9C2135D9-42B8-409C-916F-D4B2970E2370}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|Any CPU = Debug|Any CPU | |||
| @@ -61,6 +63,10 @@ Global | |||
| {5AF7027F-7A05-454F-AD26-A63630F09E69}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| {5AF7027F-7A05-454F-AD26-A63630F09E69}.Release|x64.ActiveCfg = Release|x64 | |||
| {5AF7027F-7A05-454F-AD26-A63630F09E69}.Release|x64.Build.0 = Release|x64 | |||
| {9C2135D9-42B8-409C-916F-D4B2970E2370}.Debug|Any CPU.ActiveCfg = Debug | |||
| {9C2135D9-42B8-409C-916F-D4B2970E2370}.Debug|x64.ActiveCfg = Debug | |||
| {9C2135D9-42B8-409C-916F-D4B2970E2370}.Release|Any CPU.ActiveCfg = Release | |||
| {9C2135D9-42B8-409C-916F-D4B2970E2370}.Release|x64.ActiveCfg = Release | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| @@ -28,4 +28,19 @@ V1.2.4A: | |||
| 1.加入标签打印功能 | |||
| 2.加入Excel文件打印功能 | |||
| V2.0: | |||
| 新版本,新流程,兼容老流程 | |||
| 新版本,新流程,兼容老流程 | |||
| 修复SN重复bug,只有相同料号的sn重复。 | |||
| 新增本地数据查询功能。 | |||
| 详细: | |||
| 1.增加检测单号,可不填。方便记录批次工单 | |||
| 2.兼容老的流程。老的产品。不需要新建 | |||
| 3.新增快速流程,方便新建流程,流程运行速度更快。 | |||
| 4.快速流程新增取值,可以多次采集一点数据,取均值,最大值或最小值判断。 | |||
| 5.快速流程新增结果判断,可以进行单点判断或多点均值判断 | |||
| 6.快速流程加入自动聚焦功能。 | |||
| 7.快速流程功能可以在产品的图纸功能上选择需要测试的点位 | |||
| 8.新增X方向PT测试功能 | |||
| 9.新增http上传数据功能 | |||
| 10.新增标签打印,excel打印功能(需要安装标签打印软件和excel软件) | |||
| 11.快速流程张力,厚度,pt,线宽等测试不设测试次数上限,可自由设置 | |||