专项检查
This commit is contained in:
@@ -14,7 +14,7 @@ namespace BLL.OfficeCheck.Inspect
|
||||
public static Model.Inspect_Inspection SaveInspection(Model.Inspect_Inspection Inspection)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
int count = (from x in db.Inspect_Inspection where x.InspectType == "1" select x).Count();
|
||||
int count = (from x in db.Inspect_Inspection where x.InspectType == Inspection.InspectType select x).Count();
|
||||
if (Inspection.InspectionId == null)
|
||||
{
|
||||
Inspection.InspectionId = SQLHelper.GetNewID();
|
||||
@@ -22,7 +22,7 @@ namespace BLL.OfficeCheck.Inspect
|
||||
Model.Inspect_Inspection newInspection = new Model.Inspect_Inspection
|
||||
{
|
||||
InspectionId = Inspection.InspectionId,
|
||||
InspectionCode = "1-"+count.ToString("D6"),
|
||||
InspectionCode = Inspection.InspectType+"-" + count.ToString("D6"),
|
||||
ProjectId = Inspection.ProjectId,
|
||||
Description = Inspection.Description,
|
||||
States = Inspection.States,
|
||||
@@ -77,6 +77,7 @@ namespace BLL.OfficeCheck.Inspect
|
||||
CreateManName = (from y in Funs.DB.Sys_User where y.UserId == x.CreateMan select y.UserName).FirstOrDefault(),
|
||||
ProblemTypeId = x.ProblemTypeId,
|
||||
ProblemTypeName = x.ProblemTypeName,
|
||||
InspectType = x.InspectType,
|
||||
Place = x.Place,
|
||||
children = (from a in Funs.DB.Inspect_InspectionItem
|
||||
where a.InspectionId == x.InspectionId
|
||||
@@ -92,7 +93,9 @@ namespace BLL.OfficeCheck.Inspect
|
||||
AfterUrl = a.AfterUrl,
|
||||
RectificationDate = a.RectificationDate,
|
||||
EvaluateResults = a.EvaluateResults,
|
||||
WorkAreaName = a.WorkAreaName
|
||||
WorkAreaName = a.WorkAreaName,
|
||||
RectificationDescription = a.RectificationDescription,
|
||||
ProblemDetial = a.ProblemDetial
|
||||
}).ToList()
|
||||
}).FirstOrDefault(e => e.InspectionId == InspectionId);
|
||||
}
|
||||
@@ -178,7 +181,8 @@ namespace BLL.OfficeCheck.Inspect
|
||||
ProblemTypeId = y.ProblemTypeId,
|
||||
ProblemTypeName = y.ProblemTypeName,
|
||||
Place = y.Place,
|
||||
|
||||
ProblemDetial = x.ProblemDetial,
|
||||
RectificationDescription = x.RectificationDescription,
|
||||
}
|
||||
).FirstOrDefault(e => e.InspectionItemId == InspectionItemId);
|
||||
}
|
||||
@@ -232,7 +236,8 @@ namespace BLL.OfficeCheck.Inspect
|
||||
newInspectionItem.AfterUrl = InspectionItem.AfterUrl;
|
||||
newInspectionItem.AuditTime = InspectionItem.AuditTime;
|
||||
newInspectionItem.AuditMan = InspectionItem.AuditMan;
|
||||
|
||||
newInspectionItem.ProblemDetial = InspectionItem.ProblemDetial;
|
||||
newInspectionItem.RectificationDescription = InspectionItem.RectificationDescription;
|
||||
newInspectionItem.BeforelUrl = InspectionItem.BeforelUrl;
|
||||
newInspectionItem.RectificationResults = InspectionItem.RectificationResults;
|
||||
newInspectionItem.States = InspectionItem.States;
|
||||
@@ -301,10 +306,11 @@ namespace BLL.OfficeCheck.Inspect
|
||||
/// </summary>
|
||||
/// <param name="SafetyResponsibilitiesId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionDto> GetInspectionList(string ProjectId, string States, int PageNumber, int PageSize)
|
||||
public static List<InspectionDto> GetInspectionList(string ProjectId,string type, string States, int PageNumber, int PageSize)
|
||||
{
|
||||
|
||||
var getDataLists = (from x in Funs.DB.Inspect_Inspection
|
||||
|
||||
select new InspectionDto
|
||||
{
|
||||
InspectionId = x.InspectionId,
|
||||
@@ -324,7 +330,7 @@ namespace BLL.OfficeCheck.Inspect
|
||||
ProblemTypeName = x.ProblemTypeName,
|
||||
Place = x.Place,
|
||||
ChildsCount = Funs.DB.Inspect_InspectionItem.Count(itm=>itm.InspectionId == x.InspectionId).ToString()
|
||||
});
|
||||
}).Where(x=> x.InspectType == type);
|
||||
if (!string.IsNullOrEmpty(ProjectId))
|
||||
{
|
||||
getDataLists = getDataLists.Where(q => q.ProjectId == ProjectId);
|
||||
|
||||
Reference in New Issue
Block a user