1
This commit is contained in:
@@ -1426,7 +1426,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
string UnitWorkName = checkLotBindStatiscData.Rows[i]["UnitWorkName"].ToString();
|
||||
string cNProfessionalCode = checkLotBindStatiscData.Rows[i]["cNProfessionalCode"].ToString();
|
||||
string IsOnceQualified = checkLotBindStatiscData.Rows[i]["IsOnceQualified"].ToString();
|
||||
DateTime? InspectionDate = Funs.GetNewDateTime(checkLotBindStatiscData.Rows[i]["InspectionDate"].ToString());
|
||||
//DateTime? InspectionDate = Funs.GetNewDateTime(checkLotBindStatiscData.Rows[i]["InspectionDate"].ToString());
|
||||
DateTime? CompileDate = Funs.GetNewDateTime(checkLotBindStatiscData.Rows[i]["CompileDate"].ToString());
|
||||
|
||||
if (tempCV != cNProfessionalCode || tempArea != UnitWorkName)
|
||||
{
|
||||
@@ -1449,7 +1450,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
|
||||
}
|
||||
}
|
||||
if (InspectionDate.HasValue && InspectionDate.Value >= startDate && InspectionDate.Value <= endDate)
|
||||
if (CompileDate.HasValue && CompileDate.Value >= startDate && CompileDate.Value <= endDate)
|
||||
{
|
||||
checkStatisc.CheckNum += 1;
|
||||
if (IsOnceQualified == "1" || IsOnceQualified == "True" || IsOnceQualified == "true")
|
||||
@@ -1457,6 +1458,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
checkStatisc.OKNum += 1;
|
||||
}
|
||||
}
|
||||
//if (InspectionDate.HasValue && InspectionDate.Value >= startDate && InspectionDate.Value <= endDate)
|
||||
//{
|
||||
// checkStatisc.CheckNum += 1;
|
||||
// if (IsOnceQualified == "1" || IsOnceQualified == "True" || IsOnceQualified == "true")
|
||||
// {
|
||||
// checkStatisc.OKNum += 1;
|
||||
// }
|
||||
//}
|
||||
|
||||
checkStatisc.TotalCheckNum += 1;
|
||||
if (IsOnceQualified == "1")
|
||||
@@ -1897,7 +1906,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
{
|
||||
string UnitId = row["UnitId"].ToString();
|
||||
string IsOnceQualified = row["IsOnceQualified"].ToString();
|
||||
DateTime? InspectionDate = Funs.GetNewDateTime(row["InspectionDate"].ToString());
|
||||
//DateTime? InspectionDate = Funs.GetNewDateTime(row["InspectionDate"].ToString());
|
||||
DateTime? CompileDate = Funs.GetNewDateTime(row["CompileDate"].ToString());
|
||||
if (!Quantity1Dic.ContainsKey(UnitId))
|
||||
{
|
||||
Quantity1Dic.Add(UnitId, 0);
|
||||
@@ -1914,7 +1924,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
{
|
||||
Quantity4Dic.Add(UnitId, 0);
|
||||
}
|
||||
if (InspectionDate.HasValue && InspectionDate.Value >= startDate && InspectionDate.Value <= endDate)
|
||||
if (CompileDate.HasValue && CompileDate.Value >= startDate && CompileDate.Value <= endDate)
|
||||
{
|
||||
Quantity1Dic[UnitId] = Quantity1Dic[UnitId] + 1;
|
||||
if (IsOnceQualified == "1")
|
||||
@@ -1922,6 +1932,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
Quantity3Dic[UnitId] = Quantity3Dic[UnitId] + 1;
|
||||
}
|
||||
}
|
||||
//if (InspectionDate.HasValue && InspectionDate.Value >= startDate && InspectionDate.Value <= endDate)
|
||||
//{
|
||||
// Quantity1Dic[UnitId] = Quantity1Dic[UnitId] + 1;
|
||||
// if (IsOnceQualified == "1")
|
||||
// {
|
||||
// Quantity3Dic[UnitId] = Quantity3Dic[UnitId] + 1;
|
||||
// }
|
||||
//}
|
||||
Quantity2Dic[UnitId] = Quantity2Dic[UnitId] + 1;
|
||||
if (IsOnceQualified == "1")
|
||||
{
|
||||
@@ -2471,6 +2489,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
{
|
||||
string CheckType = row["CheckType"].ToString();
|
||||
DateTime? CheckDate = Funs.GetNewDateTime(row["CheckDate"].ToString());
|
||||
string CheckTypeName = ConvertJointCheckType(CheckType);
|
||||
|
||||
if (!Quantity1Dic.ContainsKey(CheckType))
|
||||
{
|
||||
@@ -4107,6 +4126,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
select new
|
||||
{
|
||||
c.CheckDate,
|
||||
c.InspectionDate,
|
||||
c.CompileDate,
|
||||
c.ProjectId,
|
||||
u.UnitId,
|
||||
u.UnitName,
|
||||
@@ -4119,14 +4140,19 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
select new
|
||||
{
|
||||
x.CheckDate,
|
||||
x.InspectionDate,
|
||||
x.CompileDate,
|
||||
x.ProjectId,
|
||||
x.UnitId,
|
||||
x.UnitName,
|
||||
x.IsOnceQualified
|
||||
};
|
||||
var AllList = query.ToList();
|
||||
//var monethCount = query
|
||||
// .Where(x => (x.CheckDate >= Convert.ToDateTime(startDate) && x.CheckDate <= Convert.ToDateTime(endDate)));
|
||||
|
||||
var monethCount = query
|
||||
.Where(x => (x.CheckDate >= Convert.ToDateTime(startDate) && x.CheckDate <= Convert.ToDateTime(endDate)));
|
||||
.Where(x => (x.CompileDate >= Convert.ToDateTime(startDate) && x.CompileDate <= Convert.ToDateTime(endDate)));
|
||||
|
||||
|
||||
Model.CheckStatisc checkStatisc = new Model.CheckStatisc();
|
||||
@@ -4135,8 +4161,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
checkStatisc.WorkName = item.UnitName;
|
||||
checkStatisc.CheckNum = monethCount.Count();
|
||||
checkStatisc.TotalCheckNum = AllList.Count();
|
||||
checkStatisc.OKNum = monethCount.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
|
||||
checkStatisc.TotalOKNum = AllList.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
|
||||
checkStatisc.OKNum = monethCount.Count(x => x.IsOnceQualified == true);
|
||||
checkStatisc.TotalOKNum = AllList.Count(x => x.IsOnceQualified == true);
|
||||
|
||||
if (checkStatisc.CheckNum != 0)//被除数不能为零
|
||||
{
|
||||
@@ -4209,7 +4235,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
return await Task.Run(() =>
|
||||
{
|
||||
|
||||
string strSql = @"select UnitId,IsOnceQualified, InspectionDate from View_CQMS_InspectionManagementDetail
|
||||
string strSql = @"select UnitId,IsOnceQualified, InspectionDate,CompileDate from View_MonthReport_InspectionManagement
|
||||
where ProjectId='" + this.CurrUser.LoginProjectId + "' ";
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, null);
|
||||
return dt;
|
||||
@@ -4262,8 +4288,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
checkStatisc.CheckNum = managementList.Count(x => x.UnitWorkId == item);
|
||||
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.UnitWorkId == item);
|
||||
|
||||
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
|
||||
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
|
||||
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
|
||||
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
|
||||
|
||||
if (checkStatisc.CheckNum != 0)//被除数不能为零
|
||||
{
|
||||
@@ -4453,7 +4479,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
return await Task.Run(() =>
|
||||
{
|
||||
|
||||
string strSql = @"select a.UnitWorkId,UnitWorkName,cNProfessionalCode,IsOnceQualified,InspectionDate from View_MonthReport_InspectionManagement a
|
||||
string strSql = @"select a.UnitWorkId,UnitWorkName,cNProfessionalCode,IsOnceQualified,InspectionDate,CompileDate from View_MonthReport_InspectionManagement a
|
||||
left join WBS_UnitWork b on a.UnitWorkId =b.UnitWorkId
|
||||
left join Base_CNProfessional c on a.CNProfessionalId= c.CNProfessionalId
|
||||
where a.ProjectId='" + this.CurrUser.LoginProjectId + "' order by cNProfessionalCode,UnitWorkName";
|
||||
@@ -7103,5 +7129,36 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
//<summary>
|
||||
//获取检查类别
|
||||
//</summary>
|
||||
//<param name="state"></param>
|
||||
//<returns></returns>
|
||||
protected string ConvertJointCheckType(string CheckType)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(CheckType))
|
||||
{
|
||||
string checkType = CheckType.ToString();
|
||||
if (checkType == "1")
|
||||
{
|
||||
return "周检查";
|
||||
}
|
||||
else if (checkType == "2")
|
||||
{
|
||||
return "月检查";
|
||||
}
|
||||
else if (checkType == "3")
|
||||
{
|
||||
return "不定期检查";
|
||||
}
|
||||
else if (checkType == "4")
|
||||
{
|
||||
return "专业检查";
|
||||
}
|
||||
}
|
||||
return CheckType;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user