From c7acb51c3ace14e509704f453adc58b9eb6613a8 Mon Sep 17 00:00:00 2001 From: liuying <1427574514@qq.com> Date: 周三, 16 10月 2024 16:23:28 +0800 Subject: [PATCH] 细节 --- iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs | 42 +++++++++++++++++++++++++++++++++++------- 1 files changed, 35 insertions(+), 7 deletions(-) diff --git a/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs b/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs index 619cbf8..f5a2fc7 100644 --- a/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs +++ b/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs @@ -239,6 +239,13 @@ .Select(s => new WorkPieceProcessOutput { Id = s.a.Id, + + DataCapturePointCname = s.a.DataCapturePointCname, + UpdateDataCapturePointCname = s.a.UpdateDataCapturePointCname, + QualityNoOkReason = s.a.QualityNoOkReason, + CreateUserName = s.a.CreatedUserName, + UpdatedUserName = s.a.UpdatedUserName, + WorkPieceID = s.a.WorkPieceID, WorkingProcedureCurrent = s.a.WorkingProcedureCurrent, EquipmentID = s.a.EquipmentID, @@ -486,13 +493,13 @@ public async Task<string> outBoundWorkPiece([FromBody] OutBoundInput input) { - if (input.Password == null || !input.Password.Equals("123456")) - { - throw Oops.Oh("淇敼宸ヤ欢璐ㄩ噺鐘舵�佸け璐ワ細瀵嗙爜杈撳叆閿欒锛�"); - } + //if (input.Password == null || !input.Password.Equals("123456")) + //{ + // throw Oops.Oh("淇敼宸ヤ欢璐ㄩ噺鐘舵�佸け璐ワ細瀵嗙爜杈撳叆閿欒锛�"); + //} if (input.WorkPieceInfoLst.Count < 1) { - throw Oops.Oh("宸ヤ欢鍑哄簱澶辫触锛氭暟鎹笉鑳戒负绌猴紒"); + throw Oops.Oh("宸ヤ欢鍏ュ簱澶辫触锛氭暟鎹笉鑳戒负绌猴紒"); } List<OutBoundDetailsInput> WorkPieceInfoLst = input.WorkPieceInfoLst; @@ -504,9 +511,11 @@ List<WorkPieceInfo> db_WorkPieceInfoList = await _workPieceInfoRep.Where(w => queryOP80NewCodeList.Contains(w.OP80NewCode) && w.IsDeleted == false).ToListAsync(); + var addOutBoundLogList = new List<WorkPieceOutboundRecord>(); + foreach (var item in WorkPieceInfoLst) { - var itemModel = db_itemModelList.FirstOrDefault(w => w.OP80NewCode == item.OP80NewCode); + var itemModel = db_itemModelList.FirstOrDefault(w => w.OP80NewCode == item.OP80NewCode && w.IsDeleted == false); if (itemModel != null) { //itemModel.IsDeleted = true; @@ -526,7 +535,7 @@ if (workPiece != null) { workPiece.OutPerson = CurrentUserInfo.Name; - workPiece.OutRemark = "鎾ら攢宸ヤ欢鍑哄簱"; + workPiece.OutRemark = "鎾ら攢宸ヤ欢鍏ュ簱"; workPiece.OutTime = DateTime.Now; workPiece.IsOut = false; @@ -544,9 +553,28 @@ }; addOutBoundList.Add(outBoundLog); + var outBoundLogRecord = new WorkPieceOutboundRecord + { + OperationType = OutboundOperationType.鍏ュ簱.ToString(), + WorkPieceID = workPiece?.WorkPieceID, + OP80NewCode = item.OP80NewCode, + + CreatedUserId = CurrentUserInfo.UserId, + CreatedUserName = CurrentUserInfo.Name, + + + //CarNo = input.CarNo, + Remark = "宸ヤ欢鍏ュ簱", + + }; + addOutBoundLogList.Add(outBoundLogRecord); + } await _workPieceOutboundRep.InsertAsync(addOutBoundList); + + await _workPieceOutboundRecordRep.InsertAsync(addOutBoundLogList); + return "鍑哄簱鎴愬姛"; } -- Gitblit v1.9.3