Pārlūkot izejas kodu

收款退还与其他款项
验证更改

leiy 1 gadu atpakaļ
vecāks
revīzija
e7739fdebc
1 mainītis faili ar 11 papildinājumiem un 22 dzēšanām
  1. 11 22
      OASystem/OASystem.Api/Controllers/FinancialController.cs

+ 11 - 22
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -895,10 +895,11 @@ namespace OASystem.API.Controllers
         {
             try
             {
-                if (dto == null)
-                {
-                    return Ok(JsonView(false, "参数不能为空!"));
-                }
+                if (dto == null)  return Ok(JsonView(false, "参数不能为空!"));
+               
+                if (dto.PageId <= 0) return Ok(JsonView(false, "请传入正确的的页面Id!"));
+               
+                if (dto.UserId <= 0)  return Ok(JsonView(false, "请传入正确的的员工Id!")); 
 
                 #region 页面功能权限处理
                 PageFunAuthViewBase pageFunAuth = new PageFunAuthViewBase();
@@ -951,11 +952,9 @@ namespace OASystem.API.Controllers
         {
             try
             {
-                if (dto == null)
-                {
-                    return Ok(JsonView(false, "参数不能为空!"));
-                }
-
+                if (dto == null) return Ok(JsonView(false, "参数不能为空!"));
+                if (dto.PageId <= 0) return Ok(JsonView(false, "请传入正确的的页面Id!"));
+                if (dto.UserId <= 0) return Ok(JsonView(false, "请传入正确的的员工Id!"));
 
                 PageFunAuthViewBase pageFunAuth = new PageFunAuthViewBase();
 
@@ -963,10 +962,6 @@ namespace OASystem.API.Controllers
 
                 pageFunAuth = await GeneralMethod.PostUserPageFuncDatas(dto.UserId, dto.PageId);
 
-                if (pageFunAuth.CheckAuth == 0)
-                {
-                    return Ok(JsonView(false, "您没有当前页面查询权限!"));
-                }
                 #endregion
 
                 if (pageFunAuth.DeleteAuth == 0)
@@ -1061,20 +1056,14 @@ namespace OASystem.API.Controllers
         {
             try
             {
-                if (dto == null)
-                {
-                    return Ok(JsonView(false, "参数不能为空!"));
-                }
+                if (dto == null) return Ok(JsonView(false, "参数不能为空!"));
+                if (dto.PageId <= 0) return Ok(JsonView(false, "请传入正确的的页面Id!"));
+                if (dto.UserId <= 0) return Ok(JsonView(false, "请传入正确的的员工Id!"));
 
                 #region 页面功能权限处理
                 PageFunAuthViewBase pageFunAuth = new PageFunAuthViewBase();
                 pageFunAuth = await GeneralMethod.PostUserPageFuncDatas(dto.UserId, dto.PageId);
 
-                if (pageFunAuth.CheckAuth == 0)
-                {
-                    return Ok(JsonView(false, "您没有当前页面查询权限!"));
-                }
-
                 #endregion
 
                 if (dto.Status == 1) //add