From 278c9cfdb2aef8ac079e04b94719c6125b747d4b Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期四, 18 一月 2024 09:11:41 +0800 Subject: [PATCH] 特批申请单:审核时对于单据状态为0的单据无法审核,提示单据不为“创建”状态 --- WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs | 87 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 83 insertions(+), 4 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs index 21886e5..ed0d865 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs @@ -1478,6 +1478,26 @@ } if (IsAudit == 1) //鍙嶅鏍告彁浜� { + //鍙嶅鏍稿墠鎺у埗========================================= + DataSet ds = oCN.RunProcReturn("Exec h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl " + lngBillKey, "h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl"); + if (ds == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + //========================================================= + //鍙嶅鏍告彁浜bandonCheck if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { @@ -1856,11 +1876,11 @@ try { string sql = @"select - c.HEmpID + ISNULL(c.HEmpID,0) HEmpID ,e.HName HEmpName - ,c.HDeptID + ,ISNULL(c.HDeptID,0) HDeptID ,d.HName HDeptName - ,d.HEmpID HManagerID + ,ISNULL(d.HEmpID,0) HManagerID ,e1.HName HManagerName from Gy_Czygl as c left join Gy_Employee as e on c.HEmpID = e.HItemID @@ -1923,7 +1943,7 @@ else { sWhere = " and HCusID in ("; - for(var i = 0; i < ds.Tables[0].Rows.Count; i++) + for (var i = 0; i < ds.Tables[0].Rows.Count; i++) { if (i < ds.Tables[0].Rows.Count - 1) { @@ -1935,6 +1955,8 @@ } } } + + //sWhere = " and 1=1 "; } objJsonResult.code = "1"; @@ -2062,6 +2084,8 @@ List<object> columnNameList0 = new List<object>(); List<object> columnNameList1 = new List<object>(); List<object> columnNameList2 = new List<object>(); + List<object> columnNameList3 = new List<object>(); + List<object> columnNameList4 = new List<object>(); string sql = "exec h_p_Xs_SeOrderBill_lookdown " + HInterID; ds = oCN.RunProcReturn(sql, "h_p_Xs_SeOrderBill_lookdown"); @@ -2090,9 +2114,27 @@ columnNameList2.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } + //娣诲姞 閿�鍞嚭搴撳崟 鍒楀悕 + foreach (DataColumn col in ds.Tables[3].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList3.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + //娣诲姞 宸ュ簭娴佽浆鍗� 鍒楀悕 + foreach (DataColumn col in ds.Tables[4].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList4.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + columnNameListSum.Add(columnNameList0); columnNameListSum.Add(columnNameList1); columnNameListSum.Add(columnNameList2); + columnNameListSum.Add(columnNameList3); + columnNameListSum.Add(columnNameList4); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -2111,5 +2153,42 @@ } } #endregion + + #region 閿�鍞鍗� 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栭攢鍞鍗曟暟鎹� + [Route("Xs_SeOrderBill/loadXs_SeOrderBill_Push")] + [HttpGet] + public object loadXs_SeOrderBill_Push(long HInterID,long HSubID) + { + try + { + + ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where hmainid =" + HInterID + " and hsubid = " + HSubID, "h_v_IF_SeOrderBillList"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈煡璇㈠埌婧愬崟淇℃伅锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + 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 } } \ No newline at end of file -- Gitblit v1.9.1