From 9885a8a2f98104f5ee63dd5ab8023095a1d8b9f6 Mon Sep 17 00:00:00 2001 From: bklLiudl <673013083@qq.com> Date: 星期一, 02 九月 2024 08:23:44 +0800 Subject: [PATCH] 功能测试 --- Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs | 80 ++++++++++++++++++++++++---------------- 1 files changed, 48 insertions(+), 32 deletions(-) diff --git a/Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs b/Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs index 616764b..54187e7 100644 --- a/Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs +++ b/Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs @@ -5,6 +5,7 @@ using Newtonsoft.Json; using SqlSugar; using System; +using System.Collections; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; @@ -204,41 +205,56 @@ Db.Insertable(exTask).ExecuteCommand(); - // 璋冪敤Limes鎺ュ彛鍙戣捣璇烽獙 - var jsonData = JsonConvert.SerializeObject(QcNoModel); - string response = ""; - try - { - var time1 = DateTime.Now;//鍙戦�佹椂闂� .ToString("yyyy-MM-dd HH:mm:ss") - response = HttpHelper.DoPost(url, jsonData, "涓婁紶ERP鍙栨牱娑堣�楅噺杩囪处", "ERP"); - var time2 = DateTime.Now;//杩斿洖鏃堕棿 .ToString("yyyy-MM-dd HH:mm:ss") + List<string> list1 = new List<string>(); + list1.Add(taskNo); + //鏇存敼浠诲姟鐨勫彂閫佽繑鍥炴椂闂�// + var time1 = DateTime.Now;//鍙戦�佹椂闂� .ToString("yyyy-MM-dd HH:mm:ss") + var time2 = DateTime.Now;//杩斿洖鏃堕棿 .ToString("yyyy-MM-dd HH:mm:ss") + new TaskServer().EditTaskIssueOk(list1, time1, time2); - ////瑙f瀽杩斿洖鏁版嵁 - var limesModel = JsonConvert.DeserializeObject<LimesModel>(response); - List<string> list1 = new List<string>(); - list1.Add(taskNo); - if (limesModel.Success == 0) - { - //鏇存敼浠诲姟鐨勫彂閫佽繑鍥炴椂闂�// - new TaskServer().EditTaskIssueOk(list1, time1, time2); + // 鏇存柊璇烽獙鍗曚俊鎭� + data.Status = "2"; + data.UpdateTime = time; + data.UpdateUser = userId; - // 鏇存柊璇烽獙鍗曚俊鎭� - data.Status = "2"; - data.UpdateTime = time; - data.UpdateUser = userId; + Db.Updateable(data).ExecuteCommand(); - Db.Updateable(data).ExecuteCommand(); - } - if (limesModel.Success == -1) - { - new TaskServer().EditTaskIssueNo(list1, time1, time2, limesModel.Message); - throw new Exception(limesModel.Message); - } - } - catch (Exception ex) - { - throw new Exception(ex.Message); - } + + // 璋冪敤ERP鎺ュ彛鍥炰紶鍙栨牱娑堣�� + //var jsonData = JsonConvert.SerializeObject(QcNoModel); + //string response = ""; + //try + //{ + // var time1 = DateTime.Now;//鍙戦�佹椂闂� .ToString("yyyy-MM-dd HH:mm:ss") + // response = HttpHelper.DoPost(url, jsonData, "涓婁紶ERP鍙栨牱娑堣�楅噺杩囪处", "ERP"); + // var time2 = DateTime.Now;//杩斿洖鏃堕棿 .ToString("yyyy-MM-dd HH:mm:ss") + + // ////瑙f瀽杩斿洖鏁版嵁 + // var limesModel = JsonConvert.DeserializeObject<LimesModel>(response); + // List<string> list1 = new List<string>(); + // list1.Add(taskNo); + // if (limesModel.Success == 0) + // { + // //鏇存敼浠诲姟鐨勫彂閫佽繑鍥炴椂闂�// + // new TaskServer().EditTaskIssueOk(list1, time1, time2); + + // // 鏇存柊璇烽獙鍗曚俊鎭� + // data.Status = "2"; + // data.UpdateTime = time; + // data.UpdateUser = userId; + + // Db.Updateable(data).ExecuteCommand(); + // } + // if (limesModel.Success == -1) + // { + // new TaskServer().EditTaskIssueNo(list1, time1, time2, limesModel.Message); + // throw new Exception(limesModel.Message); + // } + //} + //catch (Exception ex) + //{ + // throw new Exception(ex.Message); + //} //娣诲姞鎿嶄綔鏃ュ織璁板綍 var k = new OperationCrServer().AddLogOperationCr("璐ㄩ噺绠$悊", "璐ㄦ璇烽獙", model.Code, "鍏冲崟", $"鍏抽棴浜唟model.Code}璇烽獙鍗�!", userId); -- Gitblit v1.8.0