0813
This commit is contained in:
@@ -187,15 +187,32 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string row3 = pds.Rows[i][3].ToString();
|
||||
if (!string.IsNullOrEmpty(row3))
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (!string.IsNullOrEmpty(row2))
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault();
|
||||
var cn = cns.Where(x => x.ProfessionalName == row2.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|";
|
||||
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row2 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "专业名称" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string row3 = pds.Rows[i][3].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(row3))
|
||||
{
|
||||
if (row3 != "设备" && row3 != "材料")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "设备/材料" + "," + "[" + row2 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "设备/材料" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string row9 = pds.Rows[i][9].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(row9))
|
||||
@@ -244,7 +261,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
errorInfos.Clear();
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
|
||||
|
||||
string results = result;
|
||||
List<string> errorInfoList = results.Split('|').ToList();
|
||||
foreach (var item in errorInfoList)
|
||||
@@ -393,31 +410,31 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
// ).FirstOrDefault();
|
||||
//if (oldViewInfo == null)
|
||||
//{
|
||||
Model.Comprehensive_InspectionEquipment Ins = new Model.Comprehensive_InspectionEquipment();
|
||||
Ins.ProjectId = this.CurrUser.LoginProjectId;
|
||||
Ins.UnitId = unitInfo.UnitId;
|
||||
Ins.InspectionCode = pds.Rows[i][1].ToString().Trim();
|
||||
Ins.EquipmentNO = pds.Rows[i][2].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim()))
|
||||
{
|
||||
Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId;
|
||||
}
|
||||
Ins.InspectionName = pds.Rows[i][4].ToString().Trim();
|
||||
Ins.Specifications = pds.Rows[i][5].ToString().Trim();
|
||||
Ins.Supplier = pds.Rows[i][6].ToString().Trim();
|
||||
Ins.Counts = pds.Rows[i][7].ToString().Trim();
|
||||
Ins.SamplingCount = pds.Rows[i][8].ToString().Trim();
|
||||
Ins.SamplingResult = pds.Rows[i][9].ToString().Trim() == "合格" ? "1" : "2";
|
||||
Model.Comprehensive_InspectionEquipment Ins = new Model.Comprehensive_InspectionEquipment();
|
||||
Ins.ProjectId = this.CurrUser.LoginProjectId;
|
||||
Ins.UnitId = unitInfo.UnitId;
|
||||
Ins.InspectionCode = pds.Rows[i][1].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim()))
|
||||
{
|
||||
Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][2].ToString().Trim()).CNProfessionalId;
|
||||
}
|
||||
Ins.EquipmentOrMatail = pds.Rows[i][3].ToString().Trim();
|
||||
Ins.InspectionName = pds.Rows[i][4].ToString().Trim();
|
||||
Ins.Specifications = pds.Rows[i][5].ToString().Trim();
|
||||
Ins.Supplier = pds.Rows[i][6].ToString().Trim();
|
||||
Ins.Counts = pds.Rows[i][7].ToString().Trim();
|
||||
Ins.SamplingCount = pds.Rows[i][8].ToString().Trim();
|
||||
Ins.SamplingResult = pds.Rows[i][9].ToString().Trim() == "合格" ? "1" : "2";
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim()))
|
||||
{
|
||||
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim());
|
||||
}
|
||||
Ins.RemarkCode = pds.Rows[i][11].ToString().Trim();
|
||||
Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
BLL.InspectionEquipmentService.AddInspectionEquipment(Ins);
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim()))
|
||||
{
|
||||
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim());
|
||||
}
|
||||
Ins.RemarkCode = pds.Rows[i][11].ToString().Trim();
|
||||
Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
BLL.InspectionEquipmentService.AddInspectionEquipment(Ins);
|
||||
|
||||
//}
|
||||
//else
|
||||
@@ -431,7 +448,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user