From 0ba4d496d1d52a0fe6205fc7e5e83a5da7ea9dee Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 27 Sep 2024 11:43:19 +0800 Subject: [PATCH] =?UTF-8?q?PDA=20=E6=B3=A8=E5=A1=91=E9=A2=86=E7=8F=AD=20?= =?UTF-8?q?=E8=BD=A6=E9=97=B4=E4=B8=BB=E4=BB=BB=20=E6=B3=A8=E5=A1=91?= =?UTF-8?q?=E4=B8=BB=E7=AE=A1=20=E8=BD=A6=E9=97=B4=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=91=98=20=E8=AE=A1=E5=88=92=E4=B8=93=E5=91=98=20=E5=B2=97?= =?UTF-8?q?=E4=BD=8D=E7=9A=84=E4=B9=9F=E5=8F=AF=E4=BB=A5=E7=9C=8B=E5=88=B0?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/PrdPackReportService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs index c939e7da..1279ce90 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs @@ -448,6 +448,23 @@ namespace Tnb.ProductionMgr //模具部门的人 List moldUserIds = await _db.Queryable().Where(x=>x.ObjectId=="35792898276629").Select(x=>x.UserId).ToListAsync(); + //是否 注塑领班 车间主任 注塑主管 车间统计员 计划专员 岗位 + bool isPosition = false; + List positionIds = await _db.Queryable().Where(x=>x.ObjectType=="Position" && x.UserId==userId).Select(x=>x.ObjectId).ToListAsync(); + List position = new List() { "36384895704085", "33530523354645", "36384903950101", "36384884923925", "36384877722901" }; + if (positionIds != null && !positionIds.IsEmpty()) + { + foreach (var item in positionIds) + { + if (position.Contains(item)) + { + isPosition = true; + break; + } + + } + } + SqlSugarPagedList result = await _db.Queryable() .LeftJoin((a, b) => a.material_id == b.id) .LeftJoin((a, b, c) => a.process_id == c.id) @@ -471,6 +488,7 @@ namespace Tnb.ProductionMgr .WhereIF(status == "3" && end_time != null, a => a.act_end_date <= end_time) .WhereIF(!_userManager.IsAdministrator,(a, b, c, d, e, f, g, h, j, k, l)=>(d.ManagerId==userId) || (j.mo_type==DictConst.PrdMoTypeBZ && !SqlFunc.IsNullOrEmpty(userWorklineId) && a.workline_id==userWorklineId) + || (j.mo_type==DictConst.PrdMoTypeZS && isPosition) || (a.schedule_type==1 && a.mo_task_status==DictConst.ToBeStartedEnCode && moldUserIds.Contains(userId)) || (a.scheduling_class_type=="1" && twoDayFlag && a.dayshift_worker_id==userId) || (a.scheduling_class_type=="1" && twoNightFlag && a.nightshift_worker_id==userId)