提交代码

This commit is contained in:
2024-04-19 15:48:37 +08:00
parent 8f650add98
commit ae229cb24e
22 changed files with 1565 additions and 225 deletions
+86 -46
View File
@@ -24,7 +24,7 @@ namespace FineUIPro.Web.DataShow
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
// 绑定表格t
BindGrid();
this.Panel1.Title = "质量共检数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CWCEC) + "";
this.Panel1.Title = "焊接一次合格数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CWCEC) + "";
}
}
@@ -144,7 +144,7 @@ namespace FineUIPro.Web.DataShow
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionManagementItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeldOneOKItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - ")));
}
#endregion
@@ -159,76 +159,116 @@ namespace FineUIPro.Web.DataShow
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected int Count1(object projectId)
protected int? Count1(object projectId)
{
int cout1 = 0;
int? cout1 = null;
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString());
if (datetime1.HasValue)
var getT = (from x in Funs.DB.ProcessControl_NondestructiveTest_New
where x.ProfessionalName == "工艺管道" && x.ProjectId == projectId.ToString()
orderby x.CreateDate descending
select x).FirstOrDefault();
if (getT != null && getT.TotalQuantity != null)
{
getT = getT.Where(x => x.InspectionDate >= datetime1);
cout1 = getT.TotalQuantity.Value;
}
if (datetime2.HasValue)
{
getT = getT.Where(x => x.InspectionDate <= datetime2);
}
cout1 = getT.Count();
}
return cout1;
}
protected int Count2(object projectId)
protected string Count2(object projectId)
{
int cout1 = 0;
string cout1 = null;
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString() && x.IsOnceQualified == true);
if (datetime1.HasValue)
var getT = (from x in Funs.DB.ProcessControl_NondestructiveTest_New
where x.ProfessionalName == "工艺管道" && x.ProjectId == projectId.ToString()
orderby x.CreateDate descending
select x).FirstOrDefault();
if (getT != null)
{
getT = getT.Where(x => x.InspectionDate >= datetime1);
}
if (datetime2.HasValue)
{
getT = getT.Where(x => x.InspectionDate <= datetime2);
cout1 = getT.TotalRate;
}
}
return cout1;
}
cout1 = getT.Count();
/// <summary>
/// 数量
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected int? Count3(object projectId)
{
int? cout1 = null;
if (projectId != null)
{
var getT = (from x in Funs.DB.ProcessControl_NondestructiveTest_New
where x.ProfessionalName == "地管" && x.ProjectId == projectId.ToString()
orderby x.CreateDate descending
select x).FirstOrDefault();
if (getT != null && getT.TotalQuantity != null)
{
cout1 = getT.TotalQuantity.Value;
}
}
return cout1;
}
protected string Count4(object projectId)
{
string rate = string.Empty;
string cout1 = null;
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getALL = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString());
if (datetime1.HasValue)
var getT = (from x in Funs.DB.ProcessControl_NondestructiveTest_New
where x.ProfessionalName == "地管" && x.ProjectId == projectId.ToString()
orderby x.CreateDate descending
select x).FirstOrDefault();
if (getT != null)
{
getALL = getALL.Where(x => x.CheckDate >= datetime1);
}
if (datetime2.HasValue)
{
getALL = getALL.Where(x => x.CheckDate >= datetime1);
}
var getT = getALL.Where(x => x.ProjectId == projectId.ToString() && x.IsOnceQualified == true);
int coutall = getALL.Count();
int cout0 = getT.Count();
if (coutall > 0)
{
rate = Math.Round(cout0 * 1.0 / coutall * 100, 2).ToString();
cout1 = getT.TotalRate;
}
}
return rate;
return cout1;
}
/// <summary>
/// 数量
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected int? Count5(object projectId)
{
int? cout1 = null;
if (projectId != null)
{
var getT = (from x in Funs.DB.ProcessControl_NondestructiveTest_New
where x.ProfessionalName == "非标" && x.ProjectId == projectId.ToString()
orderby x.CreateDate descending
select x).FirstOrDefault();
if (getT != null && getT.TotalQuantity != null)
{
cout1 = getT.TotalQuantity.Value;
}
}
return cout1;
}
protected string Count6(object projectId)
{
string cout1 = null;
if (projectId != null)
{
var getT = (from x in Funs.DB.ProcessControl_NondestructiveTest_New
where x.ProfessionalName == "非标" && x.ProjectId == projectId.ToString()
orderby x.CreateDate descending
select x).FirstOrDefault();
if (getT != null)
{
cout1 = getT.TotalRate;
}
}
return cout1;
}
}
}