diff --git a/DataBase/hjglDB_7_2024.06.13(本机).rar b/DataBase/hjglDB_7_2024.06.13(本机).rar
new file mode 100644
index 0000000..b5220eb
Binary files /dev/null and b/DataBase/hjglDB_7_2024.06.13(本机).rar differ
diff --git a/HJGL/.vs/HJGL/config/applicationhost.config b/HJGL/.vs/HJGL/config/applicationhost.config
index e47cfd0..1963de0 100644
--- a/HJGL/.vs/HJGL/config/applicationhost.config
+++ b/HJGL/.vs/HJGL/config/applicationhost.config
@@ -162,7 +162,7 @@
-
+
@@ -250,7 +250,7 @@
-
+
diff --git a/HJGL/BLL/WeldingProcess/WelderTest/WelderTestService.cs b/HJGL/BLL/WeldingProcess/WelderTest/WelderTestService.cs
index 19084de..9279d86 100644
--- a/HJGL/BLL/WeldingProcess/WelderTest/WelderTestService.cs
+++ b/HJGL/BLL/WeldingProcess/WelderTest/WelderTestService.cs
@@ -32,7 +32,7 @@ namespace BLL
{
return ;
}
- result.WelderId = input.WelderId;
+ //result.WelderId = input.WelderId;
result.WeldMethodId = input.WeldMethodId;
result.MaterialId = input.MaterialId;
result.Remark = input.Remark;
diff --git a/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx b/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx
index b38e1dc..e1b12af 100644
--- a/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx
+++ b/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx
@@ -33,9 +33,12 @@
-
+
diff --git a/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx.cs b/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx.cs
index ff1df69..89b1b42 100644
--- a/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx.cs
+++ b/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx.cs
@@ -342,7 +342,28 @@ namespace FineUIPro.Web.PublicInfo.WPQ
string wpsId = Grid1.SelectedRowID;
var wps=BLL.WPQListServiceService.GetWPQById(wpsId);
var welderList = from x in Funs.DB.Welder_ProjectWelder where x.ProjectId == this.CurrUser.LoginProjectId select x;
-
+ string materialStr = string.Empty;
+
+ if (wps.MaterialId1 != null)
+ {
+ string[] matList = wps.MaterialId1.Split('|');
+
+ foreach (var matId in matList)
+ {
+ var mat = from x in Funs.DB.Base_Material where x.MaterialId == matId select x;
+ if (mat.Count() > 0 && !materialStr.Contains(mat.First().MaterialType))
+ {
+ materialStr += mat.First().MaterialType + ",";
+ }
+
+ }
+ }
+ if (materialStr != null)
+ {
+ materialStr = materialStr.Substring(0, materialStr.Length - 1);
+ }
+ string[] wpsMaterial = materialStr.Split(',');
+
if (welderList.Count() > 0)
{
string testWelder = string.Empty;
@@ -354,14 +375,81 @@ namespace FineUIPro.Web.PublicInfo.WPQ
{
foreach (var t in welderTestList)
{
- if (wps.MaterialId1.Contains(t.MaterialId) && wps.WeldingMethodId != null && wps.WeldingMethodId.Contains(t.WeldMethodId) && t.IsPass == true)
+ if (t.MaterialId != null && wps.WeldingMethodId != null)
{
- testWelder += welder.WelderId+"|";
- break;
+ string[] testMaterial = t.MaterialId.Split(',');
+ if (wpsMaterial.All(x => testMaterial.Contains(x)) && wps.WeldingMethodId.Contains(t.WeldMethodId) && t.IsPass == true)
+ {
+ testWelder += welder.WelderId + "|";
+ break;
+ }
}
}
}
+ }
+ if (testWelder != string.Empty)
+ {
+ testWelder = testWelder.Substring(0, testWelder.Length - 1);
+ wps.WelderIds = testWelder;
+ Funs.DB.SubmitChanges();
+ ShowNotify("该WPS的可焊焊工已匹配!", MessageBoxIcon.Success);
+ BindGrid();
+ }
+ else
+ {
+ ShowNotify("没有可匹配的焊工!", MessageBoxIcon.Success);
+ }
+ }
+ }
+ protected void BatchExtract_Click(object sender, EventArgs e)
+ {
+ var wpsList = from x in Funs.DB.WPQ_WPQList where x.ProjectId == CurrUser.LoginProjectId select x;
+ var welderList = from x in Funs.DB.Welder_ProjectWelder where x.ProjectId == this.CurrUser.LoginProjectId select x;
+ foreach (var wps in wpsList)
+ {
+ string testWelder = string.Empty;
+ string materialStr = string.Empty;
+
+ if (wps.MaterialId1 != null)
+ {
+ string[] matList = wps.MaterialId1.Split('|');
+
+ foreach (var matId in matList)
+ {
+ var mat = from x in Funs.DB.Base_Material where x.MaterialId == matId select x;
+ if (mat.Count() > 0 && !materialStr.Contains(mat.First().MaterialType))
+ {
+ materialStr += mat.First().MaterialType + ",";
+ }
+
+ }
+ }
+ if (materialStr != null)
+ {
+ materialStr = materialStr.Substring(0, materialStr.Length - 1);
+ }
+ string[] wpsMaterial = materialStr.Split(',');
+
+ // 焊工考试情况
+ foreach (var welder in welderList)
+ {
+ var welderTestList = from x in Funs.DB.Welder_TestInfo where x.WelderId == welder.WelderId select x;
+ if (welderTestList.Count() > 0)
+ {
+ foreach (var t in welderTestList)
+ {
+ if (t.MaterialId != null && wps.WeldingMethodId != null)
+ {
+ string[] testMaterial = t.MaterialId.Split(',');
+ if (wpsMaterial.All(x => testMaterial.Contains(x)) && wps.WeldingMethodId.Contains(t.WeldMethodId) && t.IsPass == true)
+ {
+ testWelder += welder.WelderId + "|";
+ break;
+ }
+ }
+ }
+ }
}
if (testWelder != string.Empty)
{
@@ -370,6 +458,9 @@ namespace FineUIPro.Web.PublicInfo.WPQ
Funs.DB.SubmitChanges();
}
}
+
+ BindGrid();
+ ShowNotify("所有WPS可焊焊工已匹配!", MessageBoxIcon.Success);
}
#endregion
diff --git a/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx.designer.cs b/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx.designer.cs
index 2085aec..4f5d3f0 100644
--- a/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx.designer.cs
+++ b/HJGL/FineUIPro.Web/PublicInfo/WPQ/WPQList.aspx.designer.cs
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.PublicInfo.WPQ
///
protected global::FineUIPro.Button btnExtract;
+ ///
+ /// btnBatchExtract 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnBatchExtract;
+
///
/// lblNumber 控件。
///
diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx
index 72b23e5..d826a9b 100644
--- a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx
+++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx
@@ -81,7 +81,7 @@
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" HeaderText="焊接方法" Locked="true">
-
+ Width="900" Height="520px">