From 5466e02176f2acf2f08ef1c16315c3185bae903f Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期一, 19 五月 2025 15:53:34 +0800 Subject: [PATCH] 异常反馈单,快捷开工接口调整 --- WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 68 +++++++++++++++++++++++++++++----- 1 files changed, 58 insertions(+), 10 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs index 94c868c..e2268f6 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs @@ -2754,7 +2754,7 @@ int j = 0; for (int i = 0; i < HInterIDs.Length; i++) { - //瀹℃牳鍓嶆帶鍒� + //瀹℃牳鍓嶆帶鍒�================================================================================ string sql = "exec h_p_Sc_StationOutBill_BeforeCheckCtrl " + HInterIDs[i] + ",'" + HBillNo[i] + "','" + CurUserName + "'"; ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_BeforeCheckCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) @@ -2774,7 +2774,7 @@ objJsonResult.data = null; return objJsonResult; } - + //================================================================================ //瀹℃牳 if (Cj_StationOutBillCheckBill(long.Parse(HInterIDs[i]), HBillNo[i], CurUserName, oBill.omodel.HLastSubProc, ref DBUtility.ClsPub.sExeReturnInfo)) @@ -2850,7 +2850,7 @@ LogService.Write("鍑虹珯鍗曟嵁瀹℃牳鏇存敼娴佽浆鍗℃暟閲�,娴佽浆鍗�:" + HProcExchBillNo + ",鍑虹珯鍗曞彿锛�" + HBillNo + ",鍘熸祦杞崱鏁伴噺:" + HProcExchQty + ",鏂版祦杞崱鏁伴噺:" + HQty); } - //瀹℃牳鍚庢帶鍒� + //瀹℃牳鍚庢帶鍒�================================================================================ string sql = "exec h_p_Sc_StationOutBill_AfterCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'"; ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_AfterCheckCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) @@ -2865,7 +2865,7 @@ oCN.RollBack(); return false; } - + //================================================================================ sReturn = sReturn + " 瀹℃牳鍔熻兘锛�"; oCN.Commit(); @@ -2972,7 +2972,7 @@ int j = 0; for (int i = 0; i < HInterIDs.Length; i++) { - //鍙嶅鏍稿墠鎺у埗 + //鍙嶅鏍稿墠鎺у埗============================================================= string sql = "exec h_p_Sc_StationOutBill_BeforeUnCheckCtrl " + HInterIDs[i] + ",'" + HBillNo[i] + "','" + CurUserName + "'"; ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_BeforeUnCheckCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) @@ -2992,7 +2992,7 @@ objJsonResult.data = null; return objJsonResult; } - + //================================================================================ //鍙嶅鏍� if (Cj_StationOutBillAbandonCheckBill(long.Parse(HInterIDs[i]),HBillNo[i], CurUserName, oBill.omodel.HLastSubProc, ref DBUtility.ClsPub.sExeReturnInfo)) { @@ -3086,7 +3086,7 @@ return false; ; } } - + #endregion #region 宸ュ簭鍑虹珯鍏抽棴/鍙嶅叧闂姛鑳� [Route("Cj_StationOutBill/CloseCj_StationOutBill")] @@ -3151,8 +3151,32 @@ return objJsonResult; } } + var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); + + //鍏抽棴鍓嶆帶鍒�========================================= + string sql1 = "exec h_p_Sc_StationOutBill_BeforeCloseCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'"; + ds = oCN.RunProcReturn(sql1, "h_p_Sc_StationOutBill_BeforeCloseCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:鍏抽棴鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + objJsonResult.data = null; + return objJsonResult; + } + + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.data = null; + return objJsonResult; + } + //================================================================================== + //鍏抽棴鍗曟嵁 - if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + if (!BillOld.CloseBill(Int64.Parse(HInterID), HBillNo, "h_p_Sc_StationOutBill_AfterCloseCtrl", user, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 1; @@ -3178,8 +3202,32 @@ return objJsonResult; } } + var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); + //鍙嶅叧闂墠鎺у埗========================================= + string sql1 = "exec h_p_Sc_StationOutBill_BeforeUnCloseCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'"; + ds = oCN.RunProcReturn(sql1, "h_p_Sc_StationOutBill_BeforeUnCloseCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:鍙嶅叧闂墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�"; + objJsonResult.data = null; + return objJsonResult; + } + + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.data = null; + return objJsonResult; + } + //================================================================================== + + //鍙嶅叧闂崟鎹� - if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + if (!BillOld.CancelClose(Int64.Parse(HInterID), HBillNo, "h_p_Sc_StationOutBill_AfterUnCloseCtrl", user, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 1; @@ -3211,7 +3259,7 @@ - //鏄惁琚叧鑱� + #region //鏄惁琚叧鑱� public bool Cj_StationInBillisUse(Int64 lngBillKey, ref string sReturn) { try -- Gitblit v1.9.1