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] =?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