From 63041fcfe73b6e1245e0583a357da1129c1d94a1 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期三, 09 四月 2025 17:15:43 +0800 Subject: [PATCH] 增加 工作周计划 审核后控制 --- WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs | 131 +++++++++++++++++++++---------------------- 1 files changed, 63 insertions(+), 68 deletions(-) diff --git a/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs b/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs index 8d3ae33..0c848c5 100644 --- a/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs +++ b/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs @@ -137,60 +137,7 @@ return objJsonResult; } } - #endregion - - #region 璁惧宸ヨ壓鍙傛暟鏄庣粏琛屽垎椤垫煡璇� - [Route("Sb_EquipStopBill/get锘縎b_EquipStopBillListPage")] - [HttpGet] - public object Sb_EquipBeginBillListPage(string sWhere, string user, int page, int size) - { - try - { - List<object> columnNameList = new List<object>(); - //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("ModRightNameList", 3, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; - objJsonResult.data = null; - return objJsonResult; - } - sWhere = sWhere.Replace("'", "''"); - if (sWhere == null || sWhere.Equals("")) - { - ds = oCn.RunProcReturn("exec h_p_Sb_EquipStopBillMainListPage " + page + "," + size + ",''", "h_p_Sb_EquipStopBillMainListPage"); - } - else - { - ds = oCn.RunProcReturn("exec h_p_Sb_EquipStopBillMainListPage " + page + "," + size + ",'" + sWhere + "'", "h_p_Sb_EquipStopBillMainListPage"); - } - - //娣诲姞鍒楀悕 - foreach (DataColumn col in ds.Tables[0].Columns) - { - Type dataType = col.DataType; - string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; - columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 - } - - objJsonResult.code = "1"; - objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); - objJsonResult.Message = "Sucess锛�"; - objJsonResult.list = columnNameList; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } - catch (Exception e) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - #endregion + #endregion #region 璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛ㄥ垹闄� /// <summary> @@ -515,23 +462,47 @@ objJsonResult.data = null; return objJsonResult; } - //鍏抽棴鍗曟嵁 - if (!oBill.CloseBill(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) + + string sql = ""; + //鍏抽棴鍓嶆帶鍒�===============================================Begin=================================================================== + sql = "exec h_p_Sb_EquipICMOTechParamBill_BeforeCloseCtrl " + HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'"; + ds = oCn.RunProcReturn(sql, "h_p_Sb_EquipICMOTechParamBill_BeforeCloseCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:鍏抽棴鍓嶅墠鍒ゆ柇澶辫触锛屾棤杩斿洖淇℃伅锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�"; + objJsonResult.data = null; + return objJsonResult; + + } + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.data = null; + return objJsonResult; + } + //鍏抽棴鍓嶆帶鍒�===============================================End=================================================================== + + //鍏抽棴鎻愪氦 + if (oBill.CloseBill(Convert.ToInt32(HInterID), oBill.omodel.HBillNo, "h_p_Sb_EquipICMOTechParamBill_AfterCloseCtrl", HMaker, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍏抽棴鎴愬姛"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 鍏抽棴鎴愬姛锛�"; + objJsonResult.count = 0; + objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = null; - return objJsonResult; ; - } + return objJsonResult; + } } else { @@ -543,23 +514,47 @@ objJsonResult.data = null; return objJsonResult; } - //鍙嶅叧闂崟鎹� - if (!oBill.CancelClose(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) + + string sql = ""; + //鍙嶅叧闂墠鎺у埗===============================================Begin=================================================================== + sql = "exec h_p_Sb_EquipICMOTechParamBill_BeforeUnCloseCtrl " + HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'"; + ds = oCn.RunProcReturn(sql, "h_p_Sb_EquipICMOTechParamBill_BeforeUnCloseCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:鍙嶅叧闂墠鍓嶅垽鏂け璐ワ紝鏃犺繑鍥炰俊鎭紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + objJsonResult.data = null; + return objJsonResult; + + } + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; + objJsonResult.data = null; + return objJsonResult; + } + //鍙嶅叧闂墠鎺у埗===============================================End=================================================================== + + //鍙嶅叧闂彁浜� + if (oBill.CancelClose(Convert.ToInt32(HInterID), oBill.omodel.HBillNo, "h_p_Sb_EquipICMOTechParamBill_AfterUnCloseCtrl", HMaker, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅叧闂垚鍔�"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 鍙嶅叧闂垚鍔燂紒"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = null; - return objJsonResult; ; - } + return objJsonResult; + } } } else -- Gitblit v1.9.1