11
This commit is contained in:
@@ -489,6 +489,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
List<string> pipelineIdList = new List<string>();
|
||||
// 焊工资质不符合条件信息
|
||||
string eventArg = string.Empty;
|
||||
// 焊工WPS验证
|
||||
string errorCheck = string.Empty;
|
||||
string installationId = string.Empty;
|
||||
string workAreaId = string.Empty;
|
||||
string unitId = string.Empty;
|
||||
@@ -593,7 +595,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
var pipeline = from x in Funs.DB.Pipeline_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.InstallationId == insId && x.WorkAreaId==areaId && x.PipelineCode == ds.Tables[0].Rows[i]["管线号"].ToString()
|
||||
&& x.InstallationId == insId && x.WorkAreaId == areaId && x.PipelineCode == ds.Tables[0].Rows[i]["管线号"].ToString()
|
||||
select x;
|
||||
|
||||
if (pipeline.Count() > 0)
|
||||
@@ -1040,7 +1042,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((!string.IsNullOrEmpty(d.Material2Id) && steel.MaterialId!=d.Material2Id)
|
||||
if ((!string.IsNullOrEmpty(d.Material2Id) && steel.MaterialId != d.Material2Id)
|
||||
&& (!string.IsNullOrEmpty(d.Material1Id) && steel.MaterialId != d.Material1Id))
|
||||
{
|
||||
errorInfos += (i + 2) + "行,材质2[" + ds.Tables[0].Rows[i]["材质2"].ToString() + "]验证不一至;";
|
||||
@@ -1228,135 +1230,118 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
|
||||
dayList.Add(d);
|
||||
|
||||
|
||||
// 判断资质
|
||||
//if (welderQueIsUse == true)
|
||||
//{
|
||||
// WPS焊工判断资质
|
||||
if (isExistFloor && isExistCell)
|
||||
{
|
||||
var wps = BLL.WPQListServiceService.GetWPQById(d.WPQId);
|
||||
if (!wps.WelderIds.Contains(cellWelderId))
|
||||
{
|
||||
if (!eventArg.Contains(ds.Tables[0].Rows[i]["盖面焊工号"].ToString()))
|
||||
{
|
||||
eventArg = eventArg + ds.Tables[0].Rows[i]["盖面焊工号"].ToString() + ",";
|
||||
}
|
||||
|
||||
errorCheck += (i + 2) + "行,盖面焊工号:[" + ds.Tables[0].Rows[i]["盖面焊工号"].ToString() + "]验证无焊WPS资质;";
|
||||
}
|
||||
|
||||
|
||||
if (!wps.WelderIds.Contains(floorWelderId))
|
||||
{
|
||||
if (!eventArg.Contains(ds.Tables[0].Rows[i]["打底焊工号"].ToString()))
|
||||
{
|
||||
eventArg = eventArg + ds.Tables[0].Rows[i]["打底焊工号"].ToString() + ",";
|
||||
}
|
||||
errorCheck += (i + 2) + "行,打底焊工号:[" + ds.Tables[0].Rows[i]["打底焊工号"].ToString() + "]验证无焊WPS资质;";
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
#region 焊工资质判断 ,暂不用,改为和WPS的焊工判断
|
||||
//if (!string.IsNullOrEmpty(errorInfos))
|
||||
//{
|
||||
// ShowNotify(errorInfos, MessageBoxIcon.Warning, 10000);
|
||||
// return;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// // 判断资质
|
||||
// if (welderQueIsUse == true)
|
||||
// {
|
||||
// if (isExistFloor && isExistCell)
|
||||
// {
|
||||
// bool canSave = false;
|
||||
// var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(jotId);
|
||||
// var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
|
||||
// string weldTypeGroup = joty.Flag;
|
||||
// string weldTypeCode = joty.WeldTypeCode;
|
||||
// string floorWelder = floorWelderId;
|
||||
// string cellWelder = cellWelderId;
|
||||
// //decimal? dia = jot.Dia;
|
||||
// //decimal? sch = jot.Thickness;
|
||||
#region 焊工合格项资质判断
|
||||
// 判断资质
|
||||
if (welderQueIsUse == true)
|
||||
{
|
||||
if (isExistFloor && isExistCell)
|
||||
{
|
||||
bool canSave = false;
|
||||
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(jotId);
|
||||
var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
|
||||
string weldTypeGroup = joty.Flag;
|
||||
string weldTypeCode = joty.WeldTypeCode;
|
||||
string floorWelder = floorWelderId;
|
||||
string cellWelder = cellWelderId;
|
||||
//decimal? dia = jot.Dia;
|
||||
//decimal? sch = jot.Thickness;
|
||||
|
||||
// string weldingMethodCode = string.Empty;
|
||||
// var wm = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(jot.WeldingMethodId);
|
||||
// if (wm != null)
|
||||
// {
|
||||
// weldingMethodCode = wm.WeldingMethodCode;
|
||||
// }
|
||||
// string[] wmeCodes = weldingMethodCode.Split('+');
|
||||
string weldingMethodCode = string.Empty;
|
||||
var wm = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(jot.WeldingMethodId);
|
||||
if (wm != null)
|
||||
{
|
||||
weldingMethodCode = wm.WeldingMethodCode;
|
||||
}
|
||||
string[] wmeCodes = weldingMethodCode.Split('+');
|
||||
|
||||
// string location = string.Empty;
|
||||
// var loc = BLL.Base_WeldingLocationServie.GetWeldingLocationById(jot.WeldingLocationId);
|
||||
// if (loc != null)
|
||||
// {
|
||||
// location = loc.WeldingLocationCode;
|
||||
// }
|
||||
string location = string.Empty;
|
||||
var loc = BLL.Base_WeldingLocationServie.GetWeldingLocationById(jot.WeldingLocationId);
|
||||
if (loc != null)
|
||||
{
|
||||
location = loc.WeldingLocationCode;
|
||||
}
|
||||
|
||||
// string ste = jot.Material1Id;
|
||||
string ste = jot.Material1Id;
|
||||
|
||||
// List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
|
||||
// where x.WelderId == floorWelder && x.WeldingMethodId != null
|
||||
// && x.WeldingLocationId != null && x.MaterialType != null
|
||||
// && x.WeldType != null
|
||||
// && x.ThicknessMax != null && x.SizesMin != null
|
||||
// select x).ToList();
|
||||
List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
|
||||
where x.WelderId == floorWelder && x.WeldingMethodId != null
|
||||
&& x.WeldingLocationId != null && x.MaterialType != null
|
||||
&& x.WeldType != null
|
||||
&& x.ThicknessMax != null && x.SizesMin != null
|
||||
select x).ToList();
|
||||
|
||||
// List<Model.Welder_WelderQualify> cellWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
|
||||
// where x.WelderId == cellWelder && x.WeldingMethodId != null
|
||||
// && x.WeldingLocationId != null && x.MaterialType != null
|
||||
// && x.WeldType != null
|
||||
// && x.ThicknessMax != null && x.SizesMin != null
|
||||
// select x).ToList();
|
||||
List<Model.Welder_WelderQualify> cellWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
|
||||
where x.WelderId == cellWelder && x.WeldingMethodId != null
|
||||
&& x.WeldingLocationId != null && x.MaterialType != null
|
||||
&& x.WeldType != null
|
||||
&& x.ThicknessMax != null && x.SizesMin != null
|
||||
select x).ToList();
|
||||
|
||||
// // 打底和盖面同一焊工
|
||||
// if (floorWelder == cellWelder)
|
||||
// {
|
||||
// if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
|
||||
// {
|
||||
// if (wmeCodes.Count() <= 1) // 一种焊接方法
|
||||
// {
|
||||
// canSave = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||
// }
|
||||
// else // 大于一种焊接方法,如氩电联焊
|
||||
// {
|
||||
// canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// // 打底和盖面焊工不同
|
||||
// else
|
||||
// {
|
||||
// bool isok1 = false;
|
||||
// bool isok2 = false;
|
||||
// 打底和盖面同一焊工
|
||||
if (floorWelder == cellWelder)
|
||||
{
|
||||
if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
|
||||
{
|
||||
if (wmeCodes.Count() <= 1) // 一种焊接方法
|
||||
{
|
||||
canSave = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||
}
|
||||
else // 大于一种焊接方法,如氩电联焊
|
||||
{
|
||||
canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 打底和盖面焊工不同
|
||||
else
|
||||
{
|
||||
bool isok1 = false;
|
||||
bool isok2 = false;
|
||||
|
||||
// if (wmeCodes.Count() <= 1) // 一种焊接方法
|
||||
// {
|
||||
// if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
|
||||
// {
|
||||
// isok1 = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||
// }
|
||||
// if (cellWelderQualifys != null && cellWelderQualifys.Count() > 0)
|
||||
// {
|
||||
// isok2 = IsOK(cellWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||
// }
|
||||
// if (isok1 && isok2)
|
||||
// {
|
||||
// canSave = true;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
|
||||
// }
|
||||
// }
|
||||
if (wmeCodes.Count() <= 1) // 一种焊接方法
|
||||
{
|
||||
if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
|
||||
{
|
||||
isok1 = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||
}
|
||||
if (cellWelderQualifys != null && cellWelderQualifys.Count() > 0)
|
||||
{
|
||||
isok2 = IsOK(cellWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||
}
|
||||
if (isok1 && isok2)
|
||||
{
|
||||
canSave = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
|
||||
}
|
||||
}
|
||||
|
||||
if (canSave == false)
|
||||
{
|
||||
eventArg = eventArg + jot.WeldJointCode + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if (canSave == false)
|
||||
// {
|
||||
// eventArg = eventArg + jot.WeldJointCode + ",";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -1366,6 +1351,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
ShowNotify(errorInfos, MessageBoxIcon.Warning, 10000);
|
||||
return;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(errorCheck))
|
||||
{
|
||||
ShowNotify(errorCheck+ "请更正后再提交保存", MessageBoxIcon.Warning, 10000);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 焊工资质符全条件
|
||||
|
||||
Reference in New Issue
Block a user