This commit is contained in:
parent
c0c2738e7f
commit
e1a0c2d934
Binary file not shown.
|
@ -199,7 +199,7 @@
|
|||
<f:Label ID="ddlReportCode" Label="<%$ Resources:Lan,DailyNumber %>" runat="server"
|
||||
LabelWidth="130px">
|
||||
</f:Label>
|
||||
<f:Label ID="txtReportDate" Label="<%$ Resources:Lan,DailyDate %>" runat="server"
|
||||
<f:Label ID="txtWeldingDate" Label="<%$ Resources:Lan,WeldingDate %>" runat="server"
|
||||
LabelWidth="130px">
|
||||
</f:Label>
|
||||
<f:Label ID="ddlJointStatus" Label="<%$ Resources:Lan,WeldingJointStatus %>" runat="server"
|
||||
|
|
|
@ -180,7 +180,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
if (dReport != null)
|
||||
{
|
||||
this.ddlReportCode.Text = dReport.WeldingDailyCode;
|
||||
this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", dReport.WeldingDate);
|
||||
this.txtWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", dReport.WeldingDate);
|
||||
this.txtBackingWelder.Text = jointInfo.BackingWelderCode;
|
||||
this.txtBackingWelderName.Text = jointInfo.BackingWelderName;
|
||||
this.txtCoverWelder.Text = jointInfo.CoverWelderCode;
|
||||
|
|
|
@ -474,13 +474,13 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
protected global::FineUIPro.Label ddlReportCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtReportDate 控件。
|
||||
/// txtWeldingDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtReportDate;
|
||||
protected global::FineUIPro.Label txtWeldingDate;
|
||||
|
||||
/// <summary>
|
||||
/// ddlJointStatus 控件。
|
||||
|
|
|
@ -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
|
||||
{
|
||||
// 焊工资质符全条件
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Data;
|
||||
using System.Linq;
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
|
@ -323,14 +324,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
return;
|
||||
}
|
||||
|
||||
// 焊工资质
|
||||
// 焊工合格项资质错误信息
|
||||
string eventArg = string.Empty;
|
||||
|
||||
// 验证错误
|
||||
// 焊工WPS验证错误信息
|
||||
string errorCheck = string.Empty;
|
||||
// 日报信息验证错误信息
|
||||
string errorInfos = string.Empty;
|
||||
List<Model.SpWeldingDailyItem> GetWeldingDailyItem = this.CollectGridJointInfo();
|
||||
|
||||
#region 和焊口信息及所能焊的WPS验证
|
||||
#region 焊工所能焊的WPS验证
|
||||
int rowIndex = 1;
|
||||
foreach (var item in GetWeldingDailyItem)
|
||||
{
|
||||
|
@ -342,38 +344,29 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
{
|
||||
if (!wps.WelderIds.Contains(item.BackingWelderId))
|
||||
{
|
||||
if (!eventArg.Contains(item.BackingWelderId))
|
||||
{
|
||||
eventArg += rowIndex + "行,焊工:" + item.BackingWelderCode + "无资质,";
|
||||
}
|
||||
errorCheck += rowIndex + "行,焊工:" + item.BackingWelderCode + "无WPS焊接资质,";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!wps.WelderIds.Contains(item.BackingWelderId))
|
||||
{
|
||||
if (!eventArg.Contains(item.BackingWelderId))
|
||||
{
|
||||
eventArg += rowIndex + "行,焊工:" + item.BackingWelderCode + "无资质,";
|
||||
}
|
||||
errorCheck += rowIndex + "行,焊工:" + item.BackingWelderCode + "无WPS焊接资质,";
|
||||
}
|
||||
if (!wps.WelderIds.Contains(item.CoverWelderId))
|
||||
{
|
||||
if (!eventArg.Contains(item.CoverWelderId))
|
||||
{
|
||||
eventArg += rowIndex + "行,焊工:" + item.CoverWelderId + "无资质,";
|
||||
}
|
||||
errorCheck += rowIndex + "行,焊工:" + item.CoverWelderId + "无WPS焊接资质,";
|
||||
}
|
||||
}
|
||||
|
||||
// 验证数据是否一至
|
||||
if (!string.IsNullOrEmpty(item.WeldTypeId) && !string.IsNullOrEmpty(jot.WeldTypeId) && item.WeldTypeId != jot.WeldTypeId)
|
||||
{
|
||||
errorCheck += rowIndex + "行,焊缝类型:" + item.WeldTypeId + "验证不一至,";
|
||||
errorInfos += rowIndex + "行,焊缝类型:" + item.WeldTypeId + "验证不一至,";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.JointAttribute) && !string.IsNullOrEmpty(jot.JointAttribute) && item.JointAttribute != jot.JointAttribute)
|
||||
{
|
||||
errorCheck += rowIndex + "行,焊口属性:" + item.JointAttribute + "验证不一至,";
|
||||
errorInfos += rowIndex + "行,焊口属性:" + item.JointAttribute + "验证不一至,";
|
||||
}
|
||||
|
||||
//if (!string.IsNullOrEmpty(item.WeldingLocationId) && !string.IsNullOrEmpty(jot.WeldingLocationId) && item.WeldingLocationId != jot.WeldingLocationId)
|
||||
|
@ -383,12 +376,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
|
||||
if (item.Size!=null && jot.Size!=null && item.Size != jot.Size)
|
||||
{
|
||||
errorCheck += rowIndex + "行,管径:" + item.JointAttribute + "验证不一至,";
|
||||
errorInfos += rowIndex + "行,管径:" + item.JointAttribute + "验证不一至,";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(item.ANSISCH) && !string.IsNullOrEmpty(jot.ANSISCH) && item.ANSISCH != jot.ANSISCH)
|
||||
{
|
||||
errorCheck += rowIndex + "行,美标壁厚:" + item.ANSISCH + "验证不一至,";
|
||||
errorInfos += rowIndex + "行,美标壁厚:" + item.ANSISCH + "验证不一至,";
|
||||
}
|
||||
|
||||
//if (!string.IsNullOrEmpty(item.MaterialId1) && !string.IsNullOrEmpty(jot.Material1Id) && jot.Material1Id != item.MaterialId1)
|
||||
|
@ -401,11 +394,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
//}
|
||||
if (!string.IsNullOrEmpty(item.Components1Id) && !string.IsNullOrEmpty(jot.PipeAssembly1Id) && jot.PipeAssembly1Id != item.Components1Id)
|
||||
{
|
||||
errorCheck += rowIndex + "行,组件1:" + item.Components1Code + "验证不一至,";
|
||||
errorInfos += rowIndex + "行,组件1:" + item.Components1Code + "验证不一至,";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.Components2Id) && !string.IsNullOrEmpty(jot.PipeAssembly2Id) && jot.PipeAssembly2Id != item.Components2Id)
|
||||
{
|
||||
errorCheck += rowIndex + "行,组件2:" + item.Components2Code + "验证不一至,";
|
||||
errorInfos += rowIndex + "行,组件2:" + item.Components2Code + "验证不一至,";
|
||||
}
|
||||
|
||||
//if (!string.IsNullOrEmpty(item.HeartNo1) && !string.IsNullOrEmpty(jot.HeartNo1) && jot.HeartNo1 != item.HeartNo1)
|
||||
|
@ -418,7 +411,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
//}
|
||||
if (!string.IsNullOrEmpty(item.PipeSegment) && !string.IsNullOrEmpty(jot.PipeSegment) && jot.PipeSegment != item.PipeSegment)
|
||||
{
|
||||
errorCheck += rowIndex + "行,所属管段:" + item.PipeSegment + "验证不一至,";
|
||||
errorInfos += rowIndex + "行,所属管段:" + item.PipeSegment + "验证不一至,";
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(item.WPQId) && !string.IsNullOrEmpty(jot.WPQId) && jot.WPQId != item.WPQId)
|
||||
//{
|
||||
|
@ -429,99 +422,99 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 焊工资质判断,暂不用
|
||||
//// 焊工资质
|
||||
//foreach (var item in GetWeldingDailyItem)
|
||||
//{
|
||||
// bool canSave = false;
|
||||
// var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId);
|
||||
// var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
|
||||
// string weldTypeGroup = joty.Flag;
|
||||
// string weldTypeCode = joty.WeldTypeCode;
|
||||
// string floorWelder = item.BackingWelderId;
|
||||
// string cellWelder = item.CoverWelderId;
|
||||
// decimal? dia = item.Dia;
|
||||
// decimal? sch = item.Thickness;
|
||||
// //string wme = item.WeldingMethodCode;
|
||||
// //string wmeCode = string.Empty;
|
||||
// //var wm = BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(item.WME_ID);
|
||||
// //if (wm != null)
|
||||
// //{
|
||||
// // wmeCode = wm.WME_Code;
|
||||
// //}
|
||||
#region 焊工资质判断
|
||||
// 焊工资质
|
||||
foreach (var item in GetWeldingDailyItem)
|
||||
{
|
||||
bool canSave = false;
|
||||
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId);
|
||||
var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
|
||||
string weldTypeGroup = joty.Flag;
|
||||
string weldTypeCode = joty.WeldTypeCode;
|
||||
string floorWelder = item.BackingWelderId;
|
||||
string cellWelder = item.CoverWelderId;
|
||||
decimal? dia = item.Dia;
|
||||
decimal? sch = item.Thickness;
|
||||
//string wme = item.WeldingMethodCode;
|
||||
//string wmeCode = string.Empty;
|
||||
//var wm = BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(item.WME_ID);
|
||||
//if (wm != null)
|
||||
//{
|
||||
// wmeCode = wm.WME_Code;
|
||||
//}
|
||||
|
||||
// string[] wmeCodes = item.WeldingMethodCode.Split('+');
|
||||
// string location = item.WeldingLocationCode;
|
||||
// string ste = jot.Material1Id;
|
||||
// var projectWelder = BLL.Welder_ProjectWelderService.GetProjectWelderByProjectIdAndWelderId(this.ProjectId,item.BackingWelderId);
|
||||
// var projectUnit = BLL.Project_UnitService.GetProject_UnitByProjectIdUnitId(this.ProjectId,projectWelder.UnitId);
|
||||
// if (projectUnit != null && projectUnit.WelderQueIsUse == true)
|
||||
// {
|
||||
// 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();
|
||||
string[] wmeCodes = item.WeldingMethodCode.Split('+');
|
||||
string location = item.WeldingLocationCode;
|
||||
string ste = jot.Material1Id;
|
||||
var projectWelder = BLL.Welder_ProjectWelderService.GetProjectWelderByProjectIdAndWelderId(this.ProjectId, item.BackingWelderId);
|
||||
var projectUnit = BLL.Project_UnitService.GetProject_UnitByProjectIdUnitId(this.ProjectId, projectWelder.UnitId);
|
||||
if (projectUnit != null && projectUnit.WelderQueIsUse == true)
|
||||
{
|
||||
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();
|
||||
// // 打底和盖面同一焊工
|
||||
// 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;
|
||||
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 (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);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// canSave = true;
|
||||
// }
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
canSave = true;
|
||||
}
|
||||
|
||||
// if (canSave == false)
|
||||
// {
|
||||
// eventArg = eventArg + jot.WeldJointCode + ",";
|
||||
// }
|
||||
//}
|
||||
if (canSave == false)
|
||||
{
|
||||
eventArg = eventArg + jot.WeldJointCode + ",";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 生成管线的随机数 不用了
|
||||
|
@ -725,7 +718,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||
//}
|
||||
#endregion
|
||||
|
||||
if (!string.IsNullOrEmpty(errorCheck))
|
||||
if (!string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
ShowNotify(errorInfos, MessageBoxIcon.Warning, 10000);
|
||||
return;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(errorCheck))
|
||||
{
|
||||
errorCheck = errorCheck + "请更正后再提交保存";
|
||||
ShowNotify(errorCheck, MessageBoxIcon.Warning, 10000);
|
||||
|
|
Loading…
Reference in New Issue