From d12457c6f777b2161a1d29d230dbb67142baf561 Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期三, 14 五月 2025 14:12:43 +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 MES.Service/service/PLM/WarehouseDownloadDoc.cs | 2 MESApplication/bin/Release/net8.0/publish/MESApplication.dll | 0 MESApplication/bin/Debug/net8.0/MES.Service.dll | 0 MES.Service/Modes/QcIssueResult/QcIssueResults.cs | 55 ++++++ MESApplication/bin/Debug/net8.0/MESApplication.pdb | 0 MESApplication/bin/Release/net8.0/MES.Service.dll | 0 MESApplication/bin/Release/net8.0/MESApplication.dll | 0 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/QcIssueResult/ErpQcIssueResult.cs | 13 + MESApplication/Config/appsettings.json | 6 MESApplication/bin/Debug/net8.0/MESApplication.dll | 0 MES.Service/bin/Debug/net8.0/MES.Service.dll | 0 MES.Service/service/QcIssueResult/QcIssueResultManager.cs | 380 +++++++++++++++++++++++++++++++++++++++++++---- 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 25 files changed, 417 insertions(+), 41 deletions(-) diff --git a/MES.Service/Dto/webApi/QcIssueResult/ErpQcIssueResult.cs b/MES.Service/Dto/webApi/QcIssueResult/ErpQcIssueResult.cs index 24938b6..edd2295 100644 --- a/MES.Service/Dto/webApi/QcIssueResult/ErpQcIssueResult.cs +++ b/MES.Service/Dto/webApi/QcIssueResult/ErpQcIssueResult.cs @@ -7,4 +7,17 @@ //public string? ReleaseNo { get; set; } public string? ProcessNo { get; set; } public string? FReview { get; set; } + public string? QCSTATU { get; set; } + public string? QcRemark { get; set; } + public string? SelectRemark { get; set; } + public decimal? DATA { get; set; } + public string? CGORDER { get; set; } + public string? SJPLACE { get; set; } + public decimal? NUM { get; set; } + public string? BFREMARK { get; set; } + public string? THREMARK { get; set; } + public string? TCSTATU { get; set; } + public string? MODEL { get; set; } + public string? RBJSREMARK { get; set; } + } diff --git a/MES.Service/Modes/QcIssueResult/QcIssueResults.cs b/MES.Service/Modes/QcIssueResult/QcIssueResults.cs index b050e25..436fbf4 100644 --- a/MES.Service/Modes/QcIssueResult/QcIssueResults.cs +++ b/MES.Service/Modes/QcIssueResult/QcIssueResults.cs @@ -15,15 +15,64 @@ [SugarColumn(ColumnName = "ID", IsPrimaryKey = true, OracleSequenceName = "SEQ_QCISSUE_RESULT")] public decimal Id { get; set; } - //閫佽揣鍗曞彿 + //鏉ユ枡妫�楠屽崟鍙� [SugarColumn(ColumnName = "RELEASE_NO")] public string? ReleaseNo { get; set; } - //閫佽揣鍗曞彿 + //娴佺▼鍙� [SugarColumn(ColumnName = "PROCESSNO")] public string? ProcessNo { get; set; } - //渚涘簲鍟� + //澶勭悊缁撴灉 [SugarColumn(ColumnName = "FREVIEW")] public string? FReview { get; set; } + + //寮傚父澶勭疆鍗曟槸鍚﹁鎷掔粷 + [SugarColumn(ColumnName = "QCSTATU")] + public string? QcStatu { get; set; } + + //鍝佽川閮ㄥ鏍稿強纭畾涓嶅悎鏍� + [SugarColumn(ColumnName = "QCREMARK")] + public string? QCREMARK { get; set; } + + //鎸戦�夊唴瀹� + [SugarColumn(ColumnName = "SELECTREMARK")] + public string? SELECTREMARK { get; set; } + + //鏃ユ湡 + [SugarColumn(ColumnName = "DATA")] + public decimal? DATA { get; set; } + + //閲囪喘璁㈠崟鍙� + [SugarColumn(ColumnName = "CGORDER")] + public string? CGORDER { get; set; } + + //閫佹鍗曚綅 + [SugarColumn(ColumnName = "SJPLACE")] + public string? SJPLACE { get; set; } + + //鏃ユ湡 + [SugarColumn(ColumnName = "NUM")] + public decimal? NUM { get; set; } + + //鎶ュ簾澶囨敞 + [SugarColumn(ColumnName = "BFREMARK")] + public string? BFREMARK { get; set; } + + //閫�璐у娉� + [SugarColumn(ColumnName = "THREMARK")] + public string? THREMARK { get; set; } + + //鏄惁娑夊強鐗归噰 + [SugarColumn(ColumnName = "TCSTATU")] + public string? TCSTATU { get; set; } + + //瑙勬牸鍨嬪彿 + [SugarColumn(ColumnName = "MODEL")] + public string? MODEL { get; set; } + + //璁╂鎺ユ敹鍐呭 + [SugarColumn(ColumnName = "RBJSREMARK")] + public string? RBJSREMARK { get; set; } + } diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.dll b/MES.Service/bin/Debug/net8.0/MES.Service.dll index 8a56813..1fd5998 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 b78723c..59fb86f 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 0c56bb0..5a314aa 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 b4102a3..7121452 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/PLM/WarehouseDownloadDoc.cs b/MES.Service/service/PLM/WarehouseDownloadDoc.cs index 5792f2e..748ea0a 100644 --- a/MES.Service/service/PLM/WarehouseDownloadDoc.cs +++ b/MES.Service/service/PLM/WarehouseDownloadDoc.cs @@ -15,7 +15,7 @@ { get { - string json = "{\"ap1\":{ \"AcctID\":\"" + "6722eada66becb" + "\",\"Username\":\"Administrator\",\"Password\":\"Yc123456@\",\"Lcid\":2052,\"AuthenticateType\":1,\"PasswordIsEncrypted\":\"false\",\"ClientInfo\":{\"ClientType\":8}}"; + string json = "{\"ap1\":{ \"AcctID\":\"" + "61ce591aee4c5a" + "\",\"Username\":\"Administrator\",\"Password\":\"Yc123456@\",\"Lcid\":2052,\"AuthenticateType\":1,\"PasswordIsEncrypted\":\"false\",\"ClientInfo\":{\"ClientType\":8}}"; var resp = GetResponse("http://121.36.245.199/k3cloud/Kingdee.BOS.ServiceFacade.ServicesStub.User.UserService.ValidateLoginInfo.common.kdsvc", json, new Dictionary<string, string>()); string ret = (new StreamReader(resp.GetResponseStream(), Encoding.UTF8)).ReadToEnd(); var result = JObject.Parse(ret)["Context"]; diff --git a/MES.Service/service/QcIssueResult/QcIssueResultManager.cs b/MES.Service/service/QcIssueResult/QcIssueResultManager.cs index ab32c1c..929827a 100644 --- a/MES.Service/service/QcIssueResult/QcIssueResultManager.cs +++ b/MES.Service/service/QcIssueResult/QcIssueResultManager.cs @@ -17,6 +17,8 @@ using MES.Service.Dto.webApi.DeliveryNote; using MES.Service.Modes.DeliveryNote; using Newtonsoft.Json; +using Oracle.ManagedDataAccess.Client; +using System.Data; namespace MES.Service.service.QcIssueResult; @@ -330,7 +332,10 @@ var QcIssueResults = new QcIssueResults { ProcessNo = ProcessNo, - ReleaseNo = ReleaseNo + ReleaseNo = ReleaseNo, + QcStatu = "", + TCSTATU ="" + }; return QcIssueResults; @@ -355,7 +360,19 @@ var mesQcIssueResults = new QcIssueResults { ProcessNo = erpQcIssueResult.ProcessNo, - FReview = erpQcIssueResult.FReview + FReview = erpQcIssueResult.FReview, + QcStatu = erpQcIssueResult.QCSTATU, + QCREMARK = erpQcIssueResult.QcRemark, + SELECTREMARK = erpQcIssueResult.SelectRemark, + DATA = erpQcIssueResult.DATA, + CGORDER = erpQcIssueResult.CGORDER, + SJPLACE = erpQcIssueResult.SJPLACE, + NUM = erpQcIssueResult.NUM, + BFREMARK = erpQcIssueResult.BFREMARK, + THREMARK = erpQcIssueResult.THREMARK, + TCSTATU = erpQcIssueResult.TCSTATU, + MODEL =erpQcIssueResult.MODEL, + RBJSREMARK =erpQcIssueResult.RBJSREMARK, }; return mesQcIssueResults; @@ -378,47 +395,344 @@ if (mapping.Any()) { - string ReleaseNo = mapping.FirstOrDefault().ReleaseNo; - - // 鍙洿鏂� ReleaseNo 鍜� FReview 涓や釜瀛楁 - var updateResult = db.Updateable<QcIssueResults>() - .SetColumns(t => new QcIssueResults - { - ReleaseNo = ReleaseNo, - FReview = qcIssueResults.FReview - }) - .Where(t => t.ProcessNo == qcIssueResults.ProcessNo) // 鏄惧紡鎸囧畾鏇存柊鏉′欢 - .ExecuteCommand(); - - // 鏌ヨ UpdateMesQaItems 琛ㄤ腑鏄惁瀛樺湪鍖归厤鐨勮褰� - var existingRecord = db.Queryable<UpdateMesQaItems>() - .Where(it => it.ReleaseNo == ReleaseNo) - .First(); // 浣跨敤 First 鑾峰彇绗竴鏉¤褰� - - Debug.WriteLine($"鏌ヨ鍒扮殑 mapping: {JsonConvert.SerializeObject(existingRecord)}"); - - if (existingRecord != null) + if (qcIssueResults.TCSTATU == "鏄�") { - // 鏇存柊 UpdateMesQaItems 琛ㄤ腑鐨勫瓧娈� - existingRecord.FngHandle = qcIssueResults.FReview; - if (existingRecord.FngHandle == "閫�璐�") + if (qcIssueResults.QcStatu == "鎷掔粷") { - existingRecord.FMRMODE = "閫�鏂欒ˉ鏂�"; + string ReleaseNo = mapping.FirstOrDefault().ReleaseNo; + + // 鍙洿鏂� ReleaseNo 鍜� FReview 涓や釜瀛楁 + var updateResult = db.Updateable<QcIssueResults>() + .SetColumns(t => new QcIssueResults + { + ReleaseNo = ReleaseNo, + FReview = qcIssueResults.FReview, + QcStatu = qcIssueResults.QcStatu, + QCREMARK = qcIssueResults.QCREMARK, + SELECTREMARK = qcIssueResults.SELECTREMARK, + DATA = qcIssueResults.DATA, + CGORDER = qcIssueResults.CGORDER, + SJPLACE = qcIssueResults.SJPLACE, + NUM = qcIssueResults.NUM, + BFREMARK = qcIssueResults.BFREMARK, + THREMARK = qcIssueResults.THREMARK, + TCSTATU = qcIssueResults.TCSTATU, + MODEL = qcIssueResults.MODEL, + RBJSREMARK = qcIssueResults.RBJSREMARK, + }) + .Where(t => t.ProcessNo == qcIssueResults.ProcessNo) // 鏄惧紡鎸囧畾鏇存柊鏉′欢 + .ExecuteCommand(); + + // 鏌ヨ UpdateMesQaItems 琛ㄤ腑鏄惁瀛樺湪鍖归厤鐨勮褰� + var existingRecord = db.Queryable<UpdateMesQaItems>() + .Where(it => it.ReleaseNo == ReleaseNo) + .First(); // 浣跨敤 First 鑾峰彇绗竴鏉¤褰� + + Debug.WriteLine($"鏌ヨ鍒扮殑 mapping: {JsonConvert.SerializeObject(existingRecord)}"); + + if (existingRecord != null) + { + + bool returnValue = false; + try + { + //瀹氫箟杈撳叆鍙傛暟 + var inputParam1 = new SugarParameter("pi_no", existingRecord.ReleaseNo); + var inputParam2 = new SugarParameter("pi_user", "PL017"); + // 瀹氫箟杈撳嚭鍙傛暟 + var outParam1 = new SugarParameter("po_result", null, true); + var outParam2 = new SugarParameter("po_msg", null, true); + // 浣跨敤 SqlSugar 鎵ц瀛樺偍杩囩▼ + Db.Ado.ExecuteCommand("BEGIN PRC_MES_IQC_CG_REVOCK(:pi_no,:pi_user,:po_result,:po_msg ); END;", inputParam1, inputParam2, outParam1, outParam2); + // 鑾峰彇杈撳嚭鍙傛暟鐨勫�� + int result = int.Parse((string)outParam1.Value); + string message = outParam2.Value == DBNull.Value ? string.Empty : (string)outParam2.Value; + if (result == 1) + { + //瀛樺偍杩囩▼澶辫触鍒欎簨鍔¤繘琛屽洖婊� + db.Ado.RollbackTran(); + throw new Exception(message); + } + // 鎻愪氦浜嬪姟 + db.Ado.CommitTran(); + return true; + } + catch (Exception ex) + { + Console.WriteLine("Exception: " + ex.Message); + return false; + } + } + else + { + throw new Exception("鏈壘鍒伴渶瑕佹洿鏂扮殑璁板綍"); + } } else { - existingRecord.FMRMODE = null; + string ReleaseNo = mapping.FirstOrDefault().ReleaseNo; + + // 鍙洿鏂� ReleaseNo 鍜� FReview 涓や釜瀛楁 + var updateResult = db.Updateable<QcIssueResults>() + .SetColumns(t => new QcIssueResults + { + ReleaseNo = ReleaseNo, + FReview = qcIssueResults.FReview, + QcStatu = qcIssueResults.QcStatu, + QCREMARK = qcIssueResults.QCREMARK, + SELECTREMARK = qcIssueResults.SELECTREMARK, + DATA = qcIssueResults.DATA, + CGORDER = qcIssueResults.CGORDER, + SJPLACE = qcIssueResults.SJPLACE, + NUM = qcIssueResults.NUM, + BFREMARK = qcIssueResults.BFREMARK, + THREMARK = qcIssueResults.THREMARK, + TCSTATU = qcIssueResults.TCSTATU, + MODEL = qcIssueResults.MODEL, + RBJSREMARK = qcIssueResults.RBJSREMARK, + }) + .Where(t => t.ProcessNo == qcIssueResults.ProcessNo) // 鏄惧紡鎸囧畾鏇存柊鏉′欢 + .ExecuteCommand(); + + // 鏌ヨ UpdateMesQaItems 琛ㄤ腑鏄惁瀛樺湪鍖归厤鐨勮褰� + var existingRecord = db.Queryable<UpdateMesQaItems>() + .Where(it => it.ReleaseNo == ReleaseNo) + .First(); // 浣跨敤 First 鑾峰彇绗竴鏉¤褰� + + Debug.WriteLine($"鏌ヨ鍒扮殑 mapping: {JsonConvert.SerializeObject(existingRecord)}"); + + if (existingRecord != null) + { + // 鏇存柊 UpdateMesQaItems 琛ㄤ腑鐨勫瓧娈� + existingRecord.FngHandle = "鐗归噰鐩存帴浣跨敤"; + existingRecord.FMRMODE = null; + + // 鎵ц鏇存柊鎿嶄綔 + updateResult = db.Updateable(existingRecord).ExecuteCommand(); + if (updateResult > 0) + { + try + { + + //瀹氫箟杈撳叆鍙傛暟 + var inputParam1 = new SugarParameter("PI_BILLNO", ReleaseNo); + var inputParam2 = new SugarParameter("PI_USER", "PL017"); + var inputParam3 = new SugarParameter("PI_HANDLE", "鐗归噰鐩存帴浣跨敤"); + var inputParam4 = new SugarParameter("PI_TLFS", ""); + var inputParam5 = new SugarParameter("PI_REMARK", ""); + + // 瀹氫箟杈撳嚭鍙傛暟 + var outParam1 = new SugarParameter("PO_RESULT", null, true); + var outParam2 = new SugarParameter("PO_MSG", null, true); + // 浣跨敤 SqlSugar 鎵ц瀛樺偍杩囩▼ + Db.Ado.ExecuteCommand("BEGIN PRC_MES_IQC_CG_SUBMIT(:PI_BILLNO,:PI_BILLNO,:PI_HANDLE,:PI_TLFS,:PI_REMARK,:PO_RESULT,:PO_MSG); END;", inputParam1, inputParam2, inputParam3, inputParam4, inputParam5, outParam1, outParam2); + // 鑾峰彇杈撳嚭鍙傛暟鐨勫�� + int result = int.Parse((string)outParam1.Value); + string message = outParam2.Value == DBNull.Value ? string.Empty : (string)outParam2.Value; + if (result == 1) + { + //瀛樺偍杩囩▼澶辫触鍒欎簨鍔¤繘琛屽洖婊� + db.Ado.RollbackTran(); + throw new Exception(message); + } + // 鎻愪氦浜嬪姟 + db.Ado.CommitTran(); + return true; + + } + catch (Exception ex) + { + Console.WriteLine("Exception: " + ex.Message); + return false; + } + } + + return updateResult > 0; // 濡傛灉鏇存柊鎴愬姛锛岃繑鍥� true + } + else + { + throw new Exception("鏈壘鍒伴渶瑕佹洿鏂扮殑璁板綍"); + } } - - // 鎵ц鏇存柊鎿嶄綔 - updateResult = db.Updateable(existingRecord).ExecuteCommand(); - - return updateResult > 0; // 濡傛灉鏇存柊鎴愬姛锛岃繑鍥� true } else { - throw new Exception("鏈壘鍒伴渶瑕佹洿鏂扮殑璁板綍"); + if (qcIssueResults.QcStatu == "鎷掔粷") + { + string ReleaseNo = mapping.FirstOrDefault().ReleaseNo; + + // 鍙洿鏂� ReleaseNo 鍜� FReview 涓や釜瀛楁 + var updateResult = db.Updateable<QcIssueResults>() + .SetColumns(t => new QcIssueResults + { + ReleaseNo = ReleaseNo, + FReview = qcIssueResults.FReview, + QcStatu = qcIssueResults.QcStatu, + QCREMARK = qcIssueResults.QCREMARK, + SELECTREMARK = qcIssueResults.SELECTREMARK, + DATA = qcIssueResults.DATA, + CGORDER = qcIssueResults.CGORDER, + SJPLACE = qcIssueResults.SJPLACE, + NUM = qcIssueResults.NUM, + BFREMARK = qcIssueResults.BFREMARK, + THREMARK = qcIssueResults.THREMARK, + TCSTATU = qcIssueResults.TCSTATU, + MODEL = qcIssueResults.MODEL, + RBJSREMARK = qcIssueResults.RBJSREMARK, + }) + .Where(t => t.ProcessNo == qcIssueResults.ProcessNo) // 鏄惧紡鎸囧畾鏇存柊鏉′欢 + .ExecuteCommand(); + + // 鏌ヨ UpdateMesQaItems 琛ㄤ腑鏄惁瀛樺湪鍖归厤鐨勮褰� + var existingRecord = db.Queryable<UpdateMesQaItems>() + .Where(it => it.ReleaseNo == ReleaseNo) + .First(); // 浣跨敤 First 鑾峰彇绗竴鏉¤褰� + + Console.WriteLine($"鏌ヨ鍒扮殑 mapping: {JsonConvert.SerializeObject(existingRecord)}"); + + if (existingRecord != null) + { + + try + { + + //瀹氫箟杈撳叆鍙傛暟 + var inputParam1 = new SugarParameter("pi_no", existingRecord.ReleaseNo); + var inputParam2 = new SugarParameter("pi_user", "PL017"); + // 瀹氫箟杈撳嚭鍙傛暟 + var outParam1 = new SugarParameter("po_result", null, true); + var outParam2 = new SugarParameter("po_msg", null, true); + // 浣跨敤 SqlSugar 鎵ц瀛樺偍杩囩▼ + Db.Ado.ExecuteCommand("BEGIN PRC_MES_IQC_CG_REVOCK(:pi_no,:pi_user,:po_result,:po_msg ); END;", inputParam1, inputParam2, outParam1, outParam2); + // 鑾峰彇杈撳嚭鍙傛暟鐨勫�� + int result = int.Parse((string)outParam1.Value); + string message = outParam2.Value == DBNull.Value ? string.Empty : (string)outParam2.Value; + if (result == 1) + { + //瀛樺偍杩囩▼澶辫触鍒欎簨鍔¤繘琛屽洖婊� + db.Ado.RollbackTran(); + throw new Exception(message); + } + // 鎻愪氦浜嬪姟 + db.Ado.CommitTran(); + return true; + + } + catch (Exception ex) + { + Console.WriteLine("Exception: " + ex.Message); + return false; + } + } + else + { + throw new Exception("鏈壘鍒伴渶瑕佹洿鏂扮殑璁板綍"); + } + } + else + { + string ReleaseNo = mapping.FirstOrDefault().ReleaseNo; + + // 鍙洿鏂� ReleaseNo 鍜� FReview 涓や釜瀛楁 + var updateResult = db.Updateable<QcIssueResults>() + .SetColumns(t => new QcIssueResults + { + ReleaseNo = ReleaseNo, + FReview = qcIssueResults.FReview, + QcStatu = qcIssueResults.QcStatu, + QCREMARK = qcIssueResults.QCREMARK, + SELECTREMARK = qcIssueResults.SELECTREMARK, + DATA = qcIssueResults.DATA, + CGORDER = qcIssueResults.CGORDER, + SJPLACE = qcIssueResults.SJPLACE, + NUM = qcIssueResults.NUM, + BFREMARK = qcIssueResults.BFREMARK, + THREMARK = qcIssueResults.THREMARK, + TCSTATU = qcIssueResults.TCSTATU, + MODEL = qcIssueResults.MODEL, + RBJSREMARK = qcIssueResults.RBJSREMARK, + }) + .Where(t => t.ProcessNo == qcIssueResults.ProcessNo) // 鏄惧紡鎸囧畾鏇存柊鏉′欢 + .ExecuteCommand(); + + // 鏌ヨ UpdateMesQaItems 琛ㄤ腑鏄惁瀛樺湪鍖归厤鐨勮褰� + var existingRecord = db.Queryable<UpdateMesQaItems>() + .Where(it => it.ReleaseNo == ReleaseNo) + .First(); // 浣跨敤 First 鑾峰彇绗竴鏉¤褰� + + Debug.WriteLine($"鏌ヨ鍒扮殑 mapping: {JsonConvert.SerializeObject(existingRecord)}"); + + if (existingRecord != null) + { + // 鏇存柊 UpdateMesQaItems 琛ㄤ腑鐨勫瓧娈� + existingRecord.FngHandle = qcIssueResults.FReview; + if (existingRecord.FngHandle == "閫�璐�") + { + existingRecord.FMRMODE = "閫�鏂欒ˉ鏂�"; + } + else if (existingRecord.FngHandle == "鎸戦�変娇鐢�") + { + existingRecord.FMRMODE = "閫�鏂欒ˉ鏂�"; + } + else if (existingRecord.FngHandle == "鎶ュ簾") + { + existingRecord.FMRMODE = "閫�鏂欒ˉ鏂�"; + } + else + { + existingRecord.FMRMODE = null; + } + + // 鎵ц鏇存柊鎿嶄綔 + updateResult = db.Updateable(existingRecord).ExecuteCommand(); + + if(updateResult > 0) + { + try + { + + //瀹氫箟杈撳叆鍙傛暟 + var inputParam1 = new SugarParameter("PI_BILLNO", ReleaseNo); + var inputParam2 = new SugarParameter("PI_USER", "PL017"); + var inputParam3 = new SugarParameter("PI_HANDLE", existingRecord.FngHandle); + var inputParam4 = new SugarParameter("PI_TLFS", existingRecord.FMRMODE); + var inputParam5 = new SugarParameter("PI_REMARK", ""); + + // 瀹氫箟杈撳嚭鍙傛暟 + var outParam1 = new SugarParameter("PO_RESULT", null, true); + var outParam2 = new SugarParameter("PO_MSG", null, true); + // 浣跨敤 SqlSugar 鎵ц瀛樺偍杩囩▼ + Db.Ado.ExecuteCommand("BEGIN PRC_MES_IQC_CG_SUBMIT(:PI_BILLNO,:PI_BILLNO,:PI_HANDLE,:PI_TLFS,:PI_REMARK,:PO_RESULT,:PO_MSG); END;", inputParam1, inputParam2, inputParam3, inputParam4, inputParam5, outParam1, outParam2); + // 鑾峰彇杈撳嚭鍙傛暟鐨勫�� + int result = int.Parse((string)outParam1.Value); + string message = outParam2.Value == DBNull.Value ? string.Empty : (string)outParam2.Value; + if (result == 1) + { + //瀛樺偍杩囩▼澶辫触鍒欎簨鍔¤繘琛屽洖婊� + db.Ado.RollbackTran(); + throw new Exception(message); + } + // 鎻愪氦浜嬪姟 + db.Ado.CommitTran(); + return true; + + } + catch (Exception ex) + { + Console.WriteLine("Exception: " + ex.Message); + return false; + } + } + + return updateResult > 0; // 濡傛灉鏇存柊鎴愬姛锛岃繑鍥� true + } + else + { + throw new Exception("鏈壘鍒伴渶瑕佹洿鏂扮殑璁板綍"); + } + } } + } else { diff --git a/MESApplication/Config/appsettings.json b/MESApplication/Config/appsettings.json index 00034c9..cf432d9 100644 --- a/MESApplication/Config/appsettings.json +++ b/MESApplication/Config/appsettings.json @@ -8,10 +8,10 @@ }, "AllowedHosts": "*", "Version": "1.0.0", - "X-KDApi-AcctID": "6722eada66becb", + "X-KDApi-AcctID": "61ce591aee4c5a", "X-KDApi-UserName": "mes", - "X-KDApi-AppID": "302566_0+8rS6ssRNHX7Yzs06TKS8XHVjRc5oMv", - "X-KDApi-AppSec": "c2a54b3702ce4cdc9d86867d822f4088", + "X-KDApi-AppID": "310228_4f7q68lG0OG9w9XL5e3q0bXqzgQV4toK", + "X-KDApi-AppSec": "db05ae60d70e4bd0a8bdb974f8030f6f", "X-KDApi-LCID": "2052", "X-KDApi-ServerUrl": "http://121.36.245.199/K3cloud/" } \ No newline at end of file diff --git a/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user b/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user index 5c021dc..00bc333 100644 --- a/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ <Project> <PropertyGroup> <_PublishTargetUrl>D:\VISUAL STUDIOS JOB\YC\MESApplication\bin\Release\net8.0\publish\</_PublishTargetUrl> - <History>True|2025-04-14T18:22:50.8483367Z||;True|2025-04-14T17:01:19.3567029+08:00||;True|2025-04-10T16:29:29.4614826+08:00||;True|2025-04-03T12:04:01.6354165+08:00||;True|2025-03-28T14:28:57.3291596+08:00||;True|2025-03-25T17:51:51.1941007+08:00||;True|2025-03-25T17:28:17.3219786+08:00||;True|2025-03-25T15:25:43.0061330+08:00||;True|2025-03-24T17:58:37.6820871+08:00||;True|2024-10-28T11:56:24.2694762+08:00||;True|2024-10-28T11:40:56.4512491+08:00||;True|2024-10-28T11:28:42.4509497+08:00||;True|2024-10-28T11:11:11.1286907+08:00||;True|2024-10-28T10:09:42.4378313+08:00||;True|2024-10-28T09:57:51.0792947+08:00||;True|2024-10-23T17:07:23.7741858+08:00||;True|2024-10-22T14:34:55.4526970+08:00||;True|2024-10-17T16:37:53.4763504+08:00||;True|2024-10-13T14:04:45.3666662+08:00||;True|2024-10-13T12:30:16.7294894+08:00||;True|2024-10-13T12:22:13.5740642+08:00||;True|2024-09-26T17:43:56.9592414+08:00||;True|2024-09-25T09:56:59.0722612+08:00||;True|2024-09-20T16:35:40.9416105+08:00||;True|2024-09-13T15:42:08.2824743+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-05-06T10:44:59.6980994Z||;True|2025-05-06T18:39:53.5994195+08:00||;True|2025-05-06T15:31:35.4635552+08:00||;True|2025-05-06T14:42:04.8934173+08:00||;True|2025-04-28T20:38:10.9382378+08:00||;True|2025-04-28T19:02:47.1742326+08:00||;True|2025-04-28T18:34:57.6622084+08:00||;True|2025-04-28T13:05:23.6608249+08:00||;True|2025-04-28T09:37:26.7461458+08:00||;True|2025-04-28T09:35:49.4586494+08:00||;True|2025-04-23T09:20:16.5810299+08:00||;True|2025-04-22T14:55:52.6602616+08:00||;True|2025-04-22T14:52:09.2986761+08:00||;True|2025-04-22T14:35:55.6073919+08:00||;True|2025-04-21T17:25:11.3783000+08:00||;True|2025-04-15T02:22:50.8483367+08:00||;True|2025-04-14T17:01:19.3567029+08:00||;True|2025-04-10T16:29:29.4614826+08:00||;True|2025-04-03T12:04:01.6354165+08:00||;True|2025-03-28T14:28:57.3291596+08:00||;True|2025-03-25T17:51:51.1941007+08:00||;True|2025-03-25T17:28:17.3219786+08:00||;True|2025-03-25T15:25:43.0061330+08:00||;True|2025-03-24T17:58:37.6820871+08:00||;True|2024-10-28T11:56:24.2694762+08:00||;True|2024-10-28T11:40:56.4512491+08:00||;True|2024-10-28T11:28:42.4509497+08:00||;True|2024-10-28T11:11:11.1286907+08:00||;True|2024-10-28T10:09:42.4378313+08:00||;True|2024-10-28T09:57:51.0792947+08:00||;True|2024-10-23T17:07:23.7741858+08:00||;True|2024-10-22T14:34:55.4526970+08:00||;True|2024-10-17T16:37:53.4763504+08:00||;True|2024-10-13T14:04:45.3666662+08:00||;True|2024-10-13T12:30:16.7294894+08:00||;True|2024-10-13T12:22:13.5740642+08:00||;True|2024-09-26T17:43:56.9592414+08:00||;True|2024-09-25T09:56:59.0722612+08:00||;True|2024-09-20T16:35:40.9416105+08:00||;True|2024-09-13T15:42:08.2824743+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 8a56813..1fd5998 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 b78723c..59fb86f 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 be9764d..18f7ab0 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 7d628bc..d09a3bc 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 f9a78d1..5cce981 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 0c56bb0..5a314aa 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 b4102a3..7121452 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 8fa6fa6..5b1f69b 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 7d628bc..d09a3bc 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 4b362f7..fe891b1 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 0c56bb0..5a314aa 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 b4102a3..7121452 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 8fa6fa6..5b1f69b 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 7d628bc..d09a3bc 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 4b362f7..fe891b1 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