chenhaozhe
1 天以前 000b588bfe72532d43a27483810d517b86ef94fb
WebAPI/Controllers/GZGL/Gy_SteppedPriceCoefficientController .cs
@@ -117,6 +117,7 @@
            try
            {
                errorLogs.Add($"=== {DateTime.Now:yyyy-MM-dd HH:mm:ss} 保存开始 ===");
                // 1. 解析数据
@@ -124,6 +125,16 @@
                string[] sArray = _value.Split(';');
                string jsonData = sArray[0];
                string user = sArray.Length > 1 ? sArray[1] : "unknown";
                // 查看权限检查
                if (!DBUtility.ClsPub.Security_Log("Gy_SteppedPriceCoefficient_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无编辑权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                errorLogs.Add($"解析数据: user={user}");
@@ -308,7 +319,7 @@
                            HMainSourceBillType, HMainSourceInterID, HMainSourceEntryID, HMainSourceBillNo,
                            HPrintQty, HProcID, HEmpID, HDeptID, HStockOrgID
                        ) VALUES (
                            {HYear}, {HPeriod}, 'GYST', '',
                            {HYear}, {HPeriod}, '3341', '',
                            {HInterID}, '{HDate.ToString("yyyy-MM-dd HH:mm:ss")}', '{safeHBillNo}', 1, '{safeHRemark}',
                            '', '{safeUser}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}',
                            '', 0, 0, '', 0, 
@@ -468,14 +479,14 @@
                List<object> columnNameList = new List<object>();
                // 查看权限检查
                //if (!DBUtility.ClsPub.Security_Log("Gy_MateNumRelation_Sec_Query", 1, false, user))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "无查看权限";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (!DBUtility.ClsPub.Security_Log("Gy_SteppedPriceCoefficient_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                // 构建基础SQL
                string baseSql = @"select * from h_v_Gy_SteppedPriceCoefficientBillWithSub";
@@ -485,7 +496,7 @@
                // 处理查询条件(约定:前端只发送条件表达式,可能以 AND 开头)
                string whereClause = ProcessWhereClause(sWhere);
                string orderByClause = "order by HItemID";
                string orderByClause = "order by hmainid";
                // 构建完整SQL
                string sql;
@@ -596,6 +607,8 @@
            {
                Console.WriteLine($"=== 编辑页面初始化开始 ===");
                Console.WriteLine($"参数 - HInterID: {HInterID}, User: {user}");
                if (string.IsNullOrEmpty(HInterID) || HInterID == "0")
                {
@@ -752,7 +765,15 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                // 查看权限检查
                if (!DBUtility.ClsPub.Security_Log("Gy_SteppedPriceCoefficient_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //检查单据状态
                string sql = "SELECT HBillStatus, HChecker FROM Gy_SteppedPriceCoefficientBillMain WHERE HInterID = " + HInterID;
                ds = oCN.RunProcReturn(sql, "CheckStatus");
@@ -813,6 +834,18 @@
        {
            try
            {
                // 查看权限检查
                if (!DBUtility.ClsPub.Security_Log("Gy_SteppedPriceCoefficient_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无审核权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //检查单据状态
                string checkSql = "SELECT HBillStatus, HChecker FROM Gy_SteppedPriceCoefficientBillMain WHERE HInterID = " + HInterID;
                ds = oCN.RunProcReturn(checkSql, "CheckStatus");