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) {