diff --git a/SGGL/BLL/OfficeCheck/Inspect/Inspect_InspectionService.cs b/SGGL/BLL/OfficeCheck/Inspect/Inspect_InspectionService.cs
index f2a2d1b..ebed688 100644
--- a/SGGL/BLL/OfficeCheck/Inspect/Inspect_InspectionService.cs
+++ b/SGGL/BLL/OfficeCheck/Inspect/Inspect_InspectionService.cs
@@ -485,6 +485,16 @@ namespace BLL.OfficeCheck.Inspect
get;
set;
}
+ public string RectificationPhotoUrl
+ {
+ get;
+ set;
+ }
+ public string RectificationVideoUrl
+ {
+ get;
+ set;
+ }
public string States
{
get;
diff --git a/SGGL/Model/APIItem/BaseInfoItem.cs b/SGGL/Model/APIItem/BaseInfoItem.cs
index 63acc82..65d59fb 100644
--- a/SGGL/Model/APIItem/BaseInfoItem.cs
+++ b/SGGL/Model/APIItem/BaseInfoItem.cs
@@ -26,7 +26,18 @@ namespace Model
get;
set;
}
-
+ ///
+ /// 班组长ID
+ ///
+ public string GroupLeaderId
+ {
+ get;
+ set;
+ }
+ ///
+ /// 班组长名称
+ ///
+ public string GroupLeaderName { get; set;}
///
/// 名称
///
diff --git a/SGGL/Model/APIItem/ToDoItem.cs b/SGGL/Model/APIItem/ToDoItem.cs
index 0e1f279..f017b6d 100644
--- a/SGGL/Model/APIItem/ToDoItem.cs
+++ b/SGGL/Model/APIItem/ToDoItem.cs
@@ -15,6 +15,11 @@ namespace Model
get;
set;
}
+ public string ChildId
+ {
+ get;
+ set;
+ }
///
/// 菜单ID
///
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 65039d6..0d24262 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -229233,8 +229233,8 @@ namespace Model
private System.Nullable _CompileTime;
private string _RectificationPhotoUrl;
-
- private EntityRef _Base_Project;
+ private string _RectificationVideoUrl;
+ private EntityRef _Base_Project;
private EntityRef _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
diff --git a/SGGL/SgManager.AI/SgManager.AI.csproj b/SGGL/SgManager.AI/SgManager.AI.csproj
index 65608c6..83e599b 100644
--- a/SGGL/SgManager.AI/SgManager.AI.csproj
+++ b/SGGL/SgManager.AI/SgManager.AI.csproj
@@ -38,8 +38,8 @@
..\FineUIPro\Reference BLL\AOP.Common.dll
-
- ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+
+ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll
diff --git a/SGGL/WebAPI/Controllers/HSSE/HazardRegisterController.cs b/SGGL/WebAPI/Controllers/HSSE/HazardRegisterController.cs
index 59c70e5..3ac9827 100644
--- a/SGGL/WebAPI/Controllers/HSSE/HazardRegisterController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/HazardRegisterController.cs
@@ -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
}
}
diff --git a/SGGL/WebAPI/Controllers/HSSE/MeetingController.cs b/SGGL/WebAPI/Controllers/HSSE/MeetingController.cs
index 6ea323d..20dcf3b 100644
--- a/SGGL/WebAPI/Controllers/HSSE/MeetingController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/MeetingController.cs
@@ -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
///
/// 保存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 listStr = new List();
+ listStr.Add(new SqlParameter("@ProjectId", projectId));
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable userTb = SQLHelper.GetDataTableRunText(projectUserSQL, parameter);
+ // 2、 获取班前会列表(日期过滤)
+ List 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 listStr = new List();
+ 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 根据时间获取各单位班会情况
///
/// 根据时间获取各单位班会情况
diff --git a/SGGL/WebAPI/Controllers/HSSE/SafetyInspectionController.cs b/SGGL/WebAPI/Controllers/HSSE/SafetyInspectionController.cs
index 0f0d137..f9d38e2 100644
--- a/SGGL/WebAPI/Controllers/HSSE/SafetyInspectionController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/SafetyInspectionController.cs
@@ -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 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,