日常巡检、班前会统计
This commit is contained in:
parent
533052efc7
commit
64c7be5db4
|
@ -485,6 +485,16 @@ namespace BLL.OfficeCheck.Inspect
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
public string RectificationPhotoUrl
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
public string RectificationVideoUrl
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
public string States
|
public string States
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
|
@ -26,7 +26,18 @@ namespace Model
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 班组长ID
|
||||||
|
/// </summary>
|
||||||
|
public string GroupLeaderId
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 班组长名称
|
||||||
|
/// </summary>
|
||||||
|
public string GroupLeaderName { get; set;}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 名称
|
/// 名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -15,6 +15,11 @@ namespace Model
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
public string ChildId
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 菜单ID
|
/// 菜单ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -229233,8 +229233,8 @@ namespace Model
|
||||||
private System.Nullable<System.DateTime> _CompileTime;
|
private System.Nullable<System.DateTime> _CompileTime;
|
||||||
|
|
||||||
private string _RectificationPhotoUrl;
|
private string _RectificationPhotoUrl;
|
||||||
|
private string _RectificationVideoUrl;
|
||||||
private EntityRef<Base_Project> _Base_Project;
|
private EntityRef<Base_Project> _Base_Project;
|
||||||
|
|
||||||
private EntityRef<Inspect_Inspection> _Inspect_Inspection;
|
private EntityRef<Inspect_Inspection> _Inspect_Inspection;
|
||||||
|
|
||||||
|
@ -229489,7 +229489,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectificationResults", DbType="NVarChar(20)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectificationResults", DbType="NVarChar(1000)")]
|
||||||
public string RectificationResults
|
public string RectificationResults
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -229588,8 +229588,26 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_RectificationVideoUrl", DbType = "NVarChar(1000)")]
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Inspect_InspectionItem_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
public string RectificationVideoUrl
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._RectificationVideoUrl;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._RectificationVideoUrl != value))
|
||||||
|
{
|
||||||
|
this.OnRectificationPhotoUrlChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._RectificationVideoUrl = value;
|
||||||
|
this.SendPropertyChanged("RectificationVideoUrl");
|
||||||
|
this.OnRectificationPhotoUrlChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Inspect_InspectionItem_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
||||||
public Base_Project Base_Project
|
public Base_Project Base_Project
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
<Reference Include="AOP.Common">
|
<Reference Include="AOP.Common">
|
||||||
<HintPath>..\FineUIPro\Reference BLL\AOP.Common.dll</HintPath>
|
<HintPath>..\FineUIPro\Reference BLL\AOP.Common.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.configuration" />
|
<Reference Include="System.configuration" />
|
||||||
|
|
|
@ -169,5 +169,22 @@ namespace WebAPI.Controllers
|
||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 按项目和检查日期获取日常巡检
|
||||||
|
public Model.ResponeData getHazardRegisterByProjectIdStates(string projectId, string date)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = APIHazardRegisterService.getHazardRegisterByProjectIdStates(projectId, date);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
@ -94,6 +96,25 @@ namespace WebAPI.Controllers
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 根据ID删除会议
|
||||||
|
[HttpDelete]
|
||||||
|
public Model.ResponeData DeleteMeeting(string meetingId)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
BLL.ClassMeetingService.DeleteClassMeetingById(meetingId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 保存Meeting
|
#region 保存Meeting
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存Meeting
|
/// 保存Meeting
|
||||||
|
@ -118,6 +139,74 @@ namespace WebAPI.Controllers
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 班前会参加人数统计
|
||||||
|
public Model.ResponeData getClassMeetingPersonCount(string projectId, string meetingDate)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// 1、获取项目用户(管理人员数量)
|
||||||
|
string projectUserSQL = "SELECT * FROM [dbo].[Project_ProjectUser] as pu LEFT JOIN [dbo].[Sys_User] as u on u.UserId = pu.UserId WHERE pu.ProjectId = @ProjectId;";
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
listStr.Add(new SqlParameter("@ProjectId", projectId));
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable userTb = SQLHelper.GetDataTableRunText(projectUserSQL, parameter);
|
||||||
|
// 2、 获取班前会列表(日期过滤)
|
||||||
|
List<Model.MeetingItem> classMettingList = APIMeetingService.getClassMeetingList(projectId, meetingDate);
|
||||||
|
int personCount = 0;
|
||||||
|
classMettingList.ForEach(item =>
|
||||||
|
{
|
||||||
|
personCount += item.AttentPersonNum;
|
||||||
|
});
|
||||||
|
responeData.data = new
|
||||||
|
{
|
||||||
|
manager = userTb.Rows.Count,
|
||||||
|
personCount = personCount,
|
||||||
|
classMettingList = classMettingList
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 公司级班前会人员统计
|
||||||
|
public Model.ResponeData getCompanyMeetingPersonCounts( string meetingDate)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
|
||||||
|
string sql = "SELECT p.ProjectId as projectId, p.ProjectName as projectName,(SELECT count(*) FROM [dbo].[Project_ProjectUser] as pu LEFT JOIN [dbo].[Sys_User] as u on u.UserId = pu.UserId WHERE pu.ProjectId = p.ProjectId) as manager,(SELECT SUM(AttentPersonNum) as cpunt FROM [dbo].[Meeting_ClassMeeting] as mc WHERE mc.ProjectId = p.ProjectId AND Year(ClassMeetingDate) = @year AND Month(ClassMeetingDate) = @month AND Day(ClassMeetingDate) = @day) as personCount FROM [dbo].[Base_Project] as p;";
|
||||||
|
DateTime mdate = Funs.GetNewDateTimeOrNow(meetingDate);
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
listStr.Add(new SqlParameter("@year", mdate.Year));
|
||||||
|
listStr.Add(new SqlParameter("@month", mdate.Month));
|
||||||
|
listStr.Add(new SqlParameter("@day", mdate.Day));
|
||||||
|
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter);
|
||||||
|
responeData.data = tb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 根据时间获取各单位班会情况
|
#region 根据时间获取各单位班会情况
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据时间获取各单位班会情况
|
/// 根据时间获取各单位班会情况
|
||||||
|
|
|
@ -6,6 +6,7 @@ using BLL.OfficeCheck.Inspect;
|
||||||
using Model;
|
using Model;
|
||||||
using static BLL.OfficeCheck.Inspect.Inspect_InspectionService;
|
using static BLL.OfficeCheck.Inspect.Inspect_InspectionService;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using static WebAPI.Controllers.HSSE.ImageRecognitionController;
|
||||||
|
|
||||||
namespace WebAPI.Controllers.HSSE
|
namespace WebAPI.Controllers.HSSE
|
||||||
{
|
{
|
||||||
|
@ -179,8 +180,33 @@ namespace WebAPI.Controllers.HSSE
|
||||||
|
|
||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
|
#region 保存专检子项
|
||||||
|
[HttpPost]
|
||||||
|
public Model.ResponeData SaveInspectionChild(Model.Inspect_InspectionItem child)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(child.InspectionItemId))
|
||||||
|
{
|
||||||
|
child.InspectionItemId = Guid.NewGuid().ToString();
|
||||||
|
child.CompileTime = DateTime.Now;
|
||||||
|
Inspect_InspectionService.AddInspectionItem(child);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Inspect_InspectionService.UpdateInspectionItem(child);
|
||||||
|
}
|
||||||
|
} catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
//编辑 新增明细
|
//编辑 新增明细
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public Model.ResponeData SaveInspectionItem([FromBody] List<Model.Inspect_InspectionItem> InspectionItems)
|
public Model.ResponeData SaveInspectionItem([FromBody] List<Model.Inspect_InspectionItem> InspectionItems)
|
||||||
|
@ -241,6 +267,8 @@ namespace WebAPI.Controllers.HSSE
|
||||||
TimeLimited = x.TimeLimited,
|
TimeLimited = x.TimeLimited,
|
||||||
RectificationDescription = x.RectificationDescription,
|
RectificationDescription = x.RectificationDescription,
|
||||||
RectificationResults = x.RectificationResults,
|
RectificationResults = x.RectificationResults,
|
||||||
|
RectificationPhotoUrl = x.RectificationPhotoUrl,
|
||||||
|
RectificationVideoUrl = x.RectificationVideoUrl,
|
||||||
States = x.States,
|
States = x.States,
|
||||||
CompileMan = subUser1.UserName,
|
CompileMan = subUser1.UserName,
|
||||||
CompileTime = x.CompileTime,
|
CompileTime = x.CompileTime,
|
||||||
|
|
Loading…
Reference in New Issue