| | |
| | | |
| | | try |
| | | { |
| | | |
| | | errorLogs.Add($"=== {DateTime.Now:yyyy-MM-dd HH:mm:ss} 保存开始 ==="); |
| | | |
| | | // 1. 解析数据 |
| | |
| | | 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}"); |
| | | |
| | |
| | | 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, |
| | |
| | | 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"; |
| | |
| | | |
| | | // 处理查询条件(约定:前端只发送条件表达式,可能以 AND 开头) |
| | | string whereClause = ProcessWhereClause(sWhere); |
| | | string orderByClause = "order by HItemID"; |
| | | string orderByClause = "order by hmainid"; |
| | | |
| | | // 构建完整SQL |
| | | string sql; |
| | |
| | | { |
| | | Console.WriteLine($"=== 编辑页面初始化开始 ==="); |
| | | Console.WriteLine($"参数 - HInterID: {HInterID}, User: {user}"); |
| | | |
| | | |
| | | |
| | | if (string.IsNullOrEmpty(HInterID) || HInterID == "0") |
| | | { |
| | |
| | | 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"); |
| | |
| | | { |
| | | 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"); |