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
/// 修改日期:2025-09-10(新增重载:返回 SP Return 值;@msg 通过 out
/// </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(
out string nextSelectStepCode,
out string nextSelectStepOper,
@@ -187,7 +199,8 @@ namespace Lskj.Business.Impl
bool ret = false,
int returnd = 0,
int selectConfirmFlag = 0,
bool IsStepOver = false)
bool IsStepOver = false,
int comfirm = 0)
{
bool newAudit = true;
int i = 8;
@@ -226,7 +239,6 @@ namespace Lskj.Business.Impl
new SqlParameter("@Direction", SqlDbType.Char, 1),
pMsg
};
if (newAudit)
{
list.Add(new SqlParameter("@selectConfirmFlag", SqlDbType.Int, 4));
@@ -245,6 +257,15 @@ namespace Lskj.Business.Impl
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 参数
list.Add(pReturn);
@@ -295,9 +316,9 @@ namespace Lskj.Business.Impl
? "0"
: 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;
@@ -620,16 +641,17 @@ namespace Lskj.Business.Impl
/// <param name="stepCode">进度编号</param>
/// <param name="operatorName">角色名</param>
/// <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,
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
left join (
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
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) });
}
/// <summary>
@@ -872,6 +894,10 @@ namespace Lskj.Business.Impl
{
fields += " ,DetailSearch";
}
if (BaseImpl.HasExistsColumn("p_systembillauditAttach", "DragExecuteSql"))
{
fields += " ,DragExecuteSql";
}
string sqlCond = string.Empty;
List<SqlParameter> parames = new List<SqlParameter>