From 710311abde05a1e08a90d8b6154d7d6b78e7a84e Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期一, 24 三月 2025 17:31:24 +0800 Subject: [PATCH] 设备启动点检单、防错验证检查单、首件单、巡检单、工序转移检验单、库存检验单、车间自检单、环境检测单、不良品评审处理单、异常反馈单、异常反馈接收单、异常反馈签到单、异常反馈处理单、异常反馈验收单、检验取样单、检验还样单 数据库分页; 保存前控制,保存后控制; 审核前控制,反审核前控制, 审核后控制,反审核后控制,删除前控制,删除后控制; 关闭前控制,反关闭前控制;;关闭后控制,反关闭后控制; --- WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 74 ++++++++++++++++++++++++++++++------- 1 files changed, 60 insertions(+), 14 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs index e34643b..4834bcb 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs @@ -389,7 +389,7 @@ } - //=========================淇濆瓨鍚庢帶鍒� + //=========================淇濆瓨鍚庢帶鍒� ============================ DataSet ds2 = oCN.RunProcReturn("Exec h_p_Sc_StationInBill_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "',1 ", "h_p_Sc_StationInBill_AfterSaveCtrl"); if (ds2 == null) { @@ -410,7 +410,7 @@ objJsonResult.data = null; return objJsonResult; } - //============================ + //======================================================= oCN.Commit(); @@ -990,8 +990,6 @@ { try { - string ModRightNameCheck = ""; - if (HBillSubType == "SUB") { //瀹℃牳鏉冮檺 @@ -1046,7 +1044,7 @@ 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"); @@ -1067,7 +1065,7 @@ objJsonResult.data = null; return objJsonResult; } - + //============================================================================= //瀹℃牳 if (Cj_StationInBillCheckBill(HInterID, HBillNo, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo)) { @@ -1127,7 +1125,7 @@ { } - //瀹℃牳鍚庢帶鍒� + //瀹℃牳鍚庢帶鍒�======================================================= 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) @@ -1142,7 +1140,7 @@ oCN.RollBack(); return false; } - + //==================================================================== sReturn = sReturn + " 瀹℃牳鍔熻兘锛�"; oCN.Commit(); return true; @@ -1220,7 +1218,7 @@ 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"); @@ -1241,7 +1239,7 @@ objJsonResult.data = null; return objJsonResult; } - + //============================================================================================ //鍙嶅鏍� if (Cj_StationInBillAbandonCheckBill(HInterID, HBillNo, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo)) { @@ -1305,7 +1303,7 @@ { } - //鍙嶅鏍稿悗鎺у埗 + //鍙嶅鏍稿悗鎺у埗======================================================================== 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) @@ -1320,7 +1318,7 @@ oCN.RollBack(); return false; } - + //============================================================================================ sReturn = sReturn + "鍙嶅鏍稿姛鑳斤紒"; oCN.Commit(); return true; @@ -1420,8 +1418,32 @@ return objJsonResult; } } + var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); + + //鍏抽棴鍓嶆帶鍒�========================================= + string sql1 = "exec h_p_Sc_ShiftsBeginInfoBill_BeforeCloseCtrl " + HInterID + ",'" +HBillNo + "','" + user + "'"; + ds = oCN.RunProcReturn(sql1, "h_p_Sc_ShiftsBeginInfoBill_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_ShiftsBeginInfoBill_AfterCloseCtrl", user,ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 1; @@ -1447,8 +1469,32 @@ return objJsonResult; } } + var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); + //鍙嶅叧闂墠鎺у埗========================================= + string sql1 = "exec h_p_Sc_StationInBill_BeforeUnCloseCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'"; + ds = oCN.RunProcReturn(sql1, "h_p_Sc_StationInBill_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_StationInBill_AfterUnCloseCtrl", user, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 1; -- Gitblit v1.9.1