diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 073bd892..6ef3d483 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -587,6 +587,7 @@ + diff --git a/SGGL/BLL/BaseInfo/CNProfessionalService.cs b/SGGL/BLL/BaseInfo/CNProfessionalService.cs index 43ca4316..35bdff36 100644 --- a/SGGL/BLL/BaseInfo/CNProfessionalService.cs +++ b/SGGL/BLL/BaseInfo/CNProfessionalService.cs @@ -104,7 +104,30 @@ namespace BLL /// public static ListItem[] GetCNProfessionalItem() { - var q = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId orderby x.SortIndex select x).ToList(); + var q = (from x in Funs.DB.Base_CNProfessional + where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId + && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId + orderby x.SortIndex + select x).ToList(); + ListItem[] list = new ListItem[q.Count()]; + for (int i = 0; i < q.Count(); i++) + { + list[i] = new ListItem(q[i].ProfessionalName ?? "", q[i].CNProfessionalId); + } + return list; + } + + /// + /// 资料收发文专用 + /// + /// + public static ListItem[] GetCNProfessionalDocItem() + { + var q = (from x in Funs.DB.Base_CNProfessional + where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId + orderby x.SortIndex + select x).ToList(); + //var q = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId orderby x.SortIndex select x).ToList(); ListItem[] list = new ListItem[q.Count()]; for (int i = 0; i < q.Count(); i++) { @@ -142,5 +165,17 @@ namespace BLL } return res; } + + public static void InitCNProfessionalDocDownList(FineUIPro.DropDownList dropName, bool isShowPlease) + { + dropName.DataValueField = "Value"; + dropName.DataTextField = "Text"; + dropName.DataSource = GetCNProfessionalDocItem(); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } } } diff --git a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs index 220d3ddc..8cb2eaa5 100644 --- a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs @@ -396,5 +396,19 @@ namespace BLL } } } + + public static List getInspectionManagementDetailListByDate(string projectId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) + { + List InspectionMangementList = (from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.ProjectId == projectId select x).ToList(); + //if (isOnceQualified == true) + //{ + InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList(); + //} + if (startDate != null && SoptDate != null) + { + InspectionMangementList = (from x in InspectionMangementList where x.InspectionDate >= startDate && x.InspectionDate <= SoptDate select x).ToList(); + } + return InspectionMangementList; + } } } \ No newline at end of file diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index e0439ccc..60ce8daa 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3183,6 +3183,13 @@ namespace BLL /// 全厂地下管网完成情况导入模版文件原始的虚拟路径 /// public const string UndergroundPipeCompletionTemplateUrl = "File\\Excel\\DataIn\\全厂地下管网完成情况导入模板.xls"; + /// 月度计划情况导入模版文件原始的虚拟路径 + /// + public const string MonthPlanTemplateUrl = "File\\Excel\\DataIn\\月度计划情况导入模板.xls"; + /// + /// 周进度计划导入模版文件原始的虚拟路径 + /// + public const string WeekPlanTemplateUrl = "File\\Excel\\DataIn\\周进度计划导入模板.xls"; /// /// 施工进度报表模板 /// @@ -3896,6 +3903,11 @@ namespace BLL /// public const string InspectionEquipmentMenuId = "6c2c1e5e-1812-4e1c-a683-7125518e28c7"; + /// + /// 安全专业ID + /// + public const string CNProfessionalHSEId = "BD344C54-66CC-4547-89AF-04C297D60CD7"; + /// /// 人员报验 /// @@ -5762,6 +5774,11 @@ namespace BLL /// public const string MonthPlanMenuId = "94287B92-7E96-4B90-BC6F-DAF30AE3B314"; + /// + /// 周进度计划 + /// + public const string WeekPlanMenuId = "56A54B4B-BBA3-4249-9FFC-3A60DAC79059"; + /// /// 进度完成情况 /// diff --git a/SGGL/BLL/JDGL/Check/MonthPlanService.cs b/SGGL/BLL/JDGL/Check/MonthPlanService.cs index 9b21c6f6..fd0fb1dc 100644 --- a/SGGL/BLL/JDGL/Check/MonthPlanService.cs +++ b/SGGL/BLL/JDGL/Check/MonthPlanService.cs @@ -22,6 +22,16 @@ namespace BLL return Funs.DB.JDGL_MonthPlan.FirstOrDefault(e => e.MonthPlanId == MonthPlanId); } + /// + /// 根据主键获取月度计划情况 + /// + /// + /// + public static List GetMonthPlansByMonths(string projectId, DateTime months) + { + return (from x in Funs.DB.JDGL_MonthPlan where x.ProjectId == projectId && x.Months == months select x).ToList(); + } + /// /// 添加月度计划情况 /// @@ -84,5 +94,20 @@ namespace BLL db.SubmitChanges(); } } + + /// + /// 根据主键删除月度计划情况 + /// + /// + public static void DeleteAllMonthPlan(string projectId, DateTime months) + { + Model.SGGLDB db = Funs.DB; + var q = from x in db.JDGL_MonthPlan where x.ProjectId == projectId && x.Months == months select x; + if (q != null) + { + db.JDGL_MonthPlan.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + } } } diff --git a/SGGL/BLL/JDGL/Check/WeekPlanService.cs b/SGGL/BLL/JDGL/Check/WeekPlanService.cs new file mode 100644 index 00000000..12deb96d --- /dev/null +++ b/SGGL/BLL/JDGL/Check/WeekPlanService.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 周计划情况 + /// + public class WeekPlanService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取周计划情况 + /// + /// + /// + public static Model.JDGL_WeekPlan GetWeekPlanById(string WeekPlanId) + { + return Funs.DB.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlanId); + } + + /// + /// 根据主键获取周计划情况 + /// + /// + /// + public static List GetWeekPlansByWeeks(string projectId, string weekNo) + { + return (from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x).ToList(); + } + + /// + /// 添加周计划情况 + /// + /// + public static void AddWeekPlan(Model.JDGL_WeekPlan WeekPlan) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan + { + WeekPlanId = WeekPlan.WeekPlanId, + ProjectId = WeekPlan.ProjectId, + WeekNo = WeekPlan.WeekNo, + StartDate = WeekPlan.StartDate, + EndDate = WeekPlan.EndDate, + UnitWork = WeekPlan.UnitWork, + Major = WeekPlan.Major, + WorkContent = WeekPlan.WorkContent, + UnitId = WeekPlan.UnitId, + DutyPerson = WeekPlan.DutyPerson, + PlanDate = WeekPlan.PlanDate, + IsOK = WeekPlan.IsOK, + Remark = WeekPlan.Remark, + CompileMan = WeekPlan.CompileMan, + CompileDate = WeekPlan.CompileDate, + SortIndex = WeekPlan.SortIndex, + }; + db.JDGL_WeekPlan.InsertOnSubmit(newWeekPlan); + db.SubmitChanges(); + } + + /// + /// 修改周计划情况 + /// + /// + public static void UpdateWeekPlan(Model.JDGL_WeekPlan WeekPlan) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_WeekPlan newWeekPlan = db.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlan.WeekPlanId); + if (newWeekPlan != null) + { + newWeekPlan.UnitWork = WeekPlan.UnitWork; + newWeekPlan.Major = WeekPlan.Major; + newWeekPlan.WorkContent = WeekPlan.WorkContent; + newWeekPlan.UnitId = WeekPlan.UnitId; + newWeekPlan.DutyPerson = WeekPlan.DutyPerson; + newWeekPlan.PlanDate = WeekPlan.PlanDate; + newWeekPlan.IsOK = WeekPlan.IsOK; + newWeekPlan.Remark = WeekPlan.Remark; + newWeekPlan.CompileMan = WeekPlan.CompileMan; + newWeekPlan.CompileDate = WeekPlan.CompileDate; + newWeekPlan.SortIndex = WeekPlan.SortIndex; + + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除周计划情况 + /// + /// + public static void DeleteWeekPlanByWeekPlanId(string WeekPlanId) + { + Model.SGGLDB db = Funs.DB; + var q = (from x in db.JDGL_WeekPlan where x.WeekPlanId == WeekPlanId select x).FirstOrDefault(); + if (q != null) + { + db.JDGL_WeekPlan.DeleteOnSubmit(q); + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除周计划情况 + /// + /// + public static void DeleteAllWeekPlan(string projectId, string weekNo) + { + Model.SGGLDB db = Funs.DB; + var q = from x in db.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x; + if (q != null) + { + db.JDGL_WeekPlan.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ProjectData/ProjectUnitService.cs b/SGGL/BLL/ProjectData/ProjectUnitService.cs index b923eeee..3265c145 100644 --- a/SGGL/BLL/ProjectData/ProjectUnitService.cs +++ b/SGGL/BLL/ProjectData/ProjectUnitService.cs @@ -197,5 +197,31 @@ orderby x.UnitType, y.UnitCode select x).ToList(); } + + /// + /// 项目类型单位表下拉框 + /// + /// 下拉框名字 + /// 是否显示请选择 + public static void InitUnitDropDownList2(FineUIPro.DropDownList dropName, string projectId, string unitType, bool isShowPlease) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var pUnit = (from x in db.Project_ProjectUnit + join y in db.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == projectId && x.UnitType == unitType + orderby y.UnitCode + select y).ToList(); + + dropName.DataValueField = "UnitName"; + dropName.DataTextField = "UnitName"; + dropName.DataSource = pUnit; + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + } } }