现场质量问题台账

This commit is contained in:
2026-01-19 15:31:10 +08:00
parent feb9e58357
commit d4f5233fe5
32 changed files with 520 additions and 212 deletions
@@ -249,6 +249,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
newDataInTemp.Value14 = ds.Tables[0].Rows[i][13].ToString();
newDataInTemp.Value15 = ds.Tables[0].Rows[i][14].ToString();
newDataInTemp.Value16 = ds.Tables[0].Rows[i][15].ToString();
newDataInTemp.Value17 = ds.Tables[0].Rows[i][16].ToString();
newDataInTemp.Value18 = ds.Tables[0].Rows[i][17].ToString();
BLL.Sys_CQMS_DataInTempService.AddDataInTemp(newDataInTemp);
}
@@ -277,7 +279,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("NCR管理" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("现场质量问题台账" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Write(GetGridTableHtml(Grid1));
@@ -340,6 +342,31 @@ namespace FineUIPro.Web.CQMS.Comprehensive
int i = 0;
int ir = dataInTemp.Count();
string erreMessage = "";
//问题来源
List<string> lstSource = new List<string>();
lstSource.Add("NCR-业主下发");
lstSource.Add("NCR-监理下发");
lstSource.Add("NCR-五环发布");
lstSource.Add("监理通知单");
lstSource.Add("信函");
lstSource.Add("施工联系单");
lstSource.Add("施工签证");
lstSource.Add("关键事项");
lstSource.Add("设计变更单");
lstSource.Add("技术核定单");
lstSource.Add("开箱检验问题清单");
lstSource.Add("其它");
//问题类别
List<string> lstProblem = new List<string>();
lstProblem.Add("设计问题");
lstProblem.Add("采购问题");
lstProblem.Add("施工管理问题-过程监督不到位");
lstProblem.Add("施工管理问题-质量缺陷");
lstProblem.Add("施工管理问题-质量管理问题");
lstProblem.Add("施工管理问题-不按设计要求施工");
lstProblem.Add("施工管理问题-不按程序施工");
lstProblem.Add("施工管理问题-成品保护不到位");
lstProblem.Add("其它");
foreach (var tempData in dataInTemp)
{
if (tempData != null)
@@ -367,10 +394,25 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
if (!string.IsNullOrEmpty(tempData.Value2))
{
var cn = cns.Where(x => x.ProfessionalName == tempData.Value2).FirstOrDefault();
if (!lstSource.Contains(tempData.Value2))
{
errInfo += "问题来源[" + tempData.Value2 + "]错误;";
}
else
{
Ins.Source = tempData.Value2;
}
}
else
{
errInfo += "问题来源为必填项;";
}
if (!string.IsNullOrEmpty(tempData.Value3))
{
var cn = cns.Where(x => x.ProfessionalName == tempData.Value3).FirstOrDefault();
if (cn == null)
{
errInfo += "专业名称[" + tempData.Value2 + "]不存在;";
errInfo += "专业名称[" + tempData.Value3 + "]不存在;";
}
else
{
@@ -381,18 +423,18 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
errInfo += "专业名称为必填项;";
}
if (!string.IsNullOrEmpty(tempData.Value3))
if (!string.IsNullOrEmpty(tempData.Value4))
{
Ins.NCRCode = tempData.Value3;
Ins.NCRCode = tempData.Value4;
}
else
{
errInfo += "NCR单号为必填项;";
errInfo += "文件编号为必填项;";
}
if (!string.IsNullOrEmpty(tempData.Value4))
if (!string.IsNullOrEmpty(tempData.Value5))
{
string unitIds = string.Empty;
string[] reunit = tempData.Value4.Split(',');
string[] reunit = tempData.Value5.Split(',');
foreach (string unitWork in reunit)
{
var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
@@ -412,17 +454,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
Ins.UnitWorkId = unitIds;
}
if (!string.IsNullOrEmpty(tempData.Value5))//主要内容
if (!string.IsNullOrEmpty(tempData.Value6))//主要内容
{
Ins.Contents = tempData.Value5;
Ins.Contents = tempData.Value6;
}
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
{
string[] strs = tempData.Value6.Trim().Split(',');
string[] strs = tempData.Value7.Trim().Split(',');
bool b = true;
foreach (var item in strs)
{
if (item != "过程监督不到位" && item != "质量缺陷" && item != "质量管理问题" && item != "不按设计要求施工" && item != "不按程序施工" && item != "成品保护不到位")
//if (item != "施工管理问题-过程监督不到位" && item != "施工管理问题-质量缺陷" && item != "施工管理问题-质量管理问题" && item != "施工管理问题-不按设计要求施工" && item != "施工管理问题-不按程序施工" && item != "施工管理问题-成品保护不到位")
//{
// errInfo += "问题类别[" + item + "]错误;";
// b = false;
//}
if (!lstProblem.Contains(item))
{
errInfo += "问题类别[" + item + "]错误;";
b = false;
@@ -430,36 +477,36 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
if (b)
{
Ins.Problem = tempData.Value6.Trim();
Ins.Problem = tempData.Value7.Trim();
}
}
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))//问题原因分析
if (!string.IsNullOrEmpty(tempData.Value8.Trim()))//问题原因分析
{
Ins.ReasonAnalysis = tempData.Value7.Trim();
Ins.ReasonAnalysis = tempData.Value8.Trim();
}
if (!string.IsNullOrEmpty(tempData.Value8.Trim()))//改进措施
if (!string.IsNullOrEmpty(tempData.Value9.Trim()))//改进措施
{
Ins.Measure = tempData.Value8.Trim();
Ins.Measure = tempData.Value9.Trim();
}
if (!string.IsNullOrEmpty(tempData.Value9.Trim()))
if (!string.IsNullOrEmpty(tempData.Value10.Trim()))
{
try
{
Ins.IssuedDate = Funs.GetNewDateTime(tempData.Value9.Trim());
Ins.IssuedDate = Funs.GetNewDateTime(tempData.Value10.Trim());
if (Ins.IssuedDate == null)
{
errInfo += "下发日期[" + tempData.Value9.Trim() + "]错误;";
errInfo += "下发日期[" + tempData.Value10.Trim() + "]错误;";
}
}
catch (Exception)
{
errInfo += "下发日期[" + tempData.Value9.Trim() + "]错误;";
errInfo += "下发日期[" + tempData.Value10.Trim() + "]错误;";
}
}
if (!string.IsNullOrEmpty(tempData.Value10.Trim()))
if (!string.IsNullOrEmpty(tempData.Value11.Trim()))
{
string unitIds = string.Empty;
string[] reunit = tempData.Value10.Split(',');
string[] reunit = tempData.Value11.Split(',');
foreach (string unitName in reunit)
{
var u = units.Where(x => x.UnitName == unitName.Trim()).FirstOrDefault();
@@ -478,54 +525,58 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
Ins.ReceiveUnit = unitIds;
}
if (!string.IsNullOrEmpty(tempData.Value11.Trim()))
if (!string.IsNullOrEmpty(tempData.Value12.Trim()))//目前实施进展状况
{
if (tempData.Value11.Trim() != "整改中" && tempData.Value11.Trim() != "已闭合")
Ins.ProgressStatus = tempData.Value12.Trim();
}
if (!string.IsNullOrEmpty(tempData.Value13.Trim()))
{
if (tempData.Value13.Trim() != "整改中" && tempData.Value13.Trim() != "已闭合")
{
errInfo += "实时状态[" + tempData.Value11.Trim() + "]错误;";
errInfo += "实时状态[" + tempData.Value13.Trim() + "]错误;";
}
else
{
Ins.ImplementationFrontState = tempData.Value11.Trim();
Ins.ImplementationFrontState = tempData.Value13.Trim();
}
}
if (!string.IsNullOrEmpty(tempData.Value12))
if (!string.IsNullOrEmpty(tempData.Value14))
{
try
{
Ins.ClosedDate = Funs.GetNewDateTime(tempData.Value12);
Ins.ClosedDate = Funs.GetNewDateTime(tempData.Value14);
if (Ins.ClosedDate == null)
{
errInfo += "要求关闭日期[" + tempData.Value12.Trim() + "]错误;";
errInfo += "要求关闭日期[" + tempData.Value14.Trim() + "]错误;";
}
}
catch (Exception)
{
errInfo += "要求关闭日期[" + tempData.Value12.Trim() + "]错误;";
errInfo += "要求关闭日期[" + tempData.Value14.Trim() + "]错误;";
}
}
if (!string.IsNullOrEmpty(tempData.Value13))
if (!string.IsNullOrEmpty(tempData.Value15))
{
try
{
Ins.CompleteDate = Funs.GetNewDateTime(tempData.Value13);
Ins.CompleteDate = Funs.GetNewDateTime(tempData.Value15);
if (Ins.CompleteDate == null)
{
errInfo += "完成日期[" + tempData.Value13.Trim() + "]错误;";
errInfo += "完成日期[" + tempData.Value15.Trim() + "]错误;";
}
}
catch (Exception)
{
errInfo += "完成日期[" + tempData.Value13.Trim() + "]错误;";
errInfo += "完成日期[" + tempData.Value15.Trim() + "]错误;";
}
}
if (!string.IsNullOrEmpty(tempData.Value14.Trim()))//责任人
if (!string.IsNullOrEmpty(tempData.Value16.Trim()))//责任人
{
Ins.ResponsibleMan = tempData.Value14.Trim();
Ins.ResponsibleMan = tempData.Value16.Trim();
}
if (!string.IsNullOrEmpty(tempData.Value15.Trim()))//监督人
if (!string.IsNullOrEmpty(tempData.Value17.Trim()))//监督人
{
string[] strs = tempData.Value15.Trim().Split(',');
string[] strs = tempData.Value17.Trim().Split(',');
bool b = true;
string supervisor = string.Empty;
foreach (var item in strs)
@@ -549,15 +600,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
}
}
if (!string.IsNullOrEmpty(tempData.Value16))
if (!string.IsNullOrEmpty(tempData.Value18))
{
try
{
Ins.RemarkCode = Convert.ToInt32(tempData.Value16);
Ins.RemarkCode = Convert.ToInt32(tempData.Value18);
}
catch (Exception)
{
errInfo += "标志编号[" + tempData.Value16 + "]格式错误;";
errInfo += "标志编号[" + tempData.Value18 + "]格式错误;";
}
}
else
@@ -569,7 +620,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Ins.ProjectId = LoginProjectId;
Ins.Status = BLL.Const.Comprehensive_Compile;
Ins.CompileMan = this.CurrUser.UserId;
var isExitISOValue = oldViewInfos.FirstOrDefault(x => x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value16));
var isExitISOValue = oldViewInfos.FirstOrDefault(x => x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value18));
if (isExitISOValue != null) ///已存在
{
Ins.NCRManagementId = isExitISOValue.NCRManagementId;