增加质量小程序
This commit is contained in:
@@ -9,7 +9,8 @@ namespace BLL
|
||||
public class QualityAssuranceService
|
||||
{
|
||||
#region 设计交底
|
||||
public class Comprehensive_DesignDetailsDto : Model.Comprehensive_DesignDetails {
|
||||
public class Comprehensive_DesignDetailsDto : Model.Comprehensive_DesignDetails
|
||||
{
|
||||
/// <summary>
|
||||
/// 专业名称
|
||||
/// </summary>
|
||||
@@ -33,20 +34,21 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Comprehensive_DesignDetailsDto> getDesignDetailsList(string projectId,string cNProfessionalId="") {
|
||||
public static List<Comprehensive_DesignDetailsDto> 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
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
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<Comprehensive_ConTechnologyDisclosureDto> getConTechnologyDisclosureList(string projectId, string cNProfessionalId = "") {
|
||||
public static List<Comprehensive_ConTechnologyDisclosureDto> 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; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -285,16 +298,32 @@ namespace BLL
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="searchText"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Comprehensive_InspectionPersonDto> getInspectionPersonList(string projectId, string searchText = "") {
|
||||
public static List<Comprehensive_InspectionPersonDto> 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<Comprehensive_InspectionEquipmentDto> 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<Comprehensive_InspectionMachineDto> 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<ProcessControl_NondestructiveTest_NewDto> 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<Comprehensive_PressurePipeDto> 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<Comprehensive_SpecialEquipmentDto> 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<Model.InspectionManagementStatistics> getInspectionManagementStatisticsList(string projectId, string searchText = "") {
|
||||
var StatisticsList = new List<Model.InspectionManagementStatistics>();
|
||||
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<Model.ProcessControl_InspectionManagement> managementListSunNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
List<Model.ProcessControl_InspectionManagement> managementListOneNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
|
||||
//统计所给事件段的全部数量
|
||||
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<Model.ProcessControl_InspectionManagement> managementListSunNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
List<Model.ProcessControl_InspectionManagement> managementListOneNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
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<Model.ProcessControl_InspectionManagement> managementListSunNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
List<Model.ProcessControl_InspectionManagement> managementListOneNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
|
||||
//统计所给事件段的全部数量
|
||||
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<Model.ProcessControl_InspectionManagement> managementListSunNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
List<Model.ProcessControl_InspectionManagement> managementListOneNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
|
||||
//统计所给事件段的全部数量
|
||||
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<Model.ProcessControl_InspectionManagement> managementListSunNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
List<Model.ProcessControl_InspectionManagement> managementListOneNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
|
||||
//统计所给事件段的全部数量
|
||||
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<Model.ProcessControl_InspectionManagement> managementListSunNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
List<Model.ProcessControl_InspectionManagement> managementListOneNumber = new List<Model.ProcessControl_InspectionManagement>();
|
||||
|
||||
//统计所给事件段的全部数量
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user