Merge branch 'master' of https://gitee.com/frane-yang/SGGL_CWCEC
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -467,6 +467,7 @@
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\CheckCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\CheckDetailSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\CheckSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\ComplianceObligationsCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\CostInvestmentPlanCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\DrillSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\EmergencyExercisesCService.cs" />
|
||||
@@ -478,18 +479,22 @@
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\HazardSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\HseCostCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\IncentiveSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\InjuryAccidentCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\ManageDocPlanCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\MeetingCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\MeetingSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\MonthReportCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\NoInjuryAccidentCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\OtherActiveSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\OtherManagementCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\OtherWorkCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\OtherWorkPlanCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\PerformanceIndicatorCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\PersonSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\PlanCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\PromotionalActiviteSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\ReviewRecordCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\RewardAndPunishSortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\SubExpenseCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\TrainActivitySortCService.cs" />
|
||||
<Compile Include="HSSE\Manager\ManagerMonthC\TrainCService.cs" />
|
||||
|
||||
@@ -207,6 +207,11 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string AppSecret_CWCEC = "a08b6ad503f1ced05d27bc11dc9198c3";
|
||||
|
||||
/// <summary>
|
||||
/// 施工单位ID
|
||||
/// </summary>
|
||||
public const string UnitId_Con = "fedf9907-54f8-481d-ae4c-8f3dfb7c8eda";
|
||||
|
||||
/// <summary>
|
||||
///施工部门id
|
||||
/// </summary>
|
||||
@@ -281,7 +286,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// HSE工程师岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_HSSEEngineer = "9b15af2e-6131-462c-9f8a-71533957ca0e";
|
||||
public static string WorkPost_HSSEEngineer = "D1115B78-C9E1-43A4-8AB1-FF099CAF7BA4";
|
||||
/// <summary>
|
||||
/// 项目安全总监岗位Id
|
||||
/// </summary>
|
||||
@@ -289,7 +294,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// HSE经理岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_SafetyManager = "e426e560-9906-4aba-843e-2daef9ebeb05";
|
||||
public static string WorkPost_SafetyManager = "eac153fd-4cf3-4f5f-984d-022a636d47aa";
|
||||
|
||||
/// <summary>
|
||||
/// HSE副经理岗位Id
|
||||
@@ -3298,6 +3303,10 @@ namespace BLL
|
||||
/// 作废
|
||||
/// </summary>
|
||||
public const string State_C = "-2";
|
||||
/// <summary>
|
||||
/// 关闭提交
|
||||
/// </summary>
|
||||
public const string State_6 = "6";
|
||||
#endregion
|
||||
|
||||
#region 文档流程定义
|
||||
@@ -5546,5 +5555,10 @@ namespace BLL
|
||||
/// 实业
|
||||
/// </summary>
|
||||
public const string SYHSEData_DataMenuId = "S89E5EC2-F725-4656-9110-5AF83C18FB6C";
|
||||
|
||||
/// <summary>
|
||||
/// 检查表尾项管理
|
||||
/// </summary>
|
||||
public const string InspectTailTerm = "B6A6EA7D-EDAB-40C8-920D-A106731D0E08";
|
||||
}
|
||||
}
|
||||
@@ -475,15 +475,31 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据时间、项目获取安全费用投入登记信息
|
||||
/// 根据时间、项目获取五环安全费用投入登记信息
|
||||
/// </summary>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.CostGoods_PayRegistration> GetPayRegistrationByPayDate(DateTime startTime, DateTime endTime, string projectId)
|
||||
public static List<Model.CostGoods_PayRegistration> GetPayRegistrationByPayDate(DateTime startTime, DateTime endTime, string projectId,string unitId)
|
||||
{
|
||||
return (from x in Funs.DB.CostGoods_PayRegistration where x.PayDate >= startTime && x.PayDate <= endTime && x.ProjectId == projectId select x).ToList();
|
||||
return (from x in Funs.DB.CostGoods_PayRegistration where x.PayDate >= startTime && x.PayDate <= endTime && x.ProjectId == projectId && x.UnitId == unitId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据时间、项目获取施工分包商安全费用投入登记信息
|
||||
/// </summary>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.CostGoods_PayRegistration> GetConPayRegistrationByPayDate(DateTime startTime, DateTime endTime, string projectId)
|
||||
{
|
||||
return (from x in Funs.DB.CostGoods_PayRegistration
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.PayDate >= startTime && x.PayDate <= endTime && x.ProjectId == projectId
|
||||
&& y.UnitTypeId == BLL.Const.UnitId_Con
|
||||
select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,6 +219,32 @@ namespace BLL
|
||||
return (from x in Funs.DB.CostGoods_SubPayRegistration where x.PayDate >= startTime && x.PayDate <= endTime && x.ProjectId == projectId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位获取HSE措施费合同额
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSubPaySMonthTypeByUnitId(string unitId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
var q = (from x in Funs.DB.CostGoods_SubPayRegistration
|
||||
where x.UnitId == unitId && x.PayDate >= startTime && x.PayDate < endTime
|
||||
select x).ToList();
|
||||
if (q.Count > 0)
|
||||
{
|
||||
return q.Sum(e => (e.SMonthType1 + e.SMonthType2 + e.SMonthType3 + e.SMonthType4 + e.SMonthType5 + e.SMonthType6 + e.SMonthType7 + e.SMonthType8 + e.SMonthType9 + e.SMonthType10 + e.SMonthType11 + e.SMonthType12 + e.SMonthType13 + e.SMonthType14 + e.SMonthType15 + e.SMonthType16 + e.SMonthType17 + e.SMonthType18 + e.SMonthType19 + e.SMonthType20 + e.SMonthType21 + e.SMonthType22 + e.SMonthType23 + e.SMonthType24 + e.SMonthType25 + e.SMonthType26 + e.SMonthType27 + e.SMonthType28 + e.SMonthType29));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位获取本月项目分包商HSE费用支付统计
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSubPayRegistrationByUnitId(string unitId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
var q = (from x in Funs.DB.CostGoods_SubPayRegistration
|
||||
|
||||
@@ -102,5 +102,10 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetAccidentHandleByAccidentDate(DateTime startTime, DateTime endTime, string projectId, string unitId)
|
||||
{
|
||||
return (from x in Funs.DB.Accident_AccidentHandle where x.AccidentDate >= startTime && x.AccidentDate < endTime && x.ProjectId == projectId && x.UnitId == unitId select x).Count();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -453,5 +453,10 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Model.Accident_AccidentReport> GetAccidentReportsByAccidentType(string accidentType,DateTime startTime, DateTime endTime, string projectId)
|
||||
{
|
||||
return (from x in Funs.DB.Accident_AccidentReport where x.AccidentTypeId==accidentType && x.AccidentDate >= startTime && x.AccidentDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,36 +62,42 @@ namespace BLL
|
||||
string type = string.Empty;
|
||||
if (CheckItem != null)
|
||||
{
|
||||
Model.Check_ProjectCheckItemDetail detail = BLL.Check_ProjectCheckItemDetailService.GetCheckItemDetailById(CheckItem.ToString());
|
||||
//Model.Check_ProjectCheckItemDetail detail = BLL.Check_ProjectCheckItemDetailService.GetCheckItemDetailById(CheckItem.ToString());
|
||||
|
||||
//修改为项目安全检查项
|
||||
Model.Technique_CheckItemSet detail = Funs.DB.Technique_CheckItemSet.FirstOrDefault(x => x.CheckItemSetId == CheckItem.ToString());
|
||||
|
||||
if (detail != null)
|
||||
{
|
||||
Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(detail.CheckItemSetId);
|
||||
if (item != null)
|
||||
{
|
||||
if (item.SupCheckItem == "0")
|
||||
{
|
||||
type = item.CheckItemName;
|
||||
}
|
||||
else
|
||||
{
|
||||
type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem);
|
||||
}
|
||||
}
|
||||
type = detail.CheckItemName;
|
||||
//Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(detail.CheckItemSetId);
|
||||
//if (item != null)
|
||||
//{
|
||||
// if (item.SupCheckItem == "0")
|
||||
// {
|
||||
// type = item.CheckItemName;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(CheckItem.ToString());
|
||||
if (item != null)
|
||||
{
|
||||
if (item.SupCheckItem == "0")
|
||||
{
|
||||
type = item.CheckItemName;
|
||||
}
|
||||
else
|
||||
{
|
||||
type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem);
|
||||
}
|
||||
}
|
||||
type = "季节性/节假日检查(无类型)";
|
||||
//Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(CheckItem.ToString());
|
||||
//if (item != null)
|
||||
//{
|
||||
// if (item.SupCheckItem == "0")
|
||||
// {
|
||||
// type = item.CheckItemName;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
return type;
|
||||
|
||||
@@ -154,5 +154,10 @@ namespace BLL
|
||||
{
|
||||
return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate < time && x.ProjectId == projectId select x).Count();
|
||||
}
|
||||
|
||||
public static int? GetTrainPersonCount(DateTime startTime, DateTime endTime, string projectId)
|
||||
{
|
||||
return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate >= startTime && x.TrainStartDate <= endTime && x.ProjectId == projectId select x.TrainPersonNum).Sum();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,13 +16,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static ListItem[] drpStatesItem()
|
||||
{
|
||||
ListItem[] list = new ListItem[6];
|
||||
//修改日期,增加关闭审核中
|
||||
ListItem[] list = new ListItem[7];
|
||||
list[0] = new ListItem("全部", Const._Null);
|
||||
list[1] = new ListItem("待提交", Const.State_0);
|
||||
list[2] = new ListItem("审核中", Const.State_1);
|
||||
list[3] = new ListItem("作业中", Const.State_2);
|
||||
list[4] = new ListItem("已关闭", Const.State_3);
|
||||
list[5] = new ListItem("已取消", Const.State_R);
|
||||
list[4] = new ListItem("关闭审核中", Const.State_6);
|
||||
list[5] = new ListItem("已关闭", Const.State_3);
|
||||
list[6] = new ListItem("已取消", Const.State_R);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace BLL
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Manager_HSSELog newHSSELog =db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
|
||||
Model.Manager_HSSELog newHSSELog = db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
|
||||
if (newHSSELog != null)
|
||||
{
|
||||
newHSSELog.CompileDate = updateHSSELog.CompileDate;
|
||||
@@ -980,5 +980,189 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 小程序接口
|
||||
/// <summary>
|
||||
/// 返回列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HSSELogItem> getHSSELogDataList(string projectId, string userId,string CompileMan,string CompileDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.HSSELogItem> getInfoList = new List<Model.HSSELogItem>();
|
||||
getInfoList = (from x in db.Manager_HSSELog
|
||||
join y in db.Sys_User on x.CompileMan equals y.UserId
|
||||
join z in db.Sys_Const on x.Weather equals z.ConstValue
|
||||
orderby x.CompileDate descending
|
||||
where x.IsVisible != false && z.GroupId == BLL.ConstValue.Group_Weather && x.ProjectId == projectId
|
||||
select new Model.HSSELogItem
|
||||
{
|
||||
HSSELogId = x.HSSELogId,
|
||||
ProjectId = x.ProjectId,
|
||||
CompileDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
|
||||
CompileMan = x.CompileMan,
|
||||
Weather = x.Weather,
|
||||
IsVisible = x.IsVisible,
|
||||
CompileManName = y.UserName,
|
||||
WeatherName = z.ConstText
|
||||
}).ToList();
|
||||
Model.Project_ProjectUser projectUser = BLL.ProjectUserService.GetProjectUserByUserIdProjectId(projectId, userId);
|
||||
if (projectUser != null)
|
||||
{
|
||||
if (projectUser.RoleId.Contains(BLL.Const.HSSEEngineer)) //项目安全工程师只能看到自己的日志内容
|
||||
{
|
||||
getInfoList = getInfoList.Where(x => x.CompileMan == userId).ToList();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(CompileMan))
|
||||
{
|
||||
getInfoList = getInfoList.Where(x => x.CompileMan == CompileMan).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(CompileDate))
|
||||
{
|
||||
getInfoList = getInfoList.Where(x => x.CompileDate.Contains(CompileDate)).ToList();
|
||||
}
|
||||
|
||||
return getInfoList;
|
||||
}
|
||||
}
|
||||
|
||||
public static Model.HSSELogItem getHSSELogData(string HSSELogId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.HSSELogItem model = new Model.HSSELogItem();
|
||||
model = (from x in db.Manager_HSSELog
|
||||
join y in db.Sys_User on x.CompileMan equals y.UserId
|
||||
join z in db.Sys_Const on x.Weather equals z.ConstValue
|
||||
orderby x.CompileDate
|
||||
where x.IsVisible != false && z.GroupId == BLL.ConstValue.Group_Weather && x.HSSELogId == HSSELogId
|
||||
select new Model.HSSELogItem
|
||||
{
|
||||
HSSELogId = x.HSSELogId,
|
||||
ProjectId = x.ProjectId,
|
||||
CompileDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate),
|
||||
CompileMan = x.CompileMan,
|
||||
Weather = x.Weather,
|
||||
IsVisible = x.IsVisible,
|
||||
CompileManName = y.UserName,
|
||||
WeatherName = z.ConstText,
|
||||
|
||||
|
||||
Content1 = x.Num11.ToString(),
|
||||
Content2= x.Contents12,
|
||||
Content3= x.Contents13,
|
||||
Content4= x.Contents21,
|
||||
Content5= x.Num21.ToString(),
|
||||
Content6= x.Contents22,
|
||||
Content7 = x.Num22.ToString(),
|
||||
Content8 = x.Contents23,
|
||||
Content9 = x.Num23.ToString(),
|
||||
Content10 = x.Contents24,
|
||||
Content11 = x.Num24.ToString(),
|
||||
Content12 = x.Contents210,
|
||||
Content13 = x.Num210.ToString(),
|
||||
Content14 = x.Num211.ToString(),
|
||||
Content15 = x.Contents31,
|
||||
Content16 = x.Num31.ToString(),
|
||||
Content17 = x.Contents32,
|
||||
Content18 = x.Num32.ToString(),
|
||||
Content19 = x.Contents41,
|
||||
Content20 = x.Contents42
|
||||
}).FirstOrDefault();
|
||||
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加HSSE日志暨管理数据收集
|
||||
/// </summary>
|
||||
/// <param name="HSSELog">HSSE日志暨管理数据收集实体</param>
|
||||
public static void AddHSSELogApi(Model.HSSELogItem HSSELog)
|
||||
{
|
||||
Model.Manager_HSSELog newHSSELog = new Model.Manager_HSSELog
|
||||
{
|
||||
HSSELogId = HSSELog.HSSELogId,
|
||||
ProjectId = HSSELog.ProjectId,
|
||||
CompileDate = Convert.ToDateTime(HSSELog.CompileDate),
|
||||
CompileMan = HSSELog.CompileMan,
|
||||
Weather = HSSELog.Weather,
|
||||
IsVisible = HSSELog.IsVisible,
|
||||
Num11 = Convert.ToInt32(HSSELog.Content1),
|
||||
Contents12 = HSSELog.Content2,
|
||||
Contents13 = HSSELog.Content3,
|
||||
Contents21 = HSSELog.Content4,
|
||||
Num21 = Convert.ToInt32(HSSELog.Content5),
|
||||
Contents22 = HSSELog.Content6,
|
||||
Num22 = Convert.ToInt32(HSSELog.Content7),
|
||||
Contents23 = HSSELog.Content8,
|
||||
Num23 = Convert.ToInt32(HSSELog.Content9),
|
||||
Contents24 = HSSELog.Content10,
|
||||
Num24 = Convert.ToInt32(HSSELog.Content11),
|
||||
|
||||
Contents210 = HSSELog.Content12,
|
||||
Num210 = Convert.ToInt32(HSSELog.Content13),
|
||||
Num211 = Convert.ToInt32(HSSELog.Content14),
|
||||
Contents31 = HSSELog.Content15,
|
||||
Num31 = Convert.ToInt32(HSSELog.Content16),
|
||||
Contents32 = HSSELog.Content17,
|
||||
Num32 = Convert.ToInt32(HSSELog.Content18),
|
||||
|
||||
Contents41 = HSSELog.Content19,
|
||||
Contents42 = HSSELog.Content20
|
||||
};
|
||||
Funs.DB.Manager_HSSELog.InsertOnSubmit(newHSSELog);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改HSSE日志暨管理数据收集
|
||||
/// </summary>
|
||||
/// <param name="updateHSSELog"></param>
|
||||
public static void UpdateHSSELogApi(Model.HSSELogItem updateHSSELog)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Manager_HSSELog newHSSELog = db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
|
||||
if (newHSSELog != null)
|
||||
{
|
||||
newHSSELog.CompileDate = Convert.ToDateTime(updateHSSELog.CompileDate);
|
||||
newHSSELog.CompileMan = updateHSSELog.CompileMan;
|
||||
newHSSELog.Weather = updateHSSELog.Weather;
|
||||
newHSSELog.IsVisible = updateHSSELog.IsVisible;
|
||||
|
||||
newHSSELog.Num11 = Convert.ToInt32(updateHSSELog.Content1);
|
||||
newHSSELog.Contents12 = updateHSSELog.Content2;
|
||||
newHSSELog.Contents13 = updateHSSELog.Content3;
|
||||
newHSSELog.Contents21 = updateHSSELog.Content4;
|
||||
newHSSELog.Num21 = Convert.ToInt32(updateHSSELog.Content5);
|
||||
newHSSELog.Contents22 = updateHSSELog.Content6;
|
||||
newHSSELog.Num22 = Convert.ToInt32(updateHSSELog.Content7);
|
||||
newHSSELog.Contents23 = updateHSSELog.Content8;
|
||||
newHSSELog.Num23 = Convert.ToInt32(updateHSSELog.Content9);
|
||||
newHSSELog.Contents24 = updateHSSELog.Content10;
|
||||
newHSSELog.Num24 = Convert.ToInt32(updateHSSELog.Content11);
|
||||
|
||||
newHSSELog.Contents210 = updateHSSELog.Content12;
|
||||
newHSSELog.Num210 = Convert.ToInt32(updateHSSELog.Content13);
|
||||
newHSSELog.Num211 = Convert.ToInt32(updateHSSELog.Content14);
|
||||
newHSSELog.Contents31 = updateHSSELog.Content15;
|
||||
newHSSELog.Num31 = Convert.ToInt32(updateHSSELog.Content16);
|
||||
newHSSELog.Contents32 = updateHSSELog.Content17;
|
||||
newHSSELog.Num32 = Convert.ToInt32(updateHSSELog.Content18);
|
||||
|
||||
newHSSELog.Contents41 = updateHSSELog.Content19;
|
||||
newHSSELog.Contents42 = updateHSSELog.Content20;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// HSE合规义务识别与评价
|
||||
/// </summary>
|
||||
public class ComplianceObligationsCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取相关HSE合规义务识别与评价
|
||||
/// </summary>
|
||||
/// <param name="monthRepportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_ComplianceObligationsC> GetComplianceObligationsCByMonthReportId(string monthRepportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_ComplianceObligationsC where x.MonthReportId == monthRepportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public static void AddComplianceObligationsC(Model.Manager_Month_ComplianceObligationsC data)
|
||||
{
|
||||
Model.Manager_Month_ComplianceObligationsC newData = new Model.Manager_Month_ComplianceObligationsC
|
||||
{
|
||||
ComplianceObligationsId = data.ComplianceObligationsId,
|
||||
MonthReportId = data.MonthReportId,
|
||||
InformationContent = data.InformationContent,
|
||||
ResponseMeasures = data.ResponseMeasures,
|
||||
ImplementationStatus = data.ImplementationStatus,
|
||||
EvaluationConclusion = data.EvaluationConclusion
|
||||
};
|
||||
Funs.DB.Manager_Month_ComplianceObligationsC.InsertOnSubmit(newData);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据HSE月报ID删除相关HSE合规义务识别与评价
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
public static void DeleteComplianceObligationsCByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_Month_ComplianceObligationsC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Manager_Month_ComplianceObligationsC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_HazardC> GetHazardByMonthReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_HazardC where x.MonthReportId == monthReportId orderby x.SortIndex select x).ToList();
|
||||
return (from x in Funs.DB.Manager_Month_HazardC where x.MonthReportId == monthReportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -31,10 +31,10 @@ namespace BLL
|
||||
HazardId = SQLHelper.GetNewID(typeof(Model.Manager_Month_HazardC)),
|
||||
MonthReportId = hazard.MonthReportId,
|
||||
WorkArea = hazard.WorkArea,
|
||||
Subcontractor = hazard.Subcontractor,
|
||||
DangerousSource = hazard.DangerousSource,
|
||||
EnvironmentalFactors = hazard.EnvironmentalFactors,
|
||||
Consequence = hazard.Consequence,
|
||||
ControlMeasures = hazard.ControlMeasures,
|
||||
SortIndex = hazard.SortIndex
|
||||
IsMajor = hazard.IsMajor
|
||||
};
|
||||
db.Manager_Month_HazardC.InsertOnSubmit(newHazard);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 伤害事故统计
|
||||
/// </summary>
|
||||
public class InjuryAccidentCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_InjuryAccidentC> GetInjuryAccidentCByMonthReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_InjuryAccidentC where x.MonthReportId == monthReportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="injuryAccount"></param>
|
||||
public static void AddInjuryAccidentC(Model.Manager_Month_InjuryAccidentC injuryAccident)
|
||||
{
|
||||
Model.Manager_Month_InjuryAccidentC newInjuryAccident = new Model.Manager_Month_InjuryAccidentC
|
||||
{
|
||||
InjuryAccidentId = injuryAccident.InjuryAccidentId,
|
||||
MonthReportId = injuryAccident.MonthReportId,
|
||||
UnitName = injuryAccident.UnitName,
|
||||
AttemptedIncidents = injuryAccident.AttemptedIncidents,
|
||||
FirstAidDressing = injuryAccident.FirstAidDressing,
|
||||
MedicalTreatment = injuryAccident.MedicalTreatment,
|
||||
WorkLimitation = injuryAccident.WorkLimitation,
|
||||
LossPerson = injuryAccident.LossPerson,
|
||||
LossWorkTime = injuryAccident.LossWorkTime,
|
||||
LossEconomy = injuryAccident.LossEconomy,
|
||||
DeathPerson = injuryAccident.DeathPerson,
|
||||
DeathWorkTime = injuryAccident.DeathWorkTime,
|
||||
DeathEconomy = injuryAccident.DeathEconomy
|
||||
};
|
||||
Funs.DB.Manager_Month_InjuryAccidentC.InsertOnSubmit(newInjuryAccident);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报ID删除伤害事故
|
||||
/// </summary>
|
||||
/// <param name="montReportId"></param>
|
||||
public static void DeleteInjuryAccidengtByMonthReportId(string montReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_Month_InjuryAccidentC where x.MonthReportId == montReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Manager_Month_InjuryAccidentC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,8 @@ namespace BLL
|
||||
YearSolutionNum = monthReport.YearSolutionNum,
|
||||
AccidentDes = monthReport.AccidentDes,
|
||||
Question = monthReport.Question,
|
||||
SubcontractManHours = monthReport.SubcontractManHours
|
||||
SubcontractManHours = monthReport.SubcontractManHours,
|
||||
AccidentDef = monthReport.AccidentDef,
|
||||
};
|
||||
|
||||
db.Manager_MonthReportC.InsertOnSubmit(newMonthReport);
|
||||
@@ -295,6 +296,7 @@ namespace BLL
|
||||
newMonthReport.AccidentDes = monthReport.AccidentDes;
|
||||
newMonthReport.Question = monthReport.Question;
|
||||
newMonthReport.SubcontractManHours = monthReport.SubcontractManHours;
|
||||
newMonthReport.AccidentDef = monthReport.AccidentDef;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 本月无伤害事故统计
|
||||
/// </summary>
|
||||
public class NoInjuryAccidentCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取本月无伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_NoInjuryAccidentC> GetNoInjuryAccidentByMonthReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_NoInjuryAccidentC where x.MonthReportId == monthReportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加无伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="noInjury"></param>
|
||||
public static void AddNoInjuryAccident(Model.Manager_Month_NoInjuryAccidentC noInjury)
|
||||
{
|
||||
Model.Manager_Month_NoInjuryAccidentC newNoInjury = new Model.Manager_Month_NoInjuryAccidentC
|
||||
{
|
||||
NoInjuryAccidentId = noInjury.NoInjuryAccidentId,
|
||||
MonthReportId = noInjury.MonthReportId,
|
||||
AccidentType = noInjury.AccidentType,
|
||||
EconomicLosses = noInjury.EconomicLosses,
|
||||
WHAccidentCount = noInjury.WHAccidentCount,
|
||||
SubAccidentCount = noInjury.SubAccidentCount,
|
||||
};
|
||||
Funs.DB.Manager_Month_NoInjuryAccidentC.InsertOnSubmit(newNoInjury);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报ID删除无伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
public static void DeleteNoInjuryAccidentByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_Month_NoInjuryAccidentC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q!=null)
|
||||
{
|
||||
Funs.DB.Manager_Month_NoInjuryAccidentC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目HSE绩效指标
|
||||
/// </summary>
|
||||
public class PerformanceIndicatorCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取HSE绩效指标
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_PerformanceIndicatorC> GetPerformanceIndicatorByMonthReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_PerformanceIndicatorC where x.MonthReportId == monthReportId orderby x.SortIndex select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加HSE绩效指标
|
||||
/// </summary>
|
||||
/// <param name="indicator"></param>
|
||||
public static void AddPerformanceIndicator(Model.Manager_Month_PerformanceIndicatorC indicator)
|
||||
{
|
||||
Model.Manager_Month_PerformanceIndicatorC newIndicator = new Model.Manager_Month_PerformanceIndicatorC
|
||||
{
|
||||
PerformanceIndicatorId = indicator.PerformanceIndicatorId,
|
||||
MonthReportId = indicator.MonthReportId,
|
||||
IndicatorType = indicator.IndicatorType,
|
||||
IndicatorName = indicator.IndicatorName,
|
||||
IndicatorValue = indicator.IndicatorValue,
|
||||
SortIndex = indicator.SortIndex,
|
||||
};
|
||||
Funs.DB.Manager_Month_PerformanceIndicatorC.InsertOnSubmit(newIndicator);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除HSE绩效指标
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
public static void DeletePerformanceIndicatorByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_Month_PerformanceIndicatorC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Manager_Month_PerformanceIndicatorC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,11 +39,11 @@ namespace BLL
|
||||
MonthReportId = checkSort.MonthReportId,
|
||||
UnitId = checkSort.UnitId,
|
||||
SumPersonNum = checkSort.SumPersonNum,
|
||||
SumOutPersonNum = checkSort.SumOutPersonNum,
|
||||
HSEPersonNum = checkSort.HSEPersonNum,
|
||||
ContractRange = checkSort.ContractRange,
|
||||
Remark = checkSort.Remark
|
||||
};
|
||||
|
||||
db.Manager_PersonSortC.InsertOnSubmit(newPersonSort);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// HSE奖励与处罚
|
||||
/// </summary>
|
||||
public class RewardAndPunishSortCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取HSE奖励与处罚列表
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_RewardAndPunishSortC> GetRewardAndPunishSortCByMontReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_RewardAndPunishSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加HSE奖励与处罚
|
||||
/// </summary>
|
||||
/// <param name="sortC"></param>
|
||||
public static void AddRewardAndPunishSortC(Model.Manager_RewardAndPunishSortC sortC)
|
||||
{
|
||||
Model.Manager_RewardAndPunishSortC newSortC = new Model.Manager_RewardAndPunishSortC
|
||||
{
|
||||
RewardAndPunishId = sortC.RewardAndPunishId,
|
||||
MonthReportId = sortC.MonthReportId,
|
||||
RewardNum = sortC.RewardNum,
|
||||
RewardMoney = sortC.RewardMoney,
|
||||
ProjectRewardMoney = sortC.ProjectRewardMoney,
|
||||
PunishNum = sortC.PunishNum,
|
||||
PunishMoney = sortC.PunishMoney,
|
||||
ProjectPunishMoney = sortC.ProjectPunishMoney
|
||||
};
|
||||
Funs.DB.Manager_RewardAndPunishSortC.InsertOnSubmit(newSortC);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id删除HSE奖励与处罚
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
public static void DeleteRewardAndPunishSortCByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_RewardAndPunishSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Manager_RewardAndPunishSortC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,10 @@ namespace BLL
|
||||
SubUnit = subExpense.SubUnit,
|
||||
CostMonth = subExpense.CostMonth,
|
||||
CostYear = subExpense.CostYear,
|
||||
SortIndex = subExpense.SortIndex
|
||||
SortIndex = subExpense.SortIndex,
|
||||
ContractAmount=subExpense.ContractAmount,
|
||||
MonthApprovalAmount = subExpense.MonthApprovalAmount,
|
||||
ProjectApprovalAmount=subExpense.ProjectApprovalAmount
|
||||
};
|
||||
db.Manager_Month_SubExpenseC.InsertOnSubmit(newSubExpense);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -36,7 +36,9 @@ namespace BLL
|
||||
TeachHour = trainSort.TeachHour,
|
||||
TeachMan = trainSort.TeachMan,
|
||||
UnitName = trainSort.UnitName,
|
||||
PersonNum = trainSort.PersonNum
|
||||
PersonNum = trainSort.PersonNum,
|
||||
TrainType = trainSort.TrainType,
|
||||
TotalPersonNum = trainSort.TotalPersonNum
|
||||
};
|
||||
|
||||
db.Manager_TrainSortC.InsertOnSubmit(newTrainSort);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -100,5 +101,17 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据时间段获取班前会议集合
|
||||
/// </summary>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetCountByTime(DateTime startTime, DateTime endTime, string projectId)
|
||||
{
|
||||
return (from x in Funs.DB.Meeting_ClassMeeting where x.ClassMeetingDate >= startTime && x.ClassMeetingDate < endTime && x.ProjectId == projectId select x).Count();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,9 +384,9 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <returns>人员的数量</returns>
|
||||
public static int GetPersonCountByUnitId(string unitId, string projectId)
|
||||
public static int GetPersonCountByUnitId(string unitId, string projectId, bool isOutside)
|
||||
{
|
||||
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == true select x).ToList();
|
||||
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == true && x.IsOutside == isOutside select x).ToList();
|
||||
return q.Count();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user