This commit is contained in:
2025-09-24 11:27:49 +08:00
parent 3ad6b67803
commit 9577a0ce23
15 changed files with 167 additions and 130 deletions
@@ -328,11 +328,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
var users = from x in Funs.DB.Project_ProjectUser
join y in Funs.DB.Sys_User on x.UserId equals y.UserId
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.UnitId == BLL.Const.UnitId_CWCEC
select y;
var users = from x in Funs.DB.Sys_User
where x.UnitId == BLL.Const.UnitId_CWCEC
select x;
var dataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "NCR"
@@ -419,11 +417,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
{
if (tempData.Value6.Trim() != "过程监督不到位" && tempData.Value6.Trim() != "质量缺陷" && tempData.Value6.Trim() != "质量管理问题" && tempData.Value6.Trim() != "不按设计要求施工" && tempData.Value6.Trim() != "不按程序施工" && tempData.Value6.Trim() != "成品保护不到位")
string[] strs = tempData.Value6.Trim().Split(',');
bool b = true;
foreach (var item in strs)
{
errInfo += "问题类别[" + tempData.Value6.Trim() + "]错误;";
if (item != "过程监督不到位" && item != "质量缺陷" && item != "质量管理问题" && item != "不按设计要求施工" && item != "不按程序施工" && item != "成品保护不到位")
{
errInfo += "问题类别[" + item + "]错误;";
b = false;
}
}
else
if (b)
{
Ins.Problem = tempData.Value6.Trim();
}
@@ -516,14 +520,28 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
if (!string.IsNullOrEmpty(tempData.Value14.Trim()))//监督人
{
var user = users.FirstOrDefault(x => x.UserName == tempData.Value14.Trim());
if (user != null)
string[] strs = tempData.Value14.Trim().Split(',');
bool b = true;
string supervisor = string.Empty;
foreach (var item in strs)
{
Ins.Supervisor = user.UserId;
var user = users.FirstOrDefault(x => x.UserName == item);
if (user == null)
{
errInfo += "监督人[" + item + "]错误;";
b = false;
}
else
{
supervisor += user.UserId + ",";
}
}
else
if (b)
{
errInfo += "监督人[" + tempData.Value14.Trim() + "]错误;";
if (!string.IsNullOrEmpty(supervisor))
{
Ins.Supervisor = supervisor.Substring(0, supervisor.Length - 1);
}
}
}
if (!string.IsNullOrEmpty(tempData.Value15))