SVN r1044

SVN-Revision: r1044
This commit is contained in:
cyf
2025-11-20 08:54:42 +00:00
parent 055845b380
commit a25c68d10e
10 changed files with 265 additions and 93 deletions
+33 -7
View File
@@ -170,6 +170,18 @@ namespace Lskj.Business.Impl
/// 创建日期:2017-12-11 /// 创建日期:2017-12-11
/// 修改日期:2025-09-10(新增重载:返回 SP Return 值;@msg 通过 out /// 修改日期:2025-09-10(新增重载:返回 SP Return 值;@msg 通过 out
/// </summary> /// </summary>
/// <param name="stepCode">步骤编号</param>
/// <param name="billDocumentId">单据编号.</param>
/// <param name="Msg">特定消息</param>
/// <param name="storedName">存储过程名.</param>
/// <param name="accractFlag">审批方向'F'=审批,'R'反审批 'Q' 关闭.</param>
/// <param name="remindSelect">提醒</param>
/// <param name="remarkText">意见文本.</param>
/// <param name="remindOpers">提醒人</param>
/// <param name="confirmOpers">确认人</param>
/// <param name="ret">是否为返退处理<c>true</c> [ret].</param>
/// <param name="returnd">返退参数</param>
/// <param name="comfirm">确认标识:默认传0</param>
public static string Audit( public static string Audit(
out string nextSelectStepCode, out string nextSelectStepCode,
out string nextSelectStepOper, out string nextSelectStepOper,
@@ -187,7 +199,8 @@ namespace Lskj.Business.Impl
bool ret = false, bool ret = false,
int returnd = 0, int returnd = 0,
int selectConfirmFlag = 0, int selectConfirmFlag = 0,
bool IsStepOver = false) bool IsStepOver = false,
int comfirm = 0)
{ {
bool newAudit = true; bool newAudit = true;
int i = 8; int i = 8;
@@ -226,7 +239,6 @@ namespace Lskj.Business.Impl
new SqlParameter("@Direction", SqlDbType.Char, 1), new SqlParameter("@Direction", SqlDbType.Char, 1),
pMsg pMsg
}; };
if (newAudit) if (newAudit)
{ {
list.Add(new SqlParameter("@selectConfirmFlag", SqlDbType.Int, 4)); list.Add(new SqlParameter("@selectConfirmFlag", SqlDbType.Int, 4));
@@ -245,6 +257,15 @@ namespace Lskj.Business.Impl
list.Add(new SqlParameter("@backStepCode", SqlDbType.Int, 4)); list.Add(new SqlParameter("@backStepCode", SqlDbType.Int, 4));
} }
//判断是否存在confirmFlag参数
DataTable dt = GetDataTableResult(string.Format("select * from syscolumns where id =object_id('{0}') and name='@confirmFlag'", storedName));
if (dt != null && dt.Rows.Count > 0)
{
SqlParameter Flag = new SqlParameter("@confirmFlag", SqlDbType.Int, 4);
Flag.Value = comfirm;
list.Add(Flag);
}
// 追加 Return 参数 // 追加 Return 参数
list.Add(pReturn); list.Add(pReturn);
@@ -295,9 +316,9 @@ namespace Lskj.Business.Impl
? "0" ? "0"
: Convert.ToInt32(pReturn.Value).ToString(); : Convert.ToInt32(pReturn.Value).ToString();
if (retCode.Equals("-1")&& ERPInfo.Instance.UserName.Equals("管理员")) if (retCode.Equals("-1"))
{ {
SqlStoredProcedurepPrompt.GenerateAuditExecutionScript(sysModel, stepCode, billDocumentId, storedName, accractFlag, remindSelect, remarkText, remindOpers, confirmOpers, ret, returnd, selectConfirmFlag, IsStepOver); SqlStoredProcedurepPrompt.GenerateAuditExecutionScript(sysModel, stepCode, billDocumentId, storedName, accractFlag, remindSelect, remarkText, remindOpers, confirmOpers, ret, returnd, selectConfirmFlag, IsStepOver, comfirm);
} }
return retCode; return retCode;
@@ -620,16 +641,17 @@ namespace Lskj.Business.Impl
/// <param name="stepCode">进度编号</param> /// <param name="stepCode">进度编号</param>
/// <param name="operatorName">角色名</param> /// <param name="operatorName">角色名</param>
/// <returns>DataTable.</returns> /// <returns>DataTable.</returns>
public static DataTable GetGridColumns(string table, string menuCode, string stepCode, string operatorName) public static DataTable GetGridColumns(string table, string menuCode, string stepCode, string operatorName,bool TotalExistsTask=false)
{ {
string text= TotalExistsTask? ",isSum" : "";
string sqlValue = string.Format(@"select isnull(CASE WHEN ISNULL(b.userList,'')='' AND ISNULL(a.PrivilegeView,'')<>'' THEN 0 ELSE width END,0) width,a.id, string sqlValue = string.Format(@"select isnull(CASE WHEN ISNULL(b.userList,'')='' AND ISNULL(a.PrivilegeView,'')<>'' THEN 0 ELSE width END,0) width,a.id,
a.typeCode,a.stepCode,a.fieldName,a.sysName,a.userName,a.orderid,a.isVisible,a.privilegeView,a.MobileWidth,a.DataFormat a.typeCode,a.stepCode,a.fieldName,a.sysName,a.userName,a.orderid,a.isVisible,a.privilegeView,a.MobileWidth,a.DataFormat {1}
from {0} a from {0} a
left join ( left join (
SELECT userList,privTypeId from p_systemPrivilege b where modId =@menuCode and ISNULL(userList,'')<>'' AND CHARINDEX(@username + ',', userList + ',') > 0 SELECT userList,privTypeId from p_systemPrivilege b where modId =@menuCode and ISNULL(userList,'')<>'' AND CHARINDEX(@username + ',', userList + ',') > 0
) b on CHARINDEX(CAST(b.privTypeId AS VARCHAR(5)) + ',',a.PrivilegeView + ',') > 0 ) b on CHARINDEX(CAST(b.privTypeId AS VARCHAR(5)) + ',',a.PrivilegeView + ',') > 0
where isnull(a.isVisible,0)=0 and typeCode=@menuCode and stepCode=@stepCode where isnull(a.isVisible,0)=0 and typeCode=@menuCode and stepCode=@stepCode
order by orderid", table); order by orderid", table, text);
return SqlHelper.ExecuteDataTable(sqlValue, new SqlParameter[] { new SqlParameter("@menuCode", menuCode), new SqlParameter("@stepCode", stepCode), new SqlParameter("@username", operatorName) }); return SqlHelper.ExecuteDataTable(sqlValue, new SqlParameter[] { new SqlParameter("@menuCode", menuCode), new SqlParameter("@stepCode", stepCode), new SqlParameter("@username", operatorName) });
} }
/// <summary> /// <summary>
@@ -872,6 +894,10 @@ namespace Lskj.Business.Impl
{ {
fields += " ,DetailSearch"; fields += " ,DetailSearch";
} }
if (BaseImpl.HasExistsColumn("p_systembillauditAttach", "DragExecuteSql"))
{
fields += " ,DragExecuteSql";
}
string sqlCond = string.Empty; string sqlCond = string.Empty;
List<SqlParameter> parames = new List<SqlParameter> List<SqlParameter> parames = new List<SqlParameter>
+22 -27
View File
@@ -126,6 +126,27 @@ namespace Lskj.Business.Impl
} }
return false; return false;
} }
/// <summary>
/// 判断是否存在指定存储过程
/// </summary>
/// <param name="Name"></param>
/// <returns></returns>
public static bool HasExistsStoredProcedure(string Name)
{
try
{
string sqlValue = string.Format("select OBJECT_ID(N'{0}', N'P') ", Name);
return !string.IsNullOrWhiteSpace(SqlHelper.ExecuteScalar(sqlValue)+"");
}
catch (Exception)
{
}
return false;
}
/// <summary> /// <summary>
/// <para>说明:获取树节点配置表</para> /// <para>说明:获取树节点配置表</para>
/// <para>创建人:王一帆</para> /// <para>创建人:王一帆</para>
@@ -1154,30 +1175,4 @@ namespace Lskj.Business.Impl
} }
/// <summary> /// <summary>
/// <para>说明:根据模块id判断是否设置不能同时打开多个相同模块</para>
/// <para>创建人:曹屹峰</para>
/// <para>创建日期:2024-02-21 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <returns></returns>
public static bool GetOpenRestrictions(string MenuId)
{
if (BaseImpl.HasExistsColumn("p_formmenuconfigtab", "SingleOpenMode"))
{
string sqlValue = string.Format("SELECT SingleOpenMode from p_formmenuconfigtab where MenuId='{0}'", MenuId);
DataTable dtTable = SqlHelper.ExecuteDataTable(sqlValue);
if (dtTable.Rows.Count > 0)
{
return "1".Equals(dtTable.Rows[0]["SingleOpenMode"] + "");
}
}
return false;
}
}
}
@@ -426,7 +426,7 @@ namespace Lskj.Business.Impl
string rMsg = pMsg.Value.ToString(); string rMsg = pMsg.Value.ToString();
int result = Convert.ToInt32(returnValue.Value + ""); int result = Convert.ToInt32(returnValue.Value + "");
if (result==-1&& ERPInfo.Instance.UserName.Equals("管理员")) if (result==-1)
{ {
SqlStoredProcedurepPrompt.GenerateBaseSaveProcedureScript(model, storedProcedureValue); SqlStoredProcedurepPrompt.GenerateBaseSaveProcedureScript(model, storedProcedureValue);
} }
@@ -502,7 +502,7 @@ namespace Lskj.Business.Impl
int result = Convert.ToInt32(returnValue.Value + ""); int result = Convert.ToInt32(returnValue.Value + "");
if (result == -1 && ERPInfo.Instance.UserName.Equals("管理员")) if (result == -1)
{ {
SqlStoredProcedurepPrompt.GenerateSaveBasePanelScript(model); SqlStoredProcedurepPrompt.GenerateSaveBasePanelScript(model);
} }
@@ -553,7 +553,7 @@ namespace Lskj.Business.Impl
tipMsg = pMsg.Value + ""; tipMsg = pMsg.Value + "";
if (Convert.ToInt32(returnValue.Value.ToString()) == -1 && ERPInfo.Instance.UserName.Equals("管理员")) if (Convert.ToInt32(returnValue.Value.ToString()) == -1)
{ {
SqlStoredProcedurepPrompt.GenerateBaseApplyScript( menuCode, parmaryKey, comfirmType); SqlStoredProcedurepPrompt.GenerateBaseApplyScript( menuCode, parmaryKey, comfirmType);
} }
+10 -2
View File
@@ -87,7 +87,7 @@ namespace Lskj.Business.Impl
tipMsg = pMsg.Value.ToString(); tipMsg = pMsg.Value.ToString();
if (newVer == 1 && billWay == 1) billNo = tipMsg; if (newVer == 1 && billWay == 1) billNo = tipMsg;
if (Convert.ToInt32(returnValue.Value + "") == -1 && ERPInfo.Instance.UserName.Equals("管理员")) if (Convert.ToInt32(returnValue.Value + "") == -1)
{ {
SqlStoredProcedurepPrompt.GenerateBillSaveScript( masterSql, detailSql, detailTable, billNo, detailGuid, billSeq, billWay, comfirm,auditFlag ,newVer); SqlStoredProcedurepPrompt.GenerateBillSaveScript( masterSql, detailSql, detailTable, billNo, detailGuid, billSeq, billWay, comfirm,auditFlag ,newVer);
} }
@@ -164,7 +164,7 @@ namespace Lskj.Business.Impl
DataSet dataSet = SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "p_billApply", "billApply", param); DataSet dataSet = SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "p_billApply", "billApply", param);
tipMsg = pMsg.Value.ToString(); tipMsg = pMsg.Value.ToString();
if (Convert.ToInt32(returnValue.Value + "") == -1 && ERPInfo.Instance.UserName.Equals("管理员")) if (Convert.ToInt32(returnValue.Value + "") == -1)
{ {
SqlStoredProcedurepPrompt.GenerateBillApplyExecutionScript( typeCode, billNo, hintMsg, comfirm, comfirmFlag); SqlStoredProcedurepPrompt.GenerateBillApplyExecutionScript( typeCode, billNo, hintMsg, comfirm, comfirmFlag);
} }
@@ -438,6 +438,10 @@ namespace Lskj.Business.Impl
sumCond += ",a.ProhibitPaste "; sumCond += ",a.ProhibitPaste ";
if (HasExistsColumn("p_systembillDetail", "FormatEditBox")) if (HasExistsColumn("p_systembillDetail", "FormatEditBox"))
sumCond += ",a.FormatEditBox "; sumCond += ",a.FormatEditBox ";
if (HasExistsColumn("p_systembillDetail", "PromptText"))
sumCond += ",a.PromptText ";
if (HasExistsColumn("p_systembillDetail", "SplicingConditions"))
sumCond += ",a.SplicingConditions ";
string columsSql = string.Format(@"SELECT DISTINCT string columsSql = string.Format(@"SELECT DISTINCT
isnull(CASE WHEN ISNULL(b.userList,'')='' AND ISNULL(a.PrivilegeView,'')<>'' OR isnull(isVisible,0)=1 THEN 0 ELSE width END,0) width, isnull(CASE WHEN ISNULL(b.userList,'')='' AND ISNULL(a.PrivilegeView,'')<>'' OR isnull(isVisible,0)=1 THEN 0 ELSE width END,0) width,
@@ -525,6 +529,10 @@ namespace Lskj.Business.Impl
sumCond += ",a.ProhibitPaste "; sumCond += ",a.ProhibitPaste ";
if (HasExistsColumn("p_systembillDetail", "FormatEditBox")) if (HasExistsColumn("p_systembillDetail", "FormatEditBox"))
sumCond += ",a.FormatEditBox "; sumCond += ",a.FormatEditBox ";
if (HasExistsColumn("p_systembillDetail", "PromptText"))
sumCond += ",a.PromptText ";
if (HasExistsColumn("p_systembillDetail", "SplicingConditions"))
sumCond += ",a.SplicingConditions ";
string columsSql = string.Format(@"SELECT DISTINCT string columsSql = string.Format(@"SELECT DISTINCT
isnull(CASE WHEN ISNULL(b.userList,'')='' AND ISNULL(a.PrivilegeView,'')<>'' OR isnull(isVisible,0)=1 THEN 0 ELSE width END,0) width, isnull(CASE WHEN ISNULL(b.userList,'')='' AND ISNULL(a.PrivilegeView,'')<>'' OR isnull(isVisible,0)=1 THEN 0 ELSE width END,0) width,
@@ -79,7 +79,6 @@ namespace Lskj.Business.Impl
BaseImpl.ExecSqlValue(sql); BaseImpl.ExecSqlValue(sql);
if (ERPInfo.Instance.LanguageName.Equals("中文")) return; if (ERPInfo.Instance.LanguageName.Equals("中文")) return;
DataTable languageTable = BaseImpl.GetDataTableResult(string.Format("select [中文],[{0}] from P_language", ERPInfo.Instance.LanguageName)); DataTable languageTable = BaseImpl.GetDataTableResult(string.Format("select [中文],[{0}] from P_language", ERPInfo.Instance.LanguageName));
foreach (DataRow item in languageTable.Rows) foreach (DataRow item in languageTable.Rows)
{ {
@@ -148,38 +147,4 @@ namespace Lskj.Business.Impl
foreach (DataRow item in dataTable.Rows) foreach (DataRow item in dataTable.Rows)
{ {
item["MenuCaption"] = GetTranslatedText(item["MenuCaption"] + ""); item["MenuCaption"
item["SubSysName"] = GetTranslatedText(item["SubSysName"] + "");
item["SearchMenuCaption"] = GetTranslatedText(item["MenuCaption"] + "-" + item["SubSysName"]);
}
return dataTable;
}
/// <summary>
/// 传入表格,翻译指定列信息
/// </summary>
/// <param name="dataTable">表格数据</param>
/// <param name="ccolumnName">需要翻译的列</param>
/// <returns></returns>
public static DataTable TranslationTableColumn(DataTable dataTable, string ccolumnName)
{
if (dataTable != null && dataTable.Columns.Contains(ccolumnName))
{
foreach (DataRow item in dataTable.Rows)
{
item[ccolumnName] = GetTranslatedText(item[ccolumnName] + "");
}
}
return dataTable;
}
}
}
+68 -1
View File
@@ -182,7 +182,8 @@ namespace Lskj.Business.Impl
{ {
sqlValue = string.Format("update P_EmployeeTab set password='{0}',p_emp_password='{1}' where EmployeeId='{2}' select @@ROWCOUNT", password, mdpassword, userId); sqlValue = string.Format("update P_EmployeeTab set password='{0}',p_emp_password='{1}' where EmployeeId='{2}' select @@ROWCOUNT", password, mdpassword, userId);
} }
return SqlHelper.ExecuteNonQuery(sqlValue); int result = SqlHelper.ExecuteNonQuery(sqlValue);
return result;
} }
/// <summary> /// <summary>
/// <para>说明:修改密码</para> /// <para>说明:修改密码</para>
@@ -224,6 +225,72 @@ namespace Lskj.Business.Impl
return numberOfAffectedRows; return numberOfAffectedRows;
} }
/// <summary>
/// 修改密码,传入到存储过程中处理
/// </summary>
/// <param name="personid"></param>
/// <param name="newpsw"></param>
/// <param name="tipMsg"></param>
/// <returns></returns>
public static int ChangePassword(string personid, string newpsw, out string tipMsg)
{
try
{
//md5加密密码
//string mdpassword = SHAHelper.GetMd5Hash(newpsw);
newpsw = SHAHelper.EncryptPassword(newpsw);
SqlParameter pMsg = ERPInfo.Instance.ChangeParameterType ? new SqlParameter("@msg", SqlDbType.NVarChar, 4000) : new SqlParameter("@msg", SqlDbType.VarChar, 2000);
pMsg.Direction = ParameterDirection.Output;
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4);
returnValue.Direction = ParameterDirection.ReturnValue;
SqlParameter[] param =
{
new SqlParameter("@personid",SqlDbType.Int),
new SqlParameter("@newpsw",SqlDbType.VarChar),
pMsg,
returnValue
};
param[0].Value = personid;
param[1].Value = newpsw;
param[2].Value = "";
int result = MainImpl.ExecProcedure("pr_sytemchangepsw", param);
tipMsg = pMsg.Value.ToString();
int rValue = Convert.ToInt32(returnValue.Value);
return rValue;
}
catch (Exception ex)
{
tipMsg = ex.Message;
}
return -1;
}
/// <summary>
/// 记录修改后的密码
/// </summary>
/// <param name="userId"></param>
/// <param name="afterPass"></param>
/// <returns></returns>
public static bool RecordPassword(string afterPass)
{
try
{
//加密密码
afterPass = AESUtil.Encrypt(afterPass);
LogUtil.WriteDebug("", "修改密码", afterPass, "");
return true;
}
catch (Exception ex)
{
return false;
}
}
/// <summary> /// <summary>
/// <para>说明:跨数据库修改密码</para> /// <para>说明:跨数据库修改密码</para>
/// <para>创建人:曹屹峰</para> /// <para>创建人:曹屹峰</para>
@@ -53,8 +53,8 @@ namespace Lskj.Business.Impl
EXEC @return = {procedureName} {string.Join(", ", parameters)}; EXEC @return = {procedureName} {string.Join(", ", parameters)};
SELECT @return AS 'return', @msg AS msg;"; SELECT @return AS 'return', @msg AS msg;";
Clipboard.SetText(script); if(ERPInfo.Instance.UserName.Equals("管理员")) Clipboard.SetText(script);
LogHelper.Instance.WriteLog(script);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -108,8 +108,8 @@ SELECT @return AS 'return', @msg AS msg;";
EXEC @return = {procedureName} {string.Join(", ", parameters)} EXEC @return = {procedureName} {string.Join(", ", parameters)}
SELECT @return AS 'return', @msg AS msg;"; SELECT @return AS 'return', @msg AS msg;";
Clipboard.SetText(script); if (ERPInfo.Instance.UserName.Equals("管理员")) Clipboard.SetText(script);
LogHelper.Instance.WriteLog(script);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -146,8 +146,8 @@ SELECT @return AS 'return', @msg AS msg;";
EXEC @return = p_baseApply {string.Join(", ", parameters)} EXEC @return = p_baseApply {string.Join(", ", parameters)}
SELECT @return AS 'return', @msg AS msg;"; SELECT @return AS 'return', @msg AS msg;";
Clipboard.SetText(script); if (ERPInfo.Instance.UserName.Equals("管理员")) Clipboard.SetText(script);
LogHelper.Instance.WriteLog(script);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -190,7 +190,8 @@ SELECT @return AS 'return', @msg AS msg;
-- --
DELETE {EscapeSqlString(detailTable)}_temp WHERE sysstr = N'{EscapeSqlString(detailGuid)}';"; DELETE {EscapeSqlString(detailTable)}_temp WHERE sysstr = N'{EscapeSqlString(detailGuid)}';";
Clipboard.SetText(script); if (ERPInfo.Instance.UserName.Equals("管理员")) Clipboard.SetText(script);
LogHelper.Instance.WriteLog(script);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -229,8 +230,8 @@ DELETE {EscapeSqlString(detailTable)}_temp WHERE sysstr = N'{EscapeSqlString(det
EXEC @return = p_billApply {string.Join(", ", parameters)}; EXEC @return = p_billApply {string.Join(", ", parameters)};
SELECT @return AS 'return', @msg AS msg;"; SELECT @return AS 'return', @msg AS msg;";
Clipboard.SetText(executionScript); if (ERPInfo.Instance.UserName.Equals("管理员")) Clipboard.SetText(executionScript);
LogHelper.Instance.WriteLog(executionScript);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -310,7 +311,8 @@ SELECT
'msg' = @msg;"; 'msg' = @msg;";
// 复制到剪贴板 // 复制到剪贴板
Clipboard.SetText(script); if (ERPInfo.Instance.UserName.Equals("管理员")) Clipboard.SetText(script);
LogHelper.Instance.WriteLog(script);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -320,6 +322,105 @@ SELECT
public static void GenerateAuditExecutionScript(
DynamicModel sysModel,
string stepCode,
string billDocumentId,
string storedName,
string accractFlag,
string remindSelect,
string remarkText = "",
string remindOpers = "",
string confirmOpers = "",
bool ret = false,
int returnd = 0,
int selectConfirmFlag = 0,
bool isStepOver = false,
int comfirm = 0)
{
try
{
// 检查新审核参数是否存在
bool newAudit = true;
string[] newParameter = new string[] { "@nextSelectStepCode", "@nextSelectStepOper", "@selectConfirmFlag" };
if (!BaseAuditImpl.isParamComplete(storedName, newParameter))
newAudit = false;
// 检查存储过程是否包含@confirmFlag参数(模拟原方法syscolumns查询逻辑)
bool hasConfirmFlag = CheckIfProcedureHasParameter(storedName, "@confirmFlag");
// 构建参数列表
List<string> parameters = new List<string>
{
// 基础参数
$"@typeCode = N'{EscapeSqlString(sysModel.ModuleCode)}'",
$"@stepCode = {(string.IsNullOrEmpty(stepCode) ? 0 : Convert.ToInt32(stepCode))}",
$"@billDocumentId = N'{EscapeSqlString(billDocumentId)}'",
$"@operatorId = {sysModel.UserId}",
$"@operatorName = N'{EscapeSqlString(sysModel.UserName)}'",
$@"@auditAdvice = N'{EscapeSqlString(accractFlag == "F" ?
remarkText : (isStepOver ? $"由[{sysModel.UserName}]强制退回,意见:{remarkText}" : remarkText))}'",
$"@Direction = N'{EscapeSqlString(accractFlag)}'",
"@msg = @msg OUTPUT"
};
// 添加新审核相关参数
if (newAudit)
{
parameters.Add($"@selectConfirmFlag = {selectConfirmFlag}");
parameters.Add("@nextSelectStepCode = @nextSelectStepCode OUTPUT");
parameters.Add("@nextSelectStepOper = @nextSelectStepOper OUTPUT");
}
// 添加提醒相关参数
if (remindSelect == "1")
{
parameters.Add($"@hint_opers = N'{EscapeSqlString(remindOpers)}'");
parameters.Add($"@comfirm_opers = N'{EscapeSqlString(confirmOpers)}'");
}
// 添加返回步骤参数
if (ret)
{
parameters.Add($"@backStepCode = {returnd}");
}
// 新增:如果存储过程包含@confirmFlag参数,则添加该参数
if (hasConfirmFlag)
{
parameters.Add($"@confirmFlag = {comfirm}");
}
// 构建完整执行语句
string script = $@"DECLARE
@msg {(ERPInfo.Instance.ChangeParameterType ? "NVARCHAR(6000)" : "VARCHAR(3000)")},
@nextSelectStepCode VARCHAR(3000),
@nextSelectStepOper VARCHAR(3000),
@return INT;
EXEC @return = {storedName}
{string.Join(",\n ", parameters)};
SELECT
'return' = @return,
'nextSelectStepCode' = @nextSelectStepCode,
'nextSelectStepOper' = @nextSelectStepOper,
'msg' = @msg;";
// 复制到剪贴板并日志记录
if (ERPInfo.Instance.UserName.Equals("管理员"))
Clipboard.SetText(script);
LogHelper.Instance.WriteLog(script);
}
catch (Exception ex)
{
}
}
//右键执行存储过程 //右键执行存储过程
public static void GenerateProcedureExecutionScript(string Action, List<string> paramList,bool isFirstFlag = false,string comfirmFlag = "0") public static void GenerateProcedureExecutionScript(string Action, List<string> paramList,bool isFirstFlag = false,string comfirmFlag = "0")
{ {
@@ -365,7 +466,8 @@ EXEC @returnValue = {procedureName}
SELECT 'return' = @returnValue, 'msg' = @msg;"; SELECT 'return' = @returnValue, 'msg' = @msg;";
// 复制到剪贴板 // 复制到剪贴板
Clipboard.SetText(script); if (ERPInfo.Instance.UserName.Equals("管理员")) Clipboard.SetText(script);
LogHelper.Instance.WriteLog(script);
} }
catch (Exception ex) catch (Exception ex)
{ {
+11 -2
View File
@@ -284,7 +284,7 @@ namespace Lskj.Business
Instance.CancelPasteClearSort = item.Table.Columns.Contains("CancelPasteClearSort") && !string.IsNullOrEmpty(item["CancelPasteClearSort"] + "") ? "1".Equals(item["CancelPasteClearSort"] + "") : false; Instance.CancelPasteClearSort = item.Table.Columns.Contains("CancelPasteClearSort") && !string.IsNullOrEmpty(item["CancelPasteClearSort"] + "") ? "1".Equals(item["CancelPasteClearSort"] + "") : false;
Instance.TreeSpecialBinding = item.Table.Columns.Contains("TreeSpecialBinding") && !string.IsNullOrEmpty(item["TreeSpecialBinding"] + "") ? "1".Equals(item["TreeSpecialBinding"] + "") : false; Instance.TreeSpecialBinding = item.Table.Columns.Contains("TreeSpecialBinding") && !string.IsNullOrEmpty(item["TreeSpecialBinding"] + "") ? "1".Equals(item["TreeSpecialBinding"] + "") : false;
Instance.OptimizationSpeed = item.Table.Columns.Contains("OptimizationSpeed") && !string.IsNullOrEmpty(item["OptimizationSpeed"] + "") ? "1".Equals(item["OptimizationSpeed"] + "") : false; Instance.OptimizationSpeed = item.Table.Columns.Contains("OptimizationSpeed") && !string.IsNullOrEmpty(item["OptimizationSpeed"] + "") ? "1".Equals(item["OptimizationSpeed"] + "") : false;
//Instance.OptimizationSpeed = false; //Instance.OptimizationSpeed = true;
Instance.DetailExportDisplay = item.Table.Columns.Contains("DetailExportDisplay") && !string.IsNullOrEmpty(item["DetailExportDisplay"] + "") ? "1".Equals(item["DetailExportDisplay"] + "") : false; Instance.DetailExportDisplay = item.Table.Columns.Contains("DetailExportDisplay") && !string.IsNullOrEmpty(item["DetailExportDisplay"] + "") ? "1".Equals(item["DetailExportDisplay"] + "") : false;
Instance.ConventionalPrintingDisplay = item.Table.Columns.Contains("ConventionalPrintingDisplay") && !string.IsNullOrEmpty(item["ConventionalPrintingDisplay"] + "") ? "1".Equals(item["ConventionalPrintingDisplay"] + "") : false; Instance.ConventionalPrintingDisplay = item.Table.Columns.Contains("ConventionalPrintingDisplay") && !string.IsNullOrEmpty(item["ConventionalPrintingDisplay"] + "") ? "1".Equals(item["ConventionalPrintingDisplay"] + "") : false;
Instance.HideSubtitle = item.Table.Columns.Contains("HideSubtitle") && !string.IsNullOrEmpty(item["HideSubtitle"] + "") ? "1".Equals(item["HideSubtitle"] + "") : false; Instance.HideSubtitle = item.Table.Columns.Contains("HideSubtitle") && !string.IsNullOrEmpty(item["HideSubtitle"] + "") ? "1".Equals(item["HideSubtitle"] + "") : false;
@@ -311,6 +311,8 @@ namespace Lskj.Business
Instance.WatermarkContent = item.Table.Columns.Contains("WatermarkContent") && !string.IsNullOrEmpty(item["WatermarkContent"] + "") ? item["WatermarkContent"] + "" : ""; Instance.WatermarkContent = item.Table.Columns.Contains("WatermarkContent") && !string.IsNullOrEmpty(item["WatermarkContent"] + "") ? item["WatermarkContent"] + "" : "";
Instance.HiddenNotification = item.Table.Columns.Contains("HiddenNotification") && !string.IsNullOrEmpty(item["HiddenNotification"] + "") ? "1".Equals(item["HiddenNotification"] + "") : false; Instance.HiddenNotification = item.Table.Columns.Contains("HiddenNotification") && !string.IsNullOrEmpty(item["HiddenNotification"] + "") ? "1".Equals(item["HiddenNotification"] + "") : false;
Instance.HiddenServerSetting = item.Table.Columns.Contains("HiddenServerSetting") && !string.IsNullOrEmpty(item["HiddenServerSetting"] + "") ? "1".Equals(item["HiddenServerSetting"] + "") : false; Instance.HiddenServerSetting = item.Table.Columns.Contains("HiddenServerSetting") && !string.IsNullOrEmpty(item["HiddenServerSetting"] + "") ? "1".Equals(item["HiddenServerSetting"] + "") : false;
Instance.GridFontName = item.Table.Columns.Contains("GridFontName") ? item["GridFontName"] + "" : "";
Instance.AllowForgetPwd = item.Table.Columns.Contains("AllowForgetPwd") && !string.IsNullOrEmpty(item["AllowForgetPwd"] + "") ? "1".Equals(item["AllowForgetPwd"] + "") : false;
} }
/// <summary> /// <summary>
/// 高拍仪AccessKey /// 高拍仪AccessKey
@@ -492,6 +494,10 @@ namespace Lskj.Business
/// </summary> /// </summary>
public int GridRowFontSize; public int GridRowFontSize;
/// <summary> /// <summary>
/// 表格字体
/// </summary>
public string GridFontName;
/// <summary>
/// 版本号 /// 版本号
/// </summary> /// </summary>
public string Version; public string Version;
@@ -1028,4 +1034,7 @@ namespace Lskj.Business
public bool FoundationHideTableRefresh; public bool FoundationHideTableRefresh;
/// <summary> /// <summary>
/// 反审url /// 反审url
/// </summary>
public string AntiAuditUrl;
/// <summary>
/// 隐藏智能工具的
@@ -293,8 +293,8 @@ namespace Lskj.Business.Impl
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public static bool UpdateBaseFlowType(BaseflowTypeModel model) public static bool UpdateBaseFlowType(BaseflowTypeModel model)
{ {
string sqlValue = string.Format(@"update p_systemdlltabflowtype set billtypename='{0}',operuser='{1}' where id='{2}'", string sqlValue = string.Format(@"update p_systemdlltabflowtype set billtypename='{0}',operuser='{1}',billflowban='{3}' where id='{2}'",
model.billTypeName.Replace("'", "''"), model.operUser.Replace("'", "''"), model.id); model.billTypeName.Replace("'", "''"), model.operUser.Replace("'", "''"), model.id, model.billflowban);
return ExecSqlValue(sqlValue) > 0; return ExecSqlValue(sqlValue) > 0;
} }
@@ -340,8 +340,8 @@ namespace Lskj.Business
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public static bool UpdateBillFlowType(BillflowTypeModel model) public static bool UpdateBillFlowType(BillflowTypeModel model)
{ {
string sqlValue = string.Format(@"update p_systembillflowtype set billtypename='{0}',operuser='{1}' where id='{2}'", string sqlValue = string.Format(@"update p_systembillflowtype set billtypename='{0}',operuser='{1}',billflowban='{3}' where id='{2}'",
model.billTypeName.Replace("'", "''"), model.operUser.Replace("'", "''"), model.id); model.billTypeName.Replace("'", "''"), model.operUser.Replace("'", "''"), model.id, model.billflowban);
return ExecSqlValue(sqlValue) > 0; return ExecSqlValue(sqlValue) > 0;
} }