From 557c867b562cc4e7356d0d276f2a76fa3d58c1d3 Mon Sep 17 00:00:00 2001
From: geh <1923421292@qq.com>
Date: Thu, 20 Feb 2025 17:55:00 +0800
Subject: [PATCH] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E5=88=86=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/HSSE/Technique/AwardStandardsService.cs | 7 ++++++-
SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs | 6 +++++-
SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs | 6 +++++-
SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs | 6 +++++-
SGGL/WebAPI/Controllers/HSSE/AwardStandardsController.cs | 4 ++--
.../Controllers/HSSE/ConstructionStandardsController.cs | 4 ++--
.../Controllers/HSSE/ProtectionStandardsController.cs | 4 ++--
.../Controllers/HSSE/SafetyResponsibilitiesController.cs | 4 ++--
8 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/SGGL/BLL/HSSE/Technique/AwardStandardsService.cs b/SGGL/BLL/HSSE/Technique/AwardStandardsService.cs
index 3441ce2..fc19e82 100644
--- a/SGGL/BLL/HSSE/Technique/AwardStandardsService.cs
+++ b/SGGL/BLL/HSSE/Technique/AwardStandardsService.cs
@@ -24,7 +24,7 @@ public class AwardStandardsService
///
///
///
- public static List GetAwardStandardsList()
+ public static List GetAwardStandardsList(int PageNumber, int PageSize)
{
List getDataLists = (from x in Funs.DB.Technique_AwardStandards
select new AwardStandardsItem
@@ -39,6 +39,11 @@ public class AwardStandardsService
UpState = x.UpState,
Remark = x.Remark
}).ToList();
+ if (PageNumber > 0 && PageSize > 0)
+ {
+ getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
+ }
+
return getDataLists;
}
diff --git a/SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs b/SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs
index 5cdf7da..001c5b3 100644
--- a/SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs
+++ b/SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs
@@ -24,7 +24,7 @@ public class ConstructionStandardsService
///
///
///
- public static List GetConstructionStandardsList()
+ public static List GetConstructionStandardsList(int PageNumber, int PageSize)
{
List getDataLists = (from x in Funs.DB.Technique_ConstructionStandards
select new ConstructionStandardsItem
@@ -39,6 +39,10 @@ public class ConstructionStandardsService
UpState = x.UpState,
Remark = x.Remark
}).ToList();
+ if (PageNumber > 0 && PageSize > 0)
+ {
+ getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
+ }
return getDataLists;
}
diff --git a/SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs b/SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs
index d9a1479..6c48948 100644
--- a/SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs
+++ b/SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs
@@ -26,7 +26,7 @@ public class ProtectionStandardsService
///
///
///
- public static List GetProtectionStandardsList()
+ public static List GetProtectionStandardsList(int PageNumber, int PageSize)
{
List getDataLists = (from x in Funs.DB.Technique_ProtectionStandards
select new ProtectionStandardsItem
@@ -41,6 +41,10 @@ public class ProtectionStandardsService
UpState = x.UpState,
Remark = x.Remark
}).ToList();
+ if (PageNumber > 0 && PageSize > 0)
+ {
+ getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
+ }
return getDataLists;
}
diff --git a/SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs b/SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs
index e7c33f8..5fb65b5 100644
--- a/SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs
+++ b/SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs
@@ -24,7 +24,7 @@ public class SafetyResponsibilitiesService
///
///
///
- public static List GetSafetyResponsibilitiesList()
+ public static List GetSafetyResponsibilitiesList(int PageNumber, int PageSize)
{
List getDataLists = (from x in Funs.DB.Technique_SafetyResponsibilities
select new SafetyResponsibilitiesItem
@@ -39,6 +39,10 @@ public class SafetyResponsibilitiesService
UpState = x.UpState,
Remark = x.Remark
}).ToList();
+ if (PageNumber > 0 && PageSize > 0)
+ {
+ getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
+ }
return getDataLists;
}
diff --git a/SGGL/WebAPI/Controllers/HSSE/AwardStandardsController.cs b/SGGL/WebAPI/Controllers/HSSE/AwardStandardsController.cs
index 93c0408..d72e85b 100644
--- a/SGGL/WebAPI/Controllers/HSSE/AwardStandardsController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/AwardStandardsController.cs
@@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
/// 获取集合
///
///
- public Model.ResponeData getAwardStandardsList()
+ public Model.ResponeData getAwardStandardsList(int PageNumber, int PageSize)
{
var responeData = new Model.ResponeData();
try
{
- responeData.data = AwardStandardsService.GetAwardStandardsList();
+ responeData.data = AwardStandardsService.GetAwardStandardsList(PageNumber,PageSize);
}
catch (Exception ex)
{
diff --git a/SGGL/WebAPI/Controllers/HSSE/ConstructionStandardsController.cs b/SGGL/WebAPI/Controllers/HSSE/ConstructionStandardsController.cs
index 8db5021..df49c1b 100644
--- a/SGGL/WebAPI/Controllers/HSSE/ConstructionStandardsController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/ConstructionStandardsController.cs
@@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
/// 获取集合
///
///
- public Model.ResponeData getConstructionStandardsList()
+ public Model.ResponeData getConstructionStandardsList(int PageNumber, int PageSize)
{
var responeData = new Model.ResponeData();
try
{
- responeData.data = ConstructionStandardsService.GetConstructionStandardsList();
+ responeData.data = ConstructionStandardsService.GetConstructionStandardsList(PageNumber, PageSize);
}
catch (Exception ex)
{
diff --git a/SGGL/WebAPI/Controllers/HSSE/ProtectionStandardsController.cs b/SGGL/WebAPI/Controllers/HSSE/ProtectionStandardsController.cs
index bbd251a..3b6029e 100644
--- a/SGGL/WebAPI/Controllers/HSSE/ProtectionStandardsController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/ProtectionStandardsController.cs
@@ -11,12 +11,12 @@ namespace WebAPI.Controllers.HSSE
/// 获取集合
///
///
- public Model.ResponeData getProtectionStandardsList()
+ public Model.ResponeData getProtectionStandardsList(int PageNumber, int PageSize)
{
var responeData = new Model.ResponeData();
try
{
- responeData.data = ProtectionStandardsService.GetProtectionStandardsList();
+ responeData.data = ProtectionStandardsService.GetProtectionStandardsList(PageNumber, PageSize);
}
catch (Exception ex)
{
diff --git a/SGGL/WebAPI/Controllers/HSSE/SafetyResponsibilitiesController.cs b/SGGL/WebAPI/Controllers/HSSE/SafetyResponsibilitiesController.cs
index edb25d8..3154c8b 100644
--- a/SGGL/WebAPI/Controllers/HSSE/SafetyResponsibilitiesController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/SafetyResponsibilitiesController.cs
@@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
/// 获取集合
///
///
- public Model.ResponeData getSafetyResponsibilitiesList()
+ public Model.ResponeData getSafetyResponsibilitiesList(int PageNumber, int PageSize)
{
var responeData = new Model.ResponeData();
try
{
- responeData.data = SafetyResponsibilitiesService.GetSafetyResponsibilitiesList();
+ responeData.data = SafetyResponsibilitiesService.GetSafetyResponsibilitiesList(PageNumber, PageSize);
}
catch (Exception ex)
{