From 66db11bdb46a983c9d786116e1d9bd05bbac23e5 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 10 Aug 2026 17:17:52 +0800 Subject: [PATCH] 1 --- HJGL_DS/BLL/API/APIBaseServices.cs | 8 +- HJGL_DS/BLL/API/APIJointInfoService.cs | 14 +++- .../WeldingManage/HJGL_PW_JointInfoService.cs | 1 + HJGL_DS/FineUIPro.Web/Web.config | 2 +- HJGL_DS/Model/APIItem/JointInfoItem.cs | 27 ++++++- HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs | 8 ++ HJGL_DS/WebAPI/Controllers/BaseController.cs | 12 +-- .../WebAPI/Controllers/JointInfoController.cs | 73 ++++++++++++++----- .../PublishProfiles/FolderProfile.pubxml.user | 18 ++--- 9 files changed, 119 insertions(+), 44 deletions(-) diff --git a/HJGL_DS/BLL/API/APIBaseServices.cs b/HJGL_DS/BLL/API/APIBaseServices.cs index dfbd69a..ec8b904 100644 --- a/HJGL_DS/BLL/API/APIBaseServices.cs +++ b/HJGL_DS/BLL/API/APIBaseServices.cs @@ -242,13 +242,13 @@ namespace BLL.API return respone; } - public static Model.ResponeData weldSilkList() + public static Model.ResponeData weldSilkList(string str) { Model.ResponeData respone = new ResponeData(); using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var q = from x in db.View_WeldInfoDropDownLists - where x.WeldTypeName.Contains("焊丝") + where x.WeldTypeName.Contains("焊丝") && x.WeldName.Contains(str) select x; List res = new List(); foreach (var p in q) @@ -264,13 +264,13 @@ namespace BLL.API return respone; } - public static Model.ResponeData weldMatList() + public static Model.ResponeData weldMatList(string str) { Model.ResponeData respone = new ResponeData(); using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var q = from x in db.View_WeldInfoDropDownLists - where x.WeldTypeName.Contains("焊条") + where x.WeldTypeName.Contains("焊条") && x.WeldName.Contains(str) select x; List res = new List(); foreach (var p in q) diff --git a/HJGL_DS/BLL/API/APIJointInfoService.cs b/HJGL_DS/BLL/API/APIJointInfoService.cs index 7932f76..607a00b 100644 --- a/HJGL_DS/BLL/API/APIJointInfoService.cs +++ b/HJGL_DS/BLL/API/APIJointInfoService.cs @@ -254,9 +254,9 @@ namespace BLL //newJointInfo.JOT_JointAttribute = newJointInfo.JOT_JointAttribute; newJointInfo.JOT_Location = addItem.JOT_Location; //newJointInfo.JOT_Sch = newJointInfo.JOT_Sch; - //newJointInfo.WME_ID = item.WME_ID; - //newJointInfo.JOT_WeldMat = item.JOT_WeldMat; - //newJointInfo.JOT_WeldSilk = item.JOT_WeldSilk; + newJointInfo.WME_ID = addItem.WME_ID; + newJointInfo.JOT_WeldMat = addItem.JOT_WeldMat; + newJointInfo.JOT_WeldSilk = addItem.JOT_WeldSilk; //if (item.JOT_Dia.HasValue) //{ @@ -424,6 +424,10 @@ namespace BLL strSql += " AND TestPackage =@TestPackage"; listStr.Add(new SqlParameter("@TestPackage", newJointInfo.PressureTestPackageNo)); } + if (newJointInfo.IsGold == true) //黄金口单独组批 + { + strSql += " AND IsGold =1"; + } SqlParameter[] parameter = listStr.ToArray(); DataTable batchInfo = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -460,6 +464,10 @@ namespace BLL batch.SER_ID = isoInfo.SER_ID; batch.TestPackage = newJointInfo.PressureTestPackageNo; batch.BatchStartDate = addItem.WeldDate; + if (newJointInfo.IsGold == true) //黄金口单独组批 + { + batch.IsGold = true; + } BLL.HJGL_BO_BatchService.AddBatch(batch); } else diff --git a/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_JointInfoService.cs b/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_JointInfoService.cs index 8770e1f..e0a5314 100644 --- a/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_JointInfoService.cs +++ b/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_JointInfoService.cs @@ -1391,6 +1391,7 @@ namespace BLL newWeldReportItem.JOT_ID = jotInfo.JOT_ID; newWeldReportItem.JOT_JointNo = jotInfo.JOT_JointNo; newWeldReportItem.ProjectId = jotInfo.ProjectId; + newWeldReportItem.DReportID = jotInfo.DReportID; var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(jotInfo.ISO_ID); if (isoInfo != null) { diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 3c98f31..070a5f8 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -11,7 +11,7 @@ - + diff --git a/HJGL_DS/Model/APIItem/JointInfoItem.cs b/HJGL_DS/Model/APIItem/JointInfoItem.cs index fef2851..02917b8 100644 --- a/HJGL_DS/Model/APIItem/JointInfoItem.cs +++ b/HJGL_DS/Model/APIItem/JointInfoItem.cs @@ -103,7 +103,14 @@ namespace Model get; set; } - + /// + /// 焊接方法id + /// + public string WME_ID + { + get; + set; + } /// /// 焊接方法 /// @@ -210,5 +217,23 @@ namespace Model get; set; } + + /// + /// 焊条Id + /// + public string JOT_WeldMat + { + get; + set; + } + + /// + /// 焊丝Id + /// + public string JOT_WeldSilk + { + get; + set; + } } } diff --git a/HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs b/HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs index 74f3fc1..6cafa61 100644 --- a/HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs +++ b/HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs @@ -59,6 +59,14 @@ namespace Model set; } /// + /// 日报id + /// + public string DReportID + { + get; + set; + } + /// /// 项目号 /// public string ProjectCode diff --git a/HJGL_DS/WebAPI/Controllers/BaseController.cs b/HJGL_DS/WebAPI/Controllers/BaseController.cs index e9e64ef..58e6140 100644 --- a/HJGL_DS/WebAPI/Controllers/BaseController.cs +++ b/HJGL_DS/WebAPI/Controllers/BaseController.cs @@ -219,13 +219,13 @@ namespace WebAPI.Controllers } [HttpGet] - public Model.ResponeData weldSilkList() + public Model.ResponeData weldSilkList(string str) { Model.ResponeData respone = new ResponeData(); try { - - return APIBaseServices.weldSilkList(); + string s = !string.IsNullOrEmpty(str) ? str : string.Empty; + return APIBaseServices.weldSilkList(s); } catch (Exception e) { @@ -236,13 +236,13 @@ namespace WebAPI.Controllers } [HttpGet] - public Model.ResponeData weldMatList() + public Model.ResponeData weldMatList(string str) { Model.ResponeData respone = new ResponeData(); try { - - return APIBaseServices.weldMatList(); + string s = !string.IsNullOrEmpty(str) ? str : string.Empty; + return APIBaseServices.weldMatList(s); } catch (Exception e) { diff --git a/HJGL_DS/WebAPI/Controllers/JointInfoController.cs b/HJGL_DS/WebAPI/Controllers/JointInfoController.cs index ca02e3a..332f912 100644 --- a/HJGL_DS/WebAPI/Controllers/JointInfoController.cs +++ b/HJGL_DS/WebAPI/Controllers/JointInfoController.cs @@ -105,27 +105,33 @@ namespace WebAPI.Controllers addItem.ProjectId = joint.ProjectId; } } - var cellWelderMan = db.HJGL_BS_Welder.FirstOrDefault(x => x.WED_Code == addItem.JOT_CellWelder); - if (cellWelderMan == null) + var cellWelderMan = db.HJGL_BS_Welder.FirstOrDefault(x => x.WED_ID == addItem.JOT_CellWelderID); + if (!string.IsNullOrEmpty(addItem.JOT_CellWelderID)) { - responeData.code = 0; - responeData.message = "焊工号" + addItem.JOT_CellWelder + "不存在!"; - return responeData; + if (cellWelderMan == null) + { + responeData.code = 0; + responeData.message = "焊工" + addItem.JOT_CellWelder + "不存在!"; + return responeData; + } + else + { + addItem.JOT_CellWelderID = cellWelderMan.WED_ID; + } } - else + var floorWelderMan = db.HJGL_BS_Welder.FirstOrDefault(x => x.WED_ID == addItem.JOT_FloorWelderID); + if (!string.IsNullOrEmpty(addItem.JOT_FloorWelderID)) { - addItem.JOT_CellWelderID = cellWelderMan.WED_ID; - } - var floorWelderMan = db.HJGL_BS_Welder.FirstOrDefault(x => x.WED_Code == addItem.JOT_FloorWelder); - if (floorWelderMan == null) - { - responeData.code = 0; - responeData.message = "焊工号" + addItem.JOT_FloorWelder + "不存在!"; - return responeData; - } - else - { - addItem.JOT_FloorWelderID = floorWelderMan.WED_ID; + if (floorWelderMan == null) + { + responeData.code = 0; + responeData.message = "焊工" + addItem.JOT_FloorWelder + "不存在!"; + return responeData; + } + else + { + addItem.JOT_FloorWelderID = floorWelderMan.WED_ID; + } } var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", addItem.ProjectId); if (batchC == null) @@ -137,9 +143,10 @@ namespace WebAPI.Controllers var weldMethod = db.HJGL_BS_WeldMethod.FirstOrDefault(x => x.WME_ID == joint.WME_ID); var locationItem = BLL.DropListService.HJGL_JOT_LocationItem().FirstOrDefault(x => x.Text == addItem.JOT_Location); var welderQualifiedProjects = from x in db.HJGL_BS_WelderQualifiedProject select x; - bool canSave = false; + bool canSave = false, isTwoWelder = false; if (!string.IsNullOrEmpty(joint.JOTY_ID) && cellWelderMan != null && floorWelderMan != null && weldMethod != null && locationItem != null) { + isTwoWelder = true; var joty = db.HJGL_BS_JointType.FirstOrDefault(x => x.JOTY_ID == joint.JOTY_ID); string weldType = joty.JOTY_Group; string floorWelder = floorWelderMan.WED_ID; @@ -225,7 +232,33 @@ namespace WebAPI.Controllers } } } - BLL.APIJointInfoService.SaveJointInfoForWeldReport(addItem); + if (isTwoWelder) //两个焊工全部选择后提交日报 + { + BLL.APIJointInfoService.SaveJointInfoForWeldReport(addItem); + } + else + { + var newJointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(addItem.JOT_ID); + newJointInfo.JOT_JointStatus = "100"; + if (!string.IsNullOrEmpty(addItem.JOT_CellWelderID)) + { + newJointInfo.JOT_CellWelder = addItem.JOT_CellWelderID; + } + if (!string.IsNullOrEmpty(addItem.JOT_FloorWelderID)) + { + newJointInfo.JOT_FloorWelder = addItem.JOT_FloorWelderID; + } + newJointInfo.JOT_DoneDin = newJointInfo.JOT_Size; + newJointInfo.JOT_Location = addItem.JOT_Location; + newJointInfo.WME_ID = addItem.WME_ID; + newJointInfo.JOT_WeldMat = addItem.JOT_WeldMat; + newJointInfo.JOT_WeldSilk = addItem.JOT_WeldSilk; + if (newJointInfo.WeldL.HasValue) + { + newJointInfo.JOT_JointDesc = "L=" + newJointInfo.WeldL.Value.ToString(); + } + BLL.HJGL_PW_JointInfoService.UpdateJointInfoByDReport(newJointInfo); + } } } catch (Exception ex) diff --git a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index b1bcbc9..eea419c 100644 --- a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -85,13 +85,13 @@ 04/12/2024 09:54:20 - 08/07/2026 17:27:28 + 08/10/2026 15:15:48 12/31/2025 16:32:37 - 08/07/2026 17:27:28 + 08/10/2026 15:15:48 12/17/2020 21:32:28 @@ -121,10 +121,10 @@ 07/25/2012 11:48:56 - 08/07/2026 17:27:27 + 08/10/2026 15:15:48 - 08/07/2026 17:27:27 + 08/10/2026 15:15:48 11/28/2018 02:07:34 @@ -295,13 +295,13 @@ 05/24/2018 13:38:24 - 08/07/2026 17:27:34 + 08/10/2026 15:15:55 07/28/2025 11:00:31 - 08/07/2026 17:27:34 + 08/10/2026 15:15:55 02/01/2018 12:17:18 @@ -337,10 +337,10 @@ 06/29/2015 16:49:52 - 08/07/2026 17:27:36 + 08/10/2026 15:15:57 - 08/07/2026 17:27:36 + 08/10/2026 15:15:57 01/23/2014 13:57:34 @@ -466,7 +466,7 @@ 07/03/2024 11:01:07 - 08/07/2026 17:27:41 + 08/10/2026 15:16:11 \ No newline at end of file