From c30f2badb9bf1cacfb1156855ab7b977018ceba0 Mon Sep 17 00:00:00 2001
From: gaofei <181547018@qq.com>
Date: Wed, 15 Mar 2023 10:55:53 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2023-03-14.sql | 2 +
SGGL/BLL/API/APIBaseInfoService.cs | 74 ++++++++
.../CQMS/Plan/CQMS_MainPlanApproveService.cs | 35 ++++
SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs | 110 +++++++++++-
.../CQMS/Plan/CQMS_SubPlanApproveService.cs | 37 ++++
SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs | 73 ++++++++
SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs | 157 ++++++++++++++++
.../CQMS/Material/EquipmentSearch.aspx | 3 +
.../CQMS/Material/EquipmentSearch.aspx.cs | 5 +
.../Material/EquipmentSearch.aspx.designer.cs | 9 +
.../CQMS/Material/MaterialSearch.aspx | 3 +
.../CQMS/Material/MaterialSearch.aspx.cs | 5 +
.../Material/MaterialSearch.aspx.designer.cs | 9 +
SGGL/Model/Model.cs | 24 +++
.../Controllers/CQMS/CQMSMeetingController.cs | 16 ++
.../Controllers/CQMS/CQMSPlanController.cs | 104 +++++++++++
.../Controllers/CQMS/CQMSTrainController.cs | 170 ++++++++++++++++++
SGGL/WebAPI/WebAPI.csproj | 3 +
18 files changed, 838 insertions(+), 1 deletion(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2023-03-14.sql
create mode 100644 SGGL/WebAPI/Controllers/CQMS/CQMSMeetingController.cs
create mode 100644 SGGL/WebAPI/Controllers/CQMS/CQMSPlanController.cs
create mode 100644 SGGL/WebAPI/Controllers/CQMS/CQMSTrainController.cs
diff --git a/DataBase/版本日志/SGGLDB_V2023-03-14.sql b/DataBase/版本日志/SGGLDB_V2023-03-14.sql
new file mode 100644
index 00000000..b759c3cc
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-03-14.sql
@@ -0,0 +1,2 @@
+alter table [dbo].[Train_TrainPlan] add AttachUrl nvarchar(1000) null
+GO
\ No newline at end of file
diff --git a/SGGL/BLL/API/APIBaseInfoService.cs b/SGGL/BLL/API/APIBaseInfoService.cs
index 0aa5171e..6b7d9e58 100644
--- a/SGGL/BLL/API/APIBaseInfoService.cs
+++ b/SGGL/BLL/API/APIBaseInfoService.cs
@@ -739,5 +739,79 @@ namespace BLL
}
}
#endregion
+
+ #region 获取质量培训对象
+ ///
+ /// 获取质量培训对象
+ ///
+ ///
+ public static List getPlanTrainPersons()
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var getDataLists = (from x in db.Base_CQMSTrainObject
+ orderby x.TrainObjectCode
+ select new Model.BaseInfoItem { BaseInfoId = x.TrainObjectId, BaseInfoName = x.TrainObjectName }).ToList();
+ return getDataLists;
+ }
+ }
+ #endregion
+
+ #region 获取质量培训类别
+ ///
+ /// 获取质量培训类别
+ ///
+ ///
+ public static List getCQMSTrainType()
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var getDataLists = (from x in Funs.DB.Base_CQMSTrainType
+ orderby x.TrainTypeCode
+ select new Model.BaseInfoItem { BaseInfoId = x.TrainTypeId, BaseInfoCode = x.TrainTypeCode, BaseInfoName = x.TrainTypeName }).ToList();
+ return getDataLists;
+ }
+ }
+ #endregion
+
+ #region 获取质量培训主持人
+ ///
+ /// 获取质量培训主持人
+ ///
+ ///
+ public static List getCQMSTrainHostMan(string projectId)
+ {
+ var list = BLL.SitePerson_PersonService.GetSitePerson_PersonListByProjectIdUnitTypeRoleIds(projectId, Const.ProjectUnitType_1, Const.QAManager + "," + Const.CQEngineer);
+ List items = new List();
+ foreach (var item in list)
+ {
+ Model.BaseInfoItem b = new Model.BaseInfoItem();
+ b.BaseInfoId = item.PersonId;
+ b.BaseInfoName = item.PersonName;
+ items.Add(b);
+ }
+ return items;
+ }
+ #endregion
+
+ #region 获取质量培训参与培训教育人员信息
+ ///
+ /// 获取质量培训参与培训教育人员信息
+ ///
+ ///
+ public static List getRealTrainPersons(string projectId)
+ {
+ var list = BLL.SitePerson_PersonService.GetSitePerson_PersonListByProjectIdUnitTypeRoleIds(projectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, null);
+ List items = new List();
+ foreach (var item in list)
+ {
+ Model.BaseInfoItem b = new Model.BaseInfoItem();
+ b.BaseInfoId = item.PersonId;
+ b.BaseInfoName = item.PersonName;
+ items.Add(b);
+ }
+ return items;
+ }
+ #endregion
}
}
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
index fdc9fbf2..4c15c203 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
@@ -207,5 +207,40 @@ namespace BLL
{
return db.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Compile);
}
+
+ public static List getApproveListDataByIdForApi(string MainPlanId)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var q = from x in db.Plan_MainPlanApprove
+ where x.MainPlanId == MainPlanId && x.ApproveDate != null && x.ApproveType != "S"
+ orderby x.ApproveDate
+ select new
+ {
+ x.MainPlanApproveId,
+ x.MainPlanId,
+ ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
+ x.ApproveDate,
+ x.IsAgree,
+ x.ApproveIdea,
+ x.ApproveType,
+ };
+ List res = new List();
+ var list = q.ToList();
+ foreach (var item in list)
+ {
+ Model.Plan_MainPlanApprove cd = new Model.Plan_MainPlanApprove();
+ cd.MainPlanApproveId = item.MainPlanApproveId;
+ cd.MainPlanId = item.MainPlanId;
+ cd.ApproveMan = item.ApproveMan;
+ cd.ApproveDate = item.ApproveDate;
+ cd.IsAgree = item.IsAgree;
+ cd.ApproveIdea = item.ApproveIdea;
+ cd.ApproveType = item.ApproveType;
+ res.Add(cd);
+ }
+ return res;
+ }
+ }
}
}
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
index e04725c7..4bbe5917 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
@@ -30,7 +30,7 @@ namespace BLL
newMainPlan.State = MainPlan.State;
newMainPlan.CompileMan = MainPlan.CompileMan;
newMainPlan.CompileDate = MainPlan.CompileDate;
- newMainPlan.FilePath = MainPlan.FilePath;
+ newMainPlan.FilePath = MainPlan.FilePath;
db.Plan_MainPlan.InsertOnSubmit(newMainPlan);
db.SubmitChanges();
}
@@ -123,5 +123,113 @@ namespace BLL
else
return null;
}
+
+ ///
+ /// 把状态转换代号为文字形式
+ ///
+ ///
+ ///
+ public static string ConvertState(object state)
+ {
+ if (state != null)
+ {
+ if (state.ToString() == BLL.Const.MainPlan_ReCompile)
+ {
+ return "重新编制";
+ }
+ else if (state.ToString() == BLL.Const.MainPlan_Compile)
+ {
+ return "编制";
+ }
+ else if (state.ToString() == BLL.Const.MainPlan_Audit1)
+ {
+ return "施工经理审核";
+ }
+ else if (state.ToString() == BLL.Const.MainPlan_Audit2)
+ {
+ return "部门评审小组审核";
+ }
+ else if (state.ToString() == BLL.Const.MainPlan_Audit3)
+ {
+ return "审核";
+ }
+ else if (state.ToString() == BLL.Const.MainPlan_Audit4)
+ {
+ return "项目经理批准";
+ }
+ else if (state.ToString() == BLL.Const.MainPlan_Audit5)
+ {
+ return "评审小组组长确认";
+ }
+ else if (state.ToString() == BLL.Const.MainPlan_Complete)
+ {
+ return "审批完成";
+ }
+ else
+ {
+ return "";
+ }
+ }
+ return "";
+ }
+
+ public static List getListDataForApi(string projectId, int startRowIndex, int maximumRows)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ IQueryable q = db.Plan_MainPlan;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ q = q.Where(e => e.ProjectId == projectId);
+ }
+ var qres = from x in q
+ orderby x.CompileDate descending
+ select new
+ {
+ x.MainPlanId,
+ x.PlanCode,
+ x.ProjectId,
+ x.FileName,
+ x.CompileDate,
+ x.CompileMan,
+ x.State,
+ StateStr = ConvertState(x.State),
+ CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
+ FilePath = x.FilePath,
+ };
+ List res = new List();
+ var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
+ foreach (var item in list)
+ {
+ Model.Plan_MainPlan cd = new Model.Plan_MainPlan();
+ cd.MainPlanId = item.MainPlanId;
+ cd.ProjectId = item.ProjectId;
+ cd.PlanCode = item.PlanCode;
+ cd.FileName = item.FileName;
+ cd.CompileDate = item.CompileDate;
+ cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
+ cd.State = item.State + "$" + item.StateStr;
+ cd.FilePath = item.FilePath;
+ res.Add(cd);
+ }
+ return res;
+ }
+ }
+
+ ///
+ /// 获取总包施工计划信息
+ ///
+ ///
+ ///
+ public static Model.Plan_MainPlan GetMainPlanByMainPlanIdForApi(string MainPlanId)
+ {
+ var q = Funs.DB.Plan_MainPlan.FirstOrDefault(e => e.MainPlanId == MainPlanId);
+ if (q != null)
+ {
+ q.State = q.State + "$" + ConvertState(q.State);
+ q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
+ }
+ return q;
+ }
}
}
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
index 4e366fee..ace062f5 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
@@ -259,5 +259,42 @@ namespace BLL
db.SubmitChanges();
}
}
+
+ public static List getApproveListDataByIdForApi(string SubPlanId)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var q = from x in db.Plan_SubPlanApprove
+ where x.SubPlanId == SubPlanId && x.ApproveDate != null && x.ApproveType != "S"
+ orderby x.ApproveDate
+ select new
+ {
+ x.SubPlanApproveId,
+ x.SubPlanId,
+ ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
+ x.ApproveDate,
+ x.IsAgree,
+ x.ApproveIdea,
+ x.ApproveType,
+ };
+ List res = new List();
+ var list = q.ToList();
+ foreach (var item in list)
+ {
+ Model.Plan_SubPlanApprove cd = new Model.Plan_SubPlanApprove();
+ cd.SubPlanApproveId = item.SubPlanApproveId;
+ cd.SubPlanId = item.SubPlanId;
+ cd.ApproveMan = item.ApproveMan;
+ cd.ApproveDate = item.ApproveDate;
+ cd.IsAgree = item.IsAgree;
+ cd.ApproveIdea = item.ApproveIdea;
+ cd.ApproveType = item.ApproveType;
+ res.Add(cd);
+ }
+ return res;
+ }
+ }
+
+
}
}
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
index 18508b10..2e909131 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
@@ -198,5 +198,78 @@ namespace BLL
rootNode.Nodes.Add(roleNode);
}
}
+
+ public static List getListDataForApi(string projectId, int startRowIndex, int maximumRows)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ IQueryable q = db.Plan_SubPlan;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ q = q.Where(e => e.ProjectId == projectId);
+ }
+ var qres = from x in q
+ orderby x.CompileDate descending
+ select new
+ {
+ x.SubPlanId,
+ x.ProjectId,
+ x.Code,
+ x.UnitId,
+ x.PlanName,
+ x.UnitWorkIds,
+ x.CNProfessionalCodes,
+ x.CompileDate,
+ x.CompileMan,
+ x.State,
+ x.Edition,
+ StateStr = ConvertState(x.State),
+ CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
+ UnitName = BLL.UnitService.GetUnitNameByUnitId(x.UnitId),
+ UnitWorkNames=BLL.UnitWorkService.GetUnitWorkName(x.UnitWorkIds),
+ CNProfessionalNames=BLL.CNProfessionalService.GetCNProfessionalNameByCode(x.CNProfessionalCodes),
+ FilePath = x.FilePath,
+ };
+ List res = new List();
+ var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
+ foreach (var item in list)
+ {
+ Model.Plan_SubPlan cd = new Model.Plan_SubPlan();
+ cd.SubPlanId = item.SubPlanId;
+ cd.ProjectId = item.ProjectId;
+ cd.Code = item.Code;
+ cd.UnitId=item.UnitId + "$" + item.UnitName;
+ cd.PlanName = item.PlanName;
+ cd.UnitWorkIds=item.UnitWorkIds + "$" + item.UnitWorkNames;
+ cd.CNProfessionalCodes = item.CNProfessionalCodes + "$" + item.CNProfessionalNames;
+ cd.CompileDate = item.CompileDate;
+ cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
+ cd.State = item.State + "$" + item.StateStr;
+ cd.Edition = item.Edition;
+ cd.FilePath = item.FilePath;
+ res.Add(cd);
+ }
+ return res;
+ }
+ }
+
+ ///
+ /// 根据分包施工质量计划Id获取一个分包施工质量计划信息
+ ///
+ /// 分包施工质量计划Id
+ /// 一个分包施工质量计划实体
+ public static Model.Plan_SubPlan GetSubPlanBySubPlanIdForApi(string SubPlanId)
+ {
+ var q= Funs.DB.Plan_SubPlan.FirstOrDefault(x => x.SubPlanId == SubPlanId);
+ if (q != null)
+ {
+ q.UnitId = q.UnitId + "$" + BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
+ q.UnitWorkIds = q.UnitWorkIds + "$" + BLL.UnitWorkService.GetUnitWorkName(q.UnitWorkIds);
+ q.CNProfessionalCodes = q.CNProfessionalCodes + "$" + BLL.CNProfessionalService.GetCNProfessionalNameByCode(q.CNProfessionalCodes);
+ q.CompileMan=q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
+ q.State = q.State + "$" + ConvertState(q.State);
+ }
+ return q;
+ }
}
}
diff --git a/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs b/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs
index 7cc594e8..f154bf80 100644
--- a/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs
+++ b/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs
@@ -78,5 +78,162 @@ namespace BLL
db.SubmitChanges();
}
}
+
+ //
+ //获取培训对象
+ //
+ //
+ //
+ public static string ConvertPlanTrainPersons(object PlanTrainPersons)
+ {
+ string names = string.Empty;
+ if (PlanTrainPersons != null)
+ {
+ string[] strs = PlanTrainPersons.ToString().Split(',');
+ foreach (var item in strs)
+ {
+ names += BLL.CQMSTrainObjectService.GetTrainObjectNameById(item) + ",";
+ }
+ if (!string.IsNullOrEmpty(names))
+ {
+ names = names.Substring(0, names.Length - 1);
+ }
+ }
+ return names;
+ }
+
+ public static List getListDataForApi(string projectId, int startRowIndex, int maximumRows)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ IQueryable q = db.Train_TrainPlan;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ q = q.Where(e => e.ProjectId == projectId);
+ }
+ var qres = from x in q
+ orderby x.CompileDate descending
+ select new
+ {
+ x.TrainPlanId,
+ x.ProjectId,
+ x.PlanTrainPersons,
+ PlanTrainPersonsStr = ConvertPlanTrainPersons(x.PlanTrainPersons),
+ x.TrainTypeId,
+ TrainTypeName = (from y in db.Base_CQMSTrainType where y.TrainTypeId == x.TrainTypeId select y.TrainTypeName).First(),
+ x.TrainContent,
+ x.PlanTrainDate,
+ x.HostMan,
+ x.RealTrainDate,
+ x.Place,
+ x.TeachHour,
+ x.TrainPersonNum,
+ x.RealTrainPersons,
+ x.CompileDate,
+ x.CompileMan,
+ CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
+ };
+ List res = new List();
+ var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
+ foreach (var item in list)
+ {
+ Model.Train_TrainPlan cd = new Model.Train_TrainPlan();
+ cd.TrainPlanId = item.TrainPlanId;
+ cd.ProjectId = item.ProjectId;
+ cd.PlanTrainPersons = item.PlanTrainPersons + "$" + item.PlanTrainPersonsStr;
+ cd.TrainTypeId = item.TrainTypeId + "$" + item.TrainTypeName;
+ cd.TrainContent = item.TrainContent;
+ cd.PlanTrainDate = item.PlanTrainDate;
+ cd.HostMan = item.HostMan;
+ cd.RealTrainDate = item.RealTrainDate;
+ cd.Place = item.Place;
+ cd.TeachHour = item.TeachHour;
+ cd.TrainPersonNum = item.TrainPersonNum;
+ cd.RealTrainPersons = item.RealTrainPersons;
+ cd.CompileDate = item.CompileDate;
+ cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
+ res.Add(cd);
+ }
+ return res;
+ }
+ }
+
+ ///
+ /// 获取质量培训信息
+ ///
+ ///
+ ///
+ public static Model.Train_TrainPlan GetTraiPlanByTrainPlanIdForApi(string TrainPlanId)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var q = db.Train_TrainPlan.FirstOrDefault(e => e.TrainPlanId == TrainPlanId);
+ if (q != null)
+ {
+ q.PlanTrainPersons = q.PlanTrainPersons + "$" + ConvertPlanTrainPersons(q.PlanTrainPersons);
+ q.TrainTypeId = q.TrainTypeId + "$" + (from y in db.Base_CQMSTrainType where y.TrainTypeId == q.TrainTypeId select y.TrainTypeName).First();
+ q.RealTrainPersons = q.RealTrainPersons + "$" + Person_PersonsService.getPersonsNamesPersonIds(q.RealTrainPersons);
+ q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
+ q.AttachUrl = AttachFileService.getFileUrl(q.TrainPlanId);
+ }
+ return q;
+ }
+ }
+
+ public static void AddTrainPlanForApi(Model.Train_TrainPlan TrainPlan)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.Train_TrainPlan newTrainPlan = new Model.Train_TrainPlan();
+ newTrainPlan.TrainPlanId = TrainPlan.TrainPlanId;
+ newTrainPlan.ProjectId = TrainPlan.ProjectId;
+ newTrainPlan.PlanTrainPersons = TrainPlan.PlanTrainPersons;
+ newTrainPlan.TrainTypeId = TrainPlan.TrainTypeId;
+ newTrainPlan.TrainContent = TrainPlan.TrainContent;
+ newTrainPlan.PlanTrainDate = TrainPlan.PlanTrainDate;
+ newTrainPlan.HostMan = TrainPlan.HostMan;
+ newTrainPlan.RealTrainDate = TrainPlan.RealTrainDate;
+ newTrainPlan.Place = TrainPlan.Place;
+ newTrainPlan.TeachHour = TrainPlan.TeachHour;
+ newTrainPlan.TrainPersonNum = TrainPlan.TrainPersonNum;
+ newTrainPlan.RealTrainPersons = TrainPlan.RealTrainPersons;
+ newTrainPlan.CompileMan = TrainPlan.CompileMan;
+ newTrainPlan.CompileDate = TrainPlan.CompileDate;
+ db.Train_TrainPlan.InsertOnSubmit(newTrainPlan);
+ db.SubmitChanges();
+ }
+ }
+
+ public static void UpdateTrainPlanForApi(Model.Train_TrainPlan TrainPlan)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.Train_TrainPlan newTrainPlan = db.Train_TrainPlan.FirstOrDefault(e => e.TrainPlanId == TrainPlan.TrainPlanId);
+ if (newTrainPlan != null)
+ {
+ if (!string.IsNullOrEmpty(TrainPlan.PlanTrainPersons))
+ newTrainPlan.PlanTrainPersons = TrainPlan.PlanTrainPersons;
+ if (!string.IsNullOrEmpty(TrainPlan.TrainTypeId))
+ newTrainPlan.TrainTypeId = TrainPlan.TrainTypeId;
+ if (!string.IsNullOrEmpty(TrainPlan.TrainContent))
+ newTrainPlan.TrainContent = TrainPlan.TrainContent;
+ if (TrainPlan.PlanTrainDate.HasValue)
+ newTrainPlan.PlanTrainDate = TrainPlan.PlanTrainDate;
+ if (!string.IsNullOrEmpty(TrainPlan.HostMan))
+ newTrainPlan.HostMan = TrainPlan.HostMan;
+ if (TrainPlan.RealTrainDate.HasValue)
+ newTrainPlan.RealTrainDate = TrainPlan.RealTrainDate;
+ if (!string.IsNullOrEmpty(TrainPlan.Place))
+ newTrainPlan.Place = TrainPlan.Place;
+ if (TrainPlan.TeachHour.HasValue)
+ newTrainPlan.TeachHour = TrainPlan.TeachHour;
+ if (TrainPlan.TrainPersonNum.HasValue)
+ newTrainPlan.TrainPersonNum = TrainPlan.TrainPersonNum;
+ if (!string.IsNullOrEmpty(TrainPlan.RealTrainPersons))
+ newTrainPlan.RealTrainPersons = TrainPlan.RealTrainPersons;
+ db.SubmitChanges();
+ }
+ }
+ }
}
}
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx
index 810edde1..e82cb812 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx
@@ -39,6 +39,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.cs
index e915c594..a58c2797 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.cs
@@ -86,6 +86,11 @@ namespace FineUIPro.Web.CQMS.Material
strSql += " AND EquipmentName like @EquipmentName";
listStr.Add(new SqlParameter("@EquipmentName", "%" + this.txtEquipmentName.Text.Trim() + "%"));
}
+ if (!string.IsNullOrEmpty(this.txtSpecificationAndModel.Text.Trim()))
+ {
+ strSql += " AND SpecificationAndModel like @SpecificationAndModel";
+ listStr.Add(new SqlParameter("@SpecificationAndModel", "%" + this.txtSpecificationAndModel.Text.Trim() + "%"));
+ }
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.designer.cs
index fc68e352..af994a1c 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx.designer.cs
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.CQMS.Material {
///
protected global::FineUIPro.TextBox txtEquipmentName;
+ ///
+ /// txtSpecificationAndModel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSpecificationAndModel;
+
///
/// btnSearch 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx b/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx
index 775d0532..1dd2bc54 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx
@@ -39,6 +39,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.cs
index b185ddd0..ae8f9d23 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.cs
@@ -86,6 +86,11 @@ namespace FineUIPro.Web.CQMS.Material
strSql += " AND MaterialName like @MaterialName";
listStr.Add(new SqlParameter("@MaterialName", "%" + this.txtMaterialName.Text.Trim() + "%"));
}
+ if (!string.IsNullOrEmpty(this.txtSpecificationAndModel.Text.Trim()))
+ {
+ strSql += " AND SpecificationAndModel like @SpecificationAndModel";
+ listStr.Add(new SqlParameter("@SpecificationAndModel", "%" + this.txtSpecificationAndModel.Text.Trim() + "%"));
+ }
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.designer.cs
index 3d9e4414..139ead17 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Material/MaterialSearch.aspx.designer.cs
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.CQMS.Material {
///
protected global::FineUIPro.TextBox txtMaterialName;
+ ///
+ /// txtSpecificationAndModel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSpecificationAndModel;
+
///
/// btnSearch 控件。
///
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 1300d94f..e3fd855e 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -212039,6 +212039,8 @@ namespace Model
private System.Nullable _CompileDate;
+ private string _AttachUrl;
+
private EntityRef _Base_CQMSTrainType;
private EntityRef _Base_Project;
@@ -212075,6 +212077,8 @@ namespace Model
partial void OnCompileManChanged();
partial void OnCompileDateChanging(System.Nullable value);
partial void OnCompileDateChanged();
+ partial void OnAttachUrlChanging(string value);
+ partial void OnAttachUrlChanged();
#endregion
public Train_TrainPlan()
@@ -212372,6 +212376,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(1000)")]
+ public string AttachUrl
+ {
+ get
+ {
+ return this._AttachUrl;
+ }
+ set
+ {
+ if ((this._AttachUrl != value))
+ {
+ this.OnAttachUrlChanging(value);
+ this.SendPropertyChanging();
+ this._AttachUrl = value;
+ this.SendPropertyChanged("AttachUrl");
+ this.OnAttachUrlChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Train_TrainPlan_Base_CQMSTrainType", Storage="_Base_CQMSTrainType", ThisKey="TrainTypeId", OtherKey="TrainTypeId", IsForeignKey=true)]
public Base_CQMSTrainType Base_CQMSTrainType
{
diff --git a/SGGL/WebAPI/Controllers/CQMS/CQMSMeetingController.cs b/SGGL/WebAPI/Controllers/CQMS/CQMSMeetingController.cs
new file mode 100644
index 00000000..49972bcf
--- /dev/null
+++ b/SGGL/WebAPI/Controllers/CQMS/CQMSMeetingController.cs
@@ -0,0 +1,16 @@
+using BLL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Web.Http;
+
+namespace WebAPI.Controllers
+{
+ ///
+ /// 质量会议
+ ///
+ public class CQMSMeetingController : ApiController
+ {
+
+ }
+}
diff --git a/SGGL/WebAPI/Controllers/CQMS/CQMSPlanController.cs b/SGGL/WebAPI/Controllers/CQMS/CQMSPlanController.cs
new file mode 100644
index 00000000..9d9d5fec
--- /dev/null
+++ b/SGGL/WebAPI/Controllers/CQMS/CQMSPlanController.cs
@@ -0,0 +1,104 @@
+using BLL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Web.Http;
+
+namespace WebAPI.Controllers
+{
+ ///
+ /// 质量计划
+ ///
+ public class CQMSPlanController : ApiController
+ {
+ ///
+ /// 根据项目id获取总包质量计划列表集合
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData> getMainPlanList(string projectId, int index, int page)
+ {
+ ResponseData> res = new ResponseData>();
+ res.successful = true;
+ res.resultValue = BLL.CQMS_MainPlanService.getListDataForApi(projectId, index, page);
+ return res;
+ }
+
+ ///
+ /// 根据项目id获取分包质量计划列表集合
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData> getSubPlanList(string projectId, int index, int page)
+ {
+ ResponseData> res = new ResponseData>();
+ res.successful = true;
+ res.resultValue = BLL.CQMS_SubPlanService.getListDataForApi(projectId, index, page);
+ return res;
+ }
+ ///
+ /// 根据id获取总包质量计划详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData GetMainPlanByMainPlanId(string id)
+ {
+ ResponseData res = new ResponseData();
+ Plan_MainPlan cd = BLL.CQMS_MainPlanService.GetMainPlanByMainPlanIdForApi(id);
+
+ res.successful = true;
+ res.resultValue = BeanUtil.CopyOjbect(cd, true);
+ return res;
+ }
+ ///
+ /// 根据id获取分包质量计划详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData GetSubPlanBySubPlanId(string id)
+ {
+ ResponseData res = new ResponseData();
+ Plan_SubPlan cd = BLL.CQMS_SubPlanService.GetSubPlanBySubPlanIdForApi(id);
+
+ res.successful = true;
+ res.resultValue = BeanUtil.CopyOjbect(cd, true);
+ return res;
+ }
+ ///
+ /// 根据id获取总包质量计划审批明细
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData> GetMainPlanApproveById(string id)
+ {
+ ResponseData> res = new ResponseData>();
+ res.successful = true;
+ res.resultValue = BLL.CQMS_MainPlanApproveService.getApproveListDataByIdForApi(id);
+ return res;
+
+ }
+ ///
+ /// 根据id获取分包质量计划审批明细
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData> GetSubPlanApproveById(string id)
+ {
+ ResponseData> res = new ResponseData>();
+ res.successful = true;
+ res.resultValue = BLL.CQMS_SubPlanApproveService.getApproveListDataByIdForApi(id);
+ return res;
+
+ }
+ }
+}
diff --git a/SGGL/WebAPI/Controllers/CQMS/CQMSTrainController.cs b/SGGL/WebAPI/Controllers/CQMS/CQMSTrainController.cs
new file mode 100644
index 00000000..eadd83e4
--- /dev/null
+++ b/SGGL/WebAPI/Controllers/CQMS/CQMSTrainController.cs
@@ -0,0 +1,170 @@
+using BLL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Web.Http;
+
+namespace WebAPI.Controllers
+{
+ ///
+ /// 质量培训计划
+ ///
+ public class CQMSTrainController : ApiController
+ {
+ ///
+ /// 根据项目id获取质量培训列表集合
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData> getTrainPlanList(string projectId, int index, int page)
+ {
+ ResponseData> res = new ResponseData>();
+ res.successful = true;
+ res.resultValue = BLL.CQMS_TrainPlanService.getListDataForApi(projectId, index, page);
+ return res;
+ }
+
+ ///
+ /// 根据id获取质量培训详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData GetTrainPlanByTrainPlanId(string id)
+ {
+ ResponseData res = new ResponseData();
+ Train_TrainPlan cd = BLL.CQMS_TrainPlanService.GetTraiPlanByTrainPlanIdForApi(id);
+
+ res.successful = true;
+ res.resultValue = BeanUtil.CopyOjbect(cd, true);
+ return res;
+ }
+ ///
+ /// 保存质量培训
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ResponseData AddTrainPlan([FromBody] Model.Train_TrainPlan trainPlan)
+ {
+ ResponseData res = new ResponseData();
+ try
+ {
+ if (string.IsNullOrEmpty(trainPlan.TrainPlanId))
+ {
+ trainPlan.TrainPlanId = Guid.NewGuid().ToString();
+ BLL.CQMS_TrainPlanService.AddTrainPlanForApi(trainPlan);
+ SaveAttachFile(trainPlan.TrainPlanId, BLL.Const.CQMSTrainPlanMenuId, trainPlan.AttachUrl);
+ res.resultValue = trainPlan.TrainPlanId;
+ res.successful = true;
+ }
+ else
+ {
+ BLL.CQMS_TrainPlanService.UpdateTrainPlanForApi(trainPlan);
+ SaveAttachFile(trainPlan.TrainPlanId, BLL.Const.CQMSTrainPlanMenuId, trainPlan.AttachUrl);
+ res.resultValue = trainPlan.TrainPlanId;
+ res.successful = true;
+ }
+ }
+ catch (Exception e)
+ {
+ res.successful = false;
+ res.resultHint = e.StackTrace;
+ }
+ return res;
+ }
+
+ ///
+ ///
+ ///
+ public static void SaveAttachFile(string dataId, string menuId, string url)
+ {
+ Model.ToDoItem toDoItem = new Model.ToDoItem
+ {
+ MenuId = menuId,
+ DataId = dataId,
+ UrlStr = url,
+ };
+ APIUpLoadFileService.SaveAttachUrl(toDoItem);
+ }
+
+ ///
+ /// 获取培训对象列表信息
+ ///
+ ///
+ public Model.ResponeData getPlanTrainPersons()
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = APIBaseInfoService.getPlanTrainPersons();
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+
+ ///
+ /// 获取培训类别列表信息
+ ///
+ ///
+ public Model.ResponeData getTrainType()
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = APIBaseInfoService.getCQMSTrainType();
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+
+ ///
+ /// 获取培训主持人信息
+ ///
+ ///
+ public Model.ResponeData getHostMan(string projectId)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = APIBaseInfoService.getCQMSTrainHostMan(projectId);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+
+ ///
+ /// 获取参与培训教育人员信息
+ ///
+ ///
+ public Model.ResponeData getRealTrainPersons(string projectId)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = APIBaseInfoService.getRealTrainPersons(projectId);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+ }
+}
diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj
index 30f4ed47..68fcd3cf 100644
--- a/SGGL/WebAPI/WebAPI.csproj
+++ b/SGGL/WebAPI/WebAPI.csproj
@@ -167,7 +167,10 @@
+
+
+
From 03a1e1e405c369e185d6d6c7a3d8e08ea3bd6159 Mon Sep 17 00:00:00 2001
From: gaofei <181547018@qq.com>
Date: Wed, 15 Mar 2023 11:10:58 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?=
=?UTF-8?q?=E6=8A=A5=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2023-03-15.sql | 2 ++
.../CQMS/Material/InspectionEdit.aspx.cs | 10 +++++-----
SGGL/Model/Model.cs | 20 +++++++++----------
3 files changed, 17 insertions(+), 15 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2023-03-15.sql
diff --git a/DataBase/版本日志/SGGLDB_V2023-03-15.sql b/DataBase/版本日志/SGGLDB_V2023-03-15.sql
new file mode 100644
index 00000000..6af1299c
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-03-15.sql
@@ -0,0 +1,2 @@
+alter table Train_TrainPlan add AttachUrl nvarchar(1000) null
+GO
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx.cs
index de72a83b..f4784d9b 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx.cs
@@ -428,11 +428,11 @@ namespace FineUIPro.Web.CQMS.Material
{
err += "请选择单位!";
}
- var att = BLL.AttachFileService.GetAttachFileByToKeyId(this.InspectionId);
- if (att == null)
- {
- err += "请上传质量证明文件!";
- }
+ //var att = BLL.AttachFileService.GetAttachFileByToKeyId(this.InspectionId);
+ //if (att == null)
+ //{
+ // err += "请上传质量证明文件!";
+ //}
if (!string.IsNullOrWhiteSpace(err))
{
Alert.ShowInTop(err, MessageBoxIcon.Warning);
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 264bee57..a794e290 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -74047,7 +74047,7 @@ namespace Model
OnCreated();
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string MaterialCode
{
get
@@ -74151,7 +74151,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(3000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string MaterialDef
{
get
@@ -78741,7 +78741,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
public string MaterialCode
{
get
@@ -83089,7 +83089,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
public string CanWelderCode
{
get
@@ -122458,7 +122458,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(100)")]
public string MaterialName
{
get
@@ -122478,7 +122478,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(200)")]
public string SpecificationAndModel
{
get
@@ -122498,7 +122498,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(100)")]
public string MaterialCode
{
get
@@ -122518,7 +122518,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(100)")]
public string Material
{
get
@@ -181587,7 +181587,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(100)")]
public string RewardAndPunishDecision
{
get
@@ -236068,7 +236068,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
public string CanWelderCode
{
get
From 0b1b5f4731cb2614f96d527693e83ae803c03b2b Mon Sep 17 00:00:00 2001
From: gaofei <181547018@qq.com>
Date: Wed, 15 Mar 2023 12:28:32 +0800
Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?=
=?UTF-8?q?=E6=8A=A5=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CQMS/Material/EquipmentSearch.aspx | 3 +++
.../CQMS/Material/InspectionEdit.aspx | 4 +--
.../CQMS/Material/InspectionEdit.aspx.cs | 25 +++++++++++--------
.../CQMS/Material/MaterialSearch.aspx | 3 +++
4 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx
index e82cb812..ace3bc66 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Material/EquipmentSearch.aspx
@@ -82,6 +82,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx
index 01ac0c59..770ca1ea 100644
--- a/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Material/InspectionEdit.aspx
@@ -124,7 +124,7 @@
-
+
@@ -166,7 +166,7 @@
-
+
+
+
From f2a3954a441a9e0ce0d40841ca82e8b2dc7d15e6 Mon Sep 17 00:00:00 2001
From: gaofei <181547018@qq.com>
Date: Wed, 15 Mar 2023 16:56:14 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?=
=?UTF-8?q?=E8=AE=A1=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs | 10 ++++++++++
SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs | 5 +++--
SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs | 11 ++++++++++-
SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs | 5 +++--
SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx | 2 +-
SGGL/FineUIPro.Web/CQMS/Plan/SubPlanEdit.aspx | 2 +-
SGGL/FineUIPro.Web/CQMS/Plan/SubPlanView.aspx | 2 +-
7 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
index 4c15c203..ccdf36ee 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
@@ -115,6 +115,16 @@ namespace BLL
{
return db.Plan_MainPlanApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == state);
}
+ public static string GetHandleManName(string MainPlanId)
+ {
+ string name = string.Empty;
+ var a= Funs.DB.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveDate == null);
+ if (a != null)
+ {
+ name = BLL.Person_PersonsService.GetPersonsNameById(a.ApproveMan);
+ }
+ return name;
+ }
///
/// 修改总包施工计划审批信息
///
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
index 4bbe5917..67f9df2d 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
@@ -195,6 +195,7 @@ namespace BLL
x.State,
StateStr = ConvertState(x.State),
CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
+ HandleManName = BLL.CQMS_MainPlanApproveService.GetHandleManName(x.State),
FilePath = x.FilePath,
};
List res = new List();
@@ -208,7 +209,7 @@ namespace BLL
cd.FileName = item.FileName;
cd.CompileDate = item.CompileDate;
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
- cd.State = item.State + "$" + item.StateStr;
+ cd.State = item.State + "$" + item.StateStr + "&" + item.HandleManName;
cd.FilePath = item.FilePath;
res.Add(cd);
}
@@ -226,7 +227,7 @@ namespace BLL
var q = Funs.DB.Plan_MainPlan.FirstOrDefault(e => e.MainPlanId == MainPlanId);
if (q != null)
{
- q.State = q.State + "$" + ConvertState(q.State);
+ q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_MainPlanApproveService.GetHandleManName(q.State);
q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
}
return q;
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
index ace062f5..93a47911 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
@@ -295,6 +295,15 @@ namespace BLL
}
}
-
+ public static string GetHandleManName(string SubPlanId)
+ {
+ string name = string.Empty;
+ var a = Funs.DB.Plan_SubPlanApprove.FirstOrDefault(x => x.SubPlanId == SubPlanId && x.ApproveDate == null);
+ if (a != null)
+ {
+ name = BLL.Person_PersonsService.GetPersonsNameById(a.ApproveMan);
+ }
+ return name;
+ }
}
}
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
index 2e909131..57c64856 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
@@ -228,6 +228,7 @@ namespace BLL
UnitName = BLL.UnitService.GetUnitNameByUnitId(x.UnitId),
UnitWorkNames=BLL.UnitWorkService.GetUnitWorkName(x.UnitWorkIds),
CNProfessionalNames=BLL.CNProfessionalService.GetCNProfessionalNameByCode(x.CNProfessionalCodes),
+ HandleManName = BLL.CQMS_SubPlanApproveService.GetHandleManName(x.State),
FilePath = x.FilePath,
};
List res = new List();
@@ -244,7 +245,7 @@ namespace BLL
cd.CNProfessionalCodes = item.CNProfessionalCodes + "$" + item.CNProfessionalNames;
cd.CompileDate = item.CompileDate;
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
- cd.State = item.State + "$" + item.StateStr;
+ cd.State = item.State + "$" + item.StateStr + "&" + item.HandleManName;
cd.Edition = item.Edition;
cd.FilePath = item.FilePath;
res.Add(cd);
@@ -267,7 +268,7 @@ namespace BLL
q.UnitWorkIds = q.UnitWorkIds + "$" + BLL.UnitWorkService.GetUnitWorkName(q.UnitWorkIds);
q.CNProfessionalCodes = q.CNProfessionalCodes + "$" + BLL.CNProfessionalService.GetCNProfessionalNameByCode(q.CNProfessionalCodes);
q.CompileMan=q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
- q.State = q.State + "$" + ConvertState(q.State);
+ q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_SubPlanApproveService.GetHandleManName(q.State);
}
return q;
}
diff --git a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx
index 98f66789..305ed6c3 100644
--- a/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Plan/SubPlan.aspx
@@ -140,7 +140,7 @@
-
+
-
+
-
+
Date: Thu, 16 Mar 2023 10:48:42 +0800
Subject: [PATCH 5/7] =?UTF-8?q?20230316=E6=96=B0=E5=A2=9E=E4=BA=BA?=
=?UTF-8?q?=E5=91=98=E5=87=BA=E5=85=A5=E8=AE=B0=E5=BD=95=E6=93=8D=E4=BD=9C?=
=?UTF-8?q?=E6=97=A5=E5=BF=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/API/APIPersonService.cs | 13 +-
SGGL/BLL/API/HTGL/APIHTGLPersonService.cs | 138 ------------------
.../SitePerson_PersonItemService.cs | 12 +-
.../SitePerson/SitePerson_PersonService.cs | 26 +++-
SGGL/BLL/Person/Person_PersonsService.cs | 5 +-
SGGL/BLL/SysManage/LogService.cs | 65 +++++++++
.../CQMS/PersonManage/TestRecordEdit.aspx.cs | 3 +-
.../HSSE/SitePerson/PersonOut.aspx.cs | 13 +-
.../HSSE/SitePerson/PersonUnitRefresh.aspx.cs | 4 +-
.../Person/DepartPersonShunt.aspx.cs | 12 +-
.../Person/PersonItemEdit.aspx.cs | 2 +-
.../Person/ProjectPersonEdit.aspx.cs | 12 +-
.../ProjectData/ProjectUser.aspx.cs | 13 +-
.../ProjectData/ProjectUserSave.aspx.cs | 13 +-
.../Controllers/HTGL/HTGLPersonController.cs | 3 +-
15 files changed, 173 insertions(+), 161 deletions(-)
diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs
index 7fb52841..deaae098 100644
--- a/SGGL/BLL/API/APIPersonService.cs
+++ b/SGGL/BLL/API/APIPersonService.cs
@@ -1,4 +1,6 @@
using Microsoft.SqlServer.Dts.Runtime;
+using Model;
+using NPOI.SS.Formula.PTG;
using System;
using System.Collections.Generic;
using System.Configuration;
@@ -572,7 +574,16 @@ namespace BLL
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
{
- SitePerson_PersonService.UpdateSitePerson(newProjectPerson);
+ Model.Sys_Log newlog = new Sys_Log
+ {
+ UserId = newPerson.PersonId,
+ MenuId = Const.PersonListMenuId,
+ OperationName = "APP修改人员",
+ OperationLog = "修改人员"+newPerson.PersonName,
+ DataId = newPerson.PersonId,
+ ProjectId = person.ProjectId,
+ };
+ SitePerson_PersonService.UpdateSitePerson(newProjectPerson, newlog);
}
else
{
diff --git a/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs b/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs
index e90de5b6..0bffb795 100644
--- a/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs
+++ b/SGGL/BLL/API/HTGL/APIHTGLPersonService.cs
@@ -150,144 +150,6 @@ namespace BLL
}
}
- public static void AddProjectUser(string ProjectCode, string UserID)
- {
- Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString);
- Base_Project base_Project = new Base_Project();
- SitePerson_Person sitePerson = new SitePerson_Person();
- base_Project = BLL.ProjectService.GetProjectByProjectCode(ProjectCode);
- if (base_Project == null)
- {
- return;
- }
- var ProUser = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(base_Project.ProjectId, UserID);
- if (ProUser == null)
- {
- sitePerson.SitePersonId = SQLHelper.GetNewID();
- sitePerson.ProjectId = base_Project.ProjectId;
- sitePerson.PersonId = UserID;
- sitePerson.UnitId = Const.UnitId_SEDIN;
- sitePerson.States = Const.State_1;
- SitePerson_PersonService.AddSitePerson(ProUser);
- }
- else
- {
- ProUser.ProjectId = base_Project.ProjectId;
- ProUser.PersonId = UserID;
- ProUser.UnitId = Const.UnitId_SEDIN;
- ProUser.States = Const.State_1;
- SitePerson_PersonService.UpdateSitePerson(ProUser);
-
- }
- }
-
-
- public static Pro_Person SavePro_Person(Pro_Person PersonjsonData)
- {
- using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
- {
- Pro_Person rb = PersonjsonData;
-
- Pro_Person _Person = new Pro_Person
- {
- data = new List()
- };
- foreach (Pro_PersonDataItem item in rb.data)
- {
- try
- {
- if (CheckDataIsNull(item)) //判断参数是否有空值
- {
- Pro_PersonDataItem pro_personDataItem = new Pro_PersonDataItem
- {
- ProjectCode = item.ProjectCode,
- UserCode = item.UserCode,
- UserName = item.UserName,
- IdentityCard = item.IdentityCard
- };
-
- _Person.data.Add(pro_personDataItem);
- _Person.Message += item.UserCode + "--参数有误存在null值|";
- continue;
- }
-
-
- if (item.UserCode == null || item.UserCode == "")
- {
- Pro_PersonDataItem pro_personDataItem = new Pro_PersonDataItem
- {
- ProjectCode = item.ProjectCode,
- UserCode = item.UserCode,
- UserName = item.UserName,
- IdentityCard = item.IdentityCard
- };
-
- _Person.data.Add(pro_personDataItem);
- _Person.Message += item.UserCode + "--身份证信息有误|";
- continue;
- }
-
- if (item.ProjectCode == null || item.ProjectCode == "")
- {
- Pro_PersonDataItem pro_personDataItem = new Pro_PersonDataItem
- {
- ProjectCode = item.ProjectCode,
- UserCode = item.UserCode,
- UserName = item.UserName,
- IdentityCard = item.IdentityCard
- };
-
- _Person.data.Add(pro_personDataItem);
- _Person.Message += item.UserCode + "--项目代号不能为空|";
- continue;
- }
-
- var getPerson = Person_PersonsService.GetPerson_PersonsByJobNum(item.UserCode);
- if (getPerson != null)
- {
- getPerson.JobNum = item.UserCode;
- getPerson.PersonName = item.UserName;
- getPerson.DataFrom = "API";
- db.SubmitChanges();
- APIHTGLPersonService.AddProjectUser(item.ProjectCode, getPerson.PersonId);
- }
- else
- {
- string newKeyID = SQLHelper.GetNewID();
- Model.Person_Persons newUser = new Model.Person_Persons
- {
- PersonId = newKeyID,
- Account = item.UserCode,
- JobNum = item.UserCode,
- PersonName = item.UserName,
- IdentityCard = item.IdentityCard,
- UnitId = Const.UnitId_SEDIN,
- Password = Funs.EncryptionPassword(Const.Password),
- DataFrom = "API",
- };
- db.Person_Persons.InsertOnSubmit(newUser);
- db.SubmitChanges();
- AddProjectUser(item.ProjectCode, newKeyID);
- }
- }
- catch (Exception ex)
- {
- Pro_PersonDataItem pro_personDataItem = new Pro_PersonDataItem
- {
- ProjectCode = item.ProjectCode,
- UserCode = item.UserCode,
- UserName = item.UserName,
- IdentityCard = item.IdentityCard
- };
-
- _Person.data.Add(pro_personDataItem);
- _Person.Message += ex.Message;
- }
- }
- return _Person;
- }
- }
-
private static bool CheckDataIsNull(object t)
{
bool Isok = false;
diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs
index d7433eef..19fcd73e 100644
--- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs
@@ -1,6 +1,7 @@
using FineUIPro;
using Microsoft.Office.Interop.Excel;
using Microsoft.SqlServer.Dts.Runtime;
+using Model;
using System;
using System.Collections;
using System.Linq;
@@ -115,7 +116,7 @@ namespace BLL
/// 设置人员进出场
///
///
- public static void SetPersonItemInOut(Model.SitePerson_Person sitePerson)
+ public static void SetPersonItemInOut(Model.SitePerson_Person sitePerson, Model.Sys_Log log)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
@@ -144,7 +145,7 @@ namespace BLL
InTime = sitePerson.InTime,
};
- AddPersonItem(newPersonItem);
+ AddPersonItem(newPersonItem, log);
if (!getPersons.MultiProject.HasValue || getPersons.MultiProject == false)
{
var getOtherPersons = db.SitePerson_Person.Where(x => x.IdentityCard == sitePerson.IdentityCard && x.ProjectId != sitePerson.ProjectId && x.States == Const.ProjectPersonStates_1);
@@ -182,7 +183,7 @@ namespace BLL
/// 增加 人员进场
///
/// 实体
- public static void AddPersonItem(Model.SitePerson_PersonItem newitem)
+ public static void AddPersonItem(Model.SitePerson_PersonItem newitem, Model.Sys_Log log)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
@@ -271,6 +272,11 @@ namespace BLL
db.SitePerson_PersonItem.InsertOnSubmit(newPersonItem);
db.SubmitChanges();
}
+ ///更新人员出入记录日志
+ if (log != null)
+ {
+ LogService.AddSys_Log(log);
+ }
}
}
}
diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
index 9f8481e8..1c4a3268 100644
--- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
@@ -1,5 +1,7 @@
using FineUIPro;
+using Microsoft.SqlServer.Dts.Runtime;
using Model;
+using NPOI.SS.Formula.PTG;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -697,9 +699,9 @@ namespace BLL
Isprint = "0",
States = person.States,
};
- ////现场人员项目出入场记录
- SitePerson_PersonItemService.SetPersonItemInOut(newPerson);
+ ////现场人员项目出入场记录
+ SitePerson_PersonItemService.SetPersonItemInOut(newPerson, null);
db.SitePerson_Person.InsertOnSubmit(newPerson);
db.SubmitChanges();
}
@@ -709,7 +711,7 @@ namespace BLL
/// 修改人员信息
///
/// 人员实体
- public static void UpdateSitePerson(Model.SitePerson_Person person)
+ public static void UpdateSitePerson(Model.SitePerson_Person person, Model.Sys_Log newlog)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
@@ -790,9 +792,9 @@ namespace BLL
}
}
if (setPersonItemInOut)
- {
+ {
////现场人员项目出入场记录
- SitePerson_PersonItemService.SetPersonItemInOut(newPerson);
+ SitePerson_PersonItemService.SetPersonItemInOut(newPerson,newlog);
}
}
}
@@ -850,7 +852,7 @@ namespace BLL
{
////现场人员项目出入场记录
person.States = Const.ProjectPersonStates_2;
- SitePerson_PersonItemService.SetPersonItemInOut(person);
+ SitePerson_PersonItemService.SetPersonItemInOut(person, null);
Funs.DB.SitePerson_Person.DeleteOnSubmit(person);
Funs.DB.SubmitChanges();
@@ -980,8 +982,18 @@ namespace BLL
}
Funs.DB.SubmitChanges();
+ Model.Sys_Log newlog = new Sys_Log
+ {
+ UserId = getSitePerson.AuditorId,
+ MenuId = Const.PersonListMenuId,
+ OperationName = "现场人员审核",
+ OperationLog = "现场人员审核" + getSitePerson.PersonName,
+ DataId = getSitePerson.PersonId,
+ ProjectId = getSitePerson.ProjectId,
+ };
+
////现场人员项目出入场记录
- SitePerson_PersonItemService.SetPersonItemInOut(getSitePerson);
+ SitePerson_PersonItemService.SetPersonItemInOut(getSitePerson, newlog);
}
}
}
diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs
index 3f866072..9b42a026 100644
--- a/SGGL/BLL/Person/Person_PersonsService.cs
+++ b/SGGL/BLL/Person/Person_PersonsService.cs
@@ -776,7 +776,10 @@ namespace BLL
newPerson.IdcardEndDate = person.IdcardEndDate;
newPerson.IdcardForever = person.IdcardForever;
newPerson.IdcardAddress = person.IdcardAddress;
- newPerson.Telephone = person.Telephone;
+ if (!string.IsNullOrEmpty(person.Telephone) && newPerson.Telephone != person.Telephone)
+ {
+ newPerson.Telephone = person.Telephone;
+ }
newPerson.Birthday = person.Birthday;
newPerson.Sex = person.Sex;
newPerson.Address = person.Address;
diff --git a/SGGL/BLL/SysManage/LogService.cs b/SGGL/BLL/SysManage/LogService.cs
index 1df5bb90..551618ac 100644
--- a/SGGL/BLL/SysManage/LogService.cs
+++ b/SGGL/BLL/SysManage/LogService.cs
@@ -1,5 +1,6 @@
namespace BLL
{
+ using NPOI.SS.Formula.PTG;
using System;
using System.Linq;
using System.Net;
@@ -73,6 +74,70 @@ namespace BLL
}
}
+ ///
+ /// Ӳ־
+ ///
+ ///
+ ///
+ /// ID
+ /// ˵ID
+ ///
+ public static void AddSys_Log(Model.Sys_Log newsyslog)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ if (newsyslog != null)
+ {
+ Model.Sys_Log syslog = new Model.Sys_Log
+ {
+ LogId = SQLHelper.GetNewID(),
+ HostName = Dns.GetHostName(),
+ OperationTime = DateTime.Now,
+ UserId = newsyslog.UserId,
+ MenuId = newsyslog.MenuId,
+ OperationName = newsyslog.OperationName,
+ DataId = newsyslog.DataId,
+ LogSource = 1,
+ };
+
+ IPAddress[] ips = Dns.GetHostAddresses(syslog.HostName);
+ if (ips.Length > 0)
+ {
+ foreach (IPAddress ip in ips)
+ {
+ if (ip.ToString().IndexOf('.') != -1)
+ {
+ syslog.Ip = ip.ToString();
+ }
+ }
+ }
+ string opLog = string.Empty;
+ var menu = db.Sys_Menu.FirstOrDefault(x => x.MenuId == newsyslog.MenuId);
+ if (menu != null)
+ {
+ opLog = menu.MenuName + ":";
+ }
+
+ if (!string.IsNullOrEmpty(newsyslog.OperationName))
+ {
+ opLog += newsyslog.OperationName;
+ }
+
+ if (!string.IsNullOrEmpty(newsyslog.OperationLog))
+ {
+ syslog.OperationLog = opLog + "" + newsyslog.OperationLog + "";
+ }
+
+ if (!string.IsNullOrEmpty(newsyslog.ProjectId) && newsyslog.ProjectId != "null")
+ {
+ syslog.ProjectId = newsyslog.ProjectId;
+ }
+
+ db.Sys_Log.InsertOnSubmit(syslog);
+ db.SubmitChanges();
+ }
+ }
+ }
///
/// ĿIdɾ־Ϣ
///
diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordEdit.aspx.cs
index 02d17db5..9ad3367f 100644
--- a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestRecordEdit.aspx.cs
@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using AspNet = System.Web.UI.WebControls;
+using Model;
namespace FineUIPro.Web.CQMS.PersonManage
{
@@ -165,7 +166,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
if (welder != null)
{
welder.States = Const.ProjectPersonStates_2;
- BLL.SitePerson_PersonService.UpdateSitePerson(welder);
+ Funs.DB.SubmitChanges();
}
}
}
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonOut.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonOut.aspx.cs
index 18d39d59..4055d554 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonOut.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonOut.aspx.cs
@@ -1,4 +1,5 @@
using BLL;
+using Model;
using System;
using System.Collections.Generic;
using System.Data;
@@ -85,7 +86,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
person.OutTime = Funs.GetNewDateTime(this.txtChangeTime.Text);
person.States = Const.State_2;
- BLL.SitePerson_PersonService.UpdateSitePerson(person);
+ Model.Sys_Log newlog = new Sys_Log
+ {
+ UserId = this.CurrUser.PersonId,
+ MenuId = Const.PersonListMenuId,
+ OperationName = "现场人员出场",
+ OperationLog = "现场人员出场" + person.PersonName,
+ DataId = person.PersonId,
+ ProjectId = person.ProjectId,
+ };
+
+ BLL.SitePerson_PersonService.UpdateSitePerson(person, newlog);
}
}
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitRefresh.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitRefresh.aspx.cs
index 26b3c80d..44427b9f 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitRefresh.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitRefresh.aspx.cs
@@ -117,13 +117,13 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
person.TeamGroupId = null;
}
- BLL.SitePerson_PersonService.UpdateSitePerson(person);
+ Funs.DB.SubmitChanges();
var getPerson = Person_PersonsService.GetPerson_PersonsById(person.PersonId);
if (getPerson != null)
{
getPerson.UnitId = person.UnitId;
- Person_PersonsService.UpdatePerson(getPerson);
+ Funs.DB.SubmitChanges();
}
}
}
diff --git a/SGGL/FineUIPro.Web/Person/DepartPersonShunt.aspx.cs b/SGGL/FineUIPro.Web/Person/DepartPersonShunt.aspx.cs
index 80715aa1..fb0fffea 100644
--- a/SGGL/FineUIPro.Web/Person/DepartPersonShunt.aspx.cs
+++ b/SGGL/FineUIPro.Web/Person/DepartPersonShunt.aspx.cs
@@ -1,5 +1,6 @@
using BLL;
using FastReport.DevComponents.Editors;
+using Model;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -380,7 +381,16 @@ namespace FineUIPro.Web.Person
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
{
- SitePerson_PersonService.UpdateSitePerson(newProjectPerson);
+ Model.Sys_Log newlog = new Sys_Log
+ {
+ UserId = this.CurrUser.PersonId,
+ MenuId = Const.PersonListMenuId,
+ OperationName = "部门人员",
+ OperationLog = "部门人员修改" + newProjectPerson.PersonName,
+ DataId = newProjectPerson.PersonId,
+ ProjectId = newProjectPerson.ProjectId,
+ };
+ SitePerson_PersonService.UpdateSitePerson(newProjectPerson,newlog);
LogService.AddSys_Log(this.CurrUser, newProjectPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnModify);
}
else
diff --git a/SGGL/FineUIPro.Web/Person/PersonItemEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonItemEdit.aspx.cs
index ab490bff..36f9a595 100644
--- a/SGGL/FineUIPro.Web/Person/PersonItemEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/Person/PersonItemEdit.aspx.cs
@@ -165,7 +165,7 @@ namespace FineUIPro.Web.Person
{
this.PersonItemId = SQLHelper.GetNewID();
newData.PersonItemId = this.PersonItemId;
- BLL.SitePerson_PersonItemService.AddPersonItem(newData);
+ BLL.SitePerson_PersonItemService.AddPersonItem(newData,null);
BLL.LogService.AddSys_Log(this.CurrUser, newData.PersonName, newData.PersonItemId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnAdd);
}
diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs
index 3881b7b4..699f074f 100644
--- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs
@@ -708,7 +708,17 @@ namespace FineUIPro.Web.Person
if (!string.IsNullOrEmpty(newProjectPerson.SitePersonId))
{
newProjectPerson.PersonId = this.PersonId;
- SitePerson_PersonService.UpdateSitePerson(newProjectPerson);
+
+ Model.Sys_Log newlog = new Sys_Log
+ {
+ UserId = this.CurrUser.PersonId,
+ MenuId = Const.PersonListMenuId,
+ OperationName = "劳务人员",
+ OperationLog = "劳务人员修改" + newProjectPerson.PersonName,
+ DataId = newProjectPerson.PersonId,
+ ProjectId = newProjectPerson.ProjectId,
+ };
+ SitePerson_PersonService.UpdateSitePerson(newProjectPerson, newlog);
LogService.AddSys_Log(this.CurrUser, newPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnModify);
}
else
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs
index e673dc2e..1067868e 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs
@@ -1,6 +1,7 @@
namespace FineUIPro.Web.ProjectData
{
using BLL;
+ using Model;
using System;
using System.Collections.Generic;
using System.Data;
@@ -122,7 +123,17 @@
{
BLL.RoleItemService.DeleteRoleItem(roleItem.RoleItemId);
}
- SitePerson_PersonService.UpdateSitePerson(projectUser);
+
+ Model.Sys_Log newlog = new Sys_Log
+ {
+ UserId = this.CurrUser.PersonId,
+ MenuId = Const.PersonListMenuId,
+ OperationName = "项目用户",
+ OperationLog = "项目用户删除" + projectUser.PersonName,
+ DataId = projectUser.PersonId,
+ ProjectId = projectUser.ProjectId,
+ };
+ SitePerson_PersonService.UpdateSitePerson(projectUser, newlog);
}
}
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUserSave.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUserSave.aspx.cs
index a1717164..e098ae9f 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectUserSave.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUserSave.aspx.cs
@@ -1,4 +1,5 @@
using BLL;
+using Model;
using System;
using System.Linq;
@@ -114,7 +115,17 @@ namespace FineUIPro.Web.ProjectData
{
newProjectUser.WorkAreaId = string.Join(",", txtUnitWork.Values);
}
- BLL.SitePerson_PersonService.UpdateSitePerson(newProjectUser);
+
+ Model.Sys_Log newlog = new Sys_Log
+ {
+ UserId = this.CurrUser.PersonId,
+ MenuId = Const.PersonListMenuId,
+ OperationName = "项目用户",
+ OperationLog = "项目用户修改" + newProjectUser.PersonName,
+ DataId = newProjectUser.PersonId,
+ ProjectId = newProjectUser.ProjectId,
+ };
+ BLL.SitePerson_PersonService.UpdateSitePerson(newProjectUser, newlog);
///离岗 -todo
Model.Sys_RoleItem roleItem = BLL.RoleItemService.GeRoleItemByUserIdAndProjectId(newProjectUser.PersonId, newProjectUser.ProjectId);
diff --git a/SGGL/WebAPI/Controllers/HTGL/HTGLPersonController.cs b/SGGL/WebAPI/Controllers/HTGL/HTGLPersonController.cs
index de6a021b..1541d776 100644
--- a/SGGL/WebAPI/Controllers/HTGL/HTGLPersonController.cs
+++ b/SGGL/WebAPI/Controllers/HTGL/HTGLPersonController.cs
@@ -53,8 +53,7 @@ namespace WebAPI.Controllers
public Model.ResponeData AddHTGLPerson_Pro([FromBody] Model.Pro_Person PersonjsonData)
{
var responeData = new Model.ResponeData();
- APICommonService.SaveSysHttpLog("API", JsonConvert.SerializeObject(PersonjsonData), "");
-
+
try
{
//var Data = APIHTGLPersonService.SavePro_Person(PersonjsonData);
From 49afa7e25de0c5ea4b0426f5b10cf57c5b51d1c7 Mon Sep 17 00:00:00 2001
From: gaofei <181547018@qq.com>
Date: Thu, 16 Mar 2023 14:35:01 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=B4=A8=E9=87=8F?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2023-03-16.sql | 4 +
SGGL/BLL/API/APIBaseInfoService.cs | 40 +++
SGGL/BLL/API/APIUnitService.cs | 19 ++
.../Meeting/CQMS_MeetingApproveService.cs | 99 +++++++
SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs | 263 +++++++++++++++++-
.../CQMS/Plan/CQMS_MainPlanApproveService.cs | 4 +-
SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs | 6 +-
.../CQMS/Plan/CQMS_SubPlanApproveService.cs | 2 +-
SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs | 6 +-
.../RewardAndPunish/RewardAndPunishService.cs | 68 +++++
SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs | 3 +
.../RewardAndPunish/RewardAndPunish.aspx.cs | 2 +-
SGGL/Model/Model.cs | 24 ++
.../Controllers/CQMS/CQMSMeetingController.cs | 246 ++++++++++++++++
.../CQMS/CQMSRewardAndPunishController.cs | 28 ++
SGGL/WebAPI/Controllers/UnitController.cs | 22 ++
SGGL/WebAPI/WebAPI.csproj | 1 +
17 files changed, 826 insertions(+), 11 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2023-03-16.sql
create mode 100644 SGGL/WebAPI/Controllers/CQMS/CQMSRewardAndPunishController.cs
diff --git a/DataBase/版本日志/SGGLDB_V2023-03-16.sql b/DataBase/版本日志/SGGLDB_V2023-03-16.sql
new file mode 100644
index 00000000..7a903f5f
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-03-16.sql
@@ -0,0 +1,4 @@
+alter table Meeting_CQMSMeeting add AttachUrl nvarchar(1000) null
+GO
+alter table RewardAndPunish_RewardAndPunish add AttachUrl nvarchar(1000) null
+GO
\ No newline at end of file
diff --git a/SGGL/BLL/API/APIBaseInfoService.cs b/SGGL/BLL/API/APIBaseInfoService.cs
index 6b7d9e58..d60e081c 100644
--- a/SGGL/BLL/API/APIBaseInfoService.cs
+++ b/SGGL/BLL/API/APIBaseInfoService.cs
@@ -813,5 +813,45 @@ namespace BLL
return items;
}
#endregion
+
+ #region 获取质量会议主持人
+ ///
+ /// 获取质量会议主持人
+ ///
+ ///
+ public static List getCQMSMeetingHostMan(string projectId,string unitId)
+ {
+ var list = BLL.SitePerson_PersonService.GetSitePerson_PersonListByUnitIdsRoleIds(projectId, unitId, null);
+ List items = new List();
+ foreach (var item in list)
+ {
+ Model.BaseInfoItem b = new Model.BaseInfoItem();
+ b.BaseInfoId = item.PersonId;
+ b.BaseInfoName = item.PersonName;
+ items.Add(b);
+ }
+ return items;
+ }
+ #endregion
+
+ #region 获取质量会议参加人员
+ ///
+ /// 获取质量会议参加人员
+ ///
+ ///
+ public static List getAttentPerson(string projectId)
+ {
+ var list = BLL.SitePerson_PersonService.GetSitePerson_PersonListByProjectIdUnitTypeRoleIds(projectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, null);
+ List items = new List();
+ foreach (var item in list)
+ {
+ Model.BaseInfoItem b = new Model.BaseInfoItem();
+ b.BaseInfoId = item.PersonId;
+ b.BaseInfoName = item.PersonName;
+ items.Add(b);
+ }
+ return items;
+ }
+ #endregion
}
}
diff --git a/SGGL/BLL/API/APIUnitService.cs b/SGGL/BLL/API/APIUnitService.cs
index 3119330e..07519711 100644
--- a/SGGL/BLL/API/APIUnitService.cs
+++ b/SGGL/BLL/API/APIUnitService.cs
@@ -36,6 +36,25 @@ namespace BLL
}
}
+ ///
+ /// 获取项目所有单位信息
+ ///
+ ///
+ ///
+ public static List getProjectUnitLists(string projectId)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var units = (from x in db.Base_Unit
+ join y in db.Project_ProjectUnit
+ on x.UnitId equals y.UnitId
+ where y.ProjectId == projectId
+ orderby x.UnitName
+ select new Model.BaseInfoItem { BaseInfoId = x.UnitId, BaseInfoCode = x.UnitCode, BaseInfoName = x.UnitName }).ToList();
+ return units;
+ }
+ }
+
///
/// 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
///
diff --git a/SGGL/BLL/CQMS/Meeting/CQMS_MeetingApproveService.cs b/SGGL/BLL/CQMS/Meeting/CQMS_MeetingApproveService.cs
index 3fdfdd28..19333ac1 100644
--- a/SGGL/BLL/CQMS/Meeting/CQMS_MeetingApproveService.cs
+++ b/SGGL/BLL/CQMS/Meeting/CQMS_MeetingApproveService.cs
@@ -91,6 +91,18 @@ namespace BLL
}
}
}
+
+ public static string GetHandleManName(string MeetingId)
+ {
+ string name = string.Empty;
+ var a = Funs.DB.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveDate == null);
+ if (a != null)
+ {
+ name = BLL.Person_PersonsService.GetPersonsNameById(a.ApproveMan);
+ }
+ return name;
+ }
+
///
/// 根据质量会议编号获取一个质量会议审批信息
///
@@ -155,5 +167,92 @@ namespace BLL
{
return db.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == BLL.Const.CQMSMeeting_Compile);
}
+
+ public static List GetListDataByIdForApi(string id)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var q = from x in db.Meeting_CQMSMeetingApprove
+ where x.MeetingId == id && x.ApproveDate != null && x.ApproveType != "S"
+ orderby x.ApproveDate
+ select new
+ {
+ x.MeetingApproveId,
+ x.MeetingId,
+ ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
+ x.ApproveDate,
+ x.IsAgree,
+ x.ApproveIdea,
+ x.ApproveType,
+ };
+ List res = new List();
+ var list = q.ToList();
+ foreach (var item in list)
+ {
+ Model.Meeting_CQMSMeetingApprove approve = new Model.Meeting_CQMSMeetingApprove();
+ approve.MeetingApproveId = item.MeetingApproveId;
+ approve.MeetingId = item.MeetingId;
+ approve.ApproveMan = item.ApproveMan;
+ approve.ApproveDate = item.ApproveDate;
+ approve.IsAgree = item.IsAgree;
+ approve.ApproveIdea = item.ApproveIdea;
+ approve.ApproveType = item.ApproveType;
+ res.Add(approve);
+ }
+ return res;
+ }
+ }
+
+ public static Model.Meeting_CQMSMeetingApprove getCurrApproveForApi(string id)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.Meeting_CQMSMeetingApprove newApprove = db.Meeting_CQMSMeetingApprove.FirstOrDefault(e => e.MeetingId == id && e.ApproveType != "S" && e.ApproveDate == null);
+ return newApprove;
+ }
+ }
+
+ public static string AddMeetingApproveForApi(Model.Meeting_CQMSMeetingApprove approve)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ string newKeyID = SQLHelper.GetNewID(typeof(Model.Meeting_CQMSMeetingApprove));
+ Model.Meeting_CQMSMeetingApprove newApprove = new Model.Meeting_CQMSMeetingApprove();
+ newApprove.MeetingApproveId = newKeyID;
+ newApprove.MeetingId = approve.MeetingId;
+ newApprove.ApproveMan = approve.ApproveMan;
+ newApprove.ApproveDate = approve.ApproveDate;
+ newApprove.ApproveIdea = approve.ApproveIdea;
+ newApprove.IsAgree = approve.IsAgree;
+ newApprove.ApproveType = approve.ApproveType;
+
+ db.Meeting_CQMSMeetingApprove.InsertOnSubmit(newApprove);
+ db.SubmitChanges();
+ return newKeyID;
+ }
+ }
+
+ public static void UpdateMeetingApproveForApi(Model.Meeting_CQMSMeetingApprove approve)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.Meeting_CQMSMeetingApprove newApprove = db.Meeting_CQMSMeetingApprove.FirstOrDefault(e => e.MeetingApproveId == approve.MeetingApproveId && e.ApproveDate == null);
+ if (newApprove != null)
+ {
+ if (!string.IsNullOrEmpty(approve.ApproveMan))
+ newApprove.ApproveMan = approve.ApproveMan;
+ if (approve.ApproveDate.HasValue)
+ newApprove.ApproveDate = approve.ApproveDate;
+ if (!string.IsNullOrEmpty(approve.ApproveIdea))
+ newApprove.ApproveIdea = approve.ApproveIdea;
+ if (approve.IsAgree.HasValue)
+ newApprove.IsAgree = approve.IsAgree;
+ if (!string.IsNullOrEmpty(approve.ApproveType))
+ newApprove.ApproveType = approve.ApproveType;
+
+ db.SubmitChanges();
+ }
+ }
+ }
}
}
diff --git a/SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs b/SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs
index 0c5d020c..62d3c889 100644
--- a/SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs
+++ b/SGGL/BLL/CQMS/Meeting/CQMS_MeetingService.cs
@@ -112,7 +112,7 @@ namespace BLL
newCQMSMeeting.MeetingTheme = CQMSMeeting.MeetingTheme;
newCQMSMeeting.MeetingContents = CQMSMeeting.MeetingContents;
newCQMSMeeting.State = CQMSMeeting.State;
-
+
db.SubmitChanges();
}
}
@@ -156,5 +156,266 @@ namespace BLL
else
return null;
}
+
+ ///
+ /// 根据状态选择下一步办理类型
+ ///
+ ///
+ ///
+ public static List GetDHandleTypeByStateForApi(string state)
+ {
+ List list = new List();
+ if (state == Const.CQMSMeeting_Compile || state == Const.CQMSMeeting_ReCompile)
+ {
+ Model.BaseInfoItem item = new Model.BaseInfoItem();
+ item.BaseInfoId = Const.CQMSMeeting_Audit;
+ item.BaseInfoName = "总包质量经理审批";
+ list.Add(item);
+ return list;
+ }
+ else if (state == Const.CQMSMeeting_Audit)
+ {
+ Model.BaseInfoItem item = new Model.BaseInfoItem();
+ item.BaseInfoId = Const.CQMSMeeting_Complete;
+ item.BaseInfoName = "审批完成";
+ list.Add(item);
+ Model.BaseInfoItem item2 = new Model.BaseInfoItem();
+ item2.BaseInfoId = Const.CQMSMeeting_ReCompile;
+ item2.BaseInfoName = "重新编制";
+ list.Add(item2);
+ return list;
+ }
+ else
+ return null;
+ }
+
+ ///
+ /// 根据状态选择下一步办理类型
+ ///
+ ///
+ ///
+ public static List GetHandleManListForApi(string state, string id, string projectId)
+ {
+ List list = new List();
+ if (state == Const.CQMSMeeting_Compile)
+ {
+ return null;
+ }
+ else if (state == Const.CQMSMeeting_ReCompile)
+ {
+ var user = BLL.Person_PersonsService.GetPerson_PersonsById(BLL.CQMS_MeetingApproveService.GetAuditMan(id, BLL.Const.CQMSMeeting_Compile).ApproveMan);
+ Model.BaseInfoItem item = new Model.BaseInfoItem();
+ item.BaseInfoId = user.PersonId;
+ item.BaseInfoName = user.PersonName;
+ list.Add(item);
+ return list;
+ }
+ else if (state == Const.CQMSMeeting_Audit)
+ {
+ var users = BLL.SitePerson_PersonService.GetSitePerson_PersonListByProjectIdUnitTypeRoleIds(projectId, Const.ProjectUnitType_1, null);
+ foreach (var user in users)
+ {
+ Model.BaseInfoItem item = new Model.BaseInfoItem();
+ item.BaseInfoId = user.PersonId;
+ item.BaseInfoName = user.PersonName;
+ list.Add(item);
+ }
+ return list;
+ }
+ else
+ return null;
+ }
+
+ ///
+ /// 把状态转换代号为文字形式
+ ///
+ ///
+ ///
+ public static string ConvertState(object state)
+ {
+ if (state != null)
+ {
+ if (state.ToString() == BLL.Const.CQMSMeeting_ReCompile)
+ {
+ return "重新编制";
+ }
+ else if (state.ToString() == BLL.Const.CQMSMeeting_Compile)
+ {
+ return "编制";
+ }
+ else if (state.ToString() == BLL.Const.CQMSMeeting_Audit)
+ {
+ return "总包质量经理审批";
+ }
+ else if (state.ToString() == BLL.Const.CQMSMeeting_Complete)
+ {
+ return "审批完成";
+ }
+ else
+ {
+ return "";
+ }
+ }
+ return "";
+ }
+
+ public static List getListDataForApi(string projectId, int startRowIndex, int maximumRows, string meetingType)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ IQueryable q = db.Meeting_CQMSMeeting;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ q = q.Where(e => e.ProjectId == projectId);
+ }
+ if (!string.IsNullOrEmpty(meetingType))
+ {
+ q = q.Where(e => e.MeetingType == meetingType);
+ }
+ var qres = from x in q
+ orderby x.CompileDate descending
+ select new
+ {
+ x.MeetingId,
+ x.ProjectId,
+ x.UnitId,
+ UnitName = (from y in db.Base_Unit where y.UnitId == x.UnitId select y.UnitName).First(),
+ x.MeetingType,
+ MeetingTypeStr = x.MeetingType == "M" ? "质量月例会" : "质量专题会",
+ x.MeetingCode,
+ x.MeetingDate,
+ x.Place,
+ x.HostMan,
+ HostManName = BLL.Person_PersonsService.getPersonsNamesPersonIds(x.HostMan),
+ x.AttentPerson,
+ AttentPersonName = BLL.Person_PersonsService.getPersonsNamesPersonIds(x.AttentPerson),
+ x.AttentPersonNum,
+ x.MeetingTheme,
+ x.MeetingContents,
+ x.CompileDate,
+ x.CompileMan,
+ x.State,
+ StateStr = ConvertState(x.State),
+ CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
+ HandleManName = BLL.CQMS_MeetingApproveService.GetHandleManName(x.MeetingId),
+ x.AttachUrl,
+ };
+ List res = new List();
+ var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
+ foreach (var item in list)
+ {
+ Model.Meeting_CQMSMeeting cd = new Model.Meeting_CQMSMeeting();
+ cd.MeetingId = item.MeetingId;
+ cd.ProjectId = item.ProjectId;
+ cd.UnitId = item.UnitId + "$" + item.UnitName;
+ cd.MeetingType = item.MeetingType + "$" + item.MeetingTypeStr;
+ cd.MeetingCode = item.MeetingCode;
+ cd.MeetingDate = item.MeetingDate;
+ cd.Place = item.Place;
+ cd.HostMan = item.HostMan + "$" + item.HostManName;
+ cd.AttentPerson = item.AttentPerson + "$" + item.AttentPersonName;
+ cd.AttentPersonNum = item.AttentPersonNum;
+ cd.MeetingTheme = item.MeetingTheme;
+ cd.MeetingContents = item.MeetingContents;
+ cd.CompileDate = item.CompileDate;
+ cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
+ cd.State = item.State + "$" + item.StateStr + "$" + item.HandleManName;
+ cd.AttachUrl = AttachFileService.getFileUrl(item.MeetingId);
+ res.Add(cd);
+ }
+ return res;
+ }
+ }
+
+ ///
+ /// 获取质量会议信息
+ ///
+ ///
+ ///
+ public static Model.Meeting_CQMSMeeting GetMeetingByMeetingIdForApi(string MeetingId)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var q = db.Meeting_CQMSMeeting.FirstOrDefault(e => e.MeetingId == MeetingId);
+ if (q != null)
+ {
+ q.UnitId = q.UnitId + "$" + BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
+ q.MeetingType = q.MeetingType + "$" + (q.MeetingType == "M" ? "质量月例会" : "质量专题会");
+ q.HostMan = q.HostMan + "$" + BLL.Person_PersonsService.getPersonsNamesPersonIds(q.HostMan);
+ q.AttentPerson = q.AttentPerson + "$" + BLL.Person_PersonsService.getPersonsNamesPersonIds(q.AttentPerson);
+ q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
+ q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_MeetingApproveService.GetHandleManName(q.MeetingId);
+ q.AttachUrl = AttachFileService.getFileUrl(q.MeetingId);
+ }
+ return q;
+ }
+ }
+
+ public static void AddMeetingForApi(Model.Meeting_CQMSMeeting Meeting)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.Meeting_CQMSMeeting newCQMSMeeting = new Model.Meeting_CQMSMeeting
+ {
+ MeetingId = Meeting.MeetingId,
+ ProjectId = Meeting.ProjectId,
+ UnitId = Meeting.UnitId,
+ MeetingType = Meeting.MeetingType,
+ MeetingCode = Meeting.MeetingCode,
+ MeetingDate = Meeting.MeetingDate,
+ Place = Meeting.Place,
+ HostMan = Meeting.HostMan,
+ AttentPerson = Meeting.AttentPerson,
+ AttentPersonNum = Meeting.AttentPersonNum,
+ MeetingTheme = Meeting.MeetingTheme,
+ MeetingContents = Meeting.MeetingContents,
+ State = Meeting.State,
+ CompileMan = Meeting.CompileMan,
+ CompileDate = Meeting.CompileDate,
+ };
+
+ db.Meeting_CQMSMeeting.InsertOnSubmit(Meeting);
+ db.SubmitChanges();
+
+ Model.Meeting_CQMSMeetingApprove approve = new Model.Meeting_CQMSMeetingApprove();
+ approve.MeetingApproveId = BLL.SQLHelper.GetNewID();
+ approve.MeetingId = Meeting.MeetingId;
+ approve.ApproveType = BLL.Const.CQMSMeeting_Compile;
+ approve.ApproveMan = Meeting.CompileMan;
+ approve.ApproveDate = Meeting.CompileDate;
+ db.Meeting_CQMSMeetingApprove.InsertOnSubmit(approve);
+ db.SubmitChanges();
+ }
+ }
+
+ public static void UpdateMeetingForApi(Model.Meeting_CQMSMeeting Meeting)
+ {
+
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.Meeting_CQMSMeeting newMeeting = db.Meeting_CQMSMeeting.First(e => e.MeetingId == Meeting.MeetingId);
+ if (!string.IsNullOrEmpty(Meeting.UnitId))
+ newMeeting.UnitId = Meeting.UnitId;
+ if (!string.IsNullOrEmpty(Meeting.MeetingCode))
+ newMeeting.MeetingCode = Meeting.MeetingCode;
+ if (Meeting.MeetingDate.HasValue)
+ newMeeting.MeetingDate = Meeting.MeetingDate;
+ if (!string.IsNullOrEmpty(Meeting.Place))
+ newMeeting.Place = Meeting.Place;
+ if (!string.IsNullOrEmpty(Meeting.HostMan))
+ newMeeting.HostMan = Meeting.HostMan;
+ if (!string.IsNullOrEmpty(Meeting.AttentPerson))
+ newMeeting.AttentPerson = Meeting.AttentPerson;
+ if (Meeting.AttentPersonNum.HasValue)
+ newMeeting.AttentPersonNum = Meeting.AttentPersonNum;
+ if (!string.IsNullOrEmpty(Meeting.MeetingTheme))
+ newMeeting.MeetingTheme = Meeting.MeetingTheme;
+ if (!string.IsNullOrEmpty(Meeting.MeetingContents))
+ newMeeting.MeetingContents = Meeting.MeetingContents;
+ if (!string.IsNullOrEmpty(Meeting.State))
+ newMeeting.State = Meeting.State;
+ db.SubmitChanges();
+ }
+ }
}
}
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
index ccdf36ee..a27b4b2f 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanApproveService.cs
@@ -118,7 +118,7 @@ namespace BLL
public static string GetHandleManName(string MainPlanId)
{
string name = string.Empty;
- var a= Funs.DB.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveDate == null);
+ var a = Funs.DB.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveDate == null);
if (a != null)
{
name = BLL.Person_PersonsService.GetPersonsNameById(a.ApproveMan);
@@ -246,7 +246,7 @@ namespace BLL
cd.ApproveDate = item.ApproveDate;
cd.IsAgree = item.IsAgree;
cd.ApproveIdea = item.ApproveIdea;
- cd.ApproveType = item.ApproveType;
+ cd.ApproveType = item.ApproveType + "$" + CQMS_MainPlanService.ConvertState(item.ApproveType);
res.Add(cd);
}
return res;
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
index 67f9df2d..0a70204f 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_MainPlanService.cs
@@ -195,7 +195,7 @@ namespace BLL
x.State,
StateStr = ConvertState(x.State),
CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
- HandleManName = BLL.CQMS_MainPlanApproveService.GetHandleManName(x.State),
+ HandleManName = BLL.CQMS_MainPlanApproveService.GetHandleManName(x.MainPlanId),
FilePath = x.FilePath,
};
List res = new List();
@@ -209,7 +209,7 @@ namespace BLL
cd.FileName = item.FileName;
cd.CompileDate = item.CompileDate;
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
- cd.State = item.State + "$" + item.StateStr + "&" + item.HandleManName;
+ cd.State = item.State + "$" + item.StateStr + "$" + item.HandleManName;
cd.FilePath = item.FilePath;
res.Add(cd);
}
@@ -227,7 +227,7 @@ namespace BLL
var q = Funs.DB.Plan_MainPlan.FirstOrDefault(e => e.MainPlanId == MainPlanId);
if (q != null)
{
- q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_MainPlanApproveService.GetHandleManName(q.State);
+ q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_MainPlanApproveService.GetHandleManName(q.MainPlanId);
q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
}
return q;
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
index 93a47911..866c5567 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanApproveService.cs
@@ -288,7 +288,7 @@ namespace BLL
cd.ApproveDate = item.ApproveDate;
cd.IsAgree = item.IsAgree;
cd.ApproveIdea = item.ApproveIdea;
- cd.ApproveType = item.ApproveType;
+ cd.ApproveType = item.ApproveType + "$" + CQMS_SubPlanService.ConvertState(item.ApproveType);
res.Add(cd);
}
return res;
diff --git a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
index 57c64856..f3ae2505 100644
--- a/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
+++ b/SGGL/BLL/CQMS/Plan/CQMS_SubPlanService.cs
@@ -228,7 +228,7 @@ namespace BLL
UnitName = BLL.UnitService.GetUnitNameByUnitId(x.UnitId),
UnitWorkNames=BLL.UnitWorkService.GetUnitWorkName(x.UnitWorkIds),
CNProfessionalNames=BLL.CNProfessionalService.GetCNProfessionalNameByCode(x.CNProfessionalCodes),
- HandleManName = BLL.CQMS_SubPlanApproveService.GetHandleManName(x.State),
+ HandleManName = BLL.CQMS_SubPlanApproveService.GetHandleManName(x.SubPlanId),
FilePath = x.FilePath,
};
List res = new List();
@@ -245,7 +245,7 @@ namespace BLL
cd.CNProfessionalCodes = item.CNProfessionalCodes + "$" + item.CNProfessionalNames;
cd.CompileDate = item.CompileDate;
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
- cd.State = item.State + "$" + item.StateStr + "&" + item.HandleManName;
+ cd.State = item.State + "$" + item.StateStr + "$" + item.HandleManName;
cd.Edition = item.Edition;
cd.FilePath = item.FilePath;
res.Add(cd);
@@ -268,7 +268,7 @@ namespace BLL
q.UnitWorkIds = q.UnitWorkIds + "$" + BLL.UnitWorkService.GetUnitWorkName(q.UnitWorkIds);
q.CNProfessionalCodes = q.CNProfessionalCodes + "$" + BLL.CNProfessionalService.GetCNProfessionalNameByCode(q.CNProfessionalCodes);
q.CompileMan=q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
- q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_SubPlanApproveService.GetHandleManName(q.State);
+ q.State = q.State + "$" + ConvertState(q.State) + "$" + BLL.CQMS_SubPlanApproveService.GetHandleManName(q.SubPlanId);
}
return q;
}
diff --git a/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishService.cs b/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishService.cs
index 06f513fb..e9d0f49e 100644
--- a/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishService.cs
+++ b/SGGL/BLL/CQMS/RewardAndPunish/RewardAndPunishService.cs
@@ -115,5 +115,73 @@ namespace BLL
else
return null;
}
+
+ //public static List getListDataForApi(string projectId, int startRowIndex, int maximumRows, string type)
+ //{
+ // using (var db = new Model.SGGLDB(Funs.ConnString))
+ // {
+ // IQueryable q = db.RewardAndPunish_RewardAndPunish;
+ // if (!string.IsNullOrEmpty(projectId))
+ // {
+ // q = q.Where(e => e.ProjectId == projectId);
+ // }
+ // if (type!="0")
+ // {
+ // q = q.Where(e => e.Type == type);
+ // }
+ // var qres = from x in q
+ // orderby x.CompileDate descending
+ // select new
+ // {
+ // x.MeetingId,
+ // x.ProjectId,
+ // x.UnitId,
+ // UnitName = (from y in db.Base_Unit where y.UnitId == x.UnitId select y.UnitName).First(),
+ // x.MeetingType,
+ // MeetingTypeStr = x.MeetingType == "M" ? "质量月例会" : "质量专题会",
+ // x.MeetingCode,
+ // x.MeetingDate,
+ // x.Place,
+ // x.HostMan,
+ // HostManName = BLL.Person_PersonsService.getPersonsNamesPersonIds(x.HostMan),
+ // x.AttentPerson,
+ // AttentPersonName = BLL.Person_PersonsService.getPersonsNamesPersonIds(x.AttentPerson),
+ // x.AttentPersonNum,
+ // x.MeetingTheme,
+ // x.MeetingContents,
+ // x.CompileDate,
+ // x.CompileMan,
+ // x.State,
+ // StateStr = ConvertState(x.State),
+ // CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
+ // HandleManName = BLL.CQMS_MeetingApproveService.GetHandleManName(x.MeetingId),
+ // x.AttachUrl,
+ // };
+ // List res = new List();
+ // var list = qres.Skip(startRowIndex).Take(maximumRows).ToList();
+ // foreach (var item in list)
+ // {
+ // Model.Meeting_CQMSMeeting cd = new Model.Meeting_CQMSMeeting();
+ // cd.MeetingId = item.MeetingId;
+ // cd.ProjectId = item.ProjectId;
+ // cd.UnitId = item.UnitId + "$" + item.UnitName;
+ // cd.MeetingType = item.MeetingType + "$" + item.MeetingTypeStr;
+ // cd.MeetingCode = item.MeetingCode;
+ // cd.MeetingDate = item.MeetingDate;
+ // cd.Place = item.Place;
+ // cd.HostMan = item.HostMan + "$" + item.HostManName;
+ // cd.AttentPerson = item.AttentPerson + "$" + item.AttentPersonName;
+ // cd.AttentPersonNum = item.AttentPersonNum;
+ // cd.MeetingTheme = item.MeetingTheme;
+ // cd.MeetingContents = item.MeetingContents;
+ // cd.CompileDate = item.CompileDate;
+ // cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
+ // cd.State = item.State + "$" + item.StateStr + "$" + item.HandleManName;
+ // cd.AttachUrl = AttachFileService.getFileUrl(item.MeetingId);
+ // res.Add(cd);
+ // }
+ // return res;
+ // }
+ //}
}
}
diff --git a/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs b/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs
index f154bf80..c670f188 100644
--- a/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs
+++ b/SGGL/BLL/CQMS/Train/CQMS_TrainPlanService.cs
@@ -131,6 +131,7 @@ namespace BLL
x.RealTrainPersons,
x.CompileDate,
x.CompileMan,
+ x.AttachUrl,
CompileManName = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
};
List res = new List();
@@ -152,6 +153,7 @@ namespace BLL
cd.RealTrainPersons = item.RealTrainPersons;
cd.CompileDate = item.CompileDate;
cd.CompileMan = item.CompileMan + "$" + item.CompileManName;
+ cd.AttachUrl = AttachFileService.getFileUrl(item.TrainPlanId);
res.Add(cd);
}
return res;
@@ -173,6 +175,7 @@ namespace BLL
q.PlanTrainPersons = q.PlanTrainPersons + "$" + ConvertPlanTrainPersons(q.PlanTrainPersons);
q.TrainTypeId = q.TrainTypeId + "$" + (from y in db.Base_CQMSTrainType where y.TrainTypeId == q.TrainTypeId select y.TrainTypeName).First();
q.RealTrainPersons = q.RealTrainPersons + "$" + Person_PersonsService.getPersonsNamesPersonIds(q.RealTrainPersons);
+ q.HostMan = q.HostMan + "$" + BLL.Person_PersonsService.getPersonsNamesPersonIds(q.HostMan);
q.CompileMan = q.CompileMan + "$" + BLL.Person_PersonsService.GetPersonsNameById(q.CompileMan);
q.AttachUrl = AttachFileService.getFileUrl(q.TrainPlanId);
}
diff --git a/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunish.aspx.cs b/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunish.aspx.cs
index fcf26166..024bbf27 100644
--- a/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunish.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/RewardAndPunish/RewardAndPunish.aspx.cs
@@ -66,7 +66,7 @@ namespace FineUIPro.Web.CQMS.RewardAndPunish
strSql += " AND ins.UnitId=@UnitId";
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
}
- if (this.rblType.SelectedValue != "0")
+ if (this.rblType.SelectedValue != "0")
{
strSql += " AND ins.Type=@Type";
listStr.Add(new SqlParameter("@Type", rblType.SelectedValue));
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index a794e290..876c2161 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -124992,6 +124992,8 @@ namespace Model
private System.Nullable _CompileDate;
+ private string _AttachUrl;
+
private EntityRef _Base_Project;
private EntitySet _Meeting_CQMSMeetingApprove;
@@ -125030,6 +125032,8 @@ namespace Model
partial void OnCompileManChanged();
partial void OnCompileDateChanging(System.Nullable value);
partial void OnCompileDateChanged();
+ partial void OnAttachUrlChanging(string value);
+ partial void OnAttachUrlChanged();
#endregion
public Meeting_CQMSMeeting()
@@ -125343,6 +125347,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(1000)")]
+ public string AttachUrl
+ {
+ get
+ {
+ return this._AttachUrl;
+ }
+ set
+ {
+ if ((this._AttachUrl != value))
+ {
+ this.OnAttachUrlChanging(value);
+ this.SendPropertyChanging();
+ this._AttachUrl = value;
+ this.SendPropertyChanged("AttachUrl");
+ this.OnAttachUrlChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Meeting_CQMSMeeting_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
diff --git a/SGGL/WebAPI/Controllers/CQMS/CQMSMeetingController.cs b/SGGL/WebAPI/Controllers/CQMS/CQMSMeetingController.cs
index 49972bcf..8af82e64 100644
--- a/SGGL/WebAPI/Controllers/CQMS/CQMSMeetingController.cs
+++ b/SGGL/WebAPI/Controllers/CQMS/CQMSMeetingController.cs
@@ -11,6 +11,252 @@ namespace WebAPI.Controllers
///
public class CQMSMeetingController : ApiController
{
+ ///
+ /// 根据项目id获取质量会议列表集合
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData> getMeetingList(string projectId, int index, int page, string meetingType)
+ {
+ ResponseData> res = new ResponseData>();
+ res.successful = true;
+ res.resultValue = BLL.CQMS_MeetingService.getListDataForApi(projectId, index, page, meetingType);
+ return res;
+ }
+ ///
+ /// 根据id获取质量会议详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ public ResponseData GetMeetingByMeetingId(string id)
+ {
+ ResponseData res = new ResponseData();
+ Meeting_CQMSMeeting cd = BLL.CQMS_MeetingService.GetMeetingByMeetingIdForApi(id);
+
+ res.successful = true;
+ res.resultValue = BeanUtil.CopyOjbect(cd, true);
+ return res;
+ }
+
+ ///
+ /// 根据id获取审核记录集合
+ ///
+ ///
+ ///
+ public ResponseData> GetApproveById(string id)
+ {
+ ResponseData> res = new ResponseData>();
+
+ res.successful = true;
+ res.resultValue = BLL.CQMS_MeetingApproveService.GetListDataByIdForApi(id);
+ return res;
+ }
+
+ ///
+ /// 根据id获取当前办理人审批信息
+ ///
+ ///
+ ///
+ public ResponseData GetCurrApproveById(string id)
+ {
+ ResponseData res = new ResponseData();
+
+ res.successful = true;
+ res.resultValue = BeanUtil.CopyOjbect(BLL.CQMS_MeetingApproveService.getCurrApproveForApi(id), true);
+ return res;
+ }
+
+ ///
+ /// 保存会议主表信息
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ResponseData AddCQMSMeeting([FromBody] Model.Meeting_CQMSMeeting meeting)
+ {
+ ResponseData res = new ResponseData();
+ try
+ {
+ if (string.IsNullOrEmpty(meeting.MeetingId))
+ {
+ meeting.MeetingId = Guid.NewGuid().ToString();
+ BLL.CQMS_MeetingService.AddMeetingForApi(meeting);
+ if (meeting.MeetingType == "M")
+ {
+ SaveAttachFile(meeting.MeetingId, BLL.Const.CQMSMonthMeetingMenuId, meeting.AttachUrl);
+ }
+ else
+ {
+ SaveAttachFile(meeting.MeetingId, BLL.Const.CQMSSpecialMeetingMenuId, meeting.AttachUrl);
+ }
+ res.resultValue = meeting.MeetingId;
+ }
+ else
+ {
+ BLL.CQMS_MeetingService.UpdateMeetingForApi(meeting);
+ if (meeting.MeetingType == "M")
+ {
+ SaveAttachFile(meeting.MeetingId, BLL.Const.CQMSMonthMeetingMenuId, meeting.AttachUrl);
+ }
+ else
+ {
+ SaveAttachFile(meeting.MeetingId, BLL.Const.CQMSSpecialMeetingMenuId, meeting.AttachUrl);
+ }
+ res.resultValue = meeting.MeetingId;
+ }
+
+ res.successful = true;
+
+ }
+ catch (Exception e)
+ {
+ res.resultHint = e.StackTrace;
+ res.successful = false;
+ }
+ return res;
+ }
+
+ public static void SaveAttachFile(string dataId, string menuId, string url)
+ {
+ Model.ToDoItem toDoItem = new Model.ToDoItem
+ {
+ MenuId = menuId,
+ DataId = dataId,
+ UrlStr = url,
+ };
+ APIUpLoadFileService.SaveAttachUrl(toDoItem);
+ }
+
+ ///
+ /// 新增办理信息
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ResponseData AddApprove([FromBody] Model.Meeting_CQMSMeetingApprove approve)
+ {
+ ResponseData res = new ResponseData();
+ try
+ {
+ Model.Meeting_CQMSMeeting Meeting = new Model.Meeting_CQMSMeeting();
+ Meeting.MeetingId = approve.MeetingId;
+ Meeting.State = approve.ApproveType;
+ BLL.CQMS_MeetingService.UpdateMeetingForApi(Meeting);
+ res.resultValue = BLL.CQMS_MeetingApproveService.AddMeetingApproveForApi(approve);
+ res.successful = true;
+ }
+ catch (Exception e)
+ {
+ res.resultHint = e.StackTrace;
+ res.successful = false;
+ }
+ return res;
+ }
+
+ ///
+ /// 更新办理信息
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ResponseData UpdateApprove([FromBody] Model.Meeting_CQMSMeetingApprove approve)
+ {
+ ResponseData res = new ResponseData();
+ try
+ {
+ approve.ApproveDate = DateTime.Now;
+ BLL.CQMS_MeetingApproveService.UpdateMeetingApproveForApi(approve);
+ res.successful = true;
+
+ }
+ catch (Exception e)
+ {
+ res.resultHint = e.StackTrace;
+ res.successful = false;
+ }
+ return res;
+ }
+
+ ///
+ /// 获取主持人信息
+ ///
+ ///
+ public Model.ResponeData getHostMan(string projectId, string unitId)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = APIBaseInfoService.getCQMSMeetingHostMan(projectId, unitId);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+
+ ///
+ /// 获取质量会议参加人员
+ ///
+ ///
+ public Model.ResponeData getAttentPerson(string projectId)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = APIBaseInfoService.getAttentPerson(projectId);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+
+ ///
+ /// 根据状态获取办理步骤 0-重新编制,1-编制,2-总包质量经理审批,C-审批完成
+ ///
+ ///
+ public Model.ResponeData getHandleListByState(string state)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = CQMS_MeetingService.GetDHandleTypeByStateForApi(state);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
+
+ ///
+ /// 根据办理步骤获取办理人
+ ///
+ ///
+ public Model.ResponeData getHandleManListByState(string state, string id, string projectId)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = CQMS_MeetingService.GetHandleManListForApi(state, id, projectId);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
}
}
diff --git a/SGGL/WebAPI/Controllers/CQMS/CQMSRewardAndPunishController.cs b/SGGL/WebAPI/Controllers/CQMS/CQMSRewardAndPunishController.cs
new file mode 100644
index 00000000..7fe5ef34
--- /dev/null
+++ b/SGGL/WebAPI/Controllers/CQMS/CQMSRewardAndPunishController.cs
@@ -0,0 +1,28 @@
+using BLL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Web.Http;
+
+namespace WebAPI.Controllers
+{
+ public class CQMSRewardAndPunishController : ApiController
+ {
+ ///
+ /// 根据项目id获取质量会议列表集合
+ ///
+ ///
+ ///
+ ///
+ /// 0-全部,1-奖励,2-处罚
+ ///
+ [HttpGet]
+ public ResponseData> getMeetingList(string projectId, int index, int page, string type)
+ {
+ ResponseData> res = new ResponseData>();
+ res.successful = true;
+ //res.resultValue = BLL.RewardAndPunishService.getListDataForApi(projectId, index, page, type);
+ return res;
+ }
+ }
+}
diff --git a/SGGL/WebAPI/Controllers/UnitController.cs b/SGGL/WebAPI/Controllers/UnitController.cs
index 02184de7..95776242 100644
--- a/SGGL/WebAPI/Controllers/UnitController.cs
+++ b/SGGL/WebAPI/Controllers/UnitController.cs
@@ -55,6 +55,28 @@ namespace WebAPI.Controllers
}
#endregion
+ #region 获取项目所有单位
+ ///
+ /// 获取项目所有单位
+ ///
+ ///
+ public Model.ResponeData getProjectUnitLists(string projectId)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = APIUnitService.getProjectUnitLists(projectId);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
+ #endregion
+
#region 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
///
/// 根据projectId、unitType获取单位信息(总包1;施工分包2;监理3;业主4;其他5)
diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj
index 68fcd3cf..3643ae1d 100644
--- a/SGGL/WebAPI/WebAPI.csproj
+++ b/SGGL/WebAPI/WebAPI.csproj
@@ -170,6 +170,7 @@
+
From eef27faf84274c871854153aa77b0ed416cc627c Mon Sep 17 00:00:00 2001
From: gaofei <181547018@qq.com>
Date: Thu, 16 Mar 2023 14:37:39 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=B4=A8=E9=87=8F?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/Model/Model.cs | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 876c2161..0ab33041 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -181368,6 +181368,8 @@ namespace Model
private string _RewardAndPunishDecision;
+ private string _AttachUrl;
+
private EntityRef _Base_Project;
private EntitySet _RewardAndPunish_RewardAndPunishApprove;
@@ -181398,6 +181400,8 @@ namespace Model
partial void OnCompileDateChanged();
partial void OnRewardAndPunishDecisionChanging(string value);
partial void OnRewardAndPunishDecisionChanged();
+ partial void OnAttachUrlChanging(string value);
+ partial void OnAttachUrlChanged();
#endregion
public RewardAndPunish_RewardAndPunish()
@@ -181631,6 +181635,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(1000)")]
+ public string AttachUrl
+ {
+ get
+ {
+ return this._AttachUrl;
+ }
+ set
+ {
+ if ((this._AttachUrl != value))
+ {
+ this.OnAttachUrlChanging(value);
+ this.SendPropertyChanging();
+ this._AttachUrl = value;
+ this.SendPropertyChanged("AttachUrl");
+ this.OnAttachUrlChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_RewardAndPunish_RewardAndPunish_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{