This commit is contained in:
2025-07-23 10:56:18 +08:00
parent f81257f719
commit 08df59d881
2 changed files with 53 additions and 46 deletions
@@ -66,7 +66,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#region
[Serializable]
public class UnitClass {
public class UnitClass
{
public string UnitId { get; set; }
public string UnitName { get; set; }
@@ -90,7 +91,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#region
[Serializable]
public class ProfessionalsClass {
public class ProfessionalsClass
{
public string CNProfessionalId { get; set; }
public string ProfessionalName { get; set; }
}
@@ -121,20 +123,20 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//加载所有单位
units = (from x in db.Project_ProjectUnit
join y in db.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId
orderby y.UnitCode
select new UnitClass{ UnitId=x.UnitId, UnitName=y.UnitName, UnitType=x.UnitType }).ToList();
join y in db.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId
orderby y.UnitCode
select new UnitClass { UnitId = x.UnitId, UnitName = y.UnitName, UnitType = x.UnitType }).ToList();
//加载所有专业
CNProfessionals = (from x in db.Base_CNProfessional
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
&& x.CNProfessionalId != BLL.Const.CNProfessionalHSEId
where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
&& x.CNProfessionalId != BLL.Const.CNProfessionalHSEId
orderby x.SortIndex
select new ProfessionalsClass
{
CNProfessionalId=x.CNProfessionalId,
ProfessionalName=x.ProfessionalName
}).ToList();
select new ProfessionalsClass
{
CNProfessionalId = x.CNProfessionalId,
ProfessionalName = x.ProfessionalName
}).ToList();
BLL.UnitService.InitUnitNameByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, false);
BLL.UnitService.InitUnitDownListByText(this.drpUnitIdGrid9, this.CurrUser.LoginProjectId, true);
@@ -244,7 +246,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#region
var txtReportList = db.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList();
if (txtReportList.Count>0)
if (txtReportList.Count > 0)
{
if (txtReportList.FirstOrDefault(x => x.ContentType == "0") != null)
{
@@ -422,7 +424,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
}
protected void btnLoad_Click(object sender, EventArgs e) {
protected void btnLoad_Click(object sender, EventArgs e)
{
if (AddOrUpdate == "update")
{
lodAllGrid("1");
@@ -439,7 +442,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#region Grid1方法
protected void btnAddGrid1_Click(object sender, EventArgs e)
{
{
Grid1.Hidden = false;
JArray teamGroupData = Grid1.GetMergedData();
@@ -1076,7 +1079,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#region 7.2 PQR/WPS报验情况 Grid9方法
protected void btnAddGrid9_Click(object sender, EventArgs e)
{
{
Grid9.Hidden = false;
JArray teamGroupData = Grid9.GetMergedData();
@@ -1126,7 +1129,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
DataTable source = ObjectToTable(Grid9.DataSource);
int Quantity1Total = 0, Quantity2Total = 0;
if (source!=null)
if (source != null)
{
foreach (DataRow row in source.Rows)
{
@@ -1140,7 +1143,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
summary.Add("Quantity2", Quantity2Total.ToString());
Grid9.SummaryData = summary;
}
}
public static DataTable ObjectToTable(object obj)
@@ -1255,7 +1258,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
c.MonthRate,
c.TotalRate
};
if (query.ToList().Count > 0) {
if (query.ToList().Count > 0)
{
//加载工艺管道
var gygdModel = query.FirstOrDefault(x => x.ProfessionalName == "工艺管道");
var model = new Model.ProcessControl_NondestructiveTest_New();
@@ -1378,7 +1382,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Grid10.Hidden = true;
hidWsjcgl.Hidden = false;
}
else {
else
{
Grid10.Hidden = false;
hidWsjcgl.Hidden = true;
Grid10.DataSource = list;
@@ -1426,7 +1431,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId
//&& c.Status == "3"
//&& c.Status == "3"
select new
@@ -1738,7 +1743,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//int i = 1;
string cNProfessionalId = (from x in db.Base_CNProfessional where x.CNProfessionalCode == cNProfessionalCode select x.CNProfessionalId).FirstOrDefault();
List<string> workNames = new List<string>();
//专业下所有集合
List<Model.View_MonthReport_InspectionManagement> totalManagementList = BLL.InspectionManagementService.getViewMonthReportInspectionManagementByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, projectStartDate, endDate, false);
@@ -2121,7 +2126,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// where x.ProjectId == this.CurrUser.LoginProjectId && (x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1)
// orderby y.UnitCode
// select new { x.UnitId, y.UnitName };
var specialUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
var specialUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
foreach (var item in specialUnits)
{
var query = from c in db.Comprehensive_SpecialEquipment
@@ -2233,8 +2238,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
NCRStatisc.WorkName = item.UnitName;
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
//NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
//NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState == "已闭合").Count();
NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState == "已闭合").Count();
NCRStatisc.CheckNum = AllList.Count();
@@ -2840,7 +2847,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
ShowNotify("设计质量情况字符长度不能大于2000!", MessageBoxIcon.Warning);
return;
}
if (this.txtAre1.Text.Length>2000)
if (this.txtAre1.Text.Length > 2000)
{
ShowNotify("采购质量情况字符长度不能大于2000!", MessageBoxIcon.Warning);
return;
@@ -2855,7 +2862,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
ShowNotify("项目质量体系审核字符长度不能大于2000!", MessageBoxIcon.Warning);
return;
}
if (this.txtAre21.Text.Length>2000)
if (this.txtAre21.Text.Length > 2000)
{
ShowNotify("类似项目管理经验教训应对措施及跟踪字符长度不能大于2000!", MessageBoxIcon.Warning);
return;
@@ -3603,7 +3610,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
{
//Id = values.Value<string>("Id"),
Id= SQLHelper.GetNewID(),
Id = SQLHelper.GetNewID(),
ReportId = ReportId,
ReType = "9",
ContentName = values.Value<string>("ContentName"),
@@ -3962,7 +3969,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
TotationRate = values.Value<string>("TotalOneOKRate"),
Remarks = values.Value<string>("Remarks"),//本月累计合格点数
};
////if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
////{
@@ -4157,7 +4164,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
catch (Exception)
{
return;
}
}
}
}
#endregion
@@ -4203,7 +4210,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
catch (Exception)
{
return;
}
}
}
}
#endregion
@@ -4248,7 +4255,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
catch (Exception)
{
return;
}
}
}
}
#endregion
@@ -4294,7 +4301,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
catch (Exception)
{
return;
}
}
}
}
#endregion
@@ -4358,7 +4365,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Model.Report_ConstructionProblems newDetail = new Model.Report_ConstructionProblems
{
//ConstructionProblemsId = values.Value<string>("ConstructionProblemsId"),
ConstructionProblemsId= SQLHelper.GetNewID(),
ConstructionProblemsId = SQLHelper.GetNewID(),
ReportId = ReportId,
UnitId = values.Value<string>("UnitId"),
ProblemDesrioption = values.Value<string>("ProblemDesrioption"),
@@ -4404,7 +4411,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Model.Report_NextQualityControl newDetail = new Model.Report_NextQualityControl
{
//NextQualityControlId = values.Value<string>("NextQualityControlId"),
NextQualityControlId= SQLHelper.GetNewID(),
NextQualityControlId = SQLHelper.GetNewID(),
ReportId = ReportId,
NextQualityControlContent = values.Value<string>("NextQualityControlContent")
};
@@ -4439,7 +4446,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
imgage1.ReportId = ReportId;
imgage1.ContentType = "23-1";
imgage1.ContentText = txtPhotoContent1.Text;
imgage1.ImageUrl = imgPhoto.ImageUrl.Substring(imgPhoto.ImageUrl.IndexOf("/")+1);
imgage1.ImageUrl = imgPhoto.ImageUrl.Substring(imgPhoto.ImageUrl.IndexOf("/") + 1);
ImageLists.Add(imgage1);
var imgage2 = new Model.Report_TextBoxContent();