1
lan
2024-05-30 8affd199e02bd37f0dcb16447d1fbcaa34bfa2f8
WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs
@@ -217,7 +217,15 @@
                }
                //进行 会计期间 结账 的判断和控制
                int sYear = 0;
                int sPeriod = 0;
                DateTime HDate = DateTime.Now;
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    objJsonResult.Message = s;
                    return objJsonResult;
                }
                //保存
                //保存完毕后处理
@@ -349,6 +357,15 @@
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //进行 会计期间 结账 的判断和控制
                int sYear = 0;
                int sPeriod = 0;
                DateTime HDate = DateTime.Now;
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    objJsonResult.Message = s;
                    return objJsonResult;
                }
                oCN.BeginTran();
@@ -468,8 +485,17 @@
                //进行需要进行的审核/反审核操作
                if (IsAudit == 0) //审核提交
                {
                    //进行 会计期间 结账 的判断和控制
                    string s = "";
                    int sYear = 0;
                    int sPeriod = 0;
                    DateTime HDate = DateTime.Now;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                    {
                        objJsonResult.Message = s;
                        return objJsonResult;
                    }
                    //审核提交
                    if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
@@ -497,6 +523,17 @@
                }
                if (IsAudit == 1) //反审核提交
                {
                    //进行 会计期间 结账 的判断和控制
                    string s = "";
                    int sYear = 0;
                    int sPeriod = 0;
                    DateTime HDate = DateTime.Now;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                    {
                        objJsonResult.Message = s;
                        return objJsonResult;
                    }
                    //反审核提交AbandonCheck
                    if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
@@ -817,10 +854,20 @@
        /// </summary>
        [Route("Xs_CusRatingChangeBill/getCustomerBalance")]
        [HttpGet]
        public object getCustomerBalance(Int64 HCusID)
        public object getCustomerBalance(Int64 HCusID, string CurUserName)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_Customer_Balance", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无客户余额查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql = "exec h_p_Gy_Customer_CrediControl " + HCusID;
                ds = oCN.RunProcReturn(sql, "h_p_Gy_Customer_CrediControl");
                if(ds == null || ds.Tables[0].Rows.Count == 0)