20241028 共检通知单专业
This commit is contained in:
parent
9cc1ef7faa
commit
21a099cc01
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
update ProcessControl_InspectionManagement set CNProfessionalId='10487C07-DE54-4ED6-BBDF-2C7988A44665' where CNProfessionalId='D03E079B-8B97-4C5A-BF1C-782887548B92'--¹ÜµÀ
|
||||||
|
update ProcessControl_InspectionManagement set CNProfessionalId='DEB367FF-AD35-41A0-B68E-FA8E68737B93' where CNProfessionalId='445B1EE6-901E-4A07-A4AB-4EE1066E742F'--µçÆø
|
||||||
|
update ProcessControl_InspectionManagement set CNProfessionalId='F41C5022-F499-4BD7-84B6-E87E4CE53CAC' where CNProfessionalId='E9AC9563-E338-48B7-867D-488222AD0557'--ÍÁ½¨
|
||||||
|
go
|
|
@ -25,14 +25,18 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
GetButtonPower();
|
GetButtonPower();
|
||||||
//BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
|
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||||
//专业
|
{
|
||||||
this.drpCNProfessional.DataTextField = "DetectionItems";
|
this.drpCNProfessional.DataTextField = "DetectionItems";
|
||||||
this.drpCNProfessional.DataValueField = "ControlId";
|
this.drpCNProfessional.DataValueField = "ControlId";
|
||||||
this.drpCNProfessional.DataSource = BLL.CNProfessionalService.GetCnProList();
|
this.drpCNProfessional.DataSource = BLL.CNProfessionalService.GetCnProList();
|
||||||
this.drpCNProfessional.DataBind();
|
this.drpCNProfessional.DataBind();
|
||||||
Funs.FineUIPleaseSelect(this.drpCNProfessional);
|
Funs.FineUIPleaseSelect(this.drpCNProfessional);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
|
||||||
|
}
|
||||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
|
@ -43,7 +47,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void BindGrid()
|
public void BindGrid()
|
||||||
{
|
{
|
||||||
string strSql = @"SELECT P.InspectionId,
|
if (this.CurrUser.UserId==BLL.Const.hfnbdId)
|
||||||
|
{
|
||||||
|
|
||||||
|
string strSql = @"SELECT P.InspectionId,
|
||||||
P.ProjectId,
|
P.ProjectId,
|
||||||
P.UnitId,
|
P.UnitId,
|
||||||
P.CNProfessionalId,
|
P.CNProfessionalId,
|
||||||
|
@ -57,42 +64,96 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
BP.Class,
|
BP.Class,
|
||||||
P.AcceptanceSite,
|
P.AcceptanceSite,
|
||||||
P.AcceptanceCheckMan"
|
P.AcceptanceCheckMan"
|
||||||
+ @" FROM ProcessControl_InspectionManagement AS P"
|
+ @" FROM ProcessControl_InspectionManagement AS P"
|
||||||
+ @" LEFT JOIN Base_Unit AS U ON U.UnitId = P.UnitId"
|
+ @" LEFT JOIN Base_Unit AS U ON U.UnitId = P.UnitId"
|
||||||
+ @" LEFT JOIN Control_PointCropping C ON C.ControlId = P.CNProfessionalId"
|
+ @" LEFT JOIN Control_PointCropping C ON C.ControlId = P.CNProfessionalId"
|
||||||
+ @" LEFT JOIN WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId = P.UnitWorkId"
|
+ @" LEFT JOIN WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId = P.UnitWorkId"
|
||||||
+ @" LEFT JOIN WBS_DivisionProject AS DP ON DP.DivisionProjectId = P.Branch"
|
+ @" LEFT JOIN WBS_DivisionProject AS DP ON DP.DivisionProjectId = P.Branch"
|
||||||
+ @" LEFT JOIN WBS_BreakdownProject AS BP ON BP.BreakdownProjectId = P.ControlPointType"
|
+ @" LEFT JOIN WBS_BreakdownProject AS BP ON BP.BreakdownProjectId = P.ControlPointType"
|
||||||
+ @" WHERE P.ProjectId=@ProjectId ";
|
+ @" WHERE P.ProjectId=@ProjectId ";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
if (drpUnit.SelectedValue != BLL.Const._Null)
|
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql += " AND P.UnitId=@UnitId";
|
strSql += " AND P.UnitId=@UnitId";
|
||||||
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
|
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
|
||||||
|
}
|
||||||
|
if (drpCNProfessional.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " AND P.CNProfessionalId=@CNProfessionalId";
|
||||||
|
listStr.Add(new SqlParameter("@CNProfessionalId", drpCNProfessional.SelectedValue));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND P.InspectionDate >= @startTime";
|
||||||
|
listStr.Add(new SqlParameter("@startTime", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND P.InspectionDate <= @endTime";
|
||||||
|
listStr.Add(new SqlParameter("@endTime", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
|
||||||
|
}
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
|
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||||
|
var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
|
Grid1.DataSource = table;
|
||||||
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
if (drpCNProfessional.SelectedValue != BLL.Const._Null)
|
else
|
||||||
{
|
{
|
||||||
strSql += " AND P.CNProfessionalId=@CNProfessionalId";
|
string strSql = @"SELECT P.InspectionId,
|
||||||
listStr.Add(new SqlParameter("@CNProfessionalId", drpCNProfessional.SelectedValue));
|
P.ProjectId,
|
||||||
|
P.UnitId,
|
||||||
|
P.CNProfessionalId,
|
||||||
|
P.UnitWorkId,
|
||||||
|
U.UnitName,
|
||||||
|
C.ProfessionalName as ProfessionalName,
|
||||||
|
P.NoticeCode,
|
||||||
|
UnitWork.UnitWorkName,
|
||||||
|
DP.DivisionName AS Branch,
|
||||||
|
BP.BreakdownName AS ControlPointType,
|
||||||
|
BP.Class,
|
||||||
|
P.AcceptanceSite,
|
||||||
|
P.AcceptanceCheckMan"
|
||||||
|
+ @" FROM ProcessControl_InspectionManagement AS P"
|
||||||
|
+ @" LEFT JOIN Base_Unit AS U ON U.UnitId = P.UnitId"
|
||||||
|
+ @" left join Base_CNProfessional c on c.CNProfessionalId = P.CNProfessionalId"
|
||||||
|
+ @" LEFT JOIN WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId = P.UnitWorkId"
|
||||||
|
+ @" LEFT JOIN WBS_DivisionProject AS DP ON DP.DivisionProjectId = P.Branch"
|
||||||
|
+ @" LEFT JOIN WBS_BreakdownProject AS BP ON BP.BreakdownProjectId = P.ControlPointType"
|
||||||
|
+ @" WHERE P.ProjectId=@ProjectId ";
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " AND P.UnitId=@UnitId";
|
||||||
|
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
|
||||||
|
}
|
||||||
|
if (drpCNProfessional.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " AND P.CNProfessionalId=@CNProfessionalId";
|
||||||
|
listStr.Add(new SqlParameter("@CNProfessionalId", drpCNProfessional.SelectedValue));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND P.InspectionDate >= @startTime";
|
||||||
|
listStr.Add(new SqlParameter("@startTime", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND P.InspectionDate <= @endTime";
|
||||||
|
listStr.Add(new SqlParameter("@endTime", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
|
||||||
|
}
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
|
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||||
|
var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
|
Grid1.DataSource = table;
|
||||||
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
|
|
||||||
{
|
|
||||||
strSql += " AND P.InspectionDate >= @startTime";
|
|
||||||
listStr.Add(new SqlParameter("@startTime", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
|
|
||||||
{
|
|
||||||
strSql += " AND P.InspectionDate <= @endTime";
|
|
||||||
listStr.Add(new SqlParameter("@endTime", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
|
|
||||||
}
|
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
|
||||||
Grid1.RecordCount = tb.Rows.Count;
|
|
||||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
|
||||||
var table = this.GetPagedDataTable(Grid1, tb);
|
|
||||||
Grid1.DataSource = table;
|
|
||||||
Grid1.DataBind();
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -27,15 +27,22 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
}
|
}
|
||||||
GetButtonPower();
|
GetButtonPower();
|
||||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
||||||
//BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
|
|
||||||
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||||
//UserService.InitUserNameProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
//UserService.InitUserNameProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||||
//专业
|
if (this.CurrUser.UserId == BLL.Const.hfnbdId)//测试阶段,仅hfnbd账号使用
|
||||||
this.drpCNProfessionalId.DataTextField = "DetectionItems";
|
{
|
||||||
this.drpCNProfessionalId.DataValueField = "ControlId";
|
//专业
|
||||||
this.drpCNProfessionalId.DataSource = BLL.CNProfessionalService.GetCnProList();
|
this.drpCNProfessionalId.DataTextField = "DetectionItems";
|
||||||
this.drpCNProfessionalId.DataBind();
|
this.drpCNProfessionalId.DataValueField = "ControlId";
|
||||||
Funs.FineUIPleaseSelect(this.drpCNProfessionalId);
|
this.drpCNProfessionalId.DataSource = BLL.CNProfessionalService.GetCnProList();
|
||||||
|
this.drpCNProfessionalId.DataBind();
|
||||||
|
Funs.FineUIPleaseSelect(this.drpCNProfessionalId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
|
||||||
|
}
|
||||||
|
|
||||||
//单位工程
|
//单位工程
|
||||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!--连接字符串-->
|
<!--连接字符串-->
|
||||||
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
||||||
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||||
<!--系统名称-->
|
<!--系统名称-->
|
||||||
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||||
|
|
|
@ -333,50 +333,100 @@ namespace FineUIPro.Web
|
||||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||||
List<string> listCategories = new List<string>();
|
List<string> listCategories = new List<string>();
|
||||||
businessColumn.title = "质量一次合格率";
|
businessColumn.title = "质量一次合格率";
|
||||||
var cns = BLL.CNProfessionalService.GetCnProList();
|
|
||||||
Model.SGGLDB db = Funs.DB;
|
//专业测试阶段,仅hfnbd使用
|
||||||
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailOKLists = (from x in db.ProcessControl_InspectionManagement
|
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsOnceQualified == true
|
|
||||||
select x).ToList();
|
|
||||||
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailLists = (from x in db.ProcessControl_InspectionManagement
|
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
|
||||||
select x).ToList();
|
|
||||||
Model.SingleSerie s = new Model.SingleSerie();
|
|
||||||
Model.SingleSerie s2 = new Model.SingleSerie();
|
|
||||||
List<double> listdata = new List<double>();
|
|
||||||
List<double> listdata2 = new List<double>();
|
|
||||||
double result = 0, result2 = 0;
|
|
||||||
foreach (var cn in cns)
|
|
||||||
{
|
{
|
||||||
listCategories.Add(cn.DetectionItems);
|
var cns = BLL.CNProfessionalService.GetCnProList();
|
||||||
var okChecks = TotalCheckDetailOKLists.Where(x => x.CNProfessionalId == cn.ControlId).ToList();
|
Model.SGGLDB db = Funs.DB;
|
||||||
var totalChecks = TotalCheckDetailLists.Where(x => x.CNProfessionalId == cn.ControlId).ToList();
|
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailOKLists = (from x in db.ProcessControl_InspectionManagement
|
||||||
if (okChecks.Count > 0 && totalChecks.Count > 0)
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsOnceQualified == true
|
||||||
|
select x).ToList();
|
||||||
|
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailLists = (from x in db.ProcessControl_InspectionManagement
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
select x).ToList();
|
||||||
|
Model.SingleSerie s = new Model.SingleSerie();
|
||||||
|
Model.SingleSerie s2 = new Model.SingleSerie();
|
||||||
|
List<double> listdata = new List<double>();
|
||||||
|
List<double> listdata2 = new List<double>();
|
||||||
|
double result = 0, result2 = 0;
|
||||||
|
foreach (var cn in cns)
|
||||||
{
|
{
|
||||||
var a = Convert.ToDouble(okChecks.Count);
|
listCategories.Add(cn.DetectionItems);
|
||||||
var b = Convert.ToDouble(totalChecks.Count);
|
var okChecks = TotalCheckDetailOKLists.Where(x => x.CNProfessionalId == cn.ControlId).ToList();
|
||||||
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 1));
|
var totalChecks = TotalCheckDetailLists.Where(x => x.CNProfessionalId == cn.ControlId).ToList();
|
||||||
}
|
if (okChecks.Count > 0 && totalChecks.Count > 0)
|
||||||
if (cn.DetectionItems.Contains("管道"))
|
|
||||||
{
|
|
||||||
var ndtList = (from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" && x.ProjectId == this.CurrUser.LoginProjectId orderby x.CreateDate descending select x).FirstOrDefault();
|
|
||||||
if (ndtList != null && !string.IsNullOrEmpty(ndtList.TotalRate))
|
|
||||||
{
|
{
|
||||||
result2 = Convert.ToDouble(ndtList.TotalRate);
|
var a = Convert.ToDouble(okChecks.Count);
|
||||||
|
var b = Convert.ToDouble(totalChecks.Count);
|
||||||
|
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 1));
|
||||||
}
|
}
|
||||||
|
if (cn.DetectionItems.Contains("管道"))
|
||||||
|
{
|
||||||
|
var ndtList = (from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" && x.ProjectId == this.CurrUser.LoginProjectId orderby x.CreateDate descending select x).FirstOrDefault();
|
||||||
|
if (ndtList != null && !string.IsNullOrEmpty(ndtList.TotalRate))
|
||||||
|
{
|
||||||
|
result2 = Convert.ToDouble(ndtList.TotalRate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
listdata.Add(result);
|
||||||
|
listdata2.Add(result2);
|
||||||
|
result = 0;
|
||||||
|
result2 = 0;
|
||||||
}
|
}
|
||||||
listdata.Add(result);
|
s.data = listdata;
|
||||||
listdata2.Add(result2);
|
s2.data = listdata2;
|
||||||
result = 0;
|
series.Add(s);
|
||||||
result2 = 0;
|
series.Add(s2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var cns = BLL.CNProfessionalService.GetList();
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailOKLists = (from x in db.ProcessControl_InspectionManagement
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsOnceQualified == true
|
||||||
|
select x).ToList();
|
||||||
|
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailLists = (from x in db.ProcessControl_InspectionManagement
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
select x).ToList();
|
||||||
|
Model.SingleSerie s = new Model.SingleSerie();
|
||||||
|
Model.SingleSerie s2 = new Model.SingleSerie();
|
||||||
|
List<double> listdata = new List<double>();
|
||||||
|
List<double> listdata2 = new List<double>();
|
||||||
|
double result = 0, result2 = 0;
|
||||||
|
foreach (var cn in cns)
|
||||||
|
{
|
||||||
|
listCategories.Add(cn.ProfessionalName);
|
||||||
|
var okChecks = TotalCheckDetailOKLists.Where(x => x.CNProfessionalId == cn.CNProfessionalId).ToList();
|
||||||
|
var totalChecks = TotalCheckDetailLists.Where(x => x.CNProfessionalId == cn.CNProfessionalId).ToList();
|
||||||
|
if (okChecks.Count > 0 && totalChecks.Count > 0)
|
||||||
|
{
|
||||||
|
var a = Convert.ToDouble(okChecks.Count);
|
||||||
|
var b = Convert.ToDouble(totalChecks.Count);
|
||||||
|
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 1));
|
||||||
|
}
|
||||||
|
if (cn.ProfessionalName.Contains("管道"))
|
||||||
|
{
|
||||||
|
var ndtList = (from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" && x.ProjectId == this.CurrUser.LoginProjectId orderby x.CreateDate descending select x).FirstOrDefault();
|
||||||
|
if (ndtList != null && !string.IsNullOrEmpty(ndtList.TotalRate))
|
||||||
|
{
|
||||||
|
result2 = Convert.ToDouble(ndtList.TotalRate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
listdata.Add(result);
|
||||||
|
listdata2.Add(result2);
|
||||||
|
result = 0;
|
||||||
|
result2 = 0;
|
||||||
|
}
|
||||||
|
s.data = listdata;
|
||||||
|
s2.data = listdata2;
|
||||||
|
series.Add(s);
|
||||||
|
series.Add(s2);
|
||||||
}
|
}
|
||||||
s.data = listdata;
|
|
||||||
s2.data = listdata2;
|
|
||||||
series.Add(s);
|
|
||||||
series.Add(s2);
|
|
||||||
businessColumn.categories = listCategories;
|
businessColumn.categories = listCategories;
|
||||||
businessColumn.series = series;
|
businessColumn.series = series;
|
||||||
return JsonConvert.SerializeObject(businessColumn);
|
return JsonConvert.SerializeObject(businessColumn);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取项目部人数
|
/// 获取项目部人数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetProjectPersonNum()
|
public int GetProjectPersonNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -154,18 +154,18 @@ namespace FineUIPro.Web.common
|
||||||
else {
|
else {
|
||||||
int result = (from x in Funs.DB.SitePerson_Person
|
int result = (from x in Funs.DB.SitePerson_Person
|
||||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
where y.IsCQMS == true && x.IsUsed == true && pids.Contains(x.ProjectId)
|
where y.IsCQMS == true && x.IsUsed == true && pids.Contains(x.ProjectId)
|
||||||
select x).Count();
|
select x).Count();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取在用计量器具数
|
/// 获取在用计量器具数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetUseNum()
|
public int GetUseNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -180,13 +180,13 @@ namespace FineUIPro.Web.common
|
||||||
select x).Count();
|
select x).Count();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取校准合格数
|
/// 获取校准合格数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetOKNum()
|
public int GetOKNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -207,7 +207,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 机械预警
|
/// 机械预警
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetJxyjNum()
|
public int GetJxyjNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -237,7 +237,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取质量培训人次数
|
/// 获取质量培训人次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetTrainPersonNum()
|
public int GetTrainPersonNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -258,7 +258,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取技术交底人次数
|
/// 获取技术交底人次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetTechnicalDisclosePersonNum()
|
public int GetTechnicalDisclosePersonNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ namespace FineUIPro.Web.common
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||||
where pids.Contains(x.ProjectId)
|
where pids.Contains(x.ProjectId)
|
||||||
select x.JoinPersonNum ?? 0).ToList().Sum();
|
select x.JoinPersonNum ?? 0).ToList().Sum();
|
||||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||||
return q;
|
return q;
|
||||||
|
@ -308,7 +308,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 共检总数
|
/// 共检总数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int getAllInspectionManagement()
|
public int getAllInspectionManagement()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -328,10 +328,10 @@ namespace FineUIPro.Web.common
|
||||||
else {
|
else {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
where pids.Contains(x.ProjectId)
|
where pids.Contains(x.ProjectId)
|
||||||
select x).Count();
|
select x).Count();
|
||||||
result = num1;
|
result = num1;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 次合格数量
|
/// 次合格数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int getIsOnceInspectionManagement()
|
public int getIsOnceInspectionManagement()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -360,13 +360,13 @@ namespace FineUIPro.Web.common
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
where x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
where x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||||
select x).Count();
|
select x).Count();
|
||||||
result = num2;
|
result = num2;
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -374,7 +374,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 整改率
|
/// 整改率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string GetInspectionManagementZgl()
|
public string GetInspectionManagementZgl()
|
||||||
{
|
{
|
||||||
string zgl = String.Format("{0:N2}", 100.0 * getIsOnceInspectionManagement() / getAllInspectionManagement());
|
string zgl = String.Format("{0:N2}", 100.0 * getIsOnceInspectionManagement() / getAllInspectionManagement());
|
||||||
return zgl + "%";
|
return zgl + "%";
|
||||||
|
@ -388,7 +388,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取整改完成数
|
/// 获取整改完成数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetProblemCompletedNum()
|
public int GetProblemCompletedNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -408,7 +408,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取未整改数
|
/// 获取未整改数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetProblemNotCompletedNum()
|
public int GetProblemNotCompletedNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -429,7 +429,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 整改率
|
/// 整改率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string GetProblemZgl()
|
public string GetProblemZgl()
|
||||||
{
|
{
|
||||||
string zgl = String.Format("{0:N2}", 100.0 * GetProblemCompletedNum() / (GetProblemCompletedNum() + GetProblemNotCompletedNum()));
|
string zgl = String.Format("{0:N2}", 100.0 * GetProblemCompletedNum() / (GetProblemCompletedNum() + GetProblemNotCompletedNum()));
|
||||||
return zgl + "%";
|
return zgl + "%";
|
||||||
|
@ -453,7 +453,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取问题个数
|
/// 获取问题个数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetProblemNum()
|
public int GetProblemNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -475,7 +475,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取焊工总数
|
/// 获取焊工总数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetWelderNum()
|
public int GetWelderNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -496,7 +496,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取总达因数
|
/// 获取总达因数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetTotalDineNum()
|
public int GetTotalDineNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -553,7 +553,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取完成达因数
|
/// 获取完成达因数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetCompleteDineNum()
|
public int GetCompleteDineNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -651,7 +651,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取合格片数
|
/// 获取合格片数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int GetOKFilmNum()
|
public int GetOKFilmNum()
|
||||||
{
|
{
|
||||||
if (pids == null)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
|
@ -684,7 +684,7 @@ namespace FineUIPro.Web.common
|
||||||
/// 一次拍片合格率
|
/// 一次拍片合格率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string GetOKFilmHgl()
|
public string GetOKFilmHgl()
|
||||||
{
|
{
|
||||||
string zgl = "0";
|
string zgl = "0";
|
||||||
if (GetOKFilmNum() > 0)
|
if (GetOKFilmNum() > 0)
|
||||||
|
@ -707,57 +707,114 @@ namespace FineUIPro.Web.common
|
||||||
private void getInspectionManagementInfo()
|
private void getInspectionManagementInfo()
|
||||||
{
|
{
|
||||||
|
|
||||||
//var q=(from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||||
var q = (from x in Funs.DB.Control_PointCropping where x.ParentId == null || x.ParentId == "" orderby x.OperateTime select x).ToList();
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in q)
|
|
||||||
{
|
{
|
||||||
//获取专业
|
//var q=(from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||||
InspectionManagementZy += "'" + item.DetectionItems + "',";
|
var q = (from x in Funs.DB.Control_PointCropping where x.ParentId == null || x.ParentId == "" orderby x.OperateTime select x).ToList();
|
||||||
//根据专业获取总计
|
|
||||||
//var num1 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
|
||||||
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
foreach (var item in q)
|
||||||
// where y.CNProfessionalId == item.CNProfessionalId
|
|
||||||
// select x).ToList().Count;
|
|
||||||
var num1 = 0;
|
|
||||||
var num2 = 0;
|
|
||||||
if (pids == null)
|
|
||||||
{
|
{
|
||||||
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
//获取专业
|
||||||
where x.CNProfessionalId == item.ControlId
|
InspectionManagementZy += "'" + item.DetectionItems + "',";
|
||||||
select x).Count();
|
//根据专业获取总计
|
||||||
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
//var num1 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||||
|
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||||
|
// where y.CNProfessionalId == item.CNProfessionalId
|
||||||
|
// select x).ToList().Count;
|
||||||
|
var num1 = 0;
|
||||||
|
var num2 = 0;
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.CNProfessionalId == item.ControlId
|
||||||
|
select x).Count();
|
||||||
|
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true
|
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true
|
||||||
select x).Count();
|
select x).Count();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
{
|
||||||
where x.CNProfessionalId == item.ControlId && pids.Contains(x.ProjectId)
|
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
select x).Count();
|
where x.CNProfessionalId == item.ControlId && pids.Contains(x.ProjectId)
|
||||||
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
select x).Count();
|
||||||
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
select x).Count();
|
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||||
}
|
select x).Count();
|
||||||
|
}
|
||||||
|
|
||||||
InspectionManagementSumCount += "'" + num1 + "',";
|
|
||||||
|
|
||||||
//根据专业获取合格数
|
|
||||||
//var num2 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
InspectionManagementSumCount += "'" + num1 + "',";
|
||||||
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
|
||||||
// where y.CNProfessionalId == item.CNProfessionalId && y.IsOnceQualified==true
|
//根据专业获取合格数
|
||||||
// select x).ToList().Count;
|
//var num2 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||||
|
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||||
|
// where y.CNProfessionalId == item.CNProfessionalId && y.IsOnceQualified==true
|
||||||
|
// select x).ToList().Count;
|
||||||
|
|
||||||
|
InspectionManagementOkCount += "'" + num2 + "',";
|
||||||
|
|
||||||
|
//一次验收合格率
|
||||||
|
var hgl = "0";
|
||||||
|
if (num1 > 0)
|
||||||
|
{
|
||||||
|
hgl += String.Format("{0:N2}", 100.0 * num2 / num1);
|
||||||
|
}
|
||||||
|
InspectionManagementOneOkCount += "'" + hgl + "',";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var q = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||||
|
|
||||||
InspectionManagementOkCount += "'" + num2 + "',";
|
foreach (var item in q)
|
||||||
|
|
||||||
//一次验收合格率
|
|
||||||
var hgl = "0";
|
|
||||||
if (num1 > 0)
|
|
||||||
{
|
{
|
||||||
hgl += String.Format("{0:N2}", 100.0 * num2 / num1);
|
//获取专业
|
||||||
|
InspectionManagementZy += "'" + item.ProfessionalName + "',";
|
||||||
|
//根据专业获取总计
|
||||||
|
//var num1 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||||
|
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||||
|
// where y.CNProfessionalId == item.CNProfessionalId
|
||||||
|
// select x).ToList().Count;
|
||||||
|
var num1 = 0;
|
||||||
|
var num2 = 0;
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.CNProfessionalId == item.CNProfessionalId
|
||||||
|
select x).Count();
|
||||||
|
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true
|
||||||
|
select x).Count();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.CNProfessionalId == item.CNProfessionalId && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
InspectionManagementSumCount += "'" + num1 + "',";
|
||||||
|
|
||||||
|
//根据专业获取合格数
|
||||||
|
//var num2 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||||
|
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||||
|
// where y.CNProfessionalId == item.CNProfessionalId && y.IsOnceQualified==true
|
||||||
|
// select x).ToList().Count;
|
||||||
|
|
||||||
|
InspectionManagementOkCount += "'" + num2 + "',";
|
||||||
|
|
||||||
|
//一次验收合格率
|
||||||
|
var hgl = "0";
|
||||||
|
if (num1 > 0)
|
||||||
|
{
|
||||||
|
hgl += String.Format("{0:N2}", 100.0 * num2 / num1);
|
||||||
|
}
|
||||||
|
InspectionManagementOneOkCount += "'" + hgl + "',";
|
||||||
}
|
}
|
||||||
InspectionManagementOneOkCount += "'" + hgl + "',";
|
|
||||||
}
|
}
|
||||||
InspectionManagementZy = InspectionManagementZy.TrimEnd(',');
|
InspectionManagementZy = InspectionManagementZy.TrimEnd(',');
|
||||||
InspectionManagementSumCount = InspectionManagementSumCount.TrimEnd(',');
|
InspectionManagementSumCount = InspectionManagementSumCount.TrimEnd(',');
|
||||||
|
|
Loading…
Reference in New Issue