111
This commit is contained in:
@@ -911,6 +911,11 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
model.JointCode = jointCode;
|
||||
model.CreatedTime = DateTime.Now;
|
||||
model.RowId = k;
|
||||
model.UnitId = string.Empty;
|
||||
model.InstallId = string.Empty;
|
||||
model.WorkAreaId = string.Empty;
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
model.PipelineId=string.Empty;
|
||||
model.BatchNo = batchNo;
|
||||
string errorMsg = string.Empty;
|
||||
//验证是否为空
|
||||
@@ -939,11 +944,13 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
{
|
||||
errorMsg += "是否全部焊口未填写 | ";
|
||||
}
|
||||
|
||||
//检查单位编号是否存在
|
||||
var unitInfo = Funs.DB.Base_Unit.FirstOrDefault(t => t.UnitCode == model.UnitCode);
|
||||
if (unitInfo == null)
|
||||
{
|
||||
errorMsg += "未知的单位编号 | ";
|
||||
|
||||
}
|
||||
var installInfo = Funs.DB.Project_Installation.FirstOrDefault(t => t.InstallationCode == model.InstallCode);
|
||||
if (installInfo == null)
|
||||
@@ -975,16 +982,22 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
}
|
||||
if (unitInfo != null && installInfo != null && areaInfo != null )
|
||||
{
|
||||
model.ProjectId=this.CurrUser.LoginProjectId;
|
||||
|
||||
model.UnitId = unitInfo.UnitId;
|
||||
model.WorkAreaId = areaInfo.WorkAreaId;
|
||||
model.InstallId = installInfo.InstallationId;
|
||||
var newPipelineInfo = Funs.DB.Pipeline_Pipeline.FirstOrDefault(t => t.UnitId == unitInfo.UnitId &&
|
||||
t.InstallationId == installInfo.InstallationId && t.WorkAreaId == areaInfo.WorkAreaId &&
|
||||
t.PipelineCode==model.PiplineCode);
|
||||
if (newPipelineInfo != null)
|
||||
|
||||
if (newPipelineInfo == null)
|
||||
{
|
||||
model.PipelineId =newPipelineInfo.PipelineId;
|
||||
errorMsg += "当前区域下不存在此管线号 | ";
|
||||
model.PipelineId = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.PipelineId = newPipelineInfo.PipelineId;
|
||||
|
||||
var ptpDetailList = Funs.DB.PTP_PipelineList
|
||||
.Where(t => t.PipelineId == newPipelineInfo.PipelineId);
|
||||
|
||||
Reference in New Issue
Block a user