危险源管理模块接入真实数据库:新增危大/超危工程、风险控制清单、安全验收、安全巡检、临时用电管理(含前端页面、BLL/API服务、WebAPI控制器、Model项、SQL脚本与接口文档)
排除 CreateModel.bat(含明文sa密码与本地服务器名,未入库)
This commit is contained in:
@@ -202,17 +202,28 @@ namespace BLL
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="meetingType">会议类型(C-班前会;W-周例会;M-例会;S-专题例会;A-其他会议)</param>
|
||||
/// <param name="states">状态(0-待提交;1-已提交)</param>
|
||||
/// <param name="startDate">编制日期开始日期(yyyy-MM-dd,为空不限制)</param>
|
||||
/// <param name="endDate">编制日期结束日期(yyyy-MM-dd,包含当天,为空不限制)</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.MeetingItem> getMeetingByProjectIdStates(string projectId, string meetingType, string states,int pageIndex)
|
||||
public static List<Model.MeetingItem> getMeetingByProjectIdStates(string projectId, string meetingType, string states,int pageIndex, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.MeetingItem> getMeetItem = new List<Model.MeetingItem>();
|
||||
// 编制日期(CompileDate)范围过滤:startDate/endDate为空时不限制;endDate取整天(包含endDate当天)
|
||||
DateTime? dStart = Funs.GetNewDateTime(startDate);
|
||||
DateTime? dEnd = Funs.GetNewDateTime(endDate);
|
||||
if (dEnd.HasValue)
|
||||
{
|
||||
dEnd = dEnd.Value.Date.AddDays(1);
|
||||
}
|
||||
if (meetingType == "C")
|
||||
{
|
||||
getMeetItem = (from x in db.Meeting_ClassMeeting
|
||||
where x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2")))
|
||||
&& (!dStart.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value >= dStart))
|
||||
&& (!dEnd.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value < dEnd))
|
||||
orderby x.ClassMeetingDate descending
|
||||
select new Model.MeetingItem
|
||||
{
|
||||
@@ -247,6 +258,8 @@ namespace BLL
|
||||
getMeetItem = (from x in db.Meeting_WeekMeeting
|
||||
where x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2")))
|
||||
&& (!dStart.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value >= dStart))
|
||||
&& (!dEnd.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value < dEnd))
|
||||
orderby x.WeekMeetingDate descending
|
||||
select new Model.MeetingItem
|
||||
{
|
||||
@@ -278,6 +291,8 @@ namespace BLL
|
||||
getMeetItem = (from x in db.Meeting_MonthMeeting
|
||||
where x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2")))
|
||||
&& (!dStart.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value >= dStart))
|
||||
&& (!dEnd.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value < dEnd))
|
||||
orderby x.MonthMeetingDate descending
|
||||
select new Model.MeetingItem
|
||||
{
|
||||
@@ -310,6 +325,8 @@ namespace BLL
|
||||
getMeetItem = (from x in db.Meeting_SpecialMeeting
|
||||
where x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2")))
|
||||
&& (!dStart.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value >= dStart))
|
||||
&& (!dEnd.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value < dEnd))
|
||||
orderby x.SpecialMeetingDate descending
|
||||
select new Model.MeetingItem
|
||||
{
|
||||
@@ -342,6 +359,8 @@ namespace BLL
|
||||
getMeetItem = (from x in db.Meeting_AttendMeeting
|
||||
where x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2")))
|
||||
&& (!dStart.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value >= dStart))
|
||||
&& (!dEnd.HasValue || (x.CompileDate.HasValue && x.CompileDate.Value < dEnd))
|
||||
orderby x.AttendMeetingDate descending
|
||||
select new Model.MeetingItem
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user