1
yusijie
2024-11-06 fb9bd92c61ef82561ab126f909941984f1f399df
WebAPI/Controllers/¹¤×ʹÜÀí/Pay_SingleBalBillController.cs
@@ -55,7 +55,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_SingleBalBillList where 1=1 " + sWhere + " order by hmainid desc", "h_v_Pay_SingleBalBillList");
                List<object> columnNameList = new List<object>();
@@ -941,7 +954,63 @@
        }
        #endregion
        #region å·¥èµ„结算单批量审核二版
        /// <summary>
        /// å·¥èµ„结算单批量审核二版
        /// </summary>
        /// <returns></returns>
        [Route("Pay_SingleBalBillController/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_SingleBalBill_CheckAllByTimeAndGroup " + sWhere + "", "h_p_Pay_SingleBalBill_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