From 21a66acc51d6478bdd8a028be6579099e4f86ad6 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期二, 10 十月 2023 10:55:54 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/QC_ManagementController.cs | 85 ++++++++++++++---------------------------- 1 files changed, 28 insertions(+), 57 deletions(-) diff --git a/WebAPI/Controllers/QC_ManagementController.cs b/WebAPI/Controllers/QC_ManagementController.cs index 28e0467..7452035 100644 --- a/WebAPI/Controllers/QC_ManagementController.cs +++ b/WebAPI/Controllers/QC_ManagementController.cs @@ -1204,61 +1204,7 @@ // } //} #endregion - - /// <summary> - /// 棣栦欢妫�楠岄�昏緫鍒犻櫎鍔熻兘 - /// </summary> - /// <returns></returns> - [Route("DeltetQC_FirstPieceCheck")] - [HttpGet] - public object DeltetQC_FirstPieceCheck(string HInterID, string user) - { - string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete"; - try - { - //鍒犻櫎鏉冮檺 - if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍒犻櫎澶辫触锛佹棤鏉冮檺锛�"; - objJsonResult.data = null; - return objJsonResult; - } - - if (string.IsNullOrWhiteSpace(HInterID)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "HInterID涓虹┖锛�"; - objJsonResult.data = null; - return objJsonResult; - } - //寮�濮嬩簨鐗� - oCN.BeginTran(); - oCN.RunProc("Delete From QC_FirstPieceCheckBillMain where HInterID = " + HInterID); - oCN.RunProc("Delete From QC_FirstPieceCheckBillSub where HInterID = " + HInterID); - oCN.RunProc("Delete From QC_FirstPieceCheckBillSub_ValueGrid where HInterID = " + HInterID); - oCN.RunProc("Delete From QC_FirstPieceCheckBillSub_Result where HInterID = " + HInterID); - //鎻愪氦浜嬪姟 - oCN.Commit(); - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; - objJsonResult.data = null; - return objJsonResult; - - } - catch (Exception e) - { - oCN.RollBack(); //鍥炴粴浜嬬墿 - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } + #endregion #region 宸℃ @@ -1277,6 +1223,7 @@ string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string user = sArray[2].ToString(); + string badmsg = sArray[3].ToString(); string UserName = ""; @@ -1309,7 +1256,7 @@ oItem.HBillSubType = "7506"; oItem.HBillStatus = 0; oItem.HPeriod = 0; - oItem.HMaker = ""; + oItem.HMaker = user; oItem.HMainSourceInterID = oItem.HInterID; //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); @@ -1355,10 +1302,34 @@ oItemSub.HRelationQty = 0; oItemSub.HRelationMoney = 0; oItemSub.HCloseMan = ""; - oItemSub.HRemark = ""; + //oItemSub.HRemark = ""; oBill.DetailColl.Add(oItemSub); } + badmsg = badmsg.Substring(1, badmsg.Length - 2); + badmsg = badmsg.Replace("\\", ""); + badmsg = badmsg.Replace("\n", ""); //\n + List<Model.ClsQC_PatrolProcCheckBillSub_BadReason> bs = new List<Model.ClsQC_PatrolProcCheckBillSub_BadReason>(); + bs = oListModels.getObjectByJson_ClsQC_PatrolProcCheckBillSub_BadReason(badmsg); + int j = 0; + foreach (Model.ClsQC_PatrolProcCheckBillSub_BadReason badSub in bs) + { + badSub.HBillNo_bak = oBill.omodel.HBillNo;//鍗曟嵁鍙凤紙澶囦唤锛屼互鍏嶅唴鐮佷涪澶憋紝鎵句笉鍒板搴斾富琛級 + j++; + if (string.IsNullOrWhiteSpace(badSub.HBillNo_bak)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佹病澶囦唤鍗曟嵁鍙凤紝鏃犳硶淇濆瓨锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + badSub.HInterID = oBill.omodel.HInterID; + badSub.HEntryID = j; + badSub.HSEQ = j; + oBill.DetailColl_Bad.Add(badSub); + } + //淇濆瓨 //淇濆瓨瀹屾瘯鍚庡鐞� bool bResult; -- Gitblit v1.9.1