20250227
This commit is contained in:
@@ -345,12 +345,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
string errInfo = string.Empty;
|
||||
|
||||
Model.Comprehensive_InspectionPerson Ins = new Model.Comprehensive_InspectionPerson();
|
||||
if (!string.IsNullOrEmpty(tempData.Value1))
|
||||
if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
|
||||
{
|
||||
var unit = units.FirstOrDefault(x => x.UnitName == tempData.Value1);
|
||||
var unit = units.FirstOrDefault(x => x.UnitName == tempData.Value1.Trim());
|
||||
if (unit == null)
|
||||
{
|
||||
errInfo += "报验单位[" + tempData.Value1 + "]不存在;";
|
||||
errInfo += "报验单位[" + tempData.Value1.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -361,38 +361,38 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
errInfo += "报验单位为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value2))
|
||||
if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
|
||||
{
|
||||
Ins.InspectionPersonCode = tempData.Value2;
|
||||
Ins.InspectionPersonCode = tempData.Value2.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "报验编号为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value3))
|
||||
if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
|
||||
{
|
||||
Ins.PersonName = tempData.Value3;
|
||||
Ins.PersonName = tempData.Value3.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "姓名为必填项;";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value4))
|
||||
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == tempData.Value4).FirstOrDefault();
|
||||
var cn = cns.Where(x => x.ProfessionalName == tempData.Value4.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
errInfo += "专业名称[" + tempData.Value4 + "]不存在;";
|
||||
errInfo += "专业名称[" + tempData.Value4.Trim() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.CNProfessionalId = cn.CNProfessionalId;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value5))
|
||||
if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
|
||||
{
|
||||
string unitIds = string.Empty;
|
||||
string[] reunit = tempData.Value5.Split(',');
|
||||
string[] reunit = tempData.Value5.Trim().Split(',');
|
||||
foreach (string unitWork in reunit)
|
||||
{
|
||||
var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
|
||||
@@ -415,14 +415,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
|
||||
{
|
||||
var post = Funs.DB.Base_Post.First(e => e.PostName == tempData.Value6.Trim());
|
||||
var post = posts.FirstOrDefault(e => e.PostName == tempData.Value6.Trim());
|
||||
if (post != null)
|
||||
{
|
||||
Ins.PostId = post.PostId;
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "工种[" + tempData.Value6 + "]不存在;";
|
||||
errInfo += "工种[" + tempData.Value6.Trim() + "]不存在;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value7.Trim()))
|
||||
@@ -463,15 +463,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
errInfo += "批准时间[" + tempData.Value10.Trim() + "]错误;";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value11))
|
||||
if (!string.IsNullOrEmpty(tempData.Value11.Trim()))
|
||||
{
|
||||
if (tempData.Value11 != "是" && tempData.Value11 != "否")
|
||||
if (tempData.Value11.Trim() != "是" && tempData.Value11.Trim() != "否")
|
||||
{
|
||||
errInfo += "是否在场[" + tempData.Value11 + "]错误;";
|
||||
errInfo += "是否在场[" + tempData.Value11.Trim() + "]错误;";
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.IsOnSite = tempData.Value11 == "是" ? true : false;
|
||||
Ins.IsOnSite = tempData.Value11.Trim() == "是" ? true : false;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value12.Trim()))
|
||||
@@ -504,15 +504,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
Ins.Remark = tempData.Value14.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value15))
|
||||
if (!string.IsNullOrEmpty(tempData.Value15.Trim()))
|
||||
{
|
||||
try
|
||||
{
|
||||
Ins.RemarkCode = Convert.ToInt32(tempData.Value15);
|
||||
Ins.RemarkCode = Convert.ToInt32(tempData.Value15.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
errInfo += "标志编号[" + tempData.Value15 + "]格式错误;";
|
||||
errInfo += "标志编号[" + tempData.Value15.Trim() + "]格式错误;";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -526,7 +526,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
Ins.ProjectId = LoginProjectId;
|
||||
var isExitISOValue = oldViewInfos.FirstOrDefault(x => x.UnitId == Ins.UnitId
|
||||
&& x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value15));
|
||||
&& x.RemarkCode == Funs.GetNewIntOrZero(tempData.Value15.Trim()));
|
||||
if (isExitISOValue != null) ///已存在
|
||||
{
|
||||
Ins.InspectionPersonId = isExitISOValue.InspectionPersonId;
|
||||
|
||||
Reference in New Issue
Block a user