Commit 754e05ce authored by liudong1993's avatar liudong1993

修改配置为同步读取操作

parent b75c79bc
......@@ -253,7 +253,6 @@ LEFT JOIN rb_workflow_auditrelevance war on wa.AuditId=war.Id
string where = " where 1=1 ";
where += string.Format(" AND pu.{0}={1}", nameof(RB_Property_UseReceive_Extend.Status), 0);
where += $@" and pu.RB_Group_Id={dmodel.RB_Group_Id}";
where += $@" and ar.SpecialNode=2 and ar.Stauts=1 and (ar2.Stauts=2 or ar2.Id is null)";
if (!string.IsNullOrEmpty(dmodel.OrderCode))
{
where += " and pu." + nameof(RB_Property_UseReceive_Extend.OrderCode) + " like '%" + dmodel.OrderCode + "%'";
......@@ -296,12 +295,14 @@ LEFT JOIN rb_workflow_auditrelevance war on wa.AuditId=war.Id
}
if (dmodel.AuditEmId > 0)
{
where += $@" and ar.SpecialNode=2 and ar.Stauts=1 and (ar2.Stauts=2 or ar2.Id is null)";
where += " and wa." + nameof(Rb_Workflow_Auditrecord.AuditEmId) + "=" + dmodel.AuditEmId;
where += " and wa." + nameof(Rb_Workflow_Auditrecord.AuditStatus) + "=" + (int)WFRrocessStatus.NotAudit;
where += " and pu." + nameof(RB_Property_UseReceive_Extend.AuditStatus) + "=" + (int)OrderStateEnum.Auditing;//需要申请单在审核中
}
if (dmodel.AuditedEmId > 0)
{
where += $@" and ar.SpecialNode=2 and ar.Stauts=2 ";
where += " and wa." + nameof(Rb_Workflow_Auditrecord.AuditEmId) + "=" + dmodel.AuditedEmId;
where += " and wa." + nameof(Rb_Workflow_Auditrecord.AuditStatus) + " in(" + (int)WFRrocessStatus.AuditThrough + "," + (int)WFRrocessStatus.AuditNotThrough + "," + (int)WFRrocessStatus.Rejected + ")";
}
......
......@@ -1792,7 +1792,7 @@ namespace Property.WebApi.Controllers.User
Time = x.Time.HasValue ? x.Time.Value.ToString("yyyy-MM-dd") : "",
BackTime = x.BackTime.HasValue ? x.BackTime.Value.ToString("yyyy-MM-dd") : "",
x.AuditStatus,
AuditStatusName = "待签名",
AuditStatusName = x.AuditStatus == OrderStateEnum.Auditing ? "待签名" : x.AuditStatus.GetEnumName(),
x.BranchName,
x.DepartmentName,
x.AuditDescription,
......
......@@ -126,14 +126,14 @@ namespace Property.WebApi.Filter
#region 如果参数是json实体对象,获取序列化后的数据
request.EnableBuffering();//重置读取
request.Body.Seek(0, 0);
request.Body.Seek(0, SeekOrigin.Begin);
request.Body.Position = 0;
Stream stream = request.Body;
Encoding encoding = Encoding.UTF8;
byte[] buffer = new byte[request.ContentLength.Value];
stream.ReadAsync(buffer, 0, buffer.Length);
stream.Read(buffer, 0, buffer.Length);
string responseData = Encoding.UTF8.GetString(buffer);
if (!string.IsNullOrWhiteSpace(responseData))
......
......@@ -21,6 +21,12 @@ namespace Property.WebApi
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
//services.Configure<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions>(options =>
//{
// options.AllowSynchronousIO = true;
//});
services.Configure<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions>(x => x.AllowSynchronousIO = true)
.Configure<IISServerOptions>(x => x.AllowSynchronousIO = true);
services.AddControllers();
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>(); //注入http上下文
//services.AddMvc().AddNewtonsoftJson(options =>
......@@ -42,7 +48,7 @@ namespace Property.WebApi
options.JsonSerializerOptions.PropertyNamingPolicy = null;
});
services.AddCors(options => options.AddPolicy("AllowCors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().WithOrigins(new[] { "http://www.test.com:8080", "http://www.test.com:8081", "http://www.test.com:8082", "http://zcyx.oytour.com" })));
services.AddCors(options => options.AddPolicy("AllowCors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().WithOrigins(new[] { "http://www.test.com:8080", "http://www.test.com:8081", "http://www.test.com:8082", "http://zcyx.oytour.com", "http://yx.oytour.com" })));
//services.AddCors(options =>
//{
// options.AddPolicy("AllowCors",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment