SVN r1137
SVN-Revision: r1137
This commit is contained in:
@@ -317,9 +317,17 @@ namespace Lskj.Business.Impl
|
|||||||
: Convert.ToInt32(pReturn.Value).ToString();
|
: Convert.ToInt32(pReturn.Value).ToString();
|
||||||
|
|
||||||
if (retCode.Equals("-1"))
|
if (retCode.Equals("-1"))
|
||||||
|
{
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.SqlServer)
|
||||||
{
|
{
|
||||||
SqlStoredProcedurepPrompt.GenerateAuditExecutionScript(sysModel, stepCode, billDocumentId, storedName, accractFlag, remindSelect, remarkText, remindOpers, confirmOpers, ret, returnd, selectConfirmFlag, IsStepOver, comfirm);
|
SqlStoredProcedurepPrompt.GenerateAuditExecutionScript(sysModel, stepCode, billDocumentId, storedName, accractFlag, remindSelect, remarkText, remindOpers, confirmOpers, ret, returnd, selectConfirmFlag, IsStepOver, comfirm);
|
||||||
}
|
}
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
|
||||||
|
{
|
||||||
|
SqlStoredProcedurepPrompt.GenerateBillSaveScript_DM(SqlHelper.LastFailureSql);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return retCode;
|
return retCode;
|
||||||
}
|
}
|
||||||
@@ -963,6 +971,7 @@ namespace Lskj.Business.Impl
|
|||||||
{
|
{
|
||||||
fields = " and flowSource=@flowSource ";
|
fields = " and flowSource=@flowSource ";
|
||||||
}
|
}
|
||||||
|
if (SystemInfo.Instance.CancelFlowSource && tableName.Equals("wms_billflowstep", StringComparison.OrdinalIgnoreCase)) fields = "";
|
||||||
if (SystemInfo.Instance.AutomaticStepHidie)
|
if (SystemInfo.Instance.AutomaticStepHidie)
|
||||||
{
|
{
|
||||||
fields += " and autoStep !=1 ";
|
fields += " and autoStep !=1 ";
|
||||||
|
|||||||
@@ -765,6 +765,44 @@ namespace Lskj.Business.Impl
|
|||||||
}
|
}
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 替换特殊字符 {#p_
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="defaultValue"></param>
|
||||||
|
/// <param name="parentValue"></param>
|
||||||
|
/// <param name="otherParams"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string SpecialReplacement(string defaultValue, string[] otherParams = null)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(defaultValue)) return defaultValue;
|
||||||
|
|
||||||
|
if (defaultValue.ToLower().Contains("{#p_"))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
List<string> paramList = ReplaceHelper.GetParamFields(defaultValue);
|
||||||
|
|
||||||
|
foreach (var item in paramList)
|
||||||
|
{
|
||||||
|
string index = item.Replace("{#p_", "").Replace("}", "");
|
||||||
|
int i = 0;
|
||||||
|
if (int.TryParse(index, out i))
|
||||||
|
{
|
||||||
|
defaultValue = defaultValue.Replace(item, otherParams != null ? otherParams[i - 1] : "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>说明:获取记录</para>
|
/// <para>说明:获取记录</para>
|
||||||
/// <para>创建人:龚宇超</para>
|
/// <para>创建人:龚宇超</para>
|
||||||
@@ -1184,4 +1222,4 @@ namespace Lskj.Business.Impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///
|
||||||
@@ -427,9 +427,16 @@ namespace Lskj.Business.Impl
|
|||||||
int result = Convert.ToInt32(returnValue.Value + "");
|
int result = Convert.ToInt32(returnValue.Value + "");
|
||||||
|
|
||||||
if (result==-1)
|
if (result==-1)
|
||||||
|
{
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.SqlServer)
|
||||||
{
|
{
|
||||||
SqlStoredProcedurepPrompt.GenerateBaseSaveProcedureScript(model, storedProcedureValue);
|
SqlStoredProcedurepPrompt.GenerateBaseSaveProcedureScript(model, storedProcedureValue);
|
||||||
}
|
}
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
|
||||||
|
{
|
||||||
|
SqlStoredProcedurepPrompt.GenerateBillSaveScript_DM(SqlHelper.LastFailureSql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
model.Success = result == 1;
|
model.Success = result == 1;
|
||||||
model.FaultMsg = rMsg;
|
model.FaultMsg = rMsg;
|
||||||
@@ -503,9 +510,16 @@ namespace Lskj.Business.Impl
|
|||||||
int result = Convert.ToInt32(returnValue.Value + "");
|
int result = Convert.ToInt32(returnValue.Value + "");
|
||||||
|
|
||||||
if (result == -1)
|
if (result == -1)
|
||||||
|
{
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.SqlServer)
|
||||||
{
|
{
|
||||||
SqlStoredProcedurepPrompt.GenerateSaveBasePanelScript(model);
|
SqlStoredProcedurepPrompt.GenerateSaveBasePanelScript(model);
|
||||||
}
|
}
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
|
||||||
|
{
|
||||||
|
SqlStoredProcedurepPrompt.GenerateBillSaveScript_DM(SqlHelper.LastFailureSql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
retuenMsg = result + "";
|
retuenMsg = result + "";
|
||||||
model.Success = result == 1;
|
model.Success = result == 1;
|
||||||
@@ -555,7 +569,14 @@ namespace Lskj.Business.Impl
|
|||||||
|
|
||||||
if (Convert.ToInt32(returnValue.Value.ToString()) == -1)
|
if (Convert.ToInt32(returnValue.Value.ToString()) == -1)
|
||||||
{
|
{
|
||||||
SqlStoredProcedurepPrompt.GenerateBaseApplyScript( menuCode, parmaryKey, comfirmType);
|
if (SqlHelper.ConnectionType == ConnectionType.SqlServer)
|
||||||
|
{
|
||||||
|
SqlStoredProcedurepPrompt.GenerateBaseApplyScript(menuCode, parmaryKey, comfirmType);
|
||||||
|
}
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
|
||||||
|
{
|
||||||
|
SqlStoredProcedurepPrompt.GenerateBillSaveScript_DM(SqlHelper.LastFailureSql);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Convert.ToInt32(returnValue.Value.ToString());
|
return Convert.ToInt32(returnValue.Value.ToString());
|
||||||
|
|||||||
@@ -87,10 +87,14 @@ 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)
|
if (Convert.ToInt32(returnValue.Value + "") == -1&& SqlHelper.ConnectionType == ConnectionType.SqlServer)
|
||||||
{
|
{
|
||||||
SqlStoredProcedurepPrompt.GenerateBillSaveScript( masterSql, detailSql, detailTable, billNo, detailGuid, billSeq, billWay, comfirm,auditFlag ,newVer);
|
SqlStoredProcedurepPrompt.GenerateBillSaveScript( masterSql, detailSql, detailTable, billNo, detailGuid, billSeq, billWay, comfirm,auditFlag ,newVer);
|
||||||
}
|
}
|
||||||
|
if (Convert.ToInt32(returnValue.Value + "") == -1 && SqlHelper.ConnectionType == ConnectionType.DmServer)
|
||||||
|
{
|
||||||
|
SqlStoredProcedurepPrompt.GenerateBillSaveScript_DM(detailSql, SqlHelper.LastFailureSql, detailTable, detailGuid);
|
||||||
|
}
|
||||||
|
|
||||||
return Convert.ToInt32(returnValue.Value + "");
|
return Convert.ToInt32(returnValue.Value + "");
|
||||||
}
|
}
|
||||||
@@ -166,7 +170,15 @@ namespace Lskj.Business.Impl
|
|||||||
tipMsg = pMsg.Value.ToString();
|
tipMsg = pMsg.Value.ToString();
|
||||||
if (Convert.ToInt32(returnValue.Value + "") == -1)
|
if (Convert.ToInt32(returnValue.Value + "") == -1)
|
||||||
{
|
{
|
||||||
SqlStoredProcedurepPrompt.GenerateBillApplyExecutionScript( typeCode, billNo, hintMsg, comfirm, comfirmFlag);
|
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.SqlServer)
|
||||||
|
{
|
||||||
|
SqlStoredProcedurepPrompt.GenerateBillApplyExecutionScript(typeCode, billNo, hintMsg, comfirm, comfirmFlag);
|
||||||
|
}
|
||||||
|
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
|
||||||
|
{
|
||||||
|
SqlStoredProcedurepPrompt.GenerateBillSaveScript_DM(SqlHelper.LastFailureSql);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Convert.ToInt32(returnValue.Value + "");
|
return Convert.ToInt32(returnValue.Value + "");
|
||||||
}
|
}
|
||||||
@@ -445,6 +457,10 @@ namespace Lskj.Business.Impl
|
|||||||
sumCond += ",a.PromptText ";
|
sumCond += ",a.PromptText ";
|
||||||
if (dataTable.Columns.Contains("SplicingConditions"))
|
if (dataTable.Columns.Contains("SplicingConditions"))
|
||||||
sumCond += ",a.SplicingConditions ";
|
sumCond += ",a.SplicingConditions ";
|
||||||
|
if (dataTable.Columns.Contains("ColumnAnnotation"))
|
||||||
|
sumCond += ",a.ColumnAnnotation ";
|
||||||
|
if (dataTable.Columns.Contains("TitleColor"))
|
||||||
|
sumCond += ",a.TitleColor ";
|
||||||
|
|
||||||
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,
|
||||||
@@ -539,6 +555,10 @@ namespace Lskj.Business.Impl
|
|||||||
sumCond += ",a.PromptText ";
|
sumCond += ",a.PromptText ";
|
||||||
if (dataTable.Columns.Contains("SplicingConditions"))
|
if (dataTable.Columns.Contains("SplicingConditions"))
|
||||||
sumCond += ",a.SplicingConditions ";
|
sumCond += ",a.SplicingConditions ";
|
||||||
|
if (dataTable.Columns.Contains("ColumnAnnotation"))
|
||||||
|
sumCond += ",a.ColumnAnnotation ";
|
||||||
|
if (dataTable.Columns.Contains("TitleColor"))
|
||||||
|
sumCond += ",a.TitleColor ";
|
||||||
|
|
||||||
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,
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
* 执行存储过程报错(return -1 时)
|
* 执行存储过程报错(return -1 时)
|
||||||
* 把对应执行的存储过程(exec xxx )记录到剪切板中
|
* 把对应执行的存储过程(exec xxx )记录到剪切板中
|
||||||
*/
|
*/
|
||||||
|
using Lskj.Core;
|
||||||
using Lskj.Model;
|
using Lskj.Model;
|
||||||
using Lskj.Util;
|
using Lskj.Util;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -483,4 +485,37 @@ SELECT 'return' = @returnValue, 'msg' = @msg;";
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private static string EscapeSqlString(string input)
|
private static string EscapeSqlString(string input)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(input))
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
// 将单引号替换为两个单引号,适应SQL Server的字符串格式
|
||||||
|
return input.Replace("'", "''");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检查存储过程是否包含指定参数(模拟原方法中的syscolumns查询)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="procedureName">存储过程名称</param>
|
||||||
|
/// <param name="parameterName">参数名称</param>
|
||||||
|
/// <returns>如果存在返回true,否则返回false</returns>
|
||||||
|
private static bool CheckIfProcedureHasParameter(string procedureName, string parameterName)
|
||||||
|
{
|
||||||
|
DataTable dt = BaseImpl.GetDataTableResult(string.Format("select * from syscolumns where id =object_id('{0}') and name='{1}'", procedureName, parameterName));
|
||||||
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//单据保存(达梦)
|
||||||
|
public static void GenerateBillSaveScript_DM(string detailSql, string Dmsql, string detailTable, string detailGuid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string script
|
||||||
@@ -315,8 +315,9 @@ namespace Lskj.Business
|
|||||||
Instance.AllowForgetPwd = item.Table.Columns.Contains("AllowForgetPwd") && !string.IsNullOrEmpty(item["AllowForgetPwd"] + "") ? "1".Equals(item["AllowForgetPwd"] + "") : false;
|
Instance.AllowForgetPwd = item.Table.Columns.Contains("AllowForgetPwd") && !string.IsNullOrEmpty(item["AllowForgetPwd"] + "") ? "1".Equals(item["AllowForgetPwd"] + "") : false;
|
||||||
Instance.ResSwitchingPrompt = item.Table.Columns.Contains("ResSwitchingPrompt") && !string.IsNullOrEmpty(item["ResSwitchingPrompt"] + "") ? item["ResSwitchingPrompt"] + "" : "";
|
Instance.ResSwitchingPrompt = item.Table.Columns.Contains("ResSwitchingPrompt") && !string.IsNullOrEmpty(item["ResSwitchingPrompt"] + "") ? item["ResSwitchingPrompt"] + "" : "";
|
||||||
Instance.SubscriptRefreshTime = item.Table.Columns.Contains("SubscriptRefreshTime") && !string.IsNullOrEmpty(item["SubscriptRefreshTime"] + "") ? Convert.ToInt32(item["SubscriptRefreshTime"] + "") : 0;
|
Instance.SubscriptRefreshTime = item.Table.Columns.Contains("SubscriptRefreshTime") && !string.IsNullOrEmpty(item["SubscriptRefreshTime"] + "") ? Convert.ToInt32(item["SubscriptRefreshTime"] + "") : 0;
|
||||||
Instance.SubscriptRefreshTime = 1;
|
|
||||||
Instance.CDSBLimsPrivateKey = item.Table.Columns.Contains("CDSBLimsPrivateKey") && !string.IsNullOrEmpty(item["CDSBLimsPrivateKey"] + "") ? item["CDSBLimsPrivateKey"] + "" : "";
|
Instance.CDSBLimsPrivateKey = item.Table.Columns.Contains("CDSBLimsPrivateKey") && !string.IsNullOrEmpty(item["CDSBLimsPrivateKey"] + "") ? item["CDSBLimsPrivateKey"] + "" : "";
|
||||||
|
Instance.CancelFlowSource = item.Table.Columns.Contains("CancelFlowSource") && !string.IsNullOrEmpty(item["CancelFlowSource"] + "") ? "1".Equals(item["CancelFlowSource"] + "") : false;
|
||||||
|
Instance.isBlankCellColor = item.Table.Columns.Contains("isBlankCellColor") && !string.IsNullOrEmpty(item["isBlankCellColor"] + "") ? "1".Equals(item["isBlankCellColor"] + "") : false;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 高拍仪AccessKey
|
/// 高拍仪AccessKey
|
||||||
@@ -1053,4 +1054,19 @@ namespace Lskj.Business
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SpecialReverseStep;
|
public bool SpecialReverseStep;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///主页面禁��
|
///主页面禁止切换到当前账套
|
||||||
|
/// </summary>
|
||||||
|
public bool MainProhibitSwitchingAccount;
|
||||||
|
/// <summary>
|
||||||
|
///单据明细新增时固定在最后面
|
||||||
|
/// </summary>
|
||||||
|
public bool BillAddAtTheEnd;
|
||||||
|
/// <summary>
|
||||||
|
/// 去掉登录页面的消息通知
|
||||||
|
/// </summary>
|
||||||
|
public bool HiddenNotification;
|
||||||
|
/// <summary>
|
||||||
|
/// 去掉登录页面的 设置服务器
|
||||||
|
/// </summary>
|
||||||
|
public bool HiddenServerSetting;
|
||||||
|
/// <summa
|
||||||
Reference in New Issue
Block a user