From 7eca0ab1b6d5142d623efd471985b2a20b559616 Mon Sep 17 00:00:00 2001
From: 小飞侠 <8277136+liaoxujun@user.noreply.gitee.com>
Date: 星期一, 01 十二月 2025 10:55:02 +0800
Subject: [PATCH] 修正审批备注长度

---
 cylsg/cylsg.Application/CyOS/CyOSBaoXiaoZHuGuanController.cs |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/cylsg/cylsg.Application/CyOS/CyOSBaoXiaoZHuGuanController.cs b/cylsg/cylsg.Application/CyOS/CyOSBaoXiaoZHuGuanController.cs
index 33c4b21..103387b 100644
--- a/cylsg/cylsg.Application/CyOS/CyOSBaoXiaoZHuGuanController.cs
+++ b/cylsg/cylsg.Application/CyOS/CyOSBaoXiaoZHuGuanController.cs
@@ -68,8 +68,9 @@
             SearchList = SearchList.And(x => x.MemberId == _OAServices.firmId);
             SearchList = SearchList.And(x => x.PlanType == 3);
             SearchList = SearchList.And(x => x.PlanDataType == 17);
-            //SearchList = SearchList.And(x =>  x.ApprovalStatus == PlanStatusType.unApproval);
-            //SearchList = SearchList.And(x =>  x.OaWorkPlanShenpis.Where(y => y.Buzhou == 1 && y.ApprovalStaffId == Permissions.MemberId).Count()<=0);
+            SearchList = SearchList.And(x => x.OaWorkPlanShenpis.Count(y => y.Buzhou == 1&& y.ApprovalStaffId != Permissions.MemberId) < 2);//鍙渶瑕佷袱涓汉瀹℃壒 鍙﹀涓や釜浜哄鎵逛簡锛屼笉鍦ㄦ樉绀�
+            //SearchList = SearchList.And(x => x.ApprovalStatus == PlanStatusType.unApproval);
+            //SearchList = SearchList.And(x => x.OaWorkPlanShenpis.Where(y => y.Buzhou == 1 && y.ApprovalStaffId == Permissions.MemberId).Count() <= 0);
             //SearchList = SearchList.And(x => x.DepartId == Permissions.DepartId); 閮ㄩ棬绛涢��
             if (!string.IsNullOrEmpty(param.StaffName))
             {
@@ -116,7 +117,7 @@
             //寮哄埗澧炲姞鍛樺伐杩囨护
    
             var data = await _SugarClient.Queryable<OaWorkPlan>().Includes(x=>x.Depart)
-                    .Includes(x=>x.OaWorkPlanShenpis.Where(y=>y.ApprovalStaffId==Permissions.MemberId&&y.Buzhou==1).ToList())
+                    .Includes(x=>x.OaWorkPlanShenpis.Where(y=>y.Buzhou==1).ToList())
                     .Where(SearchList).OrderByDescending(x => x.PlanStartTime).Mapper(
                     x =>
                     {
@@ -196,6 +197,13 @@
             {
                 throw Oops.Oh("鎶ラ攢鍗曟湭鎻愪氦涓嶅彲瀹℃壒");
             }
+            int shenpiCount = data.OaWorkPlanShenpis.Where(x => x.ApprovalStaffId != Permissions.MemberId && x.Buzhou == 1).Count();
+            if(shenpiCount >= 2)
+            {
+                //涓や釜浜哄鎵瑰悗銆備笉鍙啀瀹℃壒
+                throw Oops.Oh("宸茬粡宸茬粡缁撴潫");
+
+            }
             OaWorkPlanShenpi shenpi = data.OaWorkPlanShenpis.Where(x => x.ApprovalStaffId == Permissions.MemberId&&x.Buzhou==1).FirstOrDefault();
              if (shenpi!=null)
             {

--
Gitblit v1.9.1