From 1aeb40d1dfc33581f1cc4b76139ec644c3e035f6 Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Fri, 20 Sep 2024 08:49:45 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CQMS/ApiInspectionManagementService.cs | 393 ++++++++++++++++++ SGGL/BLL/API/CQMS/BreakdownProjectService.cs | 51 +++ SGGL/BLL/API/CQMS/QualityAssuranceService.cs | 349 ++++++++++++++++ SGGL/BLL/BLL.csproj | 3 + SGGL/FineUIPro.Web/Web.config | 2 +- SGGL/Model/CQMS/BreakdownProject.cs | 30 ++ SGGL/Model/CQMS/InspectionManagement.cs | 51 +++ SGGL/Model/CQMS/InspectionManagementDetail.cs | 27 ++ SGGL/Model/Model.csproj | 3 + .../CQMS/CQMSConstructSolutionController.cs | 3 + .../CQMS/InspectionManagementController.cs | 127 ++++++ .../CQMS/QualityAssuranceController.cs | 255 ++++++++++++ .../PublishProfiles/FolderProfile.pubxml.user | 234 +++++------ SGGL/WebAPI/WebAPI.csproj | 2 + SGGL/WebAPI/WebAPI.csproj.user | 2 +- 15 files changed, 1413 insertions(+), 119 deletions(-) create mode 100644 SGGL/BLL/API/CQMS/ApiInspectionManagementService.cs create mode 100644 SGGL/BLL/API/CQMS/BreakdownProjectService.cs create mode 100644 SGGL/BLL/API/CQMS/QualityAssuranceService.cs create mode 100644 SGGL/Model/CQMS/BreakdownProject.cs create mode 100644 SGGL/Model/CQMS/InspectionManagement.cs create mode 100644 SGGL/Model/CQMS/InspectionManagementDetail.cs create mode 100644 SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs diff --git a/SGGL/BLL/API/CQMS/ApiInspectionManagementService.cs b/SGGL/BLL/API/CQMS/ApiInspectionManagementService.cs new file mode 100644 index 00000000..9864e81f --- /dev/null +++ b/SGGL/BLL/API/CQMS/ApiInspectionManagementService.cs @@ -0,0 +1,393 @@ +using Model.CQMS; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.API.CQMS +{ + public class ApiInspectionManagementService + { + public static bool AddInspectionManagement(InspectionManagement inspectionManagement) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.ProcessControl_InspectionManagement newInspectionManagement = null; + if (!string.IsNullOrEmpty(inspectionManagement.InspectionId)) + { + newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(x => x.InspectionId == inspectionManagement.InspectionId); + } + if (newInspectionManagement == null) + { + newInspectionManagement = new Model.ProcessControl_InspectionManagement(); + newInspectionManagement.InspectionId = Guid.NewGuid().ToString(); + } + newInspectionManagement.InspectionId = inspectionManagement.InspectionId; + newInspectionManagement.ProjectId = inspectionManagement.ProjectId; + newInspectionManagement.UnitId = inspectionManagement.UnitId; + newInspectionManagement.CNProfessionalId = inspectionManagement.CNProfessionalId; + newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode; + newInspectionManagement.UnitWorkId = inspectionManagement.UnitWorkId; + newInspectionManagement.Branch = inspectionManagement.Branch; + newInspectionManagement.ControlPointType = inspectionManagement.ControlPointType; + newInspectionManagement.AcceptanceSite = inspectionManagement.AcceptanceSite; + newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified == "true" ? true : false; + if (!string.IsNullOrEmpty(inspectionManagement.InspectionDate)) + newInspectionManagement.InspectionDate = DateTime.Parse(inspectionManagement.InspectionDate); + newInspectionManagement.AttachUrl = inspectionManagement.AttachUrl; + newInspectionManagement.AttachUrl2 = inspectionManagement.AttachUrl2; + newInspectionManagement.NoticeCode = inspectionManagement.NoticeCode; + newInspectionManagement.ParentDivisionProjectId = inspectionManagement.ParentDivisionProjectId; + if (!string.IsNullOrEmpty(inspectionManagement.CheckDate)) + newInspectionManagement.CheckDate = DateTime.Parse(inspectionManagement.CheckDate); + newInspectionManagement.CheckMan = inspectionManagement.CheckMan; + newInspectionManagement.CompileMan = inspectionManagement.CompileMan; + //newInspectionManagement.CompileMan2 = inspectionManagement.CompileMan2; + if (!string.IsNullOrEmpty(inspectionManagement.CompileDate)) + newInspectionManagement.CompileDate = DateTime.Parse(inspectionManagement.CompileDate); + newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason; + newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan; + newInspectionManagement.FileType = inspectionManagement.FileType; + //newInspectionManagement.CCUnitIds = inspectionManagement.CCUnitIds; + //newInspectionManagement.MainSendUnitId = inspectionManagement.MainSendUnitId; + //newInspectionManagement.AuditMan = inspectionManagement.AuditMan; + //newInspectionManagement.Status = inspectionManagement.Status; + //if (!string.IsNullOrEmpty(inspectionManagement.PlanComplateDate)) + // newInspectionManagement.PlanComplateDate = DateTime.Parse(inspectionManagement.PlanComplateDate); + db.ProcessControl_InspectionManagement.InsertOnSubmit(newInspectionManagement); + db.SubmitChanges(); + + foreach (var InspectionDetail in inspectionManagement.inspectionManagementDetails) + + { + Model.ProcessControl_InspectionManagementDetail newInspectionDetail = new Model.ProcessControl_InspectionManagementDetail(); + newInspectionDetail.InspectionDetailId = InspectionDetail.InspectionDetailId; + newInspectionDetail.InspectionId = newInspectionManagement.InspectionId; + newInspectionDetail.UnitWorkId = InspectionDetail.UnitWorkId; + newInspectionDetail.Branch = InspectionDetail.Branch; + newInspectionDetail.ControlPointType = InspectionDetail.ControlPointType; + if (!string.IsNullOrEmpty(InspectionDetail.CreateDate)) + newInspectionDetail.CreateDate = DateTime.Parse(InspectionDetail.CreateDate); + + db.ProcessControl_InspectionManagementDetail.InsertOnSubmit(newInspectionDetail); + } + db.SubmitChanges(); + } + return true; + } + + /// + /// 获取分部 + /// + /// + /// + protected static string ConvertBranch(object Branch) + { + string name = string.Empty; + if (Branch != null) + { + var branch = BLL.DivisionProjectService.GetDivisionProjectById(Branch.ToString()); + if (branch != null) + { + name = branch.DivisionName; + } + } + return name; + } + + /// + /// 获取控制点内容 + /// + /// + /// + protected static string ConvertControlPointType(object ControlPointType) + { + string name = string.Empty; + if (ControlPointType != null) + { + var controlPointType = BLL.BreakdownProjectService.GetBreakdownProjectById(ControlPointType.ToString()); + if (controlPointType != null) + { + name = controlPointType.BreakdownName; + } + } + return name; + } + + /// + /// 获取控制点等级 + /// + /// + /// + protected static string ConvertClass(object ControlPointType) + { + string name = string.Empty; + if (ControlPointType != null) + { + var controlPointType = BLL.BreakdownProjectService.GetBreakdownProjectById(ControlPointType.ToString()); + if (controlPointType != null) + { + name = controlPointType.Class; + } + } + return name; + } + + public static List getInspectionManagementDetail(string projectId, int index, int page, string state, string name) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var dataList = from x in db.ProcessControl_InspectionManagementDetail + where x.ProcessControl_InspectionManagement.ProjectId == projectId + select x; + var listRes = dataList.Skip(index * page).Take(page); + + List list = new List(); + foreach (var item in listRes) + { + InspectionManagementDetail detail = new InspectionManagementDetail() + { + InspectionDetailId = item.InspectionDetailId, + UnitWorkId = item.UnitWorkId, + UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.UnitWorkId).UnitWorkName, + ControlPointType = item.ControlPointType, + CreateDate = item.CreateDate.HasValue ? item.CreateDate.Value.ToString("yyyy-MM-dd") : "", + Branch = item.Branch, + + BranchName= ConvertBranch(item.Branch), + ControlPointTypeName= ConvertControlPointType(item.ControlPointType), + ControlPointTypeLevel= ConvertClass(item.ControlPointType) + }; + InspectionManagement inspectionManagement = new InspectionManagement(); + + inspectionManagement.InspectionId = item.ProcessControl_InspectionManagement.InspectionId; + inspectionManagement.ProjectId = item.ProcessControl_InspectionManagement.ProjectId; + inspectionManagement.ProjectName = db.Base_Project.FirstOrDefault(x => x.ProjectId == item.ProcessControl_InspectionManagement.ProjectId).ProjectName; + inspectionManagement.UnitId = item.ProcessControl_InspectionManagement.UnitId; + inspectionManagement.UnitName = db.Base_Unit.FirstOrDefault(x => x.UnitId == item.ProcessControl_InspectionManagement.UnitId).UnitName; + inspectionManagement.CNProfessionalId = item.ProcessControl_InspectionManagement.CNProfessionalId; + if (!string.IsNullOrEmpty(inspectionManagement.CNProfessionalId)) + { + inspectionManagement.CNProfessionalName = db.Base_CNProfessional.FirstOrDefault(x => x.CNProfessionalId == item.ProcessControl_InspectionManagement.CNProfessionalId).ProfessionalName; + } + inspectionManagement.InspectionCode = item.ProcessControl_InspectionManagement.InspectionCode; + inspectionManagement.UnitWorkId = item.ProcessControl_InspectionManagement.UnitWorkId; + if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId)) + { + inspectionManagement.UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.ProcessControl_InspectionManagement.UnitWorkId).UnitWorkName; + } + inspectionManagement.Branch = item.ProcessControl_InspectionManagement.Branch; + inspectionManagement.ControlPointType = item.ProcessControl_InspectionManagement.ControlPointType; + inspectionManagement.AcceptanceSite = item.ProcessControl_InspectionManagement.AcceptanceSite; + inspectionManagement.IsOnceQualified = item.ProcessControl_InspectionManagement.IsOnceQualified.HasValue ? item.ProcessControl_InspectionManagement.IsOnceQualified.Value.ToString() : ""; + inspectionManagement.InspectionDate = item.ProcessControl_InspectionManagement.InspectionDate.HasValue ? "" : ""; + inspectionManagement.AttachUrl = item.ProcessControl_InspectionManagement.AttachUrl; + inspectionManagement.CheckDate = item.ProcessControl_InspectionManagement.CheckDate.HasValue ? item.ProcessControl_InspectionManagement.CheckDate.Value.ToString("yyyy-MM-dd") : ""; + inspectionManagement.CheckMan = item.ProcessControl_InspectionManagement.CheckMan; + inspectionManagement.CheckMan = item.ProcessControl_InspectionManagement.CheckMan; + inspectionManagement.UnqualifiedReason = item.ProcessControl_InspectionManagement.UnqualifiedReason; + inspectionManagement.NoticeCode = item.ProcessControl_InspectionManagement.NoticeCode; + inspectionManagement.AcceptanceCheckMan = item.ProcessControl_InspectionManagement.AcceptanceCheckMan; + inspectionManagement.ParentDivisionProjectId = item.ProcessControl_InspectionManagement.ParentDivisionProjectId; + inspectionManagement.CompileMan = item.ProcessControl_InspectionManagement.CompileMan; + if (!string.IsNullOrEmpty(inspectionManagement.CompileMan)) + { + inspectionManagement.CompileManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.ProcessControl_InspectionManagement.CompileMan).UserName; //item.ProcessControl_InspectionManagement.CompileManName; + } + inspectionManagement.CompileDate = item.ProcessControl_InspectionManagement.CompileDate.HasValue ? item.ProcessControl_InspectionManagement.CompileDate.Value.ToString("yyyy-MM-dd") : ""; + inspectionManagement.FileType = item.ProcessControl_InspectionManagement.FileType; + inspectionManagement.AttachUrl2 = item.ProcessControl_InspectionManagement.AttachUrl2; + //inspectionManagement.MainSendUnitId = item.ProcessControl_InspectionManagement.MainSendUnitId; + if (!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId)) + inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.ProcessControl_InspectionManagement.MainSendUnitName; + //inspectionManagement.CCUnitIds = item.ProcessControl_InspectionManagement.CCUnitIds; + if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds)) + { + inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.ProcessControl_InspectionManagement.CCUnitName; + } + //inspectionManagement.PlanComplateDate = item.ProcessControl_InspectionManagement.PlanComplateDate.HasValue ? item.ProcessControl_InspectionManagement.PlanComplateDate.Value.ToString("yyyy-MM-dd") : ""; + + //inspectionManagement.Status = item.ProcessControl_InspectionManagement.Status; + //inspectionManagement.CompileMan2 = item.ProcessControl_InspectionManagement.CompileMan2; + + //inspectionManagement.AuditMan = item.ProcessControl_InspectionManagement.AuditMan; + //if (!string.IsNullOrEmpty(inspectionManagement.AuditMan)) + //{ inspectionManagement.AuditManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.ProcessControl_InspectionManagement.AuditMan).UserName; } + detail.inspectionManagement = inspectionManagement; + list.Add(detail); + } + return list; + } + } + public static List getInspectionManagement(string projectId, int index, int page, string state, string name) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var dataList = from x in db.ProcessControl_InspectionManagement + where x.ProjectId == projectId + select x; + var listRes = dataList.Skip(index * page).Take(page); + + List list = new List(); + foreach (var item in listRes) + { + + InspectionManagement inspectionManagement = new InspectionManagement(); + + inspectionManagement.InspectionId = item.InspectionId; + inspectionManagement.ProjectId = item.ProjectId; + inspectionManagement.ProjectName = db.Base_Project.FirstOrDefault(x => x.ProjectId == item.ProjectId).ProjectName; + inspectionManagement.UnitId = item.UnitId; + inspectionManagement.UnitName = db.Base_Unit.FirstOrDefault(x => x.UnitId == item.UnitId).UnitName; + inspectionManagement.CNProfessionalId = item.CNProfessionalId; + + + + + if (!string.IsNullOrEmpty(inspectionManagement.CNProfessionalId)) + { + inspectionManagement.CNProfessionalName = db.Base_CNProfessional.FirstOrDefault(x => x.CNProfessionalId == item.CNProfessionalId).ProfessionalName; + } + inspectionManagement.InspectionCode = item.InspectionCode; + inspectionManagement.UnitWorkId = item.UnitWorkId; + if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId)) + { + inspectionManagement.UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.UnitWorkId).UnitWorkName; + } + inspectionManagement.Branch = item.Branch; + inspectionManagement.ControlPointType = item.ControlPointType; + inspectionManagement.AcceptanceSite = item.AcceptanceSite; + inspectionManagement.IsOnceQualified = item.IsOnceQualified.HasValue ? item.IsOnceQualified.Value.ToString() : ""; + inspectionManagement.InspectionDate = item.InspectionDate.HasValue ? "" : ""; + inspectionManagement.AttachUrl = item.AttachUrl; + inspectionManagement.CheckDate = item.CheckDate.HasValue ? item.CheckDate.Value.ToString("yyyy-MM-dd") : ""; + inspectionManagement.CheckMan = item.CheckMan; + inspectionManagement.CheckMan = item.CheckMan; + inspectionManagement.UnqualifiedReason = item.UnqualifiedReason; + inspectionManagement.NoticeCode = item.NoticeCode; + inspectionManagement.AcceptanceCheckMan = item.AcceptanceCheckMan; + inspectionManagement.ParentDivisionProjectId = item.ParentDivisionProjectId; + inspectionManagement.CompileMan = item.CompileMan; + if (!string.IsNullOrEmpty(inspectionManagement.CompileMan)) + { + inspectionManagement.CompileManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.CompileMan).UserName; //item.CompileManName; + } + inspectionManagement.CompileDate = item.CompileDate.HasValue ? item.CompileDate.Value.ToString("yyyy-MM-dd") : ""; + inspectionManagement.FileType = item.FileType; + inspectionManagement.AttachUrl2 = item.AttachUrl2; + //inspectionManagement.MainSendUnitId = item.MainSendUnitId; + if (!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId)) + inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.MainSendUnitName; + //inspectionManagement.CCUnitIds = item.CCUnitIds; + if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds)) + { + inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.CCUnitName; + } + //inspectionManagement.PlanComplateDate = item.PlanComplateDate.HasValue ? item.PlanComplateDate.Value.ToString("yyyy-MM-dd") : ""; + + //inspectionManagement.Status = item.Status; + //inspectionManagement.CompileMan2 = item.CompileMan2; + + //inspectionManagement.AuditMan = item.AuditMan; + //if (!string.IsNullOrEmpty(inspectionManagement.AuditMan)) + //{ inspectionManagement.AuditManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.AuditMan).UserName; } + + list.Add(inspectionManagement); + } + return list; + } + } + + + + + public static List getInspectionManagementDetailByinspectionId(string inspectionId) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var dataList = from x in db.ProcessControl_InspectionManagementDetail + where x.InspectionId == inspectionId + select x; + var listRes = dataList.ToList(); + + List list = new List(); + foreach (var item in listRes) + { + InspectionManagementDetail detail = new InspectionManagementDetail(){ }; + detail.InspectionDetailId = item.InspectionDetailId; + detail.UnitWorkId = item.UnitWorkId; + detail.UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.UnitWorkId).UnitWorkName; + detail.ControlPointType = item.ControlPointType; + detail.CreateDate = item.CreateDate.HasValue ? item.CreateDate.Value.ToString("yyyy-MM-dd") : ""; + detail.Branch = item.Branch; + detail.BranchName = ConvertBranch(item.Branch); + detail.ControlPointTypeName = ConvertControlPointType(item.ControlPointType); + detail.ControlPointTypeLevel = ConvertClass(item.ControlPointType); + + InspectionManagement inspectionManagement = new InspectionManagement(); + + inspectionManagement.InspectionId = item.ProcessControl_InspectionManagement.InspectionId; + inspectionManagement.ProjectId = item.ProcessControl_InspectionManagement.ProjectId; + inspectionManagement.ProjectName = db.Base_Project.FirstOrDefault(x => x.ProjectId == item.ProcessControl_InspectionManagement.ProjectId).ProjectName; + inspectionManagement.UnitId = item.ProcessControl_InspectionManagement.UnitId; + inspectionManagement.UnitName = db.Base_Unit.FirstOrDefault(x => x.UnitId == item.ProcessControl_InspectionManagement.UnitId).UnitName; + inspectionManagement.CNProfessionalId = item.ProcessControl_InspectionManagement.CNProfessionalId; + if (!string.IsNullOrEmpty(inspectionManagement.CNProfessionalId)) + { + inspectionManagement.CNProfessionalName = db.Base_CNProfessional.FirstOrDefault(x => x.CNProfessionalId == item.ProcessControl_InspectionManagement.CNProfessionalId).ProfessionalName; + } + inspectionManagement.InspectionCode = item.ProcessControl_InspectionManagement.InspectionCode; + inspectionManagement.UnitWorkId = item.ProcessControl_InspectionManagement.UnitWorkId; + if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId)) + { + inspectionManagement.UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.ProcessControl_InspectionManagement.UnitWorkId).UnitWorkName; + } + inspectionManagement.Branch = item.ProcessControl_InspectionManagement.Branch; + inspectionManagement.ControlPointType = item.ProcessControl_InspectionManagement.ControlPointType; + inspectionManagement.AcceptanceSite = item.ProcessControl_InspectionManagement.AcceptanceSite; + inspectionManagement.IsOnceQualified = item.ProcessControl_InspectionManagement.IsOnceQualified.HasValue ? item.ProcessControl_InspectionManagement.IsOnceQualified.Value.ToString() : ""; + inspectionManagement.InspectionDate = item.ProcessControl_InspectionManagement.InspectionDate.HasValue ? "" : ""; + + //inspectionManagement.AttachUrl = item.ProcessControl_InspectionManagement.AttachUrl; + inspectionManagement.AttachUrl = APIUpLoadFileService.getFileUrl(item.InspectionId, null); + + inspectionManagement.CheckDate = item.ProcessControl_InspectionManagement.CheckDate.HasValue ? item.ProcessControl_InspectionManagement.CheckDate.Value.ToString("yyyy-MM-dd") : ""; + inspectionManagement.CheckMan = item.ProcessControl_InspectionManagement.CheckMan; + inspectionManagement.CheckMan = item.ProcessControl_InspectionManagement.CheckMan; + inspectionManagement.UnqualifiedReason = item.ProcessControl_InspectionManagement.UnqualifiedReason; + inspectionManagement.NoticeCode = item.ProcessControl_InspectionManagement.NoticeCode; + inspectionManagement.AcceptanceCheckMan = item.ProcessControl_InspectionManagement.AcceptanceCheckMan; + inspectionManagement.ParentDivisionProjectId = item.ProcessControl_InspectionManagement.ParentDivisionProjectId; + inspectionManagement.CompileMan = item.ProcessControl_InspectionManagement.CompileMan; + if (!string.IsNullOrEmpty(inspectionManagement.CompileMan)) + { + inspectionManagement.CompileManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.ProcessControl_InspectionManagement.CompileMan).UserName; //item.ProcessControl_InspectionManagement.CompileManName; + } + inspectionManagement.CompileDate = item.ProcessControl_InspectionManagement.CompileDate.HasValue ? item.ProcessControl_InspectionManagement.CompileDate.Value.ToString("yyyy-MM-dd") : ""; + inspectionManagement.FileType = item.ProcessControl_InspectionManagement.FileType; + inspectionManagement.AttachUrl2 = item.ProcessControl_InspectionManagement.AttachUrl2; + //inspectionManagement.MainSendUnitId = item.ProcessControl_InspectionManagement.MainSendUnitId; + if (!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId)) + inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.ProcessControl_InspectionManagement.MainSendUnitName; + //inspectionManagement.CCUnitIds = item.ProcessControl_InspectionManagement.CCUnitIds; + if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds)) + { + inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.ProcessControl_InspectionManagement.CCUnitName; + } + //inspectionManagement.PlanComplateDate = item.ProcessControl_InspectionManagement.PlanComplateDate.HasValue ? item.ProcessControl_InspectionManagement.PlanComplateDate.Value.ToString("yyyy-MM-dd") : ""; + + //inspectionManagement.Status = item.ProcessControl_InspectionManagement.Status; + //inspectionManagement.CompileMan2 = item.ProcessControl_InspectionManagement.CompileMan2; + + //inspectionManagement.AuditMan = item.ProcessControl_InspectionManagement.AuditMan; + //if (!string.IsNullOrEmpty(inspectionManagement.AuditMan)) + //{ inspectionManagement.AuditManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.ProcessControl_InspectionManagement.AuditMan).UserName; } + detail.inspectionManagement = inspectionManagement; + list.Add(detail); + } + return list; + } + } + } +} diff --git a/SGGL/BLL/API/CQMS/BreakdownProjectService.cs b/SGGL/BLL/API/CQMS/BreakdownProjectService.cs new file mode 100644 index 00000000..13e619e5 --- /dev/null +++ b/SGGL/BLL/API/CQMS/BreakdownProjectService.cs @@ -0,0 +1,51 @@ +using Model.CQMS; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.API.CQMS +{ + public class BreakdownProjectService + { + public static List getBreakdowns(string projectId, string keyWord) + { + List res = new List(); + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var q = from x in db.View_WBS_BreakdownProject + where x.ProjectId == projectId && x.IsSelected == true + where keyWord == "" || x.BreakdownName.Contains(keyWord) + select x; + var list = q.ToList(); + foreach (var item in list) + { + BreakdownProject breakdownProject = new BreakdownProject(); + breakdownProject.AttachUrl = item.AttachUrl; + breakdownProject.BreakdownProjectId = item.BreakdownProjectId; + breakdownProject.ProjectId = item.ProjectId; + breakdownProject.BreakdownCode = item.BreakdownCode; + breakdownProject.BreakdownName = item.BreakdownName; + breakdownProject.DivisionProjectId = item.DivisionProjectId; + breakdownProject.Basis = item.Basis; + breakdownProject.CheckPoints = item.CheckPoints; + breakdownProject.RecordAndCode = item.RecordAndCode; + breakdownProject.Class = item.Class; + breakdownProject.SortIndex = item.SortIndex.HasValue ? item.SortIndex.Value.ToString() : ""; + breakdownProject.Remark = item.Remark; + breakdownProject.AttachUrl = item.AttachUrl; + breakdownProject.IsAcceptance = item.IsAcceptance.HasValue ? item.IsAcceptance.Value.ToString() : ""; + breakdownProject.FenBao = item.FenBao; + breakdownProject.WuHuan = item.WuHuan; + breakdownProject.JianLi = item.JianLi; + breakdownProject.YeZhu = item.YeZhu; + breakdownProject.IsSelected = item.IsSelected.HasValue ? "" : ""; + res.Add(breakdownProject); + + } + } + return res; + } + } +} diff --git a/SGGL/BLL/API/CQMS/QualityAssuranceService.cs b/SGGL/BLL/API/CQMS/QualityAssuranceService.cs new file mode 100644 index 00000000..fd40ded0 --- /dev/null +++ b/SGGL/BLL/API/CQMS/QualityAssuranceService.cs @@ -0,0 +1,349 @@ + +using System; +using System.Collections.Generic; +using System.Data.Linq.SqlClient; +using System.Linq; + +namespace BLL +{ + public class QualityAssuranceService + { + #region 设计交底 + public class Comprehensive_DesignDetailsDto : Model.Comprehensive_DesignDetails { + /// + /// 专业名称 + /// + public string ProfessionalName { get; set; } + + /// + /// 单位工程名称 + /// + public string UnitWorkNames { get; set; } + + /// + /// 单位名称 + /// + public string UnitNames { get; set; } + + public string DetailsDates { get; set; } + } + + /// + /// 设计交底列表 + /// + /// + /// + 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, + ProfessionalName = y.ProfessionalName, + DesignDetailsCode=x.DesignDetailsCode, + DetailsMan=x.DetailsMan, + DetailsDates = string.Format("{0:yyyy-MM-dd}", x.DetailsDate), + UnitWorkNames= ConvertUnitWork(x.UnitWorkId), + UnitNames= ConvertCarryUnit(x.UnitName), + }).ToList(); + if (!string.IsNullOrEmpty(cNProfessionalId)) + { + list = list.Where(x => x.CNProfessionalId == cNProfessionalId).ToList(); + } + return list; + } + + public static Comprehensive_DesignDetailsDto getDesignDetails(string Id) + { + var list = (from x in Funs.DB.Comprehensive_DesignDetails + join y in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId + where x.DesignDetailsId == Id + select new Comprehensive_DesignDetailsDto() + { + DesignDetailsId = x.DesignDetailsId, + ProfessionalName = y.ProfessionalName, + DesignDetailsCode = x.DesignDetailsCode, + DetailsMan = x.DetailsMan, + DetailsDates = string.Format("{0:yyyy-MM-dd}", x.DetailsDate), + UnitWorkNames = ConvertUnitWork(x.UnitWorkId), + UnitNames = ConvertCarryUnit(x.UnitName), + JoinPersonNum=x.JoinPersonNum, + RemarCode = x.RemarCode, + AttachUrl = APIUpLoadFileService.getFileUrl(x.DesignDetailsId, null), + }).First(); + return list; + } + + /// + /// 获取单位工程名称 + /// + /// + /// + protected static string ConvertUnitWork(object CarryUnitWorks) + { + string CarryUnitWorkName = string.Empty; + if (CarryUnitWorks != null) + { + string[] Ids = CarryUnitWorks.ToString().Split(','); + foreach (string t in Ids) + { + var UnitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(t); + if (UnitWork != null) + { + CarryUnitWorkName += UnitWork.UnitWorkName + ","; + } + } + } + if (CarryUnitWorkName != string.Empty) + { + return CarryUnitWorkName.Substring(0, CarryUnitWorkName.Length - 1); + } + else + { + return ""; + } + } + + /// + /// 获取单位名称 + /// + /// + /// + protected static string ConvertCarryUnit(object CarryUnitIds) + { + string CarryUnitName = string.Empty; + if (CarryUnitIds != null) + { + string[] Ids = CarryUnitIds.ToString().Split(','); + foreach (string t in Ids) + { + var type = BLL.UnitService.GetUnitByUnitId(t); + if (type != null) + { + CarryUnitName += type.UnitName + ","; + } + } + } + if (CarryUnitName != string.Empty) + { + return CarryUnitName.Substring(0, CarryUnitName.Length - 1); + } + else + { + return ""; + } + } + #endregion + + #region 图纸会审 + public class Comprehensive_ReviewDrawingsDto : Model.Comprehensive_ReviewDrawings { + public string ProfessionalName { get; set; } + + public string ReviewDates { get; set; } + + public string UnitWorkNames { get; set; } + + public string ReceiveUnitss { get; set; } + + public string AttachUrl { get; set; } + } + + /// + /// 图纸会审列表 + /// + /// + /// + /// + public static List getReviewDrawingsList(string projectId, string cNProfessionalId = "") + { + var list = (from x in Funs.DB.Comprehensive_ReviewDrawings + join y in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals y.CNProfessionalId + where x.ProjectId == projectId + select new Comprehensive_ReviewDrawingsDto + { + Id = x.Id, + CNProfessionalId = x.CNProfessionalId, + ProfessionalName = y.ProfessionalName, + DraCode = x.DraCode, + UnitWorkNames = ConvertUnitWork(x.UnitWorkId), + ReceiveUnitss = ConvertCarryUnit(x.ReceiveUnits), + ReviewDates = string.Format("{0:yyyy-MM-dd}", x.ReviewDate), + }).ToList(); + if (!string.IsNullOrEmpty(cNProfessionalId)) + { + list = list.Where(x => x.CNProfessionalId == cNProfessionalId).ToList(); + } + return list; + } + + /// + /// 图纸会审详情 + /// + /// + /// + 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 + select new Comprehensive_ReviewDrawingsDto + { + Id = x.Id, + CNProfessionalId = x.CNProfessionalId, + ProfessionalName = y.ProfessionalName, + 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), + }).First(); + return list; + } + #endregion + + #region 技术交底 + public class Comprehensive_ConTechnologyDisclosureDto : Model.Comprehensive_ConTechnologyDisclosure { + public string ProfessionalName { get; set; } + + public string UnitName { get; set; } + + public string UnitWorkNames { get; set; } + + public string DisclosureDates { get; set; } + } + + 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, + 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; + } + #endregion + + #region 人员报验 + public class Comprehensive_InspectionPersonDto : Model.Comprehensive_InspectionPerson { + public string UnitName { get; set; } + + public string ProfessionalName { get; set; } + + public string UnitWorkNames { get; set; } + + public string PostName { get; set; } + + public string ValidityDates { get; set; } + + public string ApprovalTimes { get; set; } + + public string DepartureTimes { get; set; } + } + + /// + /// 人员报验列表 + /// + /// + /// + /// + 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 + select new Comprehensive_InspectionPersonDto + { + + }).ToList(); + return list; + } + + /// + /// 详情 + /// + /// + /// + public static Comprehensive_InspectionPersonDto getInspectionPerson(string Id) + { + 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.InspectionPersonId ==Id + select new Comprehensive_InspectionPersonDto + { + + }).First(); + return list; + } + #endregion + + #region 材料报验 + + #endregion + + #region 机具报验 + + #endregion + + #region 设计变更 + + #endregion + + #region 共捡数据 + + #endregion + + #region 无损检测 + + #endregion + + #region 压力管道 + + #endregion + + #region 特种设备 + + #endregion + } +} diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index c45ee121..190fdd7a 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -96,6 +96,9 @@ + + + diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index 9fc55c34..f50b26d3 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -12,7 +12,7 @@ - + diff --git a/SGGL/Model/CQMS/BreakdownProject.cs b/SGGL/Model/CQMS/BreakdownProject.cs new file mode 100644 index 00000000..2858690f --- /dev/null +++ b/SGGL/Model/CQMS/BreakdownProject.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model.CQMS +{ + public class BreakdownProject + { + public string BreakdownProjectId { get; set; } + public string ProjectId { get; set; } + public string BreakdownCode { get; set; } + public string BreakdownName { get; set; } + public string DivisionProjectId { get; set; } + public string Basis { get; set; } + public string CheckPoints { get; set; } + public string RecordAndCode { get; set; } + public string Class { get; set; } + public string SortIndex { get; set; } + public string Remark { get; set; } + public string AttachUrl { get; set; } + public string IsAcceptance { get; set; } + public string FenBao { get; set; } + public string WuHuan { get; set; } + public string JianLi { get; set; } + public string YeZhu { get; set; } + public string IsSelected { get; set; } + } +} diff --git a/SGGL/Model/CQMS/InspectionManagement.cs b/SGGL/Model/CQMS/InspectionManagement.cs new file mode 100644 index 00000000..5e510cdf --- /dev/null +++ b/SGGL/Model/CQMS/InspectionManagement.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model.CQMS +{ + public class InspectionManagement + { + public string InspectionId { set; get; } + public string ProjectId { set; get; } + public string ProjectName { set; get; } + public string UnitId { set; get; } + public string UnitName { set; get; } + public string CNProfessionalId { set; get; } + public string CNProfessionalName { set; get; } + public string InspectionCode { set; get; } + public string UnitWorkId { set; get; } + public string UnitWorkName { set; get; } + public string Branch { set; get; } + public string ControlPointType { set; get; } + public string AcceptanceSite { set; get; } + public string IsOnceQualified { set; get; } + public string InspectionDate { set; get; } + public string AttachUrl { set; get; } + public string CheckDate { set; get; } + public string CheckMan { set; get; } + public string CheckManName { set; get; } + public string UnqualifiedReason { set; get; } + public string NoticeCode { set; get; } + public string AcceptanceCheckMan { set; get; } + public string ParentDivisionProjectId { set; get; } + public string CompileMan { set; get; } + public string CompileManName { set; get; } + public string CompileDate { set; get; } + public string FileType { set; get; } + public string AttachUrl2 { set; get; } + public string MainSendUnitId { set; get; } + public string MainSendUnitName { set; get; } + public string CCUnitIds { set; get; } + public string CCUnitName { set; get; } + public string PlanComplateDate { set; get; } + public string AuditMan { set; get; } + public string AuditManName { set; get; } + public string Status { set; get; } + public string CompileMan2 { set; get; } + + public List inspectionManagementDetails { get; set; } + } +} diff --git a/SGGL/Model/CQMS/InspectionManagementDetail.cs b/SGGL/Model/CQMS/InspectionManagementDetail.cs new file mode 100644 index 00000000..c05bf914 --- /dev/null +++ b/SGGL/Model/CQMS/InspectionManagementDetail.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model.CQMS +{ + public class InspectionManagementDetail + { + public string InspectionDetailId { get; set; } + public string InspectionId { get; set; } + public string UnitWorkId { get; set; } + public string UnitWorkName { get; set; } + + public string Branch { get; set; } + + public string BranchName { get; set; } + public string ControlPointType { get; set; } + public string ControlPointTypeName { get; set; } + + public string ControlPointTypeLevel { get; set; } + + public string CreateDate { get; set; } + public InspectionManagement inspectionManagement { get; set; } + } +} diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index d1ee1e2c..ac4045ee 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -179,10 +179,13 @@ + + + diff --git a/SGGL/WebAPI/Controllers/CQMS/CQMSConstructSolutionController.cs b/SGGL/WebAPI/Controllers/CQMS/CQMSConstructSolutionController.cs index dabedcb1..a718f5f9 100644 --- a/SGGL/WebAPI/Controllers/CQMS/CQMSConstructSolutionController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/CQMSConstructSolutionController.cs @@ -48,6 +48,7 @@ namespace Mvc.Controllers /// /// /// + [HttpGet] public ResponseData> GetApproveById(string id,int edition) { ResponseData> res = new ResponseData>(); @@ -56,6 +57,7 @@ namespace Mvc.Controllers res.resultValue = BLL.CQMSConstructSolutionApproveService.getListDataForApi(id); return res; } + [HttpGet] public ResponseData GetCurrApproveById(string id, string userId, int edition) { ResponseData res = new ResponseData(); @@ -87,6 +89,7 @@ namespace Mvc.Controllers /// /// /// + [HttpGet] public ResponseData> GetConApproveById(string id, int edition) { ResponseData> res = new ResponseData>(); diff --git a/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs b/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs index 82e978c9..299e7571 100644 --- a/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Web.Http; using BLL; using Model; +using Model.CQMS; namespace WebAPI.Controllers.CQMS { @@ -112,5 +113,131 @@ namespace WebAPI.Controllers.CQMS public string AttachUrl { get; set; } } + + #region 小程序端 + /// + /// 添加 主表+子表 + /// + /// + /// + [HttpPost] + public ResponseData AddInspectionManagement([FromBody] InspectionManagement inspectionManagement) + { + ResponseData res = new ResponseData(); + try + { + res.successful = BLL.API.CQMS.ApiInspectionManagementService.AddInspectionManagement(inspectionManagement); + res.successful = true; + } + catch (Exception e) + { + + } + return res; + + } + /// + /// 获取观测点 + /// + /// + /// + /// + public ResponseData> getBreakdownProject(string projectId, string keyWord) + { + ResponseData> res = new ResponseData>(); + try + { + if (string.IsNullOrEmpty(keyWord)) + keyWord = ""; + res.resultValue = BLL.API.CQMS.BreakdownProjectService.getBreakdowns(projectId, keyWord); + res.successful = true; + } + catch (Exception e) + { + + } + return res; + + } + + /// + /// 获取明细列表数据 + /// + /// + /// + /// + /// + /// + /// + [HttpGet] + public ResponseData> getInspectionManagement(string projectId, int index, int page, string state, string name) + { + ResponseData> res = new ResponseData>(); + try + { + res.successful = true; + res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagement(projectId, index, page, state, name); + + } + catch (Exception e) + { + res.successful = false; + + } + + return res; + } + + /// + /// 获取明细列表数据 + /// + /// + /// + /// + /// + /// + /// + [HttpGet] + public ResponseData> getInspectionManagementDetail(string projectId, int index, int page, string state, string name) + { + ResponseData> res = new ResponseData>(); + try + { + res.successful = true; + res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagementDetail(projectId, index, page, state, name); + + } + catch (Exception e) + { + res.successful = false; + + } + + return res; + } + /// + /// 根据主表 获取子表数据 + /// + /// + /// + [HttpGet] + public ResponseData> getInspectionManagementDetailByInspectionId(string InspectionId) + { + ResponseData> res = new ResponseData>(); + try + { + res.successful = true; + res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagementDetailByinspectionId(InspectionId); + + } + catch (Exception e) + { + res.successful = false; + + } + + return res; + } + #endregion } } \ No newline at end of file diff --git a/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs b/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs new file mode 100644 index 00000000..bb3472d0 --- /dev/null +++ b/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Http; +using BLL; +using Model; +using Model.CQMS; + + +namespace WebAPI.Controllers.CQMS +{ + /// + /// 质量小程序接口 + /// + public class QualityAssuranceController : ApiController + { + #region 设计交底 + /// + /// 设计交底列表 + /// + /// + /// + /// + [HttpGet] + public Model.ResponeData getDesignDetailsList(string projectId, int pageIndex = 0,string cNProfessionalId="") { + var responeData = new Model.ResponeData(); + try + { + var getDataList = QualityAssuranceService.getDesignDetailsList(projectId, cNProfessionalId); + 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 getDesignDetails(string Id) { + var responeData = new Model.ResponeData(); + try + { + responeData.data = QualityAssuranceService.getDesignDetails(Id); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion + + #region 图纸会审 + /// + /// 图纸会审列表 + /// + /// + /// + /// + [HttpGet] + public Model.ResponeData getReviewDrawingsList(string projectId, int pageIndex = 0, string cNProfessionalId = "") + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = QualityAssuranceService.getReviewDrawingsList(projectId,cNProfessionalId); + 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 getReviewDrawings(string Id) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = QualityAssuranceService.getReviewDrawings(Id); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion + + #region 技术交底 + /// + /// 技术交底列表 + /// + /// + /// + /// + /// + [HttpGet] + public Model.ResponeData getConTechnologyDisclosureList(string projectId, int pageIndex = 0, string cNProfessionalId = "") + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = QualityAssuranceService.getConTechnologyDisclosureList(projectId, cNProfessionalId); + 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 getConTechnologyDisclosure(string Id) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = QualityAssuranceService.getConTechnologyDisclosure(Id); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion + + #region 人员报验 + // + /// + /// 人员报验列表 + /// + /// + /// + /// + /// + [HttpGet] + public Model.ResponeData getInspectionPersonList(string projectId,string serachText="", int pageIndex = 0) + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = QualityAssuranceService.getInspectionPersonList(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 getInspectionPerson(string Id) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = QualityAssuranceService.getInspectionPerson(Id); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion + + #region 材料报验 + + #endregion + + #region 机具报验 + + #endregion + + #region 设计变更 + + #endregion + + #region 共捡数据 + + #endregion + + #region 无损检测 + + #endregion + + #region 压力管道 + + #endregion + + #region 特种设备 + + #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 5f866c8d..0b28c5f2 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-03T08:26:17.4985546Z||;True|2024-07-17T10:29:15.9472548+08:00||; + 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; @@ -74,34 +74,34 @@ 07/17/2022 11:13:58 - 05/07/2022 06:29:26 + 05/07/2022 14:29:26 - 09/10/2013 16:29:20 + 09/11/2013 00:29:20 - 09/10/2013 16:29:20 + 09/11/2013 00:29:20 - 09/23/2018 23:07:04 + 03/11/2024 11:33:45 - 09/03/2024 16:26:16 + 09/19/2024 16:30:47 - 09/03/2024 16:26:15 + 09/19/2024 16:30:47 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 09/03/2024 16:26:10 + 09/19/2024 16:30:34 - 06/25/2024 16:56:51 + 05/22/2024 09:42:30 - 09/03/2024 16:26:10 + 09/19/2024 16:30:34 12/18/2020 05:32:28 @@ -110,7 +110,7 @@ 05/10/2011 21:28:12 - 06/25/2024 16:56:54 + 03/11/2024 11:23:36 05/09/2021 01:08:30 @@ -119,28 +119,28 @@ 05/09/2021 01:08:30 - 05/24/2018 13:38:22 + 05/24/2018 21:38:22 06/07/2018 08:26:54 - 07/25/2012 11:48:56 + 07/25/2012 19:48:56 - 09/03/2024 16:26:07 + 09/19/2024 15:48:28 - 09/03/2024 16:26:07 + 09/19/2024 15:48:28 - 08/13/2024 14:17:23 + 03/11/2024 11:17:08 - 11/27/2018 18:07:34 + 11/28/2018 02:07:34 - 11/27/2018 17:59:08 + 11/28/2018 01:59:08 10/23/2021 09:07:54 @@ -173,151 +173,151 @@ 12/08/2021 22:02:42 - 05/24/2018 13:38:22 + 05/24/2018 21:38:22 - 05/24/2018 13:38:22 + 05/24/2018 21:38:22 - 05/24/2018 13:38:22 + 05/24/2018 21:38:22 - 05/24/2018 13:38:22 + 05/24/2018 21:38:22 - 05/24/2018 13:38:22 + 05/24/2018 21:38:22 - 05/24/2018 13:38:22 + 05/24/2018 21:38:22 - 05/24/2018 13:38:22 + 05/24/2018 21:38:22 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 05/24/2018 13:38:24 + 05/24/2018 21:38:24 - 09/03/2024 16:26:04 + 07/17/2024 10:28:48 - 06/25/2024 16:56:55 + 05/22/2024 09:42:30 - 09/03/2024 16:26:04 + 07/17/2024 10:28:48 07/08/2017 09:30:56 @@ -335,7 +335,7 @@ 02/19/2020 18:05:18 - 11/28/2018 13:00:36 + 11/28/2018 21:00:36 05/15/2018 21:29:44 @@ -344,55 +344,55 @@ 02/19/2020 18:05:16 - 11/28/2018 12:58:44 + 11/28/2018 20:58:44 - 02/01/2018 12:20:56 + 02/01/2018 20:20:56 - 11/28/2018 13:01:26 + 11/28/2018 21:01:26 - 11/28/2018 13:01:00 + 11/28/2018 21:01:00 - 02/01/2018 12:19:26 + 02/01/2018 20:19:26 - 02/01/2018 12:16:32 + 02/01/2018 20:16:32 - 02/11/2014 15:26:04 + 02/11/2014 23:26:04 - 02/01/2018 12:16:56 + 02/01/2018 20:16:56 - 02/01/2018 12:20:56 + 02/01/2018 20:20:56 - 02/01/2018 12:20:56 + 02/01/2018 20:20:56 - 02/01/2018 12:20:56 + 02/01/2018 20:20:56 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 02/09/2013 00:42:28 - 09/03/2024 16:26:11 + 09/19/2024 16:30:34 - 09/03/2024 16:26:11 + 09/19/2024 16:30:34 - 09/03/2024 16:26:11 + 09/19/2024 16:30:34 - 01/23/2014 13:57:34 + 01/23/2014 21:57:34 11/29/2018 21:26:02 @@ -425,100 +425,100 @@ 02/01/2018 20:21:00 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 09/03/2024 16:26:12 + 09/19/2024 16:30:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 06/25/2024 16:56:55 + 03/11/2024 11:23:37 - 01/25/2024 16:49:07 + 03/11/2024 11:23:37 - 01/25/2024 16:49:07 + 03/11/2024 11:23:37 - 01/25/2024 16:49:07 + 03/11/2024 11:23:37 - 01/25/2024 16:49:07 + 03/11/2024 11:23:37 - 01/25/2024 16:49:07 + 03/11/2024 11:23:37 - 09/03/2024 16:23:55 + 09/06/2024 14:03:52 \ No newline at end of file diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index 89e47133..59d8fc2f 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -155,6 +155,7 @@ + @@ -268,6 +269,7 @@ + diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index 199e5a73..71396b97 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -9,7 +9,7 @@ - D:\数据\诺必达\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml + G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml MvcControllerEmptyScaffolder root/Common/MVC/Controller 600 From e0fcd13af2bee26108edf743e8a38e607c538076 Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Fri, 20 Sep 2024 17:13:01 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/API/CQMS/QualityAssuranceService.cs | 690 ++++++++++++++++-- SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- .../CQMS/QualityAssuranceController.cs | 285 +++++++- .../PublishProfiles/FolderProfile.pubxml.user | 22 +- SGGL/WebAPI/WebAPI.csproj.user | 2 +- 5 files changed, 929 insertions(+), 72 deletions(-) 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 From 95d6e9c862e91537867430ebdeab96610dd84a3e Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Sat, 21 Sep 2024 19:10:41 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=B9=E7=A7=8D?= =?UTF-8?q?=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CQMS/Comprehensive/SpecialEquipmentService.cs | 2 ++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- .../PublishProfiles/FolderProfile.pubxml.user | 14 +++++++------- SGGL/WebAPI/WebAPI.csproj.user | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs index 7f697c09..462e8d7c 100644 --- a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs @@ -107,6 +107,7 @@ namespace BLL newEquipment.Status = SpecialEquipment.Status; newEquipment.PositionNum = SpecialEquipment.PositionNum; newEquipment.RemarkCode = SpecialEquipment.RemarkCode; + newEquipment.ReportTime = SpecialEquipment.ReportTime; db.Comprehensive_SpecialEquipment.InsertOnSubmit(newEquipment); db.SubmitChanges(); } @@ -131,6 +132,7 @@ namespace BLL newEquipment.Status = SpecialEquipment.Status; newEquipment.PositionNum = SpecialEquipment.PositionNum; newEquipment.RemarkCode = SpecialEquipment.RemarkCode; + newEquipment.ReportTime = SpecialEquipment.ReportTime; db.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index cb873201..63722353 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index bfeae44c..4ffae0b8 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-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; + True|2024-09-20T09:30:59.6144803Z;True|2024-09-20T15:28:40.2547949+08:00;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,10 +86,10 @@ 03/11/2024 11:33:45 - 09/20/2024 15:28:39 + 09/20/2024 17:30:56 - 09/20/2024 15:28:39 + 09/20/2024 17:30:56 03/11/2024 11:23:37 @@ -383,13 +383,13 @@ 02/09/2013 00:42:28 - 09/20/2024 15:28:22 + 09/20/2024 17:30:40 - 09/20/2024 15:28:22 + 09/20/2024 17:30:40 - 09/20/2024 15:28:22 + 09/20/2024 17:30:40 01/23/2014 21:57:34 @@ -473,7 +473,7 @@ 03/11/2024 11:23:37 - 09/20/2024 15:28:23 + 09/20/2024 17:30:47 03/11/2024 11:23:37 diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index df2b89c2..71396b97 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true From b6b6c69a17f5bc0e30dfd0fe8a11681b62e8e90a Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Mon, 23 Sep 2024 10:31:03 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E7=BA=A7=E7=9C=8B=E6=9D=BF=E5=8F=AA=E6=98=BE=E7=A4=BA=E5=9C=A8?= =?UTF-8?q?=E5=BB=BA=E7=9A=84=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SGGLDB_WH_V2024-09-23-phf.sql | 3 ++ SGGL/FineUIPro.Web/ErrLog.txt | 28 +++++++++++++++++++ .../TestRun/DriverSchemeEdit.aspx.cs | 4 +-- SGGL/FineUIPro.Web/common/main_new.aspx.cs | 8 ++++++ SGGL/FineUIPro.Web/common/main_new0.aspx.cs | 9 ++++++ SGGL/FineUIPro.Web/common/main_new1.aspx.cs | 10 +++++++ 6 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_V2024-09-23-phf.sql diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-09-23-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-09-23-phf.sql new file mode 100644 index 00000000..4e589fbc --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-09-23-phf.sql @@ -0,0 +1,3 @@ +CREATE NONCLUSTERED INDEX [SitePerson_Person_pid_isused_intime_index] +ON [dbo].[SitePerson_Person] ([ProjectId],[IsUsed],[InTime],[OutTime]) +INCLUDE ([PersonName]); \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..539a3001 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,28 @@ + +错误信息开始=====> +错误类型:SqlException +错误信息:在将 nvarchar 值 'PP-' 转换成数据类型 int 时失败。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() + 在 BLL.SQLHelper.RunProcNewId2(String storedProcName, String tableName, String columnName, String projectId) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 880 + 在 FineUIPro.Web.TestRun.DriverSchemeEdit.Page_Load(Object sender, EventArgs e) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverSchemeEdit.aspx.cs:行号 154 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:09/23/2024 10:27:46 +出错文件:http://localhost:8579/TestRun/DriverSchemeEdit.aspx?SolutionType=09 +IP地址:::1 +操作人员:JT + +出错时间:09/23/2024 10:27:46 + diff --git a/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.cs b/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.cs index 951ff6d7..bb05428f 100644 --- a/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.cs @@ -151,8 +151,8 @@ namespace FineUIPro.Web.TestRun options.Hidden = true; optio.Hidden = true; plApprove2.Hidden = true; - txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", - "dbo.Solution_TestRunConstructSolution", "Code", CurrUser.LoginProjectId); + //txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", + // "dbo.Solution_TestRunConstructSolution", "Code", CurrUser.LoginProjectId); this.txtSolutionType.Text = TestRunConstructSolutionService.ConvertSolutionType(Request.Params["SolutionType"]); this.hdSolutionType.Text = Request.Params["SolutionType"]; TestRunConstructSolutionService.Init(drpHandleType, Const.TestRunConstructSolution_Compile, false); diff --git a/SGGL/FineUIPro.Web/common/main_new.aspx.cs b/SGGL/FineUIPro.Web/common/main_new.aspx.cs index 3a33b6b6..a9ec355c 100644 --- a/SGGL/FineUIPro.Web/common/main_new.aspx.cs +++ b/SGGL/FineUIPro.Web/common/main_new.aspx.cs @@ -24,6 +24,14 @@ namespace FineUIPro.Web.common { pids = CurrUser.CompanyProjectId.Split(','); } + else { + //加载所有在建项目的数据 + var pidArray = Funs.DB.Base_Project.Where(x => x.ProjectState == "1").Select(x=>x.ProjectId).ToArray(); + if (pidArray.Length>0) + { + pids = pidArray; + } + } //未遂事故 diff --git a/SGGL/FineUIPro.Web/common/main_new0.aspx.cs b/SGGL/FineUIPro.Web/common/main_new0.aspx.cs index 3d6027d8..7758e0f3 100644 --- a/SGGL/FineUIPro.Web/common/main_new0.aspx.cs +++ b/SGGL/FineUIPro.Web/common/main_new0.aspx.cs @@ -32,6 +32,15 @@ namespace FineUIPro.Web.common { pids = CurrUser.CompanyProjectId.Split(','); } + else + { + //加载所有在建项目的数据 + var pidArray = Funs.DB.Base_Project.Where(x => x.ProjectState == "1").Select(x => x.ProjectId).ToArray(); + if (pidArray.Length > 0) + { + pids = pidArray; + } + } var unitId = string.Empty; var thisUnit = CommonService.GetIsThisUnit(); diff --git a/SGGL/FineUIPro.Web/common/main_new1.aspx.cs b/SGGL/FineUIPro.Web/common/main_new1.aspx.cs index 90b9356c..91ae046f 100644 --- a/SGGL/FineUIPro.Web/common/main_new1.aspx.cs +++ b/SGGL/FineUIPro.Web/common/main_new1.aspx.cs @@ -37,6 +37,16 @@ namespace FineUIPro.Web.common { pids = CurrUser.CompanyProjectId.Split(','); } + else + { + //加载所有在建项目的数据 + var pidArray = Funs.DB.Base_Project.Where(x => x.ProjectState == "1").Select(x => x.ProjectId).ToArray(); + if (pidArray.Length > 0) + { + pids = pidArray; + } + } + ProjectService.InitProjectShortNameByStateDropDownList(this.drpProject, this.CurrUser.UserId, BLL.Const.ProjectState_1, false); if (this.drpProject.Items.Count > 0) { From 6522d6df41c2cf849585cf45d9c954400aa294ee Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Mon, 23 Sep 2024 16:55:04 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=9C=88=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagerMonthC/PersonSortCService.cs | 7 +++-- SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 13 +++++----- SGGL/FineUIPro.Web/common/Menu_TestRun.xml | 26 ++++++++++--------- SGGL/FineUIPro.Web/common/Menu_Transfer.xml | 15 +++++++++++ SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 2 ++ 5 files changed, 42 insertions(+), 21 deletions(-) diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/PersonSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/PersonSortCService.cs index c9a101a8..edf74a54 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/PersonSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/PersonSortCService.cs @@ -55,8 +55,11 @@ namespace BLL public static void DeletePersonSortsByMonthReportId(string monthReportId) { var q = (from x in db.Manager_PersonSortC where x.MonthReportId == monthReportId select x).ToList(); - db.Manager_PersonSortC.DeleteAllOnSubmit(q); - db.SubmitChanges(); + if (q.Count>0) + { + db.Manager_PersonSortC.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } } /// diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 8d92973c..700a72fa 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -25,6 +25,7 @@ + @@ -89,13 +90,10 @@ - - + - - - - + + @@ -121,7 +119,8 @@ - + + diff --git a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml index b1a26ee1..4056ca52 100644 --- a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml +++ b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml @@ -24,11 +24,11 @@ - + + - @@ -41,17 +41,17 @@ - + - - - + + + + - @@ -69,16 +69,18 @@ + + - + @@ -88,7 +90,7 @@ - + @@ -119,8 +121,8 @@ - - - + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml index bc6a5bd7..e5eca709 100644 --- a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml +++ b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml @@ -3,4 +3,19 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index ed44c8fe..cc7e0f27 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -83,4 +83,6 @@ + + \ No newline at end of file From 757a0d859f51d9bb5de2fde3aecbee60f4b1cd03 Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Mon, 23 Sep 2024 17:44:35 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=9C=88=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HSSE/Manager/ManagerMonthCEdit.aspx.cs | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx.cs index dc9a56b8..8e5db146 100644 --- a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonthCEdit.aspx.cs @@ -198,6 +198,15 @@ namespace FineUIPro.Web.HSSE.Manager { this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", model.EndDate); } + + startTime = Convert.ToDateTime(txtStartDate.Text); + endTime = Convert.ToDateTime(txtEndDate.Text); + + yearStartTime = Convert.ToDateTime(startTime.ToString("yyyy-01-01")); + if (project.StartDate != null) + { + projectStartTime = Convert.ToDateTime(project.StartDate); + } } AddOrUpdate = "update"; @@ -361,6 +370,8 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 6.1未遂事件统计 + try + { var attemptedModel = db.Manager_Attempted.FirstOrDefault(x => x.MonthReportId == MonthReportId); if (attemptedModel != null) { @@ -370,15 +381,29 @@ namespace FineUIPro.Web.HSSE.Manager nbFbsYearNum.Text = attemptedModel.FbsYearNum.ToString(); nbProNum.Text = attemptedModel.ProNum.ToString(); } - #endregion + else { + GetAttempted(); + } + #endregion - #region 6.1 2 本月伤害事故统计 - injuryAccidents = BLL.InjuryAccidentCService.GetInjuryAccidentCByMonthReportId(this.MonthReportId); - if (injuryAccidents.Count > 0) + #region 6.1 2 本月伤害事故统计 + injuryAccidents = BLL.InjuryAccidentCService.GetInjuryAccidentCByMonthReportId(this.MonthReportId); + if (injuryAccidents.Count > 0) + { + this.gvInjuryAccident.DataSource = injuryAccidents; + this.gvInjuryAccident.DataBind(); + OutputSummaryData(); + } + else { + GetInjuryAccident(); + //GetAccidentReportsByAccidentTime + } + + } + catch (Exception) { - this.gvInjuryAccident.DataSource = injuryAccidents; - this.gvInjuryAccident.DataBind(); - OutputSummaryData(); + + throw; } #endregion From 1557fcc77d34ab45f759ba83f2a101895932ba17 Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Tue, 24 Sep 2024 14:53:18 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E6=96=BD=E5=B7=A5=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/API/CQMS/QualityAssuranceService.cs | 219 ++++++++++++++---- SGGL/FineUIPro.Web/ErrLog.txt | 104 +++++++++ .../CQMS/QualityAssuranceController.cs | 106 +++++++++ .../PublishProfiles/FolderProfile.pubxml.user | 18 +- 4 files changed, 396 insertions(+), 51 deletions(-) diff --git a/SGGL/BLL/API/CQMS/QualityAssuranceService.cs b/SGGL/BLL/API/CQMS/QualityAssuranceService.cs index 504b291e..d14a3cdb 100644 --- a/SGGL/BLL/API/CQMS/QualityAssuranceService.cs +++ b/SGGL/BLL/API/CQMS/QualityAssuranceService.cs @@ -692,16 +692,17 @@ namespace BLL 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, + 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), } @@ -742,19 +743,20 @@ namespace BLL public static DateTime NextDate; public static DateTime NewDate; public static DateTime EndDate; - public static List getInspectionManagementStatisticsList(string projectId, string searchText = "") { + 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"); + 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) { @@ -762,12 +764,12 @@ namespace BLL { 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(); @@ -787,11 +789,11 @@ namespace BLL 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); + + //统计所给事件段的全部数量 + 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(); @@ -812,11 +814,11 @@ namespace BLL { 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); + + //统计所给事件段的全部数量 + managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, DateTime.Now, false); + //统计所给事件段的合格数量 + managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, DateTime.Now, true); @@ -839,12 +841,12 @@ namespace BLL { 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(); @@ -879,12 +881,12 @@ namespace BLL { 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); - + + //统计所给事件段的全部数量 + 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(); @@ -904,12 +906,12 @@ namespace BLL { List managementListSunNumber = new List(); List managementListOneNumber = new List(); - - //统计所给事件段的全部数量 - managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, NewDate, false); - //统计所给事件段的合格数量 - managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(projectId, StartDate, NewDate, true); - + + //统计所给事件段的全部数量 + 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(); @@ -924,10 +926,143 @@ namespace BLL } } StatisticsList.Add(Statistics); - + } return StatisticsList; } #endregion + + #region 施工组织设计及施工方案管理 + public class Comprehensive_GeneralPlanApprovalDto : Model.Comprehensive_GeneralPlanApproval + { + public string UnitName { get; set; } + + public string ProfessionalName { get; set; } + + public string UnitWorkNames { get; set; } + + public string ApprovalDates { get; set; } + + //public string AttachUrl { get; set; } + } + + public static List getGeneralPlanList(string projectId, string searchText = "") + { + var list = (from x in Funs.DB.Comprehensive_GeneralPlanApproval + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + join z in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals z.CNProfessionalId + where x.ProjectId == projectId + orderby x.ApprovalDate descending + select new Comprehensive_GeneralPlanApprovalDto + { + GeneralPlanApprovalId = x.GeneralPlanApprovalId, + UnitName = y.UnitName, + ProfessionalName = z.ProfessionalName, + UnitWorkNames = ConvertUnitWork(x.UnitWorkId), + PlanCode = x.PlanCode, + PlanName = x.PlanName, + ApprovalDates = string.Format("{0:yyyy-MM-dd}", x.ApprovalDate), + AuditMan = x.AuditMan, + ApprovalMan = x.ApprovalMan, + ImplementationDeviation = x.ImplementationDeviation, + RemarkCode = x.RemarkCode + }).ToList(); + return list; + } + + public static Comprehensive_GeneralPlanApprovalDto getGeneralPlan(string Id) + { + var list = (from x in Funs.DB.Comprehensive_GeneralPlanApproval + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + join z in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals z.CNProfessionalId + where x.GeneralPlanApprovalId == Id + select new Comprehensive_GeneralPlanApprovalDto + { + GeneralPlanApprovalId = x.GeneralPlanApprovalId, + UnitName = y.UnitName, + ProfessionalName = z.ProfessionalName, + UnitWorkNames = ConvertUnitWork(x.UnitWorkId), + PlanCode = x.PlanCode, + PlanName = x.PlanName, + ApprovalDates = string.Format("{0:yyyy-MM-dd}", x.ApprovalDate), + AuditMan = x.AuditMan, + ApprovalMan = x.ApprovalMan, + ImplementationDeviation = x.ImplementationDeviation, + RemarkCode = x.RemarkCode, + AttachUrl = APIUpLoadFileService.getFileUrl(x.GeneralPlanApprovalId, null), + }).First(); + return list; + } + #endregion + + #region 超危大工程施工方案管理 + public class Comprehensive_MajorPlanApprovalDto : Model.Comprehensive_MajorPlanApproval + { + public string UnitName { get; set; } + + public string ProfessionalName { get; set; } + + public string UnitWorkNames { get; set; } + + public string ApprovalDates { get; set; } + + public string IsReviews { get; set; } + } + + public static List getMajorPlanList(string projectId, string searchText = "") + { + var list = (from x in Funs.DB.Comprehensive_MajorPlanApproval + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + join z in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals z.CNProfessionalId + where x.ProjectId == projectId + orderby x.ApprovalDate descending + select new Comprehensive_MajorPlanApprovalDto { + MajorPlanApprovalId=x.MajorPlanApprovalId, + UnitName = y.UnitName, + ProfessionalName = z.ProfessionalName, + UnitWorkNames = ConvertUnitWork(x.UnitWorkId), + PlanCode = x.PlanCode, + PlanName = x.PlanName, + ReviewMan=x.ReviewMan, + ApprovalDates = string.Format("{0:yyyy-MM-dd}", x.ApprovalDate), + AuditMan=x.AuditMan, + ApprovalMan=x.ApprovalMan, + ExpertReviewMan = x.ExpertReviewMan, + IsReviews = x.IsReview==true?"是":"否", + ImplementationDeviation=x.ImplementationDeviation, + RemarkCode = x.RemarkCode, + }) + .ToList(); + return list; + } + + public static Comprehensive_MajorPlanApprovalDto getMajorPlan(string Id) + { + var list = (from x in Funs.DB.Comprehensive_MajorPlanApproval + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + join z in Funs.DB.Base_CNProfessional on x.CNProfessionalId equals z.CNProfessionalId + where x.MajorPlanApprovalId == Id + select new Comprehensive_MajorPlanApprovalDto + { + MajorPlanApprovalId = x.MajorPlanApprovalId, + UnitName = y.UnitName, + ProfessionalName = z.ProfessionalName, + UnitWorkNames = ConvertUnitWork(x.UnitWorkId), + PlanCode = x.PlanCode, + PlanName = x.PlanName, + ReviewMan = x.ReviewMan, + ApprovalDates = string.Format("{0:yyyy-MM-dd}", x.ApprovalDate), + AuditMan = x.AuditMan, + ApprovalMan = x.ApprovalMan, + IsReviews = x.IsReview == true ? "是" : "否", + ImplementationDeviation = x.ImplementationDeviation, + RemarkCode = x.RemarkCode, + ExpertReviewMan=x.ExpertReviewMan, + AttachUrl = APIUpLoadFileService.getFileUrl(x.MajorPlanApprovalId, null), + }) + .First(); + return list; + } + #endregion } } diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 539a3001..4a631532 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -26,3 +26,107 @@ IP地址:::1 出错时间:09/23/2024 10:27:46 + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEService.HSSEServiceClient.GetSupervise_SubUnitReportListToSUB() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13827 + 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2181 +出错时间:09/24/2024 13:18:32 +出错时间:09/24/2024 13:18:32 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckInfo_Table8ItemListToSUB(String unitId) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13851 + 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2046 +出错时间:09/24/2024 13:18:32 +出错时间:09/24/2024 13:18:32 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckRectifyListToSUB(String unitId) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13843 + 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1942 +出错时间:09/24/2024 13:18:32 +出错时间:09/24/2024 13:18:32 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEService.HSSEServiceClient.GetInformation_UrgeReportToSUB(String unitId) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13643 + 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1884 +出错时间:09/24/2024 13:18:32 +出错时间:09/24/2024 13:18:32 + diff --git a/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs b/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs index 721ea0ce..1b80ae5a 100644 --- a/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/QualityAssuranceController.cs @@ -524,5 +524,111 @@ namespace WebAPI.Controllers.CQMS return responeData; } #endregion + + #region 施工组织设计及施工方案管理 + /// + /// 施工组织设计及施工方案管理列表 + /// + /// + /// + /// + /// + [HttpGet] + public Model.ResponeData getGeneralPlanList(string projectId, string serachText = "", int pageIndex = 0) + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = QualityAssuranceService.getGeneralPlanList(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 getGeneralPlan(string Id) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = QualityAssuranceService.getGeneralPlan(Id); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion + + #region 超危大工程施工方案管理 + /// + /// 超危大工程施工方案管理列表 + /// + /// + /// + /// + /// + [HttpGet] + public Model.ResponeData getMajorPlanList(string projectId, string serachText = "", int pageIndex = 0) + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = QualityAssuranceService.getMajorPlanList(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 getMajorPlan(string Id) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = QualityAssuranceService.getMajorPlan(Id); + } + 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 4ffae0b8..f2575fcf 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-20T09:30:59.6144803Z;True|2024-09-20T15:28:40.2547949+08:00;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; + True|2024-09-24T01:51:10.8028974Z;True|2024-09-20T17:30:59.6144803+08:00;True|2024-09-20T15:28:40.2547949+08:00;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/20/2024 17:30:56 + 09/24/2024 09:51:10 - 09/20/2024 17:30:56 + 09/24/2024 09:51:10 03/11/2024 11:23:37 - 09/20/2024 15:28:21 + 09/24/2024 09:50:50 05/22/2024 09:42:30 - 09/20/2024 15:28:21 + 09/24/2024 09:50:50 12/18/2020 05:32:28 @@ -383,13 +383,13 @@ 02/09/2013 00:42:28 - 09/20/2024 17:30:40 + 09/24/2024 09:50:50 - 09/20/2024 17:30:40 + 09/24/2024 09:50:50 - 09/20/2024 17:30:40 + 09/24/2024 09:50:50 01/23/2014 21:57:34 @@ -473,7 +473,7 @@ 03/11/2024 11:23:37 - 09/20/2024 17:30:47 + 09/24/2024 09:50:53 03/11/2024 11:23:37 From ad8f61470a2b7db8c7bfd5bd0bcdaa05597fc58f Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Wed, 25 Sep 2024 14:35:55 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=9C=88=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HSSE/Manager/ManagerMonthC/CheckSortCService.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckSortCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckSortCService.cs index 1252af92..2c988a71 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckSortCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/CheckSortCService.cs @@ -77,9 +77,13 @@ namespace BLL /// 月报告主键 public static void DeleteCheckSortsByMonthReportId(string monthReportId) { - var q = (from x in db.Manager_CheckSortC where x.MonthReportId == monthReportId select x).ToList(); - db.Manager_CheckSortC.DeleteAllOnSubmit(q); - db.SubmitChanges(); + var q = Funs.DB.Manager_CheckSortC.Where(x=>x.MonthReportId== monthReportId).ToList(); + if (q.Count>0) + { + Funs.DB.Manager_CheckSortC.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } } }