schangxiang@126.com
2024-09-02 15662d05c2e2a8620cdabf9038c94f7b64a106d2
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/WorkPieceInfoManager.cs
@@ -230,6 +230,7 @@
                            {
                                pro.EndTime = DateTimeHelper.GetDateTime();
                                pro.UpdatedUserName = loginfo.MonitoringPoint;
                                pro.UpdateDataCapturePointCname = loginfo.DataCapturePointCname;
                                pro.UpdatedTime = DateTimeHelper.GetDateTime();
                                pro.Remarks = "又一次上线,更新结束时间";
                            }
@@ -253,8 +254,10 @@
                            new_process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
                            new_process.CreatedUserName = loginfo.MonitoringPoint;
                            new_process.DataCapturePointCname = loginfo.DataCapturePointCname;
                            new_process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                            new_process.UpdatedUserName = loginfo.MonitoringPoint;
                            new_process.UpdateDataCapturePointCname = loginfo.DataCapturePointCname;
                            new_process.UpdatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                            new_process.OperationType = OperationType.生产.ToString();
                            new_process.Remarks = "";
@@ -787,8 +790,10 @@
                            process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
                            process.CreatedUserName = ResetUpdatedUserName(logMiddle);
                            process.DataCapturePointCname = logMiddle.DataCapturePointCname;
                            process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                            process.UpdatedUserName = ResetUpdatedUserName(logMiddle);
                            process.UpdateDataCapturePointCname = logMiddle.DataCapturePointCname;
                            process.UpdatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                            process.OperationType = OperationType.生产.ToString();
                            process.QualityDataInfoID = qualityData.Id;
@@ -799,6 +804,7 @@
                        {//其他的都只是修改
                            pro.QualityDataInfoID = qualityData.Id;
                            pro.UpdatedUserName = ResetUpdatedUserName(logMiddle);
                            pro.UpdateDataCapturePointCname = logMiddle.DataCapturePointCname;
                            pro.UpdatedTime = DateTimeHelper.GetDateTime();
                            //不再默认赋值为合格 【Editby shaocx,2024-08-16】
@@ -812,7 +818,7 @@
                            if (logMiddle.WorkingProcedure == "OP60")
                            {
                                pro.CreatedUserName = ResetUpdatedUserName(logMiddle);
                                pro.DataCapturePointCname = logMiddle.DataCapturePointCname;
                            }
                        }
@@ -1032,6 +1038,7 @@
                            pro.EndTime = DateTimeHelper.GetDateTime();
                            pro.Remarks = (pro.Remarks ?? "") + "NOOK结束";
                            pro.UpdatedUserName = loginfo.MonitoringPoint;
                            pro.UpdateDataCapturePointCname = loginfo.DataCapturePointCname;
                            pro.UpdatedTime = DateTimeHelper.GetDateTime();
                        }
@@ -1131,6 +1138,7 @@
                            pro.EndTime = DateTimeHelper.GetDateTime();
                            pro.Remarks = (pro.Remarks ?? "") + "SPC抽检结束";
                            pro.UpdatedUserName = loginfo.MonitoringPoint;
                            pro.UpdateDataCapturePointCname = loginfo.DataCapturePointCname;
                            pro.UpdatedTime = DateTimeHelper.GetDateTime();
                        }
                        //每次SPC 都插入追溯表
@@ -1142,8 +1150,10 @@
                        process.QualityState = (int)QualityState.Suspected;
                        process.Id = Yitter.IdGenerator.YitIdHelper.NextId();
                        process.CreatedUserName = loginfo.MonitoringPoint;
                        process.DataCapturePointCname = loginfo.DataCapturePointCname;
                        process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                        process.UpdatedUserName = loginfo.MonitoringPoint;
                        process.UpdateDataCapturePointCname = loginfo.DataCapturePointCname;
                        process.UpdatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                        process.Remarks = "工件SPC抽检推出";
                        db.WorkPieceProcess.Add(process);
@@ -1386,8 +1396,10 @@
                                process.QualityState = WorkPieceInfoManager.GetQualityStateValue(logMiddle.QualityState);
                            }
                            process.CreatedUserName = logMiddle.MonitoringPoint;
                            process.DataCapturePointCname = logMiddle.DataCapturePointCname;
                            process.CreatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                            process.UpdatedUserName = logMiddle.MonitoringPoint;
                            process.UpdateDataCapturePointCname = logMiddle.DataCapturePointCname;
                            process.UpdatedTime = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Local);
                            process.OperationType = OperationType.生产.ToString();
                            process.Remarks = "";
@@ -1414,6 +1426,7 @@
                            }
                            pro.EndTime = DateTimeHelper.GetDateTime();
                            pro.UpdatedUserName = logMiddle.MonitoringPoint;
                            pro.UpdateDataCapturePointCname = logMiddle.DataCapturePointCname;
                            pro.UpdatedTime = DateTimeHelper.GetDateTime();
                            if (logMiddle.WorkingProcedure.Equals("OP80"))
                            {