This commit is contained in:
2024-07-09 09:15:17 +08:00
43 changed files with 4985 additions and 26 deletions
+4 -2
View File
@@ -54,9 +54,9 @@
<Reference Include="Microsoft.QualityTools.Testing.Fakes, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Microsoft.SQLServer.ManagedDTS, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<Reference Include="Microsoft.SQLServer.ManagedDTS, Version=16.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Lib\Microsoft.SQLServer.ManagedDTS.dll</HintPath>
<HintPath>C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_16.0.0.0__89845dcd8080cc91\新建文件夹\Microsoft.SQLServer.ManagedDTS.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -396,7 +396,9 @@
<Compile Include="HSSE\CostGoods\CostManageService.cs" />
<Compile Include="HSSE\CostGoods\CostSmallDetailItemService.cs" />
<Compile Include="HSSE\CostGoods\CostSmallDetailService.cs" />
<Compile Include="HSSE\CostGoods\FeeRegistration.cs" />
<Compile Include="HSSE\CostGoods\GoodsManageService.cs" />
<Compile Include="HSSE\CostGoods\HseExpenseService.cs" />
<Compile Include="HSSE\EduTrain\AccidentCaseItemService.cs" />
<Compile Include="HSSE\EduTrain\AccidentCaseService.cs" />
<Compile Include="HSSE\EduTrain\CompanyTrainingItemService.cs" />
+10
View File
@@ -22,6 +22,16 @@ namespace BLL
return Funs.DB.Base_RiskLevel.FirstOrDefault(e => e.RiskLevelId == riskLevelId);
}
/// <summary>
/// 根据主键获取许可证类型
/// </summary>
/// <param name="licenseTypeId"></param>
/// <returns></returns>
public static Model.Base_RiskLevel GetRiskLevelBy(string riskLevel)
{
return Funs.DB.Base_RiskLevel.FirstOrDefault(e => e.RiskLevel == Convert.ToInt32(riskLevel));
}
/// <summary>
/// 添加许可证类型
/// </summary>
+5
View File
@@ -2279,6 +2279,11 @@ namespace BLL
/// 安全费用管理
/// </summary>
public const string ProjectHSSECostManageMenuId = "5C74F09D-FDE3-4995-A1D6-0549A8693940";
/// <summary>
/// 合同HSE费用额登记
/// </summary>
public const string FeeRegistrationMenuId = "C6CF3A5C-546B-483A-B742-A77F2E152523";
#endregion
#region HSSE行政管理
@@ -0,0 +1,94 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 合同HSE费用额登记
/// </summary>
public class FeeRegistration
{
public static bool Insert(Model.CostGoods_FeeRegistration model)
{
try
{
Funs.DB.CostGoods_FeeRegistration.InsertOnSubmit(model);
Funs.DB.SubmitChanges();
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Update(Model.CostGoods_FeeRegistration model)
{
try
{
var result = Funs.DB.CostGoods_FeeRegistration.FirstOrDefault(a => a.Id == model.Id);
if (result != null)
{
result.UnitId = model.UnitId;
result.Cost = model.Cost;
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"更新表数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Delete(List<string> newId)
{
try
{
var result = Funs.DB.CostGoods_FeeRegistration.Where(a => newId.Contains(a.Id)).ToList();
if (result.Count > 0)
{
Funs.DB.CostGoods_FeeRegistration.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Delete(string newId)
{
try
{
var result = Funs.DB.CostGoods_FeeRegistration.Where(a => a.Id == newId).ToList();
if (result.Count > 0)
{
Funs.DB.CostGoods_FeeRegistration.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static Model.CostGoods_FeeRegistration Detail(string newId)
{
var result = Funs.DB.CostGoods_FeeRegistration.FirstOrDefault(a => a.Id == newId);
return result;
}
}
}
@@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// HSE费用登记(新)
/// </summary>
public class HseExpenseService
{
public static bool Insert(Model.CostGoods_HseExpense model)
{
try
{
Funs.DB.CostGoods_HseExpense.InsertOnSubmit(model);
Funs.DB.SubmitChanges();
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"插入数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Update(Model.CostGoods_HseExpense model)
{
try
{
var result = Funs.DB.CostGoods_HseExpense.FirstOrDefault(a => a.Id == model.Id);
if (result != null)
{
result.UnitId = model.UnitId;
result.PayDate = model.PayDate;
result.PayMonth = model.PayMonth;
result.SMonthType1 = model.SMonthType1;
result.SMonthType2 = model.SMonthType2;
result.SMonthType3 = model.SMonthType3;
result.SMonthType4 = model.SMonthType4;
result.SMonthType5 = model.SMonthType5;
result.SMonthType6 = model.SMonthType6;
result.SMonthType7 = model.SMonthType7;
result.SMonthType8 = model.SMonthType8;
result.SMonthType9 = model.SMonthType9;
result.SMonthType10 = model.SMonthType10;
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"更新表数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Delete(List<string> newId)
{
try
{
var result = Funs.DB.CostGoods_HseExpense.Where(a => newId.Contains(a.Id)).ToList();
if (result.Count > 0)
{
Funs.DB.CostGoods_HseExpense.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static bool Delete(string newId)
{
try
{
var result = Funs.DB.CostGoods_HseExpense.Where(a => a.Id == newId).ToList();
if (result.Count > 0)
{
Funs.DB.CostGoods_HseExpense.DeleteAllOnSubmit(result);
Funs.DB.SubmitChanges();
}
return true;
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"删除数据失败,原因:{ex.Message}");
return false;
}
}
public static Model.CostGoods_HseExpense Detail(string newId)
{
var result = Funs.DB.CostGoods_HseExpense.FirstOrDefault(a => a.Id == newId);
return result;
}
}
}
+10 -1
View File
@@ -122,7 +122,7 @@ namespace BLL
/// <param name="PageSize">每页数量</param>
/// <returns></returns>
public static IEnumerable getListData(string projectId, string unitId, string personName, string identityCard, string treamGroupId, string workPostIds,
bool ckTrain, string postType, bool ckJT, bool ckIdCardInfoNotOK, Grid Grid1)
bool ckTrain, string postType, bool ckJT, bool ckIdCardInfoNotOK, Grid Grid1,bool isBlack=false)
{
IQueryable<Model.View_SitePerson_Person> getPersonList = getPersonLists.Where(x => x.ProjectId == projectId);
if (!string.IsNullOrEmpty(unitId))
@@ -136,6 +136,15 @@ namespace BLL
getPersonList = getPersonList.Where(x => x.UnitId == unitId);
}
}
if (isBlack == false)
{
getPersonList = getPersonList.Where(x => x.IsBlacklist != true || x.IsBlacklist == null);
}
else {
getPersonList = getPersonList.Where(x => x.IsBlacklist == true);
}
if (!string.IsNullOrEmpty(personName))
{
getPersonList = getPersonList.Where(x => x.PersonName.Contains(personName));
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Linq;
using System.Web.UI.WebControls;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Microsoft.SqlServer.Dts.Runtime;
//using Microsoft.SqlServer.Dts.Runtime;
namespace BLL
{