From 7af6866e49c1f6cb609228985cf41263b19f8988 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Sat, 14 Sep 2024 19:17:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=95=E6=96=99=E5=88=97=E8=A1=A8=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PrdMaterialReceiptService.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs index 7c3e9502..ac10c04c 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs @@ -151,6 +151,29 @@ namespace Tnb.ProductionMgr { throw Oops.Bah($"未找到该载具{qrCode}"); } + List inPrdMoTask = await db.Queryable(). + LeftJoin((x,y)=>x.mo_id==y.id) + .Where(x => x.mo_task_status==DictConst.InProgressEnCode) + .Where((x,y)=>(x.scheduling_class_type=="1" && twoDayFlag && x.dayshift_worker_id==userId) + || (y.mo_type==DictConst.PrdMoTypeBZ && !SqlFunc.IsNullOrEmpty(userWorklineId) && x.workline_id==userWorklineId) + || (x.scheduling_class_type=="1" && twoNightFlag && x.nightshift_worker_id==userId) + || (x.scheduling_class_type=="2" && fourDayBeforeFlag && x.dayshift_worker_id==userId) + || (x.scheduling_class_type=="2" && fourDayAfterFlag && x.dayshiftafter_worker_id==userId) + || (x.scheduling_class_type=="2" && fourNightBeforeFlag && x.nightshift_worker_id==userId) + || (x.scheduling_class_type=="2" && fourNightAfterFlag && x.nightshiftafter_worker_id==userId)) + .ToListAsync(); + + Log.Information($"生产投料任务单id:${prdMoTask.id}"); + Log.Information($"生产投料载具id:${wmsCarryH.id}"); + if (!ids.IsEmpty()) + { + Log.Information($"生产签收ids:${JsonConvert.SerializeObject(ids)}"); + } + + if (!inPrdMoTask.IsEmpty()) + { + Log.Information($"找到的进行中的任务单:${JsonConvert.SerializeObject(inPrdMoTask)}"); + } if (wmsCarryH.carrystd_id==WmsWareHouseConst.CARRY_ZYXCSTD_ID || wmsCarryH.carrystd_id==WmsWareHouseConst.CARRY_ZYLJSTD_ID) {