From ce0f3ec31221026f3df41658433c721ae0236d50 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期五, 10 十一月 2023 11:58:43 +0800 Subject: [PATCH] 特批申请单:审核后同步审核源单 --- WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs | 330 +------------------------------------------------------ 1 files changed, 6 insertions(+), 324 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs b/WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs index 2f5b331..7822ac2 100644 --- a/WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs @@ -472,56 +472,12 @@ //oBill.oCn.BeginTran(); if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { - //if (oBill.omodel.HMainSourceBillType == "1401") //鑷姩瀹℃牳閿�鍞鍗� - //{ - // objJsonResult = AuditXs_SeOrderBill((int)oBill.omodel.HMainSourceInterID, 0, CurUserName); - // if (objJsonResult.count != 0) - // { - // oBill.oCn.Commit(); - - // objJsonResult.code = "1"; - // objJsonResult.count = 1; - // objJsonResult.Message = "瀹℃牳鎴愬姛"; - // objJsonResult.data = null; - // return objJsonResult; - // } - // else - // { - // //oBill.oCn = new SQLHelper.ClsCN(); - // return objJsonResult; - // } - - //} - //else if (oBill.omodel.HMainSourceBillType == "1205") //鑷姩瀹℃牳閿�鍞嚭搴撳崟 - //{ - // objJsonResult = AuditKf_SellOutBill((int)oBill.omodel.HMainSourceInterID, 0, CurUserName); - // if (objJsonResult.count != 0) - // { - // oBill.oCn.Commit(); - - // objJsonResult.code = "1"; - // objJsonResult.count = 1; - // objJsonResult.Message = "瀹℃牳鎴愬姛"; - // objJsonResult.data = null; - // return objJsonResult; - // } - // else - // { - // //oBill.oCn = new SQLHelper.ClsCN(); - // return objJsonResult; - // } - //} - //else - //{ - // //oBill.oCn = new SQLHelper.ClsCN(); - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟绫诲瀷閿欒锛�"; - // objJsonResult.data = null; - // return objJsonResult; - //} - - + //瀹℃牳婧愬崟 + oCN.BeginTran(); + string sql = "exec h_p_Xs_ExceptiveCheckRequestBill_ReWriteSourceStatus " + oBill.omodel.HMainSourceInterID + ",'" + oBill.omodel.HMainSourceBillType + "','" + CurUserName + "'"; + oCN.RunProc(sql); + oCN.Commit(); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "瀹℃牳鎴愬姛"; @@ -569,280 +525,6 @@ return objJsonResult; } } - - #region 瀹℃牳閿�鍞鍗� - public json AuditXs_SeOrderBill(int HInterID, int IsAudit, string CurUserName) - { - string ModRightNameCheck = "Xs_SeOrderBill_Check"; - DBUtility.ClsPub.CurUserName = CurUserName; - try - { - //瀹℃牳鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; - objJsonResult.data = null; - return objJsonResult; - } - //HInterID鏁版嵁鍒ゆ柇 - if (HInterID <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟HInterID灏忎簬0锛�"; - objJsonResult.data = null; - return objJsonResult; - } - - - Int64 lngBillKey = 0; - lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� - DAL.ClsXs_SeOrderBill oBill = new DAL.ClsXs_SeOrderBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� - - //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔 - if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 - { - if (oBill.omodel.HCloseMan.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (oBill.omodel.HDeleteMan.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (IsAudit == 0) //瀹℃牳鍒ゆ柇 - { - if (oBill.omodel.HChecker.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - } - if (IsAudit == 1) //鍙嶅鏍稿垽鏂� - { - if (oBill.omodel.HChecker.Trim() == "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!"; - objJsonResult.data = null; - return objJsonResult; - } - } - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - - - //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� - if (IsAudit == 0) //瀹℃牳鎻愪氦 - { - //瀹℃牳鎻愪氦 - if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "婧愬崟瀹℃牳鎴愬姛"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - if (IsAudit == 1) //鍙嶅鏍告彁浜� - { - //鍙嶅鏍告彁浜bandonCheck - if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "婧愬崟鍙嶅鏍告垚鍔�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - return objJsonResult; - } - catch (Exception e) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - #endregion - - #region 瀹℃牳閿�鍞嚭搴撳崟 - public json AuditKf_SellOutBill(int HInterID, int IsAudit, string CurUserName) - { - string ModRightNameCheck = "Kf_SellOutBill_Check"; - DBUtility.ClsPub.CurUserName = CurUserName; - try - { - //瀹℃牳鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; - objJsonResult.data = null; - return objJsonResult; - } - //HInterID鏁版嵁鍒ゆ柇 - if (HInterID <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟HInterID灏忎簬0锛�"; - objJsonResult.data = null; - return objJsonResult; - } - - - Int64 lngBillKey = 0; - lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� - DAL.ClsKf_SellOutBill oBill = new DAL.ClsKf_SellOutBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� - - //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔 - if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 - { - if (oBill.omodel.HCloseMan.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (oBill.omodel.HDeleteMan.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (IsAudit == 0) //瀹℃牳鍒ゆ柇 - { - if (oBill.omodel.HChecker.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - } - if (IsAudit == 1) //鍙嶅鏍稿垽鏂� - { - if (oBill.omodel.HChecker.Trim() == "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!"; - objJsonResult.data = null; - return objJsonResult; - } - } - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - - - //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� - if (IsAudit == 0) //瀹℃牳鎻愪氦 - { - //瀹℃牳鎻愪氦 - if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "婧愬崟瀹℃牳鎴愬姛"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - if (IsAudit == 1) //鍙嶅鏍告彁浜� - { - //鍙嶅鏍告彁浜bandonCheck - if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "婧愬崟鍙嶅鏍告垚鍔�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - return objJsonResult; - } - catch (Exception e) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - #endregion #endregion #region 鐗规壒鐢宠鍗� 鍏抽棴/鍙嶅叧闂� -- Gitblit v1.9.1