From 6b3c4d87c500442f9774904c6a1117fe7cee5b5f Mon Sep 17 00:00:00 2001 From: 如洲 陈 <1278080563@qq.com> Date: 星期三, 24 九月 2025 17:50:40 +0800 Subject: [PATCH] 退货检验平板优化、任务单加序列号 --- MESApplication/bin/Release/net8.0/MESApplication.exe | 0 MESApplication/bin/Release/net8.0/publish/MESApplication.pdb | 0 MESApplication/bin/Debug/net8.0/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/publish/MESApplication.dll | 0 MES.Service/service/WomcaaManager.cs | 28 ++++++++++++++ MESApplication/bin/Debug/net8.0/MES.Service.dll | 0 MESApplication/bin/Debug/net8.0/MESApplication.pdb | 0 MESApplication/bin/Release/net8.0/MES.Service.dll | 0 MESApplication/Controllers/QC/MesOqcItemsDetect02Controller.cs | 3 - MESApplication/bin/Release/net8.0/MESApplication.dll | 0 MES.Service/Modes/Womcaa.cs | 6 +++ MESApplication/bin/Release/net8.0/publish/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/publish/MESApplication.exe | 0 MESApplication/bin/Release/net8.0/MESApplication.pdb | 0 MES.Service/bin/Debug/net8.0/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/publish/MES.Service.dll | 0 MES.Service/Dto/webApi/ErpCAA.cs | 2 + MES.Service/Dto/service/THJDto.cs | 5 ++ MESApplication/bin/Debug/net8.0/MESApplication.dll | 0 MES.Service/bin/Debug/net8.0/MES.Service.dll | 0 MES.Service/service/QC/THJService.cs | 17 +++----- MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user | 2 MESApplication/bin/Debug/net8.0/MESApplication.exe | 0 MES.Service/bin/Release/net8.0/MES.Service.dll | 0 MES.Service/bin/Release/net8.0/MES.Service.pdb | 0 26 files changed, 49 insertions(+), 14 deletions(-) diff --git a/MES.Service/Dto/service/THJDto.cs b/MES.Service/Dto/service/THJDto.cs index 744d593..79d6f39 100644 --- a/MES.Service/Dto/service/THJDto.cs +++ b/MES.Service/Dto/service/THJDto.cs @@ -93,6 +93,11 @@ /// </summary> public string? Remarks { get; set; } + /// <summary> + /// 鏄惁瀹屾垚鏍囪锛圦S_QA_ITEM_THJ.TJ锛夛紝1=宸插畬鎴愶紝0/NULL=鏈畬鎴� + /// </summary> + public int? Tj { get; set; } + // 鍒嗛〉鍙傛暟 public int PageIndex { get; set; } = 1; public int Limit { get; set; } = 20; diff --git a/MES.Service/Dto/webApi/ErpCAA.cs b/MES.Service/Dto/webApi/ErpCAA.cs index a24799f..f74004f 100644 --- a/MES.Service/Dto/webApi/ErpCAA.cs +++ b/MES.Service/Dto/webApi/ErpCAA.cs @@ -55,4 +55,6 @@ public string? CustNumber { get; set; } public string? ModelType { get; set; } + + public string? FOrderNo { get; set; } } \ No newline at end of file diff --git a/MES.Service/Modes/Womcaa.cs b/MES.Service/Modes/Womcaa.cs index 01dd241..09fec93 100644 --- a/MES.Service/Modes/Womcaa.cs +++ b/MES.Service/Modes/Womcaa.cs @@ -317,4 +317,10 @@ /// </summary> [SugarColumn(ColumnName = "MODEL_TYPE")] public string? ModelType { get; set; } + + /// <summary> + /// 璁㈠崟搴忓垪鍙� + /// </summary> + [SugarColumn(ColumnName = "ORDER_NO")] + public string? OrderNo { get; set; } } \ No newline at end of file diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.dll b/MES.Service/bin/Debug/net8.0/MES.Service.dll index f5f79ef..7fc8d5f 100644 --- a/MES.Service/bin/Debug/net8.0/MES.Service.dll +++ b/MES.Service/bin/Debug/net8.0/MES.Service.dll Binary files differ diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.pdb b/MES.Service/bin/Debug/net8.0/MES.Service.pdb index 37b5eaf..13f426c 100644 --- a/MES.Service/bin/Debug/net8.0/MES.Service.pdb +++ b/MES.Service/bin/Debug/net8.0/MES.Service.pdb Binary files differ diff --git a/MES.Service/bin/Release/net8.0/MES.Service.dll b/MES.Service/bin/Release/net8.0/MES.Service.dll index 1b5476b..677d05b 100644 --- a/MES.Service/bin/Release/net8.0/MES.Service.dll +++ b/MES.Service/bin/Release/net8.0/MES.Service.dll Binary files differ diff --git a/MES.Service/bin/Release/net8.0/MES.Service.pdb b/MES.Service/bin/Release/net8.0/MES.Service.pdb index 2293692..08c3cbf 100644 --- a/MES.Service/bin/Release/net8.0/MES.Service.pdb +++ b/MES.Service/bin/Release/net8.0/MES.Service.pdb Binary files differ diff --git a/MES.Service/service/QC/THJService.cs b/MES.Service/service/QC/THJService.cs index f837801..187bb27 100644 --- a/MES.Service/service/QC/THJService.cs +++ b/MES.Service/service/QC/THJService.cs @@ -50,6 +50,7 @@ a.SL as Sl, a.FCHECK_BY as StatusUser, a.FCHECK_RESU as Result, + a.TJ as Tj, COALESCE(m.ITEM_NAME, '') as ItemName, COALESCE(m.ITEM_MODEL, '') as ItemModel, a.SL as WorkQty, @@ -77,17 +78,13 @@ parameters.Add(new SugarParameter(":Id", queryObj.Id.Value)); } - // 鏍规嵁鐘舵�佺瓫閫� - if (!string.IsNullOrEmpty(queryObj.Result)) + // 鏍规嵁鏄惁瀹屾垚绛涢�夛紙涓ユ牸鎸塗J锛� + if (queryObj.Tj.HasValue) { - if (queryObj.Result == "鏈畬鎴�") - { - sql += " AND a.FCHECK_RESU IS NULL"; - } - else if (queryObj.Result == "宸插畬鎴�") - { - sql += " AND a.FCHECK_RESU IS NOT NULL"; - } + if (queryObj.Tj.Value == 1) + sql += " AND a.TJ = 1"; + else + sql += " AND NVL(a.TJ,0) <> 1"; } // 鏍规嵁妫�楠屼汉绛涢�� diff --git a/MES.Service/service/WomcaaManager.cs b/MES.Service/service/WomcaaManager.cs index 5859f34..36a9a6a 100644 --- a/MES.Service/service/WomcaaManager.cs +++ b/MES.Service/service/WomcaaManager.cs @@ -17,6 +17,31 @@ private readonly WomcabManager _womcabManager = new(); + /// <summary> + /// 楠岃瘉BOM鏄惁涓虹┖ + /// </summary> + /// <param name="erpCabs">BOM鏄庣粏鍒楄〃</param> + /// <param name="billNo">鐢熶骇浠诲姟鍗曞彿</param> + /// <exception cref="Exception">褰揃OM涓虹┖鏃舵姏鍑哄紓甯�</exception> + private void ValidateBomNotEmpty(List<ErpCAB> erpCabs, string billNo) + { + if (erpCabs == null || erpCabs.Count == 0) + { + throw new Exception($"鐢熶骇浠诲姟鍗� {billNo} 鐨凚OM涓虹┖锛屼笉鍏佽鎺ㄩ�佸埌MES绯荤粺"); + } + + // 妫�鏌ユ槸鍚︽湁鏈夋晥鐨凚OM鏄庣粏锛堢墿鏂欑紪鐮佷笉涓虹┖涓旈渶棰嗙敤閲忓ぇ浜�0锛� + var validBomItems = erpCabs.Where(cab => + !string.IsNullOrWhiteSpace(cab.FMaterialID2) && + !string.IsNullOrWhiteSpace(cab.FNeedQty2) && + decimal.TryParse(cab.FNeedQty2, out decimal qty) && qty > 0).ToList(); + + if (validBomItems.Count == 0) + { + throw new Exception($"鐢熶骇浠诲姟鍗� {billNo} 鐨凚OM鏄庣粏鏃犳晥锛堢墿鏂欑紪鐮佷负绌烘垨闇�棰嗙敤閲忎负0锛夛紝涓嶅厑璁告帹閫佸埌MES绯荤粺"); + } + } + public bool SaveList(List<ErpWOM> rohIns) { var result = rohIns.Select(Save).ToList(); @@ -29,6 +54,9 @@ var mesWomcaa = MapErpCAAtoWomcaa(womErpCaa); var mesWomcabs = MapErpCABtoWomcab(wom.ErpCabs); + // 楠岃瘉BOM鏄惁涓虹┖ + ValidateBomNotEmpty(wom.ErpCabs, womErpCaa.FBillNo); + return UseTransaction(db => { switch (womErpCaa.Type) diff --git a/MESApplication/Controllers/QC/MesOqcItemsDetect02Controller.cs b/MESApplication/Controllers/QC/MesOqcItemsDetect02Controller.cs index 552608c..e4a9ccf 100644 --- a/MESApplication/Controllers/QC/MesOqcItemsDetect02Controller.cs +++ b/MESApplication/Controllers/QC/MesOqcItemsDetect02Controller.cs @@ -58,7 +58,6 @@ } } -<<<<<<< HEAD [HttpPost("SetQSItems")] public ResponseResult SetQSItems([FromBody] JObject data) { @@ -104,8 +103,6 @@ } } -======= ->>>>>>> 3b90e8717befe39af4d9384252d27b7a768a773f //IqcQaSubmit [HttpPost("IqcQaSubmit")] public ResponseResult IqcQaSubmit(LLJDto rkjDto) diff --git a/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user b/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user index 92e020f..e950099 100644 --- a/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ <Project> <PropertyGroup> <_PublishTargetUrl>E:\Desktop\鎺ュ彛\RD\RD_MES_Api\MESApplication\bin\Release\net8.0\publish\</_PublishTargetUrl> - <History>True|2025-09-07T07:57:42.6492991Z||;True|2025-09-02T14:07:59.4933772+08:00||;True|2025-08-22T10:11:31.0216372+08:00||;True|2025-08-18T08:28:20.1447738+08:00||;True|2025-08-12T09:51:50.2822756+08:00||;True|2025-08-10T16:28:17.3559399+08:00||;True|2025-08-06T09:47:19.1451217+08:00||;True|2025-08-06T09:46:51.2621129+08:00||;True|2025-08-03T18:48:37.3295098+08:00||;True|2025-08-01T17:29:02.4576952+08:00||;True|2025-03-27T23:22:42.3501020+08:00||;True|2025-03-10T16:49:08.3476948+08:00||;True|2024-12-24T15:39:58.5366570+08:00||;True|2024-11-26T18:32:03.9568766+08:00||;True|2024-11-21T02:11:35.8050745+08:00||;True|2024-09-21T16:35:22.6651659+08:00||;True|2024-09-21T16:14:11.3450387+08:00||;True|2024-09-19T17:16:11.7338751+08:00||;True|2024-09-19T17:11:21.0116707+08:00||;True|2024-09-19T13:54:25.7455472+08:00||;True|2024-09-15T13:55:51.7095153+08:00||;True|2024-09-12T17:10:20.4734556+08:00||;True|2024-09-10T15:54:07.7463519+08:00||;True|2024-09-06T14:40:56.3762241+08:00||;True|2024-08-20T17:12:00.2924570+08:00||;True|2024-08-17T10:57:05.6670396+08:00||;True|2024-08-17T10:56:46.8068041+08:00||;True|2024-08-16T14:09:17.0526491+08:00||;True|2024-08-15T08:40:32.8134665+08:00||;True|2024-08-14T10:00:27.7017207+08:00||;True|2024-08-14T08:54:44.8284031+08:00||;True|2024-08-07T10:32:10.3689256+08:00||;True|2024-08-05T15:45:03.0864530+08:00||;True|2024-08-03T09:59:13.7916520+08:00||;True|2024-07-31T17:27:28.1965929+08:00||;True|2024-07-31T15:27:34.7943845+08:00||;True|2024-07-30T15:04:50.5849235+08:00||;True|2024-07-30T14:09:06.2877325+08:00||;True|2024-07-29T16:11:30.4493940+08:00||;True|2024-07-23T14:30:34.4591002+08:00||;True|2024-07-22T14:17:39.8186158+08:00||;True|2024-04-10T12:55:31.3963752+08:00||;True|2024-04-08T13:59:25.5487203+08:00||;True|2024-04-06T09:30:09.5350539+08:00||;True|2024-04-06T08:46:05.8814658+08:00||;True|2024-04-05T14:06:52.0448024+08:00||;True|2024-04-05T12:47:46.0561601+08:00||;True|2024-02-26T08:46:22.0988887+08:00||;True|2024-02-24T19:17:13.6770376+08:00||;True|2024-02-24T14:32:37.4450337+08:00||;True|2024-02-23T10:22:06.5150173+08:00||;True|2024-02-22T13:19:56.6997993+08:00||;True|2024-02-22T10:53:17.7929585+08:00||;True|2024-02-21T17:08:06.5553444+08:00||;True|2024-02-19T16:24:37.4912012+08:00||;True|2024-02-02T10:07:23.2726075+08:00||;True|2024-02-02T08:36:49.2904460+08:00||;True|2024-01-29T17:44:43.6800769+08:00||;True|2024-01-23T09:47:26.7811926+08:00||;True|2024-01-18T16:23:30.3373836+08:00||;True|2024-01-17T14:22:04.2552286+08:00||;True|2024-01-16T16:54:42.2316892+08:00||;True|2024-01-16T16:37:23.8028858+08:00||;True|2024-01-16T09:25:24.4007775+08:00||;True|2024-01-15T10:18:57.3362616+08:00||;True|2024-01-15T10:07:14.2044763+08:00||;True|2024-01-10T14:03:36.4451130+08:00||;True|2024-01-09T16:45:32.9601815+08:00||;True|2024-01-06T14:16:34.2732220+08:00||;True|2024-01-06T14:11:45.2134717+08:00||;True|2024-01-06T11:30:58.9198887+08:00||;</History> + <History>True|2025-09-24T09:48:11.4770370Z||;True|2025-09-24T10:00:27.2652137+08:00||;True|2025-09-22T17:09:16.2235067+08:00||;True|2025-09-07T15:57:42.6492991+08:00||;True|2025-09-02T14:07:59.4933772+08:00||;True|2025-08-22T10:11:31.0216372+08:00||;True|2025-08-18T08:28:20.1447738+08:00||;True|2025-08-12T09:51:50.2822756+08:00||;True|2025-08-10T16:28:17.3559399+08:00||;True|2025-08-06T09:47:19.1451217+08:00||;True|2025-08-06T09:46:51.2621129+08:00||;True|2025-08-03T18:48:37.3295098+08:00||;True|2025-08-01T17:29:02.4576952+08:00||;True|2025-03-27T23:22:42.3501020+08:00||;True|2025-03-10T16:49:08.3476948+08:00||;True|2024-12-24T15:39:58.5366570+08:00||;True|2024-11-26T18:32:03.9568766+08:00||;True|2024-11-21T02:11:35.8050745+08:00||;True|2024-09-21T16:35:22.6651659+08:00||;True|2024-09-21T16:14:11.3450387+08:00||;True|2024-09-19T17:16:11.7338751+08:00||;True|2024-09-19T17:11:21.0116707+08:00||;True|2024-09-19T13:54:25.7455472+08:00||;True|2024-09-15T13:55:51.7095153+08:00||;True|2024-09-12T17:10:20.4734556+08:00||;True|2024-09-10T15:54:07.7463519+08:00||;True|2024-09-06T14:40:56.3762241+08:00||;True|2024-08-20T17:12:00.2924570+08:00||;True|2024-08-17T10:57:05.6670396+08:00||;True|2024-08-17T10:56:46.8068041+08:00||;True|2024-08-16T14:09:17.0526491+08:00||;True|2024-08-15T08:40:32.8134665+08:00||;True|2024-08-14T10:00:27.7017207+08:00||;True|2024-08-14T08:54:44.8284031+08:00||;True|2024-08-07T10:32:10.3689256+08:00||;True|2024-08-05T15:45:03.0864530+08:00||;True|2024-08-03T09:59:13.7916520+08:00||;True|2024-07-31T17:27:28.1965929+08:00||;True|2024-07-31T15:27:34.7943845+08:00||;True|2024-07-30T15:04:50.5849235+08:00||;True|2024-07-30T14:09:06.2877325+08:00||;True|2024-07-29T16:11:30.4493940+08:00||;True|2024-07-23T14:30:34.4591002+08:00||;True|2024-07-22T14:17:39.8186158+08:00||;True|2024-04-10T12:55:31.3963752+08:00||;True|2024-04-08T13:59:25.5487203+08:00||;True|2024-04-06T09:30:09.5350539+08:00||;True|2024-04-06T08:46:05.8814658+08:00||;True|2024-04-05T14:06:52.0448024+08:00||;True|2024-04-05T12:47:46.0561601+08:00||;True|2024-02-26T08:46:22.0988887+08:00||;True|2024-02-24T19:17:13.6770376+08:00||;True|2024-02-24T14:32:37.4450337+08:00||;True|2024-02-23T10:22:06.5150173+08:00||;True|2024-02-22T13:19:56.6997993+08:00||;True|2024-02-22T10:53:17.7929585+08:00||;True|2024-02-21T17:08:06.5553444+08:00||;True|2024-02-19T16:24:37.4912012+08:00||;True|2024-02-02T10:07:23.2726075+08:00||;True|2024-02-02T08:36:49.2904460+08:00||;True|2024-01-29T17:44:43.6800769+08:00||;True|2024-01-23T09:47:26.7811926+08:00||;True|2024-01-18T16:23:30.3373836+08:00||;True|2024-01-17T14:22:04.2552286+08:00||;True|2024-01-16T16:54:42.2316892+08:00||;True|2024-01-16T16:37:23.8028858+08:00||;True|2024-01-16T09:25:24.4007775+08:00||;True|2024-01-15T10:18:57.3362616+08:00||;True|2024-01-15T10:07:14.2044763+08:00||;True|2024-01-10T14:03:36.4451130+08:00||;True|2024-01-09T16:45:32.9601815+08:00||;True|2024-01-06T14:16:34.2732220+08:00||;True|2024-01-06T14:11:45.2134717+08:00||;True|2024-01-06T11:30:58.9198887+08:00||;</History> <LastFailureDetails /> </PropertyGroup> </Project> \ No newline at end of file diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll index f5f79ef..7fc8d5f 100644 --- a/MESApplication/bin/Debug/net8.0/MES.Service.dll +++ b/MESApplication/bin/Debug/net8.0/MES.Service.dll Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.pdb b/MESApplication/bin/Debug/net8.0/MES.Service.pdb index 37b5eaf..13f426c 100644 --- a/MESApplication/bin/Debug/net8.0/MES.Service.pdb +++ b/MESApplication/bin/Debug/net8.0/MES.Service.pdb Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.dll b/MESApplication/bin/Debug/net8.0/MESApplication.dll index 129a698..3f1bca6 100644 --- a/MESApplication/bin/Debug/net8.0/MESApplication.dll +++ b/MESApplication/bin/Debug/net8.0/MESApplication.dll Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.exe b/MESApplication/bin/Debug/net8.0/MESApplication.exe index 25a106e..dd395b4 100644 --- a/MESApplication/bin/Debug/net8.0/MESApplication.exe +++ b/MESApplication/bin/Debug/net8.0/MESApplication.exe Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.pdb b/MESApplication/bin/Debug/net8.0/MESApplication.pdb index f87d9c3..c9f092b 100644 --- a/MESApplication/bin/Debug/net8.0/MESApplication.pdb +++ b/MESApplication/bin/Debug/net8.0/MESApplication.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MES.Service.dll b/MESApplication/bin/Release/net8.0/MES.Service.dll index 1b5476b..677d05b 100644 --- a/MESApplication/bin/Release/net8.0/MES.Service.dll +++ b/MESApplication/bin/Release/net8.0/MES.Service.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MES.Service.pdb b/MESApplication/bin/Release/net8.0/MES.Service.pdb index 2293692..08c3cbf 100644 --- a/MESApplication/bin/Release/net8.0/MES.Service.pdb +++ b/MESApplication/bin/Release/net8.0/MES.Service.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.dll b/MESApplication/bin/Release/net8.0/MESApplication.dll index 39eef1e..6705017 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.dll +++ b/MESApplication/bin/Release/net8.0/MESApplication.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.exe b/MESApplication/bin/Release/net8.0/MESApplication.exe index 25a106e..dd395b4 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.exe +++ b/MESApplication/bin/Release/net8.0/MESApplication.exe Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.pdb b/MESApplication/bin/Release/net8.0/MESApplication.pdb index df53339..6d53759 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.pdb +++ b/MESApplication/bin/Release/net8.0/MESApplication.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll index 1b5476b..677d05b 100644 --- a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll +++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb index 2293692..08c3cbf 100644 --- a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb +++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll index 39eef1e..6705017 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe index 25a106e..dd395b4 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb index df53339..6d53759 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb Binary files differ -- Gitblit v1.9.3