增加施工月报
This commit is contained in:
@@ -339,6 +339,11 @@
|
||||
<Compile Include="CQMS\WBS\WorkPackageParentDetailService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageProjectService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageService.cs" />
|
||||
<Compile Include="DigData\CQMSDataDWService .cs" />
|
||||
<Compile Include="DigData\WBSAnalysisService.cs" />
|
||||
<Compile Include="DigData\HTGLDataDWService.cs" />
|
||||
<Compile Include="DigData\JDGLDataDWService.cs" />
|
||||
<Compile Include="DigData\HSEDataDWService.cs" />
|
||||
<Compile Include="DigData\ProblemAnalysisService.cs" />
|
||||
<Compile Include="DigData\HSEDataCollectService.cs" />
|
||||
<Compile Include="DropListService.cs" />
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量数据仓库
|
||||
/// </summary>
|
||||
public static class CQMSDataDWService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 质量数据仓库
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Base_Project> getDataLists = from x in db.Base_Project
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 质量数据仓库
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="Grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
|
||||
{
|
||||
var getDataList = from x in Funs.DB.Base_Project select x;
|
||||
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectId == projectId);
|
||||
}
|
||||
|
||||
count = getDataList.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in getDataList
|
||||
select new
|
||||
{
|
||||
x.ProjectId,
|
||||
x.ProjectName,
|
||||
x.ProjectCode,
|
||||
Rate1 = "0%", //质量验收问题整改率
|
||||
Rate2 = "0%", //控制点完成率
|
||||
Rate3 = "0%", //质量检查问题整改率
|
||||
Rate4 = "0%", //管道焊接一次合格率
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全数据仓库
|
||||
/// </summary>
|
||||
public static class HSEDataDWService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 安全数据仓库
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Base_Project> getDataLists = from x in db.Base_Project
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 安全数据仓库
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="Grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
|
||||
{
|
||||
var getDataList = from x in Funs.DB.Base_Project select x;
|
||||
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectId == projectId);
|
||||
}
|
||||
|
||||
count = getDataList.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in getDataList
|
||||
select new
|
||||
{
|
||||
x.ProjectId,
|
||||
x.ProjectName,
|
||||
x.ProjectCode,
|
||||
Count1=0, //人员数量
|
||||
Count2 =0, //安全人工时
|
||||
Count3 =0, //安全培训次数
|
||||
ProblemRate = "0%", //安全巡检整改率
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 合同管理数据仓库
|
||||
/// </summary>
|
||||
public static class HTGLDataDWService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 合同管理数据仓库
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Base_Project> getDataLists = from x in db.Base_Project
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 合同管理数据仓库
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="Grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
|
||||
{
|
||||
var getDataList = from x in Funs.DB.Base_Project select x;
|
||||
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectId == projectId);
|
||||
}
|
||||
|
||||
count = getDataList.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in getDataList
|
||||
select new
|
||||
{
|
||||
x.ProjectId,
|
||||
x.ProjectName,
|
||||
x.ProjectCode,
|
||||
Count1=0,
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 进度数据仓库
|
||||
/// </summary>
|
||||
public static class JDGLDataDWService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 进度数据仓库
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Base_Project> getDataLists = from x in db.Base_Project
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 进度数据仓库
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="Grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
|
||||
{
|
||||
var getDataList = from x in Funs.DB.Base_Project select x;
|
||||
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectId == projectId);
|
||||
}
|
||||
|
||||
count = getDataList.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in getDataList
|
||||
select new
|
||||
{
|
||||
x.ProjectId,
|
||||
x.ProjectName,
|
||||
x.ProjectCode,
|
||||
JDRate = "0%", //项目进度完成百分比
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using FineUIPro;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// WBS分析
|
||||
/// </summary>
|
||||
public static class WBSAnalysisService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region WBS分析
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.WBS_WorkPackageInit> getDataLists = from x in db.WBS_WorkPackageInit
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 合同管理数据仓库
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="Grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getDataDWList(string level,string workPackageId, Grid Grid1)
|
||||
{
|
||||
var getDataList = getDataLists;
|
||||
if (level == "0")
|
||||
{
|
||||
List<Model.WBS_WorkPackageInit> listWork = new List<Model.WBS_WorkPackageInit>();
|
||||
if (string.IsNullOrEmpty(workPackageId) || workPackageId == "1")
|
||||
{
|
||||
Model.WBS_WorkPackageInit work1 = new Model.WBS_WorkPackageInit
|
||||
{
|
||||
WorkPackageCode = "1",
|
||||
PackageContent = "建筑工程",
|
||||
};
|
||||
listWork.Add(work1);
|
||||
}
|
||||
if (string.IsNullOrEmpty(workPackageId) || workPackageId == "2")
|
||||
{
|
||||
Model.WBS_WorkPackageInit work2 = new Model.WBS_WorkPackageInit
|
||||
{
|
||||
WorkPackageCode = "2",
|
||||
PackageContent = "安装工程",
|
||||
};
|
||||
listWork.Add(work2);
|
||||
}
|
||||
getDataList = listWork.AsQueryable();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level == "1")
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.SuperWorkPack == null);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(workPackageId))
|
||||
{
|
||||
if (workPackageId != "1" && workPackageId != "2")
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.SuperWorkPack == workPackageId);
|
||||
}
|
||||
else
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectType == workPackageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
count = getDataList.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in getDataList
|
||||
select new
|
||||
{
|
||||
x.WorkPackageCode,
|
||||
x.PackageContent,
|
||||
Count1=0,
|
||||
Count2 = 0,
|
||||
Count3 = 0,
|
||||
Count4 = 0,
|
||||
Count5 = 0,
|
||||
Count6 = 0,
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -464,6 +464,28 @@
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目各单位类型单位名称
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitType"></param>
|
||||
/// <returns></returns>
|
||||
public static string getProjectUnitIdByUnitType(string projectId, string unitType)
|
||||
{
|
||||
string unitId = string.Empty;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
var getUnit = from x in Funs.DB.Project_ProjectUnit
|
||||
where x.ProjectId == projectId && x.UnitType == unitType
|
||||
select x.UnitId;
|
||||
if (getUnit.Count() > 0)
|
||||
{
|
||||
unitId = Funs.GetStringByArray(getUnit.ToArray());
|
||||
}
|
||||
}
|
||||
return unitId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目各单位类型单位名称
|
||||
/// </summary>
|
||||
@@ -477,7 +499,7 @@
|
||||
{
|
||||
var getUnitName = from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == projectId.ToString() && x.UnitType == unitType
|
||||
where x.ProjectId == projectId && x.UnitType == unitType
|
||||
select y.UnitName;
|
||||
if (getUnitName.Count() > 0)
|
||||
{
|
||||
@@ -500,7 +522,7 @@
|
||||
{
|
||||
var getShortUnitName = from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == projectId.ToString() && x.UnitType == unitType
|
||||
where x.ProjectId == projectId && x.UnitType == unitType
|
||||
select y.ShortUnitName;
|
||||
if (getShortUnitName.Count() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user