危险源管理模块接入真实数据库:新增危大/超危工程、风险控制清单、安全验收、安全巡检、临时用电管理(含前端页面、BLL/API服务、WebAPI控制器、Model项、SQL脚本与接口文档)
排除 CreateModel.bat(含明文sa密码与本地服务器名,未入库)
This commit is contained in:
@@ -5,7 +5,6 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using BLL;
|
||||
using Model;
|
||||
using System.Collections;
|
||||
|
||||
namespace Web.obj
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace WebAPI.Controllers.CQMS
|
||||
res.successful = BLL.API.CQMS.ApiInspectionManagementService.AddInspectionManagement(inspectionManagement);
|
||||
res.successful = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace WebAPI.Controllers.CQMS
|
||||
res.resultValue = BLL.API.CQMS.BreakdownProjectService.getBreakdowns(projectId, keyWord);
|
||||
res.successful = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -77,7 +77,7 @@ namespace WebAPI.Controllers.CQMS
|
||||
res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagement(projectId, index, page, state, name);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace WebAPI.Controllers.CQMS
|
||||
res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagementDetail(projectId, index, page, state, name);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace WebAPI.Controllers.CQMS
|
||||
res.resultValue = BLL.API.CQMS.ApiInspectionManagementService.getInspectionManagementDetailByinspectionId(InspectionId);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace Mvc.Controllers
|
||||
res.resultValue = CheckControl.JointCheckId;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
}
|
||||
@@ -295,7 +295,7 @@ namespace Mvc.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace Mvc.Controllers
|
||||
res.resultValue = SpotCheckDetail.SpotCheckDetailId;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ namespace Mvc.Controllers
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
}
|
||||
@@ -358,7 +358,7 @@ namespace Mvc.Controllers
|
||||
res.resultValue = BLL.SpotCheckApproveService.AddSpotCheckApproveForApi(approve);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
}
|
||||
@@ -380,7 +380,7 @@ namespace Mvc.Controllers
|
||||
BLL.SpotCheckApproveService.UpdateSpotCheckApproveForApi(approve);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ namespace Mvc.Controllers
|
||||
string path = "FileUpload\\TechnicalContactList\\" + DateTime.Now.ToString("yyyy-MM") + "\\工程联络单.doc";
|
||||
string newuploadfilepath = rootPath + path;
|
||||
string newUrl = newuploadfilepath.Replace(".doc", technicalContactList.Code + ".doc");
|
||||
string AttachPath = rootPath + "FileUpload\\TechnicalContactList\\" + DateTime.Now.ToString("yyyy-MM"); ///文件夹
|
||||
string AttachPath = rootPath + "FileUpload\\TechnicalContactList\\" + DateTime.Now.ToString("yyyy-MM"); //文件夹
|
||||
if (!Directory.Exists(AttachPath))
|
||||
{
|
||||
Directory.CreateDirectory(AttachPath);
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace WebAPI.Controllers
|
||||
kqFace = (List<SgManager.AI.faceResult>)SgManager.AI.FaceClass.SearchFileFace(localRoot);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
responeData.message = "识别失败,人脸库信息为空" + localRoot;
|
||||
responeData.data = localRoot;
|
||||
@@ -120,7 +120,7 @@ namespace WebAPI.Controllers
|
||||
kqFace = (List<SgManager.AI.faceResult>)SgManager.AI.FaceClass.SearchFileFace(localRoot);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
responeData.message = "识别失败,人脸库信息为空"+ localRoot;
|
||||
responeData.data = localRoot;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
res.resultValue = APIElectrodeRecoveryService.GetListData(projectId, index, page, name);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
res.resultValue = BLL.APIWelderEntranceService.GetWelderList(projectId, index, page, name);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
res.resultValue = BLL.APIWelderEntranceService.GetWelderById(welderId);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
res.resultValue = BLL.APIWelderEntranceService.IsExistWEDName( WED_Name, projectId);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
res.resultValue = BLL.APIWelderEntranceService.IsExistWEDCode(WED_Code, projectId);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
BLL.APIWelderEntranceService.DeleteBSWelder(WED_ID);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
BLL.APIWelderEntranceService.AddBSWelder(welder);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
BLL.APIWelderEntranceService.UpdateBSWelder(welder);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
res.successful = false;
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers.HSSE.HazardousMG
|
||||
{
|
||||
/// <summary>
|
||||
/// 危大、超危工程清单
|
||||
/// </summary>
|
||||
public class HazardProjectController : ApiController
|
||||
{
|
||||
#region 获取危大、超危工程清单分页列表
|
||||
/// <summary>
|
||||
/// 获取危大、超危工程清单分页列表(按分部分项工程搜索)
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目主键</param>
|
||||
/// <param name="pageNumber">页码</param>
|
||||
/// <param name="pageSize">每页条数</param>
|
||||
/// <param name="keyword">分部分项工程关键字</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getHazardProjectList(string projectId, int pageNumber, int pageSize, string keyword)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var dataList = APIHazardProjectService.getHazardProjectList(projectId, keyword);
|
||||
int totalCount = dataList.Count;
|
||||
if (pageNumber > 0 && pageSize > 0)
|
||||
{
|
||||
dataList = dataList.Skip((pageNumber - 1) * pageSize).Take(pageSize).ToList();
|
||||
}
|
||||
responeData.data = new { totalCount, dataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据主键获取危大、超危工程详情
|
||||
/// <summary>
|
||||
/// 根据主键获取危大、超危工程详情
|
||||
/// </summary>
|
||||
/// <param name="hazardProjectId">主键</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getHazardProjectById(string hazardProjectId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIHazardProjectService.getHazardProjectById(hazardProjectId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers.HSSE.HazardousMG
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全防护验收
|
||||
/// </summary>
|
||||
public class SafetyAcceptanceController : ApiController
|
||||
{
|
||||
#region 获取安全防护验收分页列表
|
||||
/// <summary>
|
||||
/// 获取安全防护验收分页列表(按工程名称搜索,含附件)
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目主键</param>
|
||||
/// <param name="pageNumber">页码</param>
|
||||
/// <param name="pageSize">每页条数</param>
|
||||
/// <param name="keyword">工程名称关键字</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getSafetyAcceptanceList(string projectId, int pageNumber, int pageSize, string keyword)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var dataList = APISafetyAcceptanceService.getSafetyAcceptanceList(projectId, keyword);
|
||||
int totalCount = dataList.Count;
|
||||
if (pageNumber > 0 && pageSize > 0)
|
||||
{
|
||||
dataList = dataList.Skip((pageNumber - 1) * pageSize).Take(pageSize).ToList();
|
||||
}
|
||||
////附件关联
|
||||
foreach (var item in dataList)
|
||||
{
|
||||
item.AttachUrl = AttachFileService.getFileUrl(item.AcceptanceId, Const.SafetyAcceptanceMenuId);
|
||||
}
|
||||
responeData.data = new { totalCount, dataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据主键获取安全防护验收详情
|
||||
/// <summary>
|
||||
/// 根据主键获取安全防护验收详情
|
||||
/// </summary>
|
||||
/// <param name="acceptanceId">主键</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getSafetyAcceptanceById(string acceptanceId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var item = APISafetyAcceptanceService.getSafetyAcceptanceById(acceptanceId);
|
||||
if (item != null)
|
||||
{
|
||||
////附件关联
|
||||
item.AttachUrl = AttachFileService.getFileUrl(item.AcceptanceId, Const.SafetyAcceptanceMenuId);
|
||||
}
|
||||
responeData.data = item;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 新增安全防护验收
|
||||
/// <summary>
|
||||
/// 新增安全防护验收
|
||||
/// </summary>
|
||||
/// <param name="item">验收项</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData addSafetyAcceptance([FromBody] Model.SafetyAcceptanceItem item)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (item == null || string.IsNullOrEmpty(item.ProjectId))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "项目主键不能为空!";
|
||||
}
|
||||
else
|
||||
{
|
||||
string acceptanceId = APISafetyAcceptanceService.addSafetyAcceptance(item);
|
||||
responeData.data = new { acceptanceId };
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑安全防护验收
|
||||
/// <summary>
|
||||
/// 编辑安全防护验收
|
||||
/// </summary>
|
||||
/// <param name="item">验收项</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData updateSafetyAcceptance([FromBody] Model.SafetyAcceptanceItem item)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (item == null || string.IsNullOrEmpty(item.AcceptanceId))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "验收主键不能为空!";
|
||||
}
|
||||
else if (!APISafetyAcceptanceService.updateSafetyAcceptance(item))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "未找到对应记录!";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers.HSSE.HazardousMG
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全巡检
|
||||
/// </summary>
|
||||
public class SafetyPatrolController : ApiController
|
||||
{
|
||||
#region 获取安全巡检分页列表
|
||||
/// <summary>
|
||||
/// 获取安全巡检分页列表(按工程名称搜索,含附件)
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目主键</param>
|
||||
/// <param name="pageNumber">页码</param>
|
||||
/// <param name="pageSize">每页条数</param>
|
||||
/// <param name="keyword">工程名称关键字</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getSafetyPatrolList(string projectId, int pageNumber, int pageSize, string keyword)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var dataList = APISafetyPatrolService.getSafetyPatrolList(projectId, keyword);
|
||||
int totalCount = dataList.Count;
|
||||
if (pageNumber > 0 && pageSize > 0)
|
||||
{
|
||||
dataList = dataList.Skip((pageNumber - 1) * pageSize).Take(pageSize).ToList();
|
||||
}
|
||||
////附件关联
|
||||
foreach (var item in dataList)
|
||||
{
|
||||
item.AttachUrl = AttachFileService.getFileUrl(item.PatrolId, Const.SafetyPatrolMenuId);
|
||||
}
|
||||
responeData.data = new { totalCount, dataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据主键获取安全巡检详情
|
||||
/// <summary>
|
||||
/// 根据主键获取安全巡检详情
|
||||
/// </summary>
|
||||
/// <param name="patrolId">主键</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getSafetyPatrolById(string patrolId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var item = APISafetyPatrolService.getSafetyPatrolById(patrolId);
|
||||
if (item != null)
|
||||
{
|
||||
////附件关联
|
||||
item.AttachUrl = AttachFileService.getFileUrl(item.PatrolId, Const.SafetyPatrolMenuId);
|
||||
}
|
||||
responeData.data = item;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 新增安全巡检
|
||||
/// <summary>
|
||||
/// 新增安全巡检
|
||||
/// </summary>
|
||||
/// <param name="item">巡检项</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData addSafetyPatrol([FromBody] Model.SafetyPatrolItem item)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (item == null || string.IsNullOrEmpty(item.ProjectId))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "项目主键不能为空!";
|
||||
}
|
||||
else
|
||||
{
|
||||
string patrolId = APISafetyPatrolService.addSafetyPatrol(item);
|
||||
responeData.data = new { patrolId };
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑安全巡检
|
||||
/// <summary>
|
||||
/// 编辑安全巡检
|
||||
/// </summary>
|
||||
/// <param name="item">巡检项</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData updateSafetyPatrol([FromBody] Model.SafetyPatrolItem item)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (item == null || string.IsNullOrEmpty(item.PatrolId))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "巡检主键不能为空!";
|
||||
}
|
||||
else if (!APISafetyPatrolService.updateSafetyPatrol(item))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "未找到对应记录!";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ namespace WebAPI.Controllers.HSSE
|
||||
responeData.data = faceNum;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
responeData.code = 0;
|
||||
}
|
||||
|
||||
@@ -47,42 +47,61 @@ namespace WebAPI.Controllers
|
||||
/// <param name="meetingType">会议类型(C-班前会;W-周例会;M-例会;S-专题例会;A-其他会议)</param>
|
||||
/// <param name="states">状态(0-待提交;1-已提交)</param>
|
||||
/// <param name="pageIndex">页码</param>
|
||||
/// <param name="startDate">编制日期开始日期(yyyy-MM-dd,为空不限制)</param>
|
||||
/// <param name="endDate">编制日期结束日期(yyyy-MM-dd,包含当天,为空不限制)</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getMeetingByProjectIdStates(string projectId, string meetingType, string states, int pageIndex)
|
||||
public Model.ResponeData getMeetingByProjectIdStates(string projectId, string meetingType, string states, int pageIndex, string startDate, string endDate)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
List<Model.MeetingItem> getDataList = new List<Model.MeetingItem>();
|
||||
int pageCount = 0;
|
||||
// 编制日期(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")
|
||||
{
|
||||
pageCount = Funs.DB.Meeting_ClassMeeting.Count(x => x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2"))));
|
||||
&& (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)));
|
||||
}
|
||||
else if (meetingType == "W")
|
||||
{
|
||||
pageCount = Funs.DB.Meeting_WeekMeeting.Count(x => x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2"))));
|
||||
&& (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)));
|
||||
}
|
||||
else if (meetingType == "M")
|
||||
{
|
||||
pageCount = Funs.DB.Meeting_MonthMeeting.Count(x => x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2"))));
|
||||
&& (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)));
|
||||
}
|
||||
else if (meetingType == "S")
|
||||
{
|
||||
pageCount = Funs.DB.Meeting_SpecialMeeting.Count(x => x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2"))));
|
||||
&& (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)));
|
||||
}
|
||||
else
|
||||
{
|
||||
pageCount = Funs.DB.Meeting_AttendMeeting.Count(x => x.ProjectId == projectId
|
||||
&& (states == null || (states == "0" && (x.States == "0" || x.States == null)) || (states == "1" && (x.States == "1" || x.States == "2"))));
|
||||
&& (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)));
|
||||
}
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
getDataList = APIMeetingService.getMeetingByProjectIdStates(projectId, meetingType, states, pageIndex);
|
||||
getDataList = APIMeetingService.getMeetingByProjectIdStates(projectId, meetingType, states, pageIndex, startDate, endDate);
|
||||
}
|
||||
responeData.data = new { pageCount, getDataList };
|
||||
}
|
||||
|
||||
@@ -31,7 +31,9 @@ namespace WebAPI.Controllers
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var sysUser = db.Sys_User.FirstOrDefault(x => (x.Account == userInfo.Account || x.Telephone == userInfo.Telephone) && x.IsPost == true);
|
||||
string account = userInfo.Account;
|
||||
string telephone = userInfo.Telephone;
|
||||
var sysUser = db.Sys_User.FirstOrDefault(x => (x.Account == account || x.Telephone == telephone) && x.IsPost == true);
|
||||
if (sysUser != null)
|
||||
{
|
||||
if (sysUser.LockTime.HasValue && sysUser.LockTime.Value > DateTime.Now)
|
||||
|
||||
Reference in New Issue
Block a user