专项检查
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user