From cf89cfc7e1c06a977588c2ae0185ee1b2da5ce90 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期五, 26 一月 2024 15:18:04 +0800 Subject: [PATCH] 工序流转卡 反审核 审核 方法,增加 调用 反审核 审核 前控制 h_p_Sc_ProcessExchangeBill_BeforeUnCheckCtrl 、h_p_Sc_ProcessExchangeBill_BeforeCheckCtrl 和反审核 审核 后控制 h_p_Sc_ProcessExchangeBill_AfterUnCheckCtrl、h_p_Sc_ProcessExchangeBill_AfterCheckCtrl的 存储过程。 工序返工申请单反审核 审核方法,增加 调用 反审核 审核 前控制 h_p_Sc_ProcExchWorkBackBill_BeforeUnCheckCtrl、h_p_Sc_ProcExchWorkBackBill_BeforeCheckCtrl 和反审核 审核 后控制 h_p_Sc_ProcExchWorkBackBill_AfterUnCheckCtrl、h_p_Sc_ProcExchWorkBackBill_AfterCheckCtrl的 存储过程。 工序返工记录单反审核 审核方法,增加 调用 反审核 审核 前控制 h_p_Sc_ProcExchRecordBackBill_BeforeUnCheckCtrl 、h_p_Sc_ProcExchRecordBackBill_BeforeCheckCtrl 和反审核 审核 后控制 h_p_Sc_ProcExchRecordBackBill_AfterUnCheckCtrl、h_p_Sc_ProcExchRecordBackBill_AfterCheckCtrl的 存储过程。 工序流转卡派工单反审核审核方法,增加调用反审核 审核 前控制h_p_Sc_ProcExchSendWorkBill_BeforeUnCheckCtrl、h_p_Sc_ProcExchSendWorkBill_BeforeCheckCtrl 和反审核审核后控制h_p_Sc_ProcExchSendWorkBill_AfterUnCheckCtrl、h_p_Sc_ProcExchSendWorkBill_AfterCheckCtrl的存储过程。 工序委外派工单反审核审核方法,增加 调用反审核审核前控制h_p_WW_EntrustWorkOrderBill_BeforeUnCheckCtrl 、h_p_WW_EntrustWorkOrderBill_BeforeCheckCtrl和反审核 审核后控制h_p_WW_EntrustWorkOrderBill_AfterUnCheckCtrl、h_p_WW_EntrustWorkOrderBill_AfterCheckCtrl的存储过程。 工序进站接收单反审核审核方法,增加调用反审核审核前控制h_p_Sc_StationInBill_BeforeUnCheckCtrl 、h_p_Sc_StationInBill_BeforeCheckCtrl和反审核审核后控制h_p_Sc_StationInBill_AfterUnCheckCtrl、h_p_Sc_StationInBill_AfterCheckCtrl的存储过程。 工序出站汇报单反审核审核方法,增加调用反审核审核前控制h_p_Sc_StationOutBill_BeforeUnCheckCtrl 、h_p_Sc_StationOutBill_BeforeCheckCtrl和反审核 审核后控制h_p_Sc_StationOutBill_AfterUnCheckCtrl、h_p_Sc_StationOutBill_AfterCheckCtrl的存储过程 --- WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 88 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 84 insertions(+), 4 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs index 89276bf..4d54aa5 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs @@ -815,8 +815,31 @@ objJsonResult.data = null; return objJsonResult; } + + //瀹℃牳鍓嶆帶鍒� + string HBillNo = oBill.omodel.HBillNo; + string sql = "exec h_p_Sc_StationInBill_BeforeCheckCtrl " + HInterID + ",'" + HBillNo + "','" + CurUserName + "'"; + ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_BeforeCheckCtrl"); + 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 (Cj_StationInBillCheckBill(HInterID,CurUserName, ref DBUtility.ClsPub.sExeReturnInfo)) + if (Cj_StationInBillCheckBill(HInterID, HBillNo, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo)) { objJsonResult.code = "1"; objJsonResult.count = 1; @@ -845,7 +868,7 @@ } //瀹℃牳 - public bool Cj_StationInBillCheckBill(Int64 lngBillKey, string CurUserName, ref string sReturn) + public bool Cj_StationInBillCheckBill(Int64 lngBillKey,string HBillNo, string CurUserName, ref string sReturn) { try { @@ -873,6 +896,23 @@ else if (Pub_Class.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFstProc"]) == "鏄�") { } + + //瀹℃牳鍚庢帶鍒� + string sql = "exec h_p_Sc_StationInBill_AfterCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'"; + ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_AfterCheckCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + sReturn = "瀹℃牳杩囩▼涓嚭閿欙紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + oCN.RollBack(); + return false; + } + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString(); + oCN.RollBack(); + return false; + } + sReturn = sReturn + " 瀹℃牳鍔熻兘锛�"; oCN.Commit(); return true; @@ -949,8 +989,31 @@ objJsonResult.data = null; return objJsonResult; } + + //鍙嶅鏍稿墠鎺у埗 + string HBillNo = oBill.omodel.HBillNo; + string sql = "exec h_p_Sc_StationInBill_BeforeUnCheckCtrl " + HInterID + ",'" + HBillNo + "','" + CurUserName + "'"; + ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_BeforeUnCheckCtrl"); + 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 (Cj_StationInBillAbandonCheckBill(HInterID, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo)) + if (Cj_StationInBillAbandonCheckBill(HInterID, HBillNo, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo)) { objJsonResult.code = "1"; objJsonResult.count = 1; @@ -978,7 +1041,7 @@ } //鍙嶅鏍� - public bool Cj_StationInBillAbandonCheckBill(Int64 lngBillKey, string CurUserName, ref string sReturn) + public bool Cj_StationInBillAbandonCheckBill(Int64 lngBillKey,string HBillNo, string CurUserName, ref string sReturn) { if (Cj_StationInBillisUse(lngBillKey, ref sReturn)) { @@ -1011,6 +1074,23 @@ else if (Pub_Class.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFstProc"]) == "鏄�") { } + + //鍙嶅鏍稿悗鎺у埗 + string sql = "exec h_p_Sc_StationInBill_AfterUnCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'"; + ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_AfterUnCheckCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + sReturn = "鍙嶅鏍歌繃绋嬩腑鍑洪敊锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�"; + oCN.RollBack(); + return false; + } + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString(); + oCN.RollBack(); + return false; + } + sReturn = sReturn + "鍙嶅鏍稿姛鑳斤紒"; oCN.Commit(); return true; -- Gitblit v1.9.1