导出配置 功能优化
This commit is contained in:
parent
f4146f674e
commit
cc04ae5157
@ -1359,7 +1359,12 @@ namespace APT.BaseData.Services.DomainServices
|
||||
string field = item.Key;
|
||||
string value = item.Value;
|
||||
if (string.Compare(value, "NULL") != 0 && value.IndexOf("to_date", StringComparison.OrdinalIgnoreCase) == -1)
|
||||
{
|
||||
if (field == "ORG_ID")
|
||||
value = "@ORG_ID";
|
||||
else
|
||||
value = "'" + value + "'";
|
||||
}
|
||||
if (dataBaseType == DataBaseType.Postgresql)
|
||||
field = "\"" + field + "\"";
|
||||
else if (DB_KEYWORDS.Any(t => (string.Compare(t, field, true) == 0)))//关键字加引号
|
||||
@ -1367,6 +1372,11 @@ namespace APT.BaseData.Services.DomainServices
|
||||
|
||||
if (string.Compare(field, (dataBaseType == DataBaseType.Postgresql ? "\"ID\"" : "ID"), true) == 0)
|
||||
id = value;
|
||||
else if (field == "ORG_ID")
|
||||
{
|
||||
upBuilder.Append(field + "=@ORG_ID,");
|
||||
upFieldBuilder.Append(field + "=@ORG_ID,");
|
||||
}
|
||||
else
|
||||
{
|
||||
upBuilder.Append(field + "=" + value + ",");
|
||||
|
||||
@ -485,6 +485,10 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
}
|
||||
if (list != null && list.Any())
|
||||
{
|
||||
sb.AppendLine("--USE [mh_jy_bt]");
|
||||
sb.AppendLine("--GO ");
|
||||
sb.AppendLine("declare @ORG_ID varchar(50) ");
|
||||
sb.AppendLine("set @ORG_ID= ( select top 1 ID from T_FM_ORGANIZATION ) -- 可能需要动态调整 ");
|
||||
if (formConfigSqlType == PFFormConfigSqlTypeEnum.获取语法 || formConfigSqlType == PFFormConfigSqlTypeEnum.下载语法文件)
|
||||
{
|
||||
var tmpDatabaseType = databaseType == 0 ? DataBaseType.SQL : (DataBaseType)databaseType;
|
||||
@ -508,6 +512,7 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
this.AddEntity(file);
|
||||
return "PF/File/GetFile?id=" + file.ID;
|
||||
}
|
||||
sb.AppendLine("go ");
|
||||
return sb.ToString();
|
||||
}
|
||||
else if (formConfigSqlType == PFFormConfigSqlTypeEnum.连接数据库执行)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user