2023-05-09 接口更新
This commit is contained in:
@@ -25,12 +25,14 @@ namespace BLL
|
||||
|
||||
public static List<Model.HSSEData_HSSE> GetHSSEData_HSSEByModle(Model.HSSEData_HSSE table)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = from x in db.HSSEData_HSSE
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
|
||||
(string.IsNullOrEmpty(table.CollCropCode) || x.CollCropCode.Contains(table.CollCropCode)) &&
|
||||
(string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName))
|
||||
orderby x.ReportDate descending
|
||||
select x
|
||||
;
|
||||
|
||||
@@ -139,6 +141,7 @@ namespace BLL
|
||||
|
||||
public static void AddHSSEData_HSSE(Model.HSSEData_HSSE newtable)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSEData_HSSE table = new Model.HSSEData_HSSE
|
||||
{
|
||||
Id = newtable.Id,
|
||||
@@ -226,6 +229,7 @@ namespace BLL
|
||||
|
||||
public static void DeleteHSSEData_HSSEById(string Id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSEData_HSSE table = db.HSSEData_HSSE.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -236,6 +240,7 @@ namespace BLL
|
||||
|
||||
public static Model.HSSEData_HSSE GetHSSEData_HSSEById(string Id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return db.HSSEData_HSSE.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
public static Model.HSSEData GetItemById(string Id)
|
||||
@@ -521,7 +526,12 @@ namespace BLL
|
||||
public static HSSEData StatisticalData()
|
||||
{
|
||||
HSSEData data = new HSSEData();
|
||||
string thisUnitId = BLL.Const.UnitId_CWCEC;
|
||||
string thisUnitId = string.Empty;
|
||||
var thisUnit = Const.UnitId_CWCEC;
|
||||
if (thisUnit != null)
|
||||
{
|
||||
thisUnitId = thisUnit;
|
||||
}
|
||||
var base_Unit = BLL.UnitService.GetUnitByUnitId(thisUnitId);
|
||||
Project_HSSEData_HSSEService.StatisticalAllProjectData();
|
||||
|
||||
@@ -628,6 +638,7 @@ namespace BLL
|
||||
}
|
||||
public static void UpdateHSSEData_HSSE(Model.HSSEData_HSSE newtable)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSEData_HSSE table = db.HSSEData_HSSE.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -719,16 +730,16 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetHeadOfficeInspectorGeneralNum()
|
||||
{
|
||||
//string unitId = string.Empty;
|
||||
//var thisUnit = CommonService.GetIsThisUnit();
|
||||
//if (thisUnit != null)
|
||||
//{
|
||||
// unitId = thisUnit.UnitId;
|
||||
//}
|
||||
//int result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
// where x.IsOnJob == true && x.WorkPostId == BLL.Const.WorkPost_HSSEDirector && x.UnitId == unitId
|
||||
// select x).Count();
|
||||
return 0;
|
||||
string unitId = string.Empty;
|
||||
var thisUnit = Const.UnitId_CWCEC;
|
||||
if (thisUnit != null)
|
||||
{
|
||||
unitId = thisUnit;
|
||||
}
|
||||
int result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
where x.IsOnJob == true && x.WorkPostId == BLL.Const.WorkPost_HSSEDirector && x.UnitId == unitId
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取企业总部专职人数
|
||||
@@ -736,17 +747,17 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetHeadOfficeFullTimeNum()
|
||||
{
|
||||
//string unitId = string.Empty;
|
||||
//var thisUnit = CommonService.GetIsThisUnit();
|
||||
//if (thisUnit != null)
|
||||
//{
|
||||
// unitId = thisUnit.UnitId;
|
||||
//}
|
||||
//int result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
// join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
// where x.IsOnJob == true && y.IsHsse == true && x.UnitId == unitId
|
||||
// select x).Count();
|
||||
return 0;
|
||||
string unitId = string.Empty;
|
||||
var thisUnit = Const.UnitId_CWCEC;
|
||||
if (thisUnit != null)
|
||||
{
|
||||
unitId = thisUnit;
|
||||
}
|
||||
int result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsHsse == true && x.UnitId == unitId
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取分支机构总监人数
|
||||
@@ -754,16 +765,16 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetBranchInspectorGeneralNum()
|
||||
{
|
||||
//string unitId = string.Empty;
|
||||
//var thisUnit = CommonService.GetIsThisUnit();
|
||||
//if (thisUnit != null)
|
||||
//{
|
||||
// unitId = thisUnit.UnitId;
|
||||
//}
|
||||
//int result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
// where x.IsOnJob == true && x.WorkPostId == BLL.Const.WorkPost_HSSEDirector && x.UnitId != unitId
|
||||
// select x).Count();
|
||||
return 0;
|
||||
string unitId = string.Empty;
|
||||
var thisUnit = Const.UnitId_CWCEC;
|
||||
if (thisUnit != null)
|
||||
{
|
||||
unitId = thisUnit;
|
||||
}
|
||||
int result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
where x.IsOnJob == true && x.WorkPostId == BLL.Const.WorkPost_HSSEDirector && x.UnitId != unitId
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取分支机构专职人数
|
||||
@@ -771,17 +782,17 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetBranchFullTimeNum()
|
||||
{
|
||||
//string unitId = string.Empty;
|
||||
//var thisUnit = CommonService.GetIsThisUnit();
|
||||
//if (thisUnit != null)
|
||||
//{
|
||||
// unitId = thisUnit.UnitId;
|
||||
//}
|
||||
//int result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
// join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
// where x.IsOnJob == true && y.IsHsse == true && x.UnitId != unitId
|
||||
// select x).Count();
|
||||
return 0;
|
||||
string unitId = string.Empty;
|
||||
var thisUnit = Const.UnitId_CWCEC;
|
||||
if (thisUnit != null)
|
||||
{
|
||||
unitId = thisUnit;
|
||||
}
|
||||
int result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsHsse == true && x.UnitId != unitId
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user