专项检查

This commit is contained in:
2025-04-15 20:48:53 +08:00
parent 80ea8ec450
commit 1c6dca4612
36 changed files with 29955 additions and 932 deletions
@@ -15,6 +15,7 @@ namespace WebAPI.Controllers.HSSE
try
{
var query = (from x in Funs.DB.Technique_Rectify
where x.IsEndLever == true
select new
{
x.RectifyId,
@@ -62,12 +62,12 @@ namespace WebAPI.Controllers.HSSE
#endregion
#region
public Model.ResponeData getInspectionList(string ProjectId, string States, int PageNumber, int PageSize)
public Model.ResponeData getInspectionList(string ProjectId, string States, int PageNumber, int PageSize, string type = "1")
{
var responeData = new Model.ResponeData();
try
{
responeData.data = Inspect_InspectionService.GetInspectionList(ProjectId, States, PageNumber, PageSize);
responeData.data = Inspect_InspectionService.GetInspectionList(ProjectId, type, States, PageNumber, PageSize);
}
catch (Exception ex)
{
@@ -122,7 +122,7 @@ namespace WebAPI.Controllers.HSSE
#endregion
#region
public Model.ResponeData getInspectionByProjectIdAndCheckDate(string projectId, string checkDate)
public Model.ResponeData getInspectionByProjectIdAndCheckDate(string projectId, string checkDate, string type)
{
var responeData = new Model.ResponeData();
try
@@ -130,6 +130,7 @@ namespace WebAPI.Controllers.HSSE
DateTime mdate = Funs.GetNewDateTimeOrNow(checkDate);
var getDataLists = (from x in Funs.DB.Inspect_Inspection
where x.InspectType == type
select new InspectionDto
{
InspectionId = x.InspectionId,
@@ -151,9 +152,9 @@ namespace WebAPI.Controllers.HSSE
where a.InspectionId == x.InspectionId
select a).Count().ToString(),
});
if (!string.IsNullOrEmpty(projectId))
if (!string.IsNullOrEmpty(projectId)&&projectId!=null)
{
getDataLists = getDataLists.Where(q => q.ProjectId == projectId&&q.InspectType == "1");
getDataLists = getDataLists.Where(q => q.ProjectId == projectId);
}
getDataLists = getDataLists.Where(q => q.CreateTime.Value.Year == mdate.Year