| | |
| | | using iWare_SCADA_BusinessLogical.BLL; |
| | | using iWare_SCADA_BusinessLogical; |
| | | using iWare_SCADA_BusinessLogical.BLL; |
| | | using iWare_SCADA_BusinessLogical.Utils; |
| | | using iWare_SCADA_Model; |
| | | using Microsoft.VisualStudio.TestTools.UnitTesting; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Linq; |
| | | |
| | | namespace iWare_SCADA_Test |
| | | { |
| | |
| | | |
| | | string cc = ""; |
| | | } |
| | | |
| | | [TestMethod] |
| | | public void pp() |
| | | { |
| | | Yitter.IdGenerator.IdGeneratorOptions options = new Yitter.IdGenerator.IdGeneratorOptions(1); |
| | | Yitter.IdGenerator.YitIdHelper.SetIdGenerator(options); |
| | | |
| | | WorkPieceLogMiddle logMiddle = new WorkPieceLogMiddle( |
| | | ) |
| | | { |
| | | WorkingProcedure = "OP30", |
| | | WorkPieceID = "DZ045L2406240103521TAS", |
| | | UpdatedTime = DateTime.Now, |
| | | QualityState = (int)QualityState.NG, |
| | | QualityNoOk = (int)QualityNoOkEnum.OP30涨断工位力矩大, |
| | | QualityNoOkReason = QualityNoOkEnum.OP30涨断工位力矩大.ToString(), |
| | | MonitoringPoint = "", |
| | | QualityStateStr = "NG" |
| | | } |
| | | ; |
| | | string WorkingProcedure = logMiddle.WorkingProcedure; |
| | | //根据质量数据判断是否合格/不合格 【Editby shaocx,2024-06-25】 |
| | | WorkPieceInfoManager.SetLogMiddleForQuality(ref logMiddle); |
| | | |
| | | //更新WorkPieceInfo表以及插入WorkPieceLog表和WorkPieceInfoLog表 |
| | | WorkPieceInfoManager.QualityInfoComplete(logMiddle, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | |
| | | |
| | | string cc = ""; |
| | | } |
| | | |
| | | [TestMethod] |
| | | public void aaaaa() |
| | | { |
| | | //获取OP70未结束的工件列表 |
| | | var ooDateTime = Convert.ToDateTime("0001-01-01"); |
| | | List<WorkPieceProcess> noFinishWorkPieceProcessList = null; |
| | | using (DbModel db = new DbModel()) |
| | | { |
| | | var dateTime = DateTime.Now; |
| | | noFinishWorkPieceProcessList = db.WorkPieceProcess.Where(x => |
| | | 1 == 1 |
| | | && x.WorkingProcedureCurrent == "OP70" |
| | | && x.EndTime == ooDateTime).ToList(); |
| | | } |
| | | |
| | | |
| | | string cc = ""; |
| | | } |
| | | } |
| | | } |