diff --git a/SGGL/BLL/API/CQMS/QualityAssuranceService.cs b/SGGL/BLL/API/CQMS/QualityAssuranceService.cs
index fd40ded0..504b291e 100644
--- a/SGGL/BLL/API/CQMS/QualityAssuranceService.cs
+++ b/SGGL/BLL/API/CQMS/QualityAssuranceService.cs
@@ -9,7 +9,8 @@ namespace BLL
public class QualityAssuranceService
{
#region 设计交底
- public class Comprehensive_DesignDetailsDto : Model.Comprehensive_DesignDetails {
+ public class Comprehensive_DesignDetailsDto : Model.Comprehensive_DesignDetails
+ {
///
/// 专业名称
///
@@ -33,20 +34,21 @@ namespace BLL
///
///
///
- public static List getDesignDetailsList(string projectId,string cNProfessionalId="") {
+ public static List getDesignDetailsList(string projectId, string cNProfessionalId = "")
+ {
var list = (from x in Funs.DB.Comprehensive_DesignDetails
join y in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId
where x.ProjectId == projectId
select new Comprehensive_DesignDetailsDto()
{
- DesignDetailsId=x.DesignDetailsId,
- CNProfessionalId=x.CNProfessionalId,
+ DesignDetailsId = x.DesignDetailsId,
+ CNProfessionalId = x.CNProfessionalId,
ProfessionalName = y.ProfessionalName,
- DesignDetailsCode=x.DesignDetailsCode,
- DetailsMan=x.DetailsMan,
+ DesignDetailsCode = x.DesignDetailsCode,
+ DetailsMan = x.DetailsMan,
DetailsDates = string.Format("{0:yyyy-MM-dd}", x.DetailsDate),
- UnitWorkNames= ConvertUnitWork(x.UnitWorkId),
- UnitNames= ConvertCarryUnit(x.UnitName),
+ UnitWorkNames = ConvertUnitWork(x.UnitWorkId),
+ UnitNames = ConvertCarryUnit(x.UnitName),
}).ToList();
if (!string.IsNullOrEmpty(cNProfessionalId))
{
@@ -69,7 +71,7 @@ namespace BLL
DetailsDates = string.Format("{0:yyyy-MM-dd}", x.DetailsDate),
UnitWorkNames = ConvertUnitWork(x.UnitWorkId),
UnitNames = ConvertCarryUnit(x.UnitName),
- JoinPersonNum=x.JoinPersonNum,
+ JoinPersonNum = x.JoinPersonNum,
RemarCode = x.RemarCode,
AttachUrl = APIUpLoadFileService.getFileUrl(x.DesignDetailsId, null),
}).First();
@@ -138,7 +140,8 @@ namespace BLL
#endregion
#region 图纸会审
- public class Comprehensive_ReviewDrawingsDto : Model.Comprehensive_ReviewDrawings {
+ public class Comprehensive_ReviewDrawingsDto : Model.Comprehensive_ReviewDrawings
+ {
public string ProfessionalName { get; set; }
public string ReviewDates { get; set; }
@@ -183,7 +186,8 @@ namespace BLL
///
///
///
- public static Comprehensive_ReviewDrawingsDto getReviewDrawings(string Id) {
+ public static Comprehensive_ReviewDrawingsDto getReviewDrawings(string Id)
+ {
var list = (from x in Funs.DB.Comprehensive_ReviewDrawings
join y in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId
where x.Id == Id
@@ -192,20 +196,21 @@ namespace BLL
Id = x.Id,
CNProfessionalId = x.CNProfessionalId,
ProfessionalName = y.ProfessionalName,
- DraCode=x.DraCode,
+ DraCode = x.DraCode,
UnitWorkNames = ConvertUnitWork(x.UnitWorkId),
ReceiveUnitss = ConvertCarryUnit(x.ReceiveUnits),
ReviewDates = string.Format("{0:yyyy-MM-dd}", x.ReviewDate),
- RemarkCode=x.RemarkCode,
- Remarks=x.Remarks,
- AttachUrl= APIUpLoadFileService.getFileUrl(x.Id, null),
+ RemarkCode = x.RemarkCode,
+ Remarks = x.Remarks,
+ AttachUrl = APIUpLoadFileService.getFileUrl(x.Id, null),
}).First();
return list;
}
#endregion
#region 技术交底
- public class Comprehensive_ConTechnologyDisclosureDto : Model.Comprehensive_ConTechnologyDisclosure {
+ public class Comprehensive_ConTechnologyDisclosureDto : Model.Comprehensive_ConTechnologyDisclosure
+ {
public string ProfessionalName { get; set; }
public string UnitName { get; set; }
@@ -215,36 +220,12 @@ namespace BLL
public string DisclosureDates { get; set; }
}
- public static List getConTechnologyDisclosureList(string projectId, string cNProfessionalId = "") {
+ public static List getConTechnologyDisclosureList(string projectId, string cNProfessionalId = "")
+ {
var list = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure
join y in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId
join z in Funs.DB.Base_Unit on x.UnitId equals z.UnitId
where x.ProjectId == projectId
- select new Comprehensive_ConTechnologyDisclosureDto
- {
- ConTechnologyDisclosureId=x.ConTechnologyDisclosureId,
- ProfessionalName = y.ProfessionalName,
- DisclosureCode=x.DisclosureCode,
- DisclosureName=x.DisclosureName,
- UnitName=z.UnitName,
- DisclosureMan=x.DisclosureMan,
- DisclosureDates = string.Format("{0:yyyy-MM-dd}", x.DisclosureDate),
- UnitWorkNames= ConvertUnitWork(x.UnitWorkId),
- AttendMan=x.AttendMan,
-
- }).ToList();
- if (!string.IsNullOrEmpty(cNProfessionalId))
- {
- list = list.Where(x => x.CNProfessionalId == cNProfessionalId).ToList();
- }
- return list;
- }
-
- public static Comprehensive_ConTechnologyDisclosureDto getConTechnologyDisclosure(string Id) {
- var list = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure
- join y in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId
- join z in Funs.DB.Base_Unit on x.UnitId equals z.UnitId
- where x.ConTechnologyDisclosureId == Id
select new Comprehensive_ConTechnologyDisclosureDto
{
ConTechnologyDisclosureId = x.ConTechnologyDisclosureId,
@@ -255,7 +236,33 @@ namespace BLL
DisclosureMan = x.DisclosureMan,
DisclosureDates = string.Format("{0:yyyy-MM-dd}", x.DisclosureDate),
UnitWorkNames = ConvertUnitWork(x.UnitWorkId),
- RemarkCode=x.RemarkCode,
+ AttendMan = x.AttendMan,
+
+ }).ToList();
+ if (!string.IsNullOrEmpty(cNProfessionalId))
+ {
+ list = list.Where(x => x.CNProfessionalId == cNProfessionalId).ToList();
+ }
+ return list;
+ }
+
+ public static Comprehensive_ConTechnologyDisclosureDto getConTechnologyDisclosure(string Id)
+ {
+ var list = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure
+ join y in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId
+ join z in Funs.DB.Base_Unit on x.UnitId equals z.UnitId
+ where x.ConTechnologyDisclosureId == Id
+ select new Comprehensive_ConTechnologyDisclosureDto
+ {
+ ConTechnologyDisclosureId = x.ConTechnologyDisclosureId,
+ ProfessionalName = y.ProfessionalName,
+ DisclosureCode = x.DisclosureCode,
+ DisclosureName = x.DisclosureName,
+ UnitName = z.UnitName,
+ DisclosureMan = x.DisclosureMan,
+ DisclosureDates = string.Format("{0:yyyy-MM-dd}", x.DisclosureDate),
+ UnitWorkNames = ConvertUnitWork(x.UnitWorkId),
+ RemarkCode = x.RemarkCode,
AttendMan = x.AttendMan,
}).First();
return list;
@@ -263,7 +270,8 @@ namespace BLL
#endregion
#region 人员报验
- public class Comprehensive_InspectionPersonDto : Model.Comprehensive_InspectionPerson {
+ public class Comprehensive_InspectionPersonDto : Model.Comprehensive_InspectionPerson
+ {
public string UnitName { get; set; }
public string ProfessionalName { get; set; }
@@ -277,6 +285,11 @@ namespace BLL
public string ApprovalTimes { get; set; }
public string DepartureTimes { get; set; }
+
+ public string IsOnSites { get; set; }
+
+ public string IsTrains { get; set; }
+
}
///
@@ -285,16 +298,32 @@ namespace BLL
///
///
///
- public static List getInspectionPersonList(string projectId, string searchText = "") {
+ public static List getInspectionPersonList(string projectId, string searchText = "")
+ {
var list = (from x in Funs.DB.Comprehensive_InspectionPerson
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
join Cn in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals Cn.CNProfessionalId
join z in Funs.DB.Base_Post on x.PostId equals z.PostId
- where x.ProjectId==projectId
+ where x.ProjectId == projectId
select new Comprehensive_InspectionPersonDto
{
-
+ InspectionPersonId = x.InspectionPersonId,
+ UnitName = y.UnitName,
+ InspectionPersonCode = x.InspectionPersonCode,
+ ProfessionalName = Cn.ProfessionalName,
+ UnitWorkNames = ConvertUnitWork(x.UnitWorkId),
+ PostName = z.PostName,
+ PersonName = x.PersonName,
+ CertificateNumber = x.CertificateNumber,
+ QualifiedProjectCode = x.QualifiedProjectCode,
+ ValidityDates = string.Format("{0:yyyy-MM-dd}", x.ValidityDate),
+ ApprovalTimes = string.Format("{0:yyyy-MM-dd}", x.ApprovalTime),
+ DepartureTimes = string.Format("{0:yyyy-MM-dd}", x.DepartureTime),
}).ToList();
+ if (!string.IsNullOrEmpty(searchText))
+ {
+ list = list.Where(x => x.PersonName.Contains(searchText)).ToList();
+ }
return list;
}
@@ -309,41 +338,596 @@ namespace BLL
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
join Cn in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals Cn.CNProfessionalId
join z in Funs.DB.Base_Post on x.PostId equals z.PostId
- where x.InspectionPersonId ==Id
+ where x.InspectionPersonId == Id
select new Comprehensive_InspectionPersonDto
{
-
+ InspectionPersonId = x.InspectionPersonId,
+ UnitName = y.UnitName,
+ InspectionPersonCode = x.InspectionPersonCode,
+ ProfessionalName = Cn.ProfessionalName,
+ UnitWorkNames = ConvertUnitWork(x.UnitWorkId),
+ PostName = z.PostName,
+ PersonName = x.PersonName,
+ CertificateNumber = x.CertificateNumber,
+ QualifiedProjectCode = x.QualifiedProjectCode,
+ ValidityDates = string.Format("{0:yyyy-MM-dd}", x.ValidityDate),
+ ApprovalTimes = string.Format("{0:yyyy-MM-dd}", x.ApprovalTime),
+ DepartureTimes = string.Format("{0:yyyy-MM-dd}", x.DepartureTime),
+ IsOnSites = x.IsOnSite == true ? "是" : "否",
+ IsTrains = x.IsTrain == true ? "是" : "否",
+ RemarkCode = x.RemarkCode,
+ AttachUrl = APIUpLoadFileService.getFileUrl(x.InspectionPersonId, null),
}).First();
return list;
}
#endregion
#region 材料报验
+ public class Comprehensive_InspectionEquipmentDto : Model.Comprehensive_InspectionEquipment
+ {
+ public string UnitName { get; set; }
+
+ public string ProfessionalName { get; set; }
+
+ public string InspectionDates { get; set; }
+
+ public string Attributes { get; set; }
+ }
+ public static string getAttributesName(string aId)
+ {
+ if (aId == "1")
+ {
+ return "钢材出厂合格证、试验报告核查要录";
+ }
+ else if (aId == "2")
+ {
+ return "钢筋机械连接、焊接接头检验报告核查要录";
+ }
+ else if (aId == "3")
+ {
+ return "水泥合格证、试验报告核查要录";
+ }
+ else if (aId == "4")
+ {
+ return "砖石(砌块)合格证、试验报告核查要录";
+ }
+ else if (aId == "5")
+ {
+ return "防水材料合格证、检验报告核查要录";
+ }
+ else if (aId == "6")
+ {
+ return "其它材料、构件合格证、试验报告核查要录";
+ }
+ else if (aId == "7")
+ {
+ return "混凝土、砂浆试件抗压强度试验报告核查要录";
+ }
+ else if (aId == "8")
+ {
+ return "混凝土抗渗试件试验报告核查要录";
+ }
+ else if (aId == "9")
+ {
+ return "商品混凝土进场验收记录";
+ }
+ else
+ {
+ return "";
+ }
+ }
+
+ public static List getInspectionEquipmentList(string projectId, string searchText = "")
+ {
+ var list = (from x in Funs.DB.Comprehensive_InspectionEquipment
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ join Cn in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals Cn.CNProfessionalId
+ where x.ProjectId == projectId
+ select new Comprehensive_InspectionEquipmentDto
+ {
+ InspectionEquipmentId = x.InspectionEquipmentId,
+ UnitName = y.UnitName,
+ InspectionCode = x.InspectionCode,
+ EquipmentNO = x.EquipmentNO,
+ ProfessionalName = Cn.ProfessionalName,
+ InspectionName = x.InspectionName,
+ Specifications = x.Specifications,
+ Supplier = x.Supplier,
+ Counts = x.Counts,
+ Unit = x.Unit,
+ SamplingCount = x.SamplingCount,
+ SamplingResult = x.SamplingResult,
+ InspectionDates = string.Format("{0:yyyy-MM-dd}", x.InspectionDate),
+ UsedPlace = x.UsedPlace,
+
+ EquipmentOrMatail = x.EquipmentOrMatail,
+ Attributes = getAttributesName(x.Attribute),
+ RemarkCode = x.RemarkCode,
+ //AttachUrl = APIUpLoadFileService.getFileUrl(x.InspectionPersonId, null),
+
+ }).ToList();
+ if (!string.IsNullOrEmpty(searchText))
+ {
+ list.Where(x => x.InspectionName.Contains(searchText)).ToList();
+ }
+ return list;
+ }
+
+ public static Comprehensive_InspectionEquipmentDto getInspectionEquipment(string Id)
+ {
+ var list = (from x in Funs.DB.Comprehensive_InspectionEquipment
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ join Cn in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals Cn.CNProfessionalId
+ where x.InspectionEquipmentId == Id
+ select new Comprehensive_InspectionEquipmentDto
+ {
+ InspectionEquipmentId = x.InspectionEquipmentId,
+ UnitName = y.UnitName,
+ InspectionCode = x.InspectionCode,
+ EquipmentNO = x.EquipmentNO,
+ ProfessionalName = Cn.ProfessionalName,
+ InspectionName = x.InspectionName,
+ Specifications = x.Specifications,
+ Supplier = x.Supplier,
+ Counts = x.Counts,
+ Unit = x.Unit,
+ SamplingCount = x.SamplingCount,
+ SamplingResult = x.SamplingResult,
+ InspectionDates = string.Format("{0:yyyy-MM-dd}", x.InspectionDate),
+ UsedPlace = x.UsedPlace,
+
+ EquipmentOrMatail = x.EquipmentOrMatail,
+ Attributes = getAttributesName(x.Attribute),
+ RemarkCode = x.RemarkCode,
+ AttachUrl = APIUpLoadFileService.getFileUrl(x.InspectionEquipmentId, null),
+
+ }).First();
+
+ return list;
+ }
#endregion
#region 机具报验
+ public class Comprehensive_InspectionMachineDto : Model.Comprehensive_InspectionMachine
+ {
+ public string UnitName { get; set; }
- #endregion
+ public string ProfessionalName { get; set; }
- #region 设计变更
+ public string NextTestDates { get; set; }
- #endregion
+ public string IsVerifications { get; set; }
- #region 共捡数据
+ public string InspectionDates { get; set; }
+
+ public string IsCheckOKs { get; set; }
+
+ public string LeaveDates { get; set; }
+
+ public string IsOnSites { get; set; }
+ }
+ public static List getInspectionMachineList(string projectId, string searchText = "")
+ {
+
+ var list = (from x in Funs.DB.Comprehensive_InspectionMachine
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ join Cn in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals Cn.CNProfessionalId
+ where x.ProjectId == projectId
+ select new Comprehensive_InspectionMachineDto
+ {
+ InspectionMachineId = x.InspectionMachineId,
+ UnitName = y.UnitName,
+ InspectionMachineCode = x.InspectionMachineCode,
+ InspectionMachineName = x.InspectionMachineName,
+ ProfessionalName = Cn.ProfessionalName,
+ InspectionType = x.InspectionType,
+ SpecificationModel = x.SpecificationModel,
+ NextTestDates = string.Format("{0:yyyy-MM-dd}", x.NextTestDate),
+ TestCycle = x.TestCycle,
+ IsVerifications = x.IsVerification == true ? "是" : "否",
+ InspectionDates = string.Format("{0:yyyy-MM-dd}", x.InspectionDate),
+ IsCheckOKs = x.IsCheckOK == true ? "是" : "否",
+ UnitsCount = x.UnitsCount,
+ LeaveDates = string.Format("{0:yyyy-MM-dd}", x.LeaveDate),
+ IsOnSites = x.IsOnSite == true ? "是" : "否",
+ RemarkCode = x.RemarkCode
+ }).ToList();
+ if (!string.IsNullOrEmpty(searchText))
+ {
+ list.Where(x => x.InspectionMachineName.Contains(searchText)).ToList();
+ }
+ return list;
+ }
+
+ public static Comprehensive_InspectionMachineDto getInspectionMachine(string Id)
+ {
+
+ var list = (from x in Funs.DB.Comprehensive_InspectionMachine
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ join Cn in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals Cn.CNProfessionalId
+ where x.InspectionMachineId == Id
+ select new Comprehensive_InspectionMachineDto
+ {
+ InspectionMachineId = x.InspectionMachineId,
+ UnitName = y.UnitName,
+ InspectionMachineCode = x.InspectionMachineCode,
+ InspectionMachineName = x.InspectionMachineName,
+ ProfessionalName = Cn.ProfessionalName,
+ InspectionType = x.InspectionType,
+ SpecificationModel = x.SpecificationModel,
+ NextTestDates = string.Format("{0:yyyy-MM-dd}", x.NextTestDate),
+ TestCycle = x.TestCycle,
+ IsVerifications = x.IsVerification == true ? "是" : "否",
+ InspectionDates = string.Format("{0:yyyy-MM-dd}", x.InspectionDate),
+ IsCheckOKs = x.IsCheckOK == true ? "是" : "否",
+ UnitsCount = x.UnitsCount,
+ LeaveDates = string.Format("{0:yyyy-MM-dd}", x.LeaveDate),
+ IsOnSites = x.IsOnSite == true ? "是" : "否",
+ RemarkCode = x.RemarkCode,
+ AttachUrl = APIUpLoadFileService.getFileUrl(x.InspectionMachineId, null),
+ }).First();
+ return list;
+ }
#endregion
#region 无损检测
+ public class ProcessControl_NondestructiveTest_NewDto : Model.ProcessControl_NondestructiveTest_New
+ {
+ public string UnitName { get; set; }
+
+ public string CreateDates { get; set; }
+
+ public string AttachUrl { get; set; }
+ }
+
+ public static List getNondestructiveTest_NewList(string projectId, string searchText = "")
+ {
+ var list = (from x in Funs.DB.ProcessControl_NondestructiveTest_New
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ where x.ProjectId == projectId
+ select new ProcessControl_NondestructiveTest_NewDto
+ {
+ Id = x.Id,
+ UnitName = y.UnitName,
+ ProfessionalName = x.ProfessionalName,
+ MonthQuantity = x.MonthQuantity,
+ TotalQuantity = x.TotalQuantity,
+ MonthRate = x.MonthRate,
+ TotalRate = x.TotalRate,
+ CreateDates = string.Format("{0:yyyy-MM-dd}", x.CreateDate)
+ }).ToList();
+ return list;
+ }
+
+ public static ProcessControl_NondestructiveTest_NewDto getNondestructiveTest_New(string Id)
+ {
+ var list = (from x in Funs.DB.ProcessControl_NondestructiveTest_New
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ where x.Id == Id
+ select new ProcessControl_NondestructiveTest_NewDto
+ {
+ Id = x.Id,
+ UnitName = y.UnitName,
+ ProfessionalName = x.ProfessionalName,
+ MonthQuantity = x.MonthQuantity,
+ TotalQuantity = x.TotalQuantity,
+ MonthRate = x.MonthRate,
+ TotalRate = x.TotalRate,
+ CreateDates = string.Format("{0:yyyy-MM-dd}", x.CreateDate),
+ AttachUrl = APIUpLoadFileService.getFileUrl(x.Id, null),
+ }).First();
+ return list;
+ }
#endregion
#region 压力管道
+ public class Comprehensive_PressurePipeDto : Model.Comprehensive_PressurePipe
+ {
+ public string UnitName { get; set; }
+ public string ReportTimes { get; set; }
+ public string AttachUrl { get; set; }
+ }
+
+ public static List getPressurePipeList(string projectId, string searchText = "")
+ {
+ var list = (from x in Funs.DB.Comprehensive_PressurePipe
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ where x.Projctid == projectId
+ select new Comprehensive_PressurePipeDto
+ {
+ PressurePipeId = x.PressurePipeId,
+ UnitName = y.UnitName,
+ EstimateNumber = x.EstimateNumber,
+ ActualNumber = x.ActualNumber,
+ PackageNumber = x.PackageNumber,
+ CompletePackageNumber = x.CompletePackageNumber,
+ PressurePipeNumber = x.PressurePipeNumber,
+ IssuedReportNumber = x.IssuedReportNumber,
+ RemarkCode = x.RemarkCode,
+ ReportTimes = string.Format("{0:yyyy-MM-dd}", x.ReportTime)
+ }).ToList();
+ return list;
+ }
+
+ public static Comprehensive_PressurePipeDto getPressurePipe(string Id)
+ {
+ var list = (from x in Funs.DB.Comprehensive_PressurePipe
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ where x.PressurePipeId == Id
+ select new Comprehensive_PressurePipeDto
+ {
+ PressurePipeId = x.PressurePipeId,
+ UnitName = y.UnitName,
+ EstimateNumber = x.EstimateNumber,
+ ActualNumber = x.ActualNumber,
+ PackageNumber = x.PackageNumber,
+ CompletePackageNumber = x.CompletePackageNumber,
+ PressurePipeNumber = x.PressurePipeNumber,
+ IssuedReportNumber = x.IssuedReportNumber,
+ RemarkCode = x.RemarkCode,
+ ReportTimes = string.Format("{0:yyyy-MM-dd}", x.ReportTime),
+ AttachUrl = APIUpLoadFileService.getFileUrl(x.PressurePipeId, null),
+ }).First();
+ return list;
+ }
#endregion
#region 特种设备
+ public class Comprehensive_SpecialEquipmentDto : Model.Comprehensive_SpecialEquipment
+ {
+ public string UnitName { get; set; }
+ public string SpecialEquipmentName { get; set; }
+
+ public string ReportTimes { get; set; }
+ public string AttachUrl { get; set; }
+ }
+
+ public static List getSpecialEquipmentList(string projectId, string searchText = "")
+ {
+ var list = (from x in Funs.DB.Comprehensive_SpecialEquipment
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ join z in Funs.DB.Base_SpecialEquipment on x.EquipmentId equals z.SpecialEquipmentId
+ where x.ProjectId==projectId
+ select new Comprehensive_SpecialEquipmentDto {
+ SpecialEquipmentId=x.SpecialEquipmentId,
+ UnitName=y.UnitName,
+ SpecialEquipmentName=z.SpecialEquipmentName,
+ PositionNum=x.PositionNum,
+ SunNumber=x.SunNumber,
+ InformNumber=x.InformNumber,
+ SubmitDataNumber=x.SubmitDataNumber,
+ MonitoringReportNumber=x.MonitoringReportNumber,
+ RemarkCode = x.RemarkCode,
+ ReportTimes = string.Format("{0:yyyy-MM-dd}", x.ReportTime),
+ }
+ ).ToList();
+ return list;
+ }
+
+ public static Comprehensive_SpecialEquipmentDto getSpecialEquipment(string Id)
+ {
+ var list = (from x in Funs.DB.Comprehensive_SpecialEquipment
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ join z in Funs.DB.Base_SpecialEquipment on x.EquipmentId equals z.SpecialEquipmentId
+ where x.SpecialEquipmentId == Id
+ select new Comprehensive_SpecialEquipmentDto
+ {
+ SpecialEquipmentId = x.SpecialEquipmentId,
+ UnitName = y.UnitName,
+ SpecialEquipmentName = z.SpecialEquipmentName,
+ PositionNum = x.PositionNum,
+ SunNumber = x.SunNumber,
+ InformNumber = x.InformNumber,
+ SubmitDataNumber = x.SubmitDataNumber,
+ MonitoringReportNumber = x.MonitoringReportNumber,
+ RemarkCode = x.RemarkCode,
+ ReportTimes = string.Format("{0:yyyy-MM-dd}", x.ReportTime),
+ AttachUrl = APIUpLoadFileService.getFileUrl(x.SpecialEquipmentId, null),
+ }
+ ).First();
+ return list;
+ }
+ #endregion
+
+ #region 控制点检查检测
+
+ #endregion
+
+ #region 控制点检查检测合格率统计
+ public static DateTime NextDate;
+ public static DateTime NewDate;
+ public static DateTime EndDate;
+ public static List getInspectionManagementStatisticsList(string projectId, string searchText = "") {
+ var StatisticsList = new List();
+ Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(projectId);
+ var StartDate = Convert.ToDateTime(project.StartDate);
+
+
+ for (int i = 0; i < i + 1; i++)
+ {
+ Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics();
+ if (i == 0)
+ {
+ NextDate = Convert.ToDateTime(DateTime.Parse(StartDate.ToString("yyyy-MM-dd")).AddMonths(1).ToShortDateString());
+ NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25");
+ Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 ";
+ if (StartDate.Day < 25)
+ {
+ if (DateTime.Now < NewDate)
+ {
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, DateTime.Now, true);
+
+ Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ Statistics.SunNumber = managementListSunNumber.Count();
+ Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
+ if (managementListSunNumber.Count() != 0)//被除数不能为零
+ {
+ Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Statistics.OneStatistics = "0%";
+ }
+ StatisticsList.Add(Statistics);
+ break;
+ }
+ else
+ {
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25");
+
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, NewDate, true);
+
+ Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate);
+ Statistics.SunNumber = managementListSunNumber.Count();
+ Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
+ if (managementListSunNumber.Count() != 0)//被除数不能为零
+ {
+ Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Statistics.OneStatistics = "0%";
+ }
+ }
+ }
+ else
+ {
+ if (DateTime.Now < NewDate)
+ {
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, DateTime.Now, true);
+
+
+
+ Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ Statistics.SunNumber = managementListSunNumber.Count();
+ Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
+ if (managementListSunNumber.Count() != 0)//被除数不能为零
+ {
+ Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Statistics.OneStatistics = "0%";
+ }
+
+ StatisticsList.Add(Statistics);
+ break;
+ }
+ else
+ {
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, NewDate, true);
+
+ Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
+ Statistics.SunNumber = managementListSunNumber.Count();
+ Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
+ if (managementListSunNumber.Count() != 0)//被除数不能为零
+ {
+ Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Statistics.OneStatistics = "0%";
+ }
+ }
+ }
+ }
+ else
+ {
+
+ if (StartDate.Day > 25)
+ {
+ Statistics.CheckDate = NewDate.Year + "-" + NewDate.Month + "-" + (NewDate.Day + 1) + " 至 ";
+ StartDate = Convert.ToDateTime(NewDate.Year + "-" + NewDate.Month + "-" + (NewDate.Day + 1));//获取上一记录的结束日期加一天为本次记录的开始日期
+ }
+ else
+ {
+ Statistics.CheckDate = NextDate.Year + "-" + NextDate.Month + "-" + (NextDate.Day + 1) + " 至 ";
+ StartDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-" + (NextDate.Day + 1));//获取上一记录的结束日期加一天为本次记录的开始日期
+ }
+
+ NextDate = Convert.ToDateTime(DateTime.Parse(NextDate.ToString("yyyy-MM-dd")).AddMonths(1).ToShortDateString());
+ NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25");
+ if (DateTime.Now < NewDate)
+ {
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, DateTime.Now, true);
+
+ Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ Statistics.SunNumber = managementListSunNumber.Count();
+ Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
+ if (managementListSunNumber.Count() != 0)//被除数不能为零
+ {
+ Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Statistics.OneStatistics = "0%";
+ }
+
+ StatisticsList.Add(Statistics);
+ break;
+ }
+ else
+ {
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, NewDate, true);
+
+ Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
+ Statistics.SunNumber = managementListSunNumber.Count();
+ Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
+ if (managementListSunNumber.Count() != 0)//被除数不能为零
+ {
+ Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Statistics.OneStatistics = "0%";
+ }
+ }
+ }
+ StatisticsList.Add(Statistics);
+
+ }
+ return StatisticsList;
+ }
#endregion
}
}
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
index 63722353..cb873201 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
@@ -1,7 +1,7 @@
- Debug|Any CPU
+ Release|Any CPU
true
false
diff --git a/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs b/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs
index bb3472d0..721ea0ce 100644
--- a/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs
+++ b/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs
@@ -224,32 +224,305 @@ namespace WebAPI.Controllers.CQMS
#endregion
#region 材料报验
+ //
+ ///
+ /// 材料报验列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getInspectionEquipmentList(string projectId, string serachText = "", int pageIndex = 0)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ var getDataList = QualityAssuranceService.getInspectionEquipmentList(projectId, serachText);
+ int pageCount = getDataList.Count();
+ if (pageCount > 0 && pageIndex > 0)
+ {
+ getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
+ }
+ responeData.data = new { pageCount, getDataList };
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+ ///
+ /// 材料报验详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getInspectionEquipment(string Id)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = QualityAssuranceService.getInspectionEquipment(Id);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
#endregion
#region 机具报验
+ ///
+ /// 机具报验列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getInspectionMachineList(string projectId, string serachText = "", int pageIndex = 0)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ var getDataList = QualityAssuranceService.getInspectionMachineList(projectId, serachText);
+ int pageCount = getDataList.Count();
+ if (pageCount > 0 && pageIndex > 0)
+ {
+ getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
+ }
+ responeData.data = new { pageCount, getDataList };
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
- #endregion
+ ///
+ /// 机具报验详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getInspectionMachine(string Id)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = QualityAssuranceService.getInspectionMachine(Id);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
- #region 设计变更
-
- #endregion
-
- #region 共捡数据
+ return responeData;
+ }
#endregion
#region 无损检测
+ ///
+ /// 无损检测列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getNondestructiveTest_NewList(string projectId, string serachText = "", int pageIndex = 0)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ var getDataList = QualityAssuranceService.getNondestructiveTest_NewList(projectId, serachText);
+ int pageCount = getDataList.Count();
+ if (pageCount > 0 && pageIndex > 0)
+ {
+ getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
+ }
+ responeData.data = new { pageCount, getDataList };
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+ ///
+ /// 无损检测详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getNondestructiveTest_New(string Id)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = QualityAssuranceService.getNondestructiveTest_New(Id);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
#endregion
#region 压力管道
+ ///
+ /// 压力管道列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getPressurePipeList(string projectId, string serachText = "", int pageIndex = 0)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ var getDataList = QualityAssuranceService.getPressurePipeList(projectId, serachText);
+ int pageCount = getDataList.Count();
+ if (pageCount > 0 && pageIndex > 0)
+ {
+ getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
+ }
+ responeData.data = new { pageCount, getDataList };
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+ ///
+ /// 压力管道详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getPressurePipe(string Id)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = QualityAssuranceService.getPressurePipe(Id);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
#endregion
#region 特种设备
+ ///
+ /// 特种设备列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getSpecialEquipmentList(string projectId, string serachText = "", int pageIndex = 0)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ var getDataList = QualityAssuranceService.getSpecialEquipmentList(projectId, serachText);
+ int pageCount = getDataList.Count();
+ if (pageCount > 0 && pageIndex > 0)
+ {
+ getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
+ }
+ responeData.data = new { pageCount, getDataList };
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+
+ ///
+ /// 特种设备详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getSpecialEquipment(string Id)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = QualityAssuranceService.getSpecialEquipment(Id);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
+ #endregion
+
+ #region 控制点检查检测
#endregion
+ #region 控制点检查检测合格率统计
+ ///
+ /// 控制点检查检测合格率统计列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public Model.ResponeData getInspectionManagementStatisticsList(string projectId, string serachText = "", int pageIndex = 0)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ var getDataList = QualityAssuranceService.getInspectionManagementStatisticsList(projectId, serachText);
+ int pageCount = getDataList.Count();
+ if (pageCount > 0 && pageIndex > 0)
+ {
+ getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
+ }
+ responeData.data = new { pageCount, getDataList };
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
index 0b28c5f2..bfeae44c 100644
--- a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -6,7 +6,7 @@
<_PublishTargetUrl>E:\Package\中国五环工程有限公司\SGGLAPI
- True|2024-09-19T08:30:51.3047517Z;True|2024-09-19T15:53:23.2431713+08:00;True|2024-09-19T15:48:55.0571748+08:00;True|2024-09-19T15:06:29.5748482+08:00;True|2024-09-19T14:55:42.1477578+08:00;True|2024-09-19T10:07:53.8666329+08:00;True|2024-09-03T16:26:17.4985546+08:00;True|2024-07-17T10:29:15.9472548+08:00;
+ True|2024-09-20T07:28:40.2547949Z;True|2024-09-19T16:30:51.3047517+08:00;True|2024-09-19T15:53:23.2431713+08:00;True|2024-09-19T15:48:55.0571748+08:00;True|2024-09-19T15:06:29.5748482+08:00;True|2024-09-19T14:55:42.1477578+08:00;True|2024-09-19T10:07:53.8666329+08:00;True|2024-09-03T16:26:17.4985546+08:00;True|2024-07-17T10:29:15.9472548+08:00;
@@ -86,22 +86,22 @@
03/11/2024 11:33:45
- 09/19/2024 16:30:47
+ 09/20/2024 15:28:39
- 09/19/2024 16:30:47
+ 09/20/2024 15:28:39
03/11/2024 11:23:37
- 09/19/2024 16:30:34
+ 09/20/2024 15:28:21
05/22/2024 09:42:30
- 09/19/2024 16:30:34
+ 09/20/2024 15:28:21
12/18/2020 05:32:28
@@ -128,10 +128,10 @@
07/25/2012 19:48:56
- 09/19/2024 15:48:28
+ 09/20/2024 15:28:18
- 09/19/2024 15:48:28
+ 09/20/2024 15:28:18
03/11/2024 11:17:08
@@ -383,13 +383,13 @@
02/09/2013 00:42:28
- 09/19/2024 16:30:34
+ 09/20/2024 15:28:22
- 09/19/2024 16:30:34
+ 09/20/2024 15:28:22
- 09/19/2024 16:30:34
+ 09/20/2024 15:28:22
01/23/2014 21:57:34
@@ -473,7 +473,7 @@
03/11/2024 11:23:37
- 09/19/2024 16:30:37
+ 09/20/2024 15:28:23
03/11/2024 11:23:37
diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user
index 71396b97..df2b89c2 100644
--- a/SGGL/WebAPI/WebAPI.csproj.user
+++ b/SGGL/WebAPI/WebAPI.csproj.user
@@ -1,7 +1,7 @@
- Debug|Any CPU
+ Release|Any CPU
true