From fb9bd92c61ef82561ab126f909941984f1f399df Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 06 十一月 2024 12:11:42 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/工资管理/Pay_GroupBalBillController.cs | 72 +++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+), 1 deletions(-) diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" index 837b3c5..4d8865a 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" @@ -54,7 +54,20 @@ objJsonResult.data = null; return objJsonResult; } - + //鍒ゆ柇鏄惁鏈夋煡鐪嬪叏閮ㄧ彮缁勭殑鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_Group_AllQuery", 3, false, HMaker)) + { + //濡傛灉娌℃湁杩欎釜鏉冮檺 + //鏍规嵁鐢ㄦ埛瀵瑰簲鐝粍鐨勫叧绯伙紝杩囨护鏉′欢涓鍔犲彧鏄剧ず瀵瑰簲鐨勭彮缁� + DataSet dsHitemID = oCn.RunProcReturn("exec h_p_Gy_GetSQLGroupByUser '" + HMaker + "'", "h_p_Gy_GetSQLGroupByUser"); + string sqlGroupID = DBUtility.ClsPub.isStrNull(dsHitemID.Tables[0].Rows[0]["HBack"]); + if (sqlGroupID == "" || sqlGroupID == null)//濡傛灉娌℃湁缁戝畾鐝粍鍒欒浠栫湅涓嶅埌鎵�鏈� + { + sqlGroupID = "and 1 = 2"; + } + sqlGroupID = sqlGroupID.Replace("HitemID", "HGroupID");//鏇挎崲sql璇彞涓殑HitemID + sWhere = sWhere + sqlGroupID; + } //杩斿洖鍒楄〃淇℃伅 ds = oCn.RunProcReturn("select * from h_v_Pay_GroupBalBillList where 1=1 " + sWhere + " order by hmainid desc", "h_v_Pay_GroupBalBillList"); List<object> columnNameList = new List<object>(); @@ -483,6 +496,63 @@ } #endregion + #region 宸ヨ祫缁撶畻鍗曢泦浣撴壒閲忓鏍镐簩鐗� + /// <summary> + /// 宸ヨ祫缁撶畻鍗曟壒閲忓鏍镐簩鐗� + /// </summary> + /// <returns></returns> + [Route("Pay_GroupBalBillController/CheckAllByTimeAndGroup")] + [HttpGet] + public object CheckAllByTimeAndGroup(string sWhere, string HMaker) + { + try + { + //鍒ゆ柇鏉冮檺 + if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 3, false, HMaker)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒"; + objJsonResult.data = null; + return objJsonResult; + } + + ds = oCn.RunProcReturn($"exec h_p_Pay_GroupBalBill_CheckAllByTimeAndGroup " + sWhere + "", "h_p_Pay_GroupBalBill_CheckAllByTimeAndGroup"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀛樺偍杩囩▼鍒ゆ柇澶辫触锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + } + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0].Rows[0]["HRemark"]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ鍒楄〃淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion #region 宸ヨ祫缁撶畻鍗曪紙闆嗕綋锛� 鍏抽棴/鍙嶅叧闂� /// <summary> -- Gitblit v1.9.1