Compare commits
4 Commits
993b1bd106
...
22fa88f0b5
Author | SHA1 | Date |
---|---|---|
|
22fa88f0b5 | |
|
32d04f78d9 | |
|
3b3f1934f2 | |
|
efdccd2a2a |
|
@ -14,6 +14,7 @@
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using FineUIPro.Web.WeldingProcess.WeldingManage;
|
||||||
|
|
||||||
public class Global : System.Web.HttpApplication
|
public class Global : System.Web.HttpApplication
|
||||||
{
|
{
|
||||||
|
@ -44,11 +45,146 @@
|
||||||
AppDomain.Unload(AppDomain.CurrentDomain);
|
AppDomain.Unload(AppDomain.CurrentDomain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 开启超焊信息提取
|
||||||
|
System.Threading.Thread LoadServiceSuperQue = new System.Threading.Thread(new System.Threading.ThreadStart(SuperQueWelding));
|
||||||
|
LoadServiceSuperQue.Start();
|
||||||
|
|
||||||
// 开启线程
|
// 开启线程
|
||||||
System.Threading.Thread LoadServiceData = new System.Threading.Thread(new System.Threading.ThreadStart(ExpirePoint));
|
System.Threading.Thread LoadServiceData = new System.Threading.Thread(new System.Threading.ThreadStart(ExpirePoint));
|
||||||
LoadServiceData.Start();
|
LoadServiceData.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void SuperQueWelding()
|
||||||
|
{
|
||||||
|
//定义一个定时器,并开启和配置相关属性
|
||||||
|
System.Timers.Timer ExpirePoint = new System.Timers.Timer();
|
||||||
|
//执行任务的周期 ,3小时
|
||||||
|
ExpirePoint.Interval = 1000 * 60 * 60 * 3;
|
||||||
|
ExpirePoint.Enabled = true;
|
||||||
|
ExpirePoint.Start();
|
||||||
|
ExpirePoint.Elapsed += new System.Timers.ElapsedEventHandler(SuperQueWelding_Elapsed);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SuperQueWelding_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
var jotList = (from x in Funs.DB.Pipeline_WeldJoint where x.WeldingDailyId != null && x.WeldingMethodId != null select x).ToList();
|
||||||
|
foreach (var jot in jotList)
|
||||||
|
{
|
||||||
|
var wps = BLL.WPQListServiceService.GetWPQById(jot.WPQId);
|
||||||
|
string floorWelder = jot.BackingWelderId;
|
||||||
|
string cellWelder = jot.CoverWelderId;
|
||||||
|
|
||||||
|
bool canWPS = true;
|
||||||
|
if (wps != null)
|
||||||
|
{
|
||||||
|
// 验证焊工WPS资质
|
||||||
|
if (floorWelder == cellWelder)
|
||||||
|
{
|
||||||
|
if (!wps.WelderIds.Contains(floorWelder))
|
||||||
|
{
|
||||||
|
canWPS = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!wps.WelderIds.Contains(floorWelder))
|
||||||
|
{
|
||||||
|
canWPS = false;
|
||||||
|
}
|
||||||
|
if (!wps.WelderIds.Contains(cellWelder))
|
||||||
|
{
|
||||||
|
canWPS = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证焊工合格项目资质
|
||||||
|
bool canSave = false;
|
||||||
|
var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
|
||||||
|
var mat = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(jot.WeldingMethodId);
|
||||||
|
var loc = BLL.Base_WeldingLocationServie.GetWeldingLocationById(jot.WeldingLocationId);
|
||||||
|
string weldTypeGroup = joty.Flag;
|
||||||
|
string weldTypeCode = joty.WeldTypeCode;
|
||||||
|
decimal? dia = jot.Dia;
|
||||||
|
decimal? sch = jot.Thickness;
|
||||||
|
|
||||||
|
string[] wmeCodes = mat.WeldingMethodCode.Split('+');
|
||||||
|
string location = string.Empty;
|
||||||
|
if (loc != null)
|
||||||
|
{
|
||||||
|
location = loc.WeldingLocationCode;
|
||||||
|
}
|
||||||
|
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> 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 = BLL.WelderQualifiedService.IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||||
|
}
|
||||||
|
else // 大于一种焊接方法,如氩电联焊
|
||||||
|
{
|
||||||
|
canSave = BLL.WelderQualifiedService.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 = BLL.WelderQualifiedService.IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||||
|
}
|
||||||
|
if (cellWelderQualifys != null && cellWelderQualifys.Count() > 0)
|
||||||
|
{
|
||||||
|
isok2 = BLL.WelderQualifiedService.IsOK(cellWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
|
||||||
|
}
|
||||||
|
if (isok1 && isok2)
|
||||||
|
{
|
||||||
|
canSave = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
canSave = BLL.WelderQualifiedService.TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canWPS == false || canSave == false)
|
||||||
|
{
|
||||||
|
jot.IsSuperQueWelding = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jot.IsSuperQueWelding = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ExpirePoint()
|
private void ExpirePoint()
|
||||||
{
|
{
|
||||||
//定义一个定时器,并开启和配置相关属性
|
//定义一个定时器,并开启和配置相关属性
|
||||||
|
|
|
@ -492,8 +492,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
ws.SetColumnWidth(7, 5 * 256);
|
ws.SetColumnWidth(7, 5 * 256);
|
||||||
ws.SetColumnWidth(8, 5 * 256);
|
ws.SetColumnWidth(8, 5 * 256);
|
||||||
ws.SetColumnWidth(9, 5 * 256);
|
ws.SetColumnWidth(9, 5 * 256);
|
||||||
ws.SetColumnWidth(10, 8 * 256);
|
ws.SetColumnWidth(10, 4 * 256);
|
||||||
ws.SetColumnWidth(11, 11 * 256);
|
ws.SetColumnWidth(11, 15 * 256);
|
||||||
ws.SetColumnWidth(12, 8 * 256);
|
ws.SetColumnWidth(12, 8 * 256);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -629,8 +629,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
|
|
||||||
region = new CellRangeAddress(rowIndex + 8, rowIndex + 8, 8, 10);
|
region = new CellRangeAddress(rowIndex + 8, rowIndex + 8, 8, 10);
|
||||||
ws.AddMergedRegion(region);
|
ws.AddMergedRegion(region);
|
||||||
ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue("检件规格");
|
ws.GetRow(rowIndex + 8).GetCell(8).SetCellValue("焊口规格");
|
||||||
ws.GetRow(rowIndex + 8).GetCell(8).SetCellValue("检件材质");
|
ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue("焊口材质");
|
||||||
ws.GetRow(rowIndex + 8).GetCell(12).SetCellValue("备注");
|
ws.GetRow(rowIndex + 8).GetCell(12).SetCellValue("备注");
|
||||||
|
|
||||||
|
|
||||||
|
@ -680,11 +680,11 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
|
|
||||||
//焊口号
|
//焊口号
|
||||||
ws.GetRow(dataIndex).GetCell(4).SetCellValue(pageTb.Rows[j]["WeldJointCode"].ToString());
|
ws.GetRow(dataIndex).GetCell(4).SetCellValue(pageTb.Rows[j]["WeldJointCode"].ToString());
|
||||||
//焊工代号
|
// 焊工代号
|
||||||
ws.GetRow(dataIndex).GetCell(6).SetCellValue(pageTb.Rows[j]["WelderCode"].ToString());
|
ws.GetRow(dataIndex).GetCell(6).SetCellValue(pageTb.Rows[j]["WelderCode"].ToString());
|
||||||
//检件材质
|
// 检件规格(mm)
|
||||||
ws.GetRow(dataIndex).GetCell(8).SetCellValue(pageTb.Rows[j]["Specification"].ToString());
|
ws.GetRow(dataIndex).GetCell(8).SetCellValue(pageTb.Rows[j]["Specification"].ToString());
|
||||||
//检件规格(mm)
|
// 检件材质
|
||||||
ws.GetRow(dataIndex).GetCell(11).SetCellValue(pageTb.Rows[j]["MaterialCode"].ToString());
|
ws.GetRow(dataIndex).GetCell(11).SetCellValue(pageTb.Rows[j]["MaterialCode"].ToString());
|
||||||
//备注
|
//备注
|
||||||
ws.GetRow(dataIndex).GetCell(12).SetCellValue(pageTb.Rows[j]["Remark"].ToString());
|
ws.GetRow(dataIndex).GetCell(12).SetCellValue(pageTb.Rows[j]["Remark"].ToString());
|
||||||
|
|
|
@ -1026,7 +1026,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
{
|
{
|
||||||
List<string> weldMot = new List<string>();
|
List<string> weldMot = new List<string>();
|
||||||
List<string> grooveType = new List<string>();
|
List<string> grooveType = new List<string>();
|
||||||
List<bool> IsFist = new List<bool>();
|
//List<bool> IsFist = new List<bool>();
|
||||||
string error = string.Empty;
|
string error = string.Empty;
|
||||||
|
|
||||||
foreach (string pointItemId in selectRow)
|
foreach (string pointItemId in selectRow)
|
||||||
|
@ -1035,7 +1035,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(pointItem.WeldJointId);
|
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(pointItem.WeldJointId);
|
||||||
weldMot.Add(jot.WeldingMethodId);
|
weldMot.Add(jot.WeldingMethodId);
|
||||||
grooveType.Add(jot.GrooveTypeId);
|
grooveType.Add(jot.GrooveTypeId);
|
||||||
IsFist.Add(pointItem.IsWelderFirst == true ? true : false);
|
//IsFist.Add(pointItem.IsWelderFirst == true ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (weldMot.Distinct().Count() > 1)
|
if (weldMot.Distinct().Count() > 1)
|
||||||
|
@ -1046,10 +1046,10 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
{
|
{
|
||||||
error = error + "勾选的焊口坡口类型不一至,";
|
error = error + "勾选的焊口坡口类型不一至,";
|
||||||
}
|
}
|
||||||
if (IsFist.Distinct().Count() > 1)
|
//if (IsFist.Distinct().Count() > 1)
|
||||||
{
|
//{
|
||||||
error = error + "勾选的焊口是否首三不一至,";
|
// error = error + "勾选的焊口是否首三不一至,";
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (error == string.Empty)
|
if (error == string.Empty)
|
||||||
{
|
{
|
||||||
|
@ -1076,7 +1076,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
newBatchTrust.WorkAreaId = iso.WorkAreaId;
|
newBatchTrust.WorkAreaId = iso.WorkAreaId;
|
||||||
newBatchTrust.WeldingMethodId = weldMot[0];
|
newBatchTrust.WeldingMethodId = weldMot[0];
|
||||||
newBatchTrust.GrooveTypeId = grooveType[0];
|
newBatchTrust.GrooveTypeId = grooveType[0];
|
||||||
newBatchTrust.IsWelderFirst = IsFist[0];
|
//newBatchTrust.IsWelderFirst = IsFist[0];
|
||||||
newBatchTrust.DetectionTypeId = point.DetectionTypeId;
|
newBatchTrust.DetectionTypeId = point.DetectionTypeId;
|
||||||
newBatchTrust.PipelineId = point.PipelineId;
|
newBatchTrust.PipelineId = point.PipelineId;
|
||||||
|
|
||||||
|
@ -1182,7 +1182,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
newBatchTrust.WorkAreaId = trust.WorkAreaId;
|
newBatchTrust.WorkAreaId = trust.WorkAreaId;
|
||||||
newBatchTrust.WeldingMethodId = trust.WeldingMethodId;
|
newBatchTrust.WeldingMethodId = trust.WeldingMethodId;
|
||||||
newBatchTrust.GrooveTypeId = trust.GrooveTypeId;
|
newBatchTrust.GrooveTypeId = trust.GrooveTypeId;
|
||||||
newBatchTrust.IsWelderFirst = Convert.ToBoolean(trust.IsWelderFirst);
|
//newBatchTrust.IsWelderFirst = Convert.ToBoolean(trust.IsWelderFirst);
|
||||||
newBatchTrust.DetectionTypeId = trust.DetectionTypeId;
|
newBatchTrust.DetectionTypeId = trust.DetectionTypeId;
|
||||||
newBatchTrust.PipelineId = trust.PipelineId;
|
newBatchTrust.PipelineId = trust.PipelineId;
|
||||||
|
|
||||||
|
@ -1193,7 +1193,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
where x.ProjectId == trust.ProjectId && x.InstallationId == trust.InstallationId
|
where x.ProjectId == trust.ProjectId && x.InstallationId == trust.InstallationId
|
||||||
&& x.WorkAreaId == trust.WorkAreaId && x.UnitId == trust.UnitId
|
&& x.WorkAreaId == trust.WorkAreaId && x.UnitId == trust.UnitId
|
||||||
&& x.WeldingMethodId==trust.WeldingMethodId && x.GrooveTypeId==trust.GrooveTypeId
|
&& x.WeldingMethodId==trust.WeldingMethodId && x.GrooveTypeId==trust.GrooveTypeId
|
||||||
&& x.IsWelderFirst==trust.IsWelderFirst && x.DetectionTypeId == trust.DetectionTypeId
|
&& x.DetectionTypeId == trust.DetectionTypeId
|
||||||
&& x.PipelineId == trust.PipelineId
|
&& x.PipelineId == trust.PipelineId
|
||||||
select x;
|
select x;
|
||||||
string toPointBatch = string.Empty;
|
string toPointBatch = string.Empty;
|
||||||
|
|
|
@ -276,10 +276,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
{
|
{
|
||||||
result += "焊口已委托" + "|";
|
result += "焊口已委托" + "|";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
t.IsWelderFirst = pointBatchItem.IsWelderFirst;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(col6))
|
if (!string.IsNullOrEmpty(col6))
|
||||||
|
@ -484,7 +481,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
t.DetectionTypeId = nde.DetectionTypeId;
|
t.DetectionTypeId = nde.DetectionTypeId;
|
||||||
|
|
||||||
var pointBatchItem = trustIn.FirstOrDefault(x => x.WorkAreaId == workArea.WorkAreaId && x.PipelineId == pipe.PipelineId && x.WeldJointId == jot.WeldJointId && x.DetectionTypeId == nde.DetectionTypeId);
|
var pointBatchItem = trustIn.FirstOrDefault(x => x.WorkAreaId == workArea.WorkAreaId && x.PipelineId == pipe.PipelineId && x.WeldJointId == jot.WeldJointId && x.DetectionTypeId == nde.DetectionTypeId);
|
||||||
t.IsWelderFirst = pointBatchItem.IsWelderFirst;
|
//t.IsWelderFirst = pointBatchItem.IsWelderFirst;
|
||||||
t.AcceptStandard = pointBatchItem.PointBatchItemId; // 作为点口明细ID
|
t.AcceptStandard = pointBatchItem.PointBatchItemId; // 作为点口明细ID
|
||||||
t.TopointBatch = pointBatchItem.PointBatchId;
|
t.TopointBatch = pointBatchItem.PointBatchId;
|
||||||
|
|
||||||
|
@ -530,7 +527,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
newBatchTrust.WorkAreaId = t.First().WorkAreaId;
|
newBatchTrust.WorkAreaId = t.First().WorkAreaId;
|
||||||
newBatchTrust.WeldingMethodId = t.First().WeldingMethodId;
|
newBatchTrust.WeldingMethodId = t.First().WeldingMethodId;
|
||||||
newBatchTrust.GrooveTypeId = t.First().GrooveTypeId;
|
newBatchTrust.GrooveTypeId = t.First().GrooveTypeId;
|
||||||
newBatchTrust.IsWelderFirst = t.First().IsWelderFirst;
|
//newBatchTrust.IsWelderFirst = t.First().IsWelderFirst;
|
||||||
newBatchTrust.DetectionTypeId = t.First().DetectionTypeId;
|
newBatchTrust.DetectionTypeId = t.First().DetectionTypeId;
|
||||||
newBatchTrust.PipelineId = t.First().PipelineId;
|
newBatchTrust.PipelineId = t.First().PipelineId;
|
||||||
newBatchTrust.TopointBatch = t.First().TopointBatch;
|
newBatchTrust.TopointBatch = t.First().TopointBatch;
|
||||||
|
|
|
@ -1714,8 +1714,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
ws.SetColumnWidth(7, 5 * 256);
|
ws.SetColumnWidth(7, 5 * 256);
|
||||||
ws.SetColumnWidth(8, 5 * 256);
|
ws.SetColumnWidth(8, 5 * 256);
|
||||||
ws.SetColumnWidth(9, 5 * 256);
|
ws.SetColumnWidth(9, 5 * 256);
|
||||||
ws.SetColumnWidth(10, 8 * 256);
|
ws.SetColumnWidth(10, 4 * 256);
|
||||||
ws.SetColumnWidth(11, 11 * 256);
|
ws.SetColumnWidth(11, 15 * 256);
|
||||||
ws.SetColumnWidth(12, 8 * 256);
|
ws.SetColumnWidth(12, 8 * 256);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -1853,8 +1853,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
|
|
||||||
region = new CellRangeAddress(rowIndex + 8, rowIndex + 8, 8, 10);
|
region = new CellRangeAddress(rowIndex + 8, rowIndex + 8, 8, 10);
|
||||||
ws.AddMergedRegion(region);
|
ws.AddMergedRegion(region);
|
||||||
ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue("检件规格");
|
ws.GetRow(rowIndex + 8).GetCell(8).SetCellValue("焊口规格");
|
||||||
ws.GetRow(rowIndex + 8).GetCell(8).SetCellValue("检件材质");
|
ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue("焊口材质");
|
||||||
ws.GetRow(rowIndex + 8).GetCell(12).SetCellValue("备注");
|
ws.GetRow(rowIndex + 8).GetCell(12).SetCellValue("备注");
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
<Items>
|
<Items>
|
||||||
<f:TextBox ID="txtCoode" runat="server" Label="物料码"
|
<f:TextBox ID="txtCoode" runat="server" Label="物料码"
|
||||||
EmptyText="<%$ Resources:Lan,EnterQueryConditions %>" Width="250px" LabelWidth="120px" LabelAlign="Right">
|
EmptyText="<%$ Resources:Lan,EnterQueryConditions %>" Width="250px" LabelWidth="120px" LabelAlign="Right">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:TextBox ID="txtHeartNo" runat="server" Label="炉批号"
|
||||||
|
EmptyText="<%$ Resources:Lan,EnterQueryConditions %>" Width="250px" LabelWidth="120px" LabelAlign="Right">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
<f:Button ID="btnQuery" ToolTip="<%$ Resources:Lan,Inquiry %>" Icon="SystemSearch"
|
<f:Button ID="btnQuery" ToolTip="<%$ Resources:Lan,Inquiry %>" Icon="SystemSearch"
|
||||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||||
|
|
|
@ -55,6 +55,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
listStr.Add(new SqlParameter("@Coode", "%" + this.txtCoode.Text.Trim() + "%"));
|
listStr.Add(new SqlParameter("@Coode", "%" + this.txtCoode.Text.Trim() + "%"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(this.txtHeartNo.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " AND HeartNo LIKE @HeartNo";
|
||||||
|
listStr.Add(new SqlParameter("@HeartNo", "%" + this.txtHeartNo.Text.Trim() + "%"));
|
||||||
|
}
|
||||||
|
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
|
||||||
|
@ -368,12 +374,20 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
coodeList.Add(d);
|
coodeList.Add(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
var coodeGroup = coodeList.GroupBy(x => new { x.Coode, x.HeartNo }).Select(g => new { Coode = g.Key.Coode, HeartNo = g.Key.HeartNo });
|
var coodeGroup = coodeList.GroupBy(x => new { x.Coode, x.HeartNo }).Select(g => new { Coode = g.Key.Coode, HeartNo = g.Key.HeartNo }).Distinct();
|
||||||
if (coodeList.Count() != coodeGroup.Count())
|
foreach (var c in coodeGroup)
|
||||||
{
|
{
|
||||||
errorInfos += "Coode对应的炉批号有重复!";
|
var coodeNum=from x in coodeList where x.Coode==c.Coode && x.HeartNo==c.HeartNo select x;
|
||||||
|
if (coodeNum.Count() > 1)
|
||||||
|
{
|
||||||
|
errorInfos += "coode码:"+c.Coode+"炉批号:"+c.HeartNo+"有重复!";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if (coodeList.Count() != coodeGroup.Count())
|
||||||
|
//{
|
||||||
|
// errorInfos += "Coode对应的炉批号有重复!";
|
||||||
|
//}
|
||||||
|
|
||||||
// 数据验证错误,返回
|
// 数据验证错误,返回
|
||||||
if (!string.IsNullOrEmpty(errorInfos))
|
if (!string.IsNullOrEmpty(errorInfos))
|
||||||
|
|
|
@ -68,6 +68,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtCoode;
|
protected global::FineUIPro.TextBox txtCoode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtHeartNo 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtHeartNo;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnQuery 控件。
|
/// btnQuery 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1042,7 +1042,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
var cood = coodeList.FirstOrDefault(x =>x.IsUse==true && x.Coode == d.Coode1 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号1"].ToString());
|
var cood = coodeList.FirstOrDefault(x =>x.IsUse==true && x.Coode == d.Coode1 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号1"].ToString());
|
||||||
if (cood == null)
|
if (cood == null)
|
||||||
{
|
{
|
||||||
errorInfos += "炉批号1:[" + ds.Tables[0].Rows[i]["炉批号1"].ToString() + "]或对应的Coode1不存在;";
|
errorInfos += "炉批号1:[" + ds.Tables[0].Rows[i]["炉批号1"].ToString() + "]或对应的Coode1:"+d.Coode1+"不存在;";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1059,7 +1059,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
var cood = coodeList.FirstOrDefault(x => x.IsUse == true && x.Coode == d.Coode2 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号2"].ToString());
|
var cood = coodeList.FirstOrDefault(x => x.IsUse == true && x.Coode == d.Coode2 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号2"].ToString());
|
||||||
if (cood == null)
|
if (cood == null)
|
||||||
{
|
{
|
||||||
errorInfos += "炉批号2:[" + ds.Tables[0].Rows[i]["炉批号2"].ToString() + "]或对应的Coode2不存在;";
|
errorInfos += "炉批号2:[" + ds.Tables[0].Rows[i]["炉批号2"].ToString() + "]或对应的Coode2:"+ d.Coode2 + "不存在;";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -37501,8 +37501,6 @@ namespace Model
|
||||||
|
|
||||||
private string _GrooveTypeId;
|
private string _GrooveTypeId;
|
||||||
|
|
||||||
private int _IsWelderFirst;
|
|
||||||
|
|
||||||
public View_GenerateTrust_FJ()
|
public View_GenerateTrust_FJ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -37650,22 +37648,6 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsWelderFirst", DbType="Int NOT NULL")]
|
|
||||||
public int IsWelderFirst
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this._IsWelderFirst;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if ((this._IsWelderFirst != value))
|
|
||||||
{
|
|
||||||
this._IsWelderFirst = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_GenerateTrustItem")]
|
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_GenerateTrustItem")]
|
||||||
|
@ -37841,8 +37823,6 @@ namespace Model
|
||||||
|
|
||||||
private string _GrooveTypeId;
|
private string _GrooveTypeId;
|
||||||
|
|
||||||
private int _IsWelderFirst;
|
|
||||||
|
|
||||||
private System.Nullable<int> _DetectionRateValue;
|
private System.Nullable<int> _DetectionRateValue;
|
||||||
|
|
||||||
private string _PointBatchItemId;
|
private string _PointBatchItemId;
|
||||||
|
@ -37985,22 +37965,6 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsWelderFirst", DbType="Int NOT NULL")]
|
|
||||||
public int IsWelderFirst
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this._IsWelderFirst;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if ((this._IsWelderFirst != value))
|
|
||||||
{
|
|
||||||
this._IsWelderFirst = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionRateValue", DbType="Int")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionRateValue", DbType="Int")]
|
||||||
public System.Nullable<int> DetectionRateValue
|
public System.Nullable<int> DetectionRateValue
|
||||||
{
|
{
|
||||||
|
@ -43368,8 +43332,6 @@ namespace Model
|
||||||
|
|
||||||
private string _DetectionTypeCode;
|
private string _DetectionTypeCode;
|
||||||
|
|
||||||
private System.Nullable<bool> _IsWelderFirst;
|
|
||||||
|
|
||||||
private string _TrustBatchItemId;
|
private string _TrustBatchItemId;
|
||||||
|
|
||||||
public View_TrustBathcIn()
|
public View_TrustBathcIn()
|
||||||
|
@ -43584,22 +43546,6 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsWelderFirst", DbType="Bit")]
|
|
||||||
public System.Nullable<bool> IsWelderFirst
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this._IsWelderFirst;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if ((this._IsWelderFirst != value))
|
|
||||||
{
|
|
||||||
this._IsWelderFirst = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrustBatchItemId", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrustBatchItemId", DbType="NVarChar(50)")]
|
||||||
public string TrustBatchItemId
|
public string TrustBatchItemId
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue