日常巡检、班前会统计

This commit is contained in:
杨家亮 2025-03-30 17:13:19 +08:00
parent 533052efc7
commit 64c7be5db4
8 changed files with 187 additions and 9 deletions

View File

@ -485,6 +485,16 @@ namespace BLL.OfficeCheck.Inspect
get;
set;
}
public string RectificationPhotoUrl
{
get;
set;
}
public string RectificationVideoUrl
{
get;
set;
}
public string States
{
get;

View File

@ -26,7 +26,18 @@ namespace Model
get;
set;
}
/// <summary>
/// 班组长ID
/// </summary>
public string GroupLeaderId
{
get;
set;
}
/// <summary>
/// 班组长名称
/// </summary>
public string GroupLeaderName { get; set;}
/// <summary>
/// 名称
/// </summary>

View File

@ -15,6 +15,11 @@ namespace Model
get;
set;
}
public string ChildId
{
get;
set;
}
/// <summary>
/// 菜单ID
/// </summary>

View File

@ -229233,8 +229233,8 @@ namespace Model
private System.Nullable<System.DateTime> _CompileTime;
private string _RectificationPhotoUrl;
private EntityRef<Base_Project> _Base_Project;
private string _RectificationVideoUrl;
private EntityRef<Base_Project> _Base_Project;
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
{
get
@ -229588,8 +229588,26 @@ namespace Model
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Inspect_InspectionItem_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_RectificationVideoUrl", DbType = "NVarChar(1000)")]
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
{
get

View File

@ -38,8 +38,8 @@
<Reference Include="AOP.Common">
<HintPath>..\FineUIPro\Reference BLL\AOP.Common.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />

View File

@ -169,5 +169,22 @@ namespace WebAPI.Controllers
return responeData;
}
#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
}
}

View File

@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Net;
using System.Net.Http;
@ -94,6 +96,25 @@ namespace WebAPI.Controllers
}
#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
/// <summary>
/// 保存Meeting
@ -118,6 +139,74 @@ namespace WebAPI.Controllers
}
#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
/// <summary>
/// 根据时间获取各单位班会情况

View File

@ -6,6 +6,7 @@ using BLL.OfficeCheck.Inspect;
using Model;
using static BLL.OfficeCheck.Inspect.Inspect_InspectionService;
using System.Collections.Generic;
using static WebAPI.Controllers.HSSE.ImageRecognitionController;
namespace WebAPI.Controllers.HSSE
{
@ -179,8 +180,33 @@ namespace WebAPI.Controllers.HSSE
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]
public Model.ResponeData SaveInspectionItem([FromBody] List<Model.Inspect_InspectionItem> InspectionItems)
@ -241,6 +267,8 @@ namespace WebAPI.Controllers.HSSE
TimeLimited = x.TimeLimited,
RectificationDescription = x.RectificationDescription,
RectificationResults = x.RectificationResults,
RectificationPhotoUrl = x.RectificationPhotoUrl,
RectificationVideoUrl = x.RectificationVideoUrl,
States = x.States,
CompileMan = subUser1.UserName,
CompileTime = x.CompileTime,