From fd865638a82d6691a7904ce1aaccff1e050c7c14 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 09 七月 2021 13:18:02 +0800
Subject: [PATCH] 订单管理: 订单数量默认1 列表 订单类别 显示三级 收货人默认客户资料的收货人 订单批量打印 打印需要批量打印 回访:需要增加 接待人,回访情况,用户评价.客户意见, 送货。 送货公司,单号,时间
---
zhengcaioa/zhengcaioa/Startup.cs | 39 +++++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Startup.cs b/zhengcaioa/zhengcaioa/Startup.cs
index eebad5c..58f88ba 100644
--- a/zhengcaioa/zhengcaioa/Startup.cs
+++ b/zhengcaioa/zhengcaioa/Startup.cs
@@ -25,6 +25,7 @@
using zhengcaioa.Model;
using zhengcaioa.Models;
using zhengcaioa.Service;
+using zhengcaioa.Timer;
namespace zhengcaioa
{
@@ -46,11 +47,12 @@
options.AddPolicy("any", builder =>
{
builder.WithMethods("GET", "POST", "HEAD", "PUT", "DELETE", "OPTIONS")
+ .AllowAnyHeader()
//.AllowCredentials()//指定处理cookie
.AllowAnyOrigin(); //允许任何来源的主机访问
});
});
-
+ //services.AddCors(option => option.AddPolicy("cors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().AllowAnyOrigin()));
services.AddSession(options =>
{
@@ -62,11 +64,16 @@
options.CheckConsentNeeded = context => true;
options.MinimumSameSitePolicy = SameSiteMode.None;
});
+ services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
var connectionString = Configuration.GetConnectionString("DefaultConnection");
services.AddDbContext<zhengcaioaContext>(options =>
- options.UseSqlServer(connectionString));
+ options.UseSqlServer(connectionString));
services.AddControllersWithViews();
+
+ services.AddScoped(typeof(ISimService), typeof(SimService));
+ services.AddScoped(typeof(IHrSalaryService), typeof(HrSalaryService));
+
services.AddScoped(typeof(IUserService), typeof(UserService));
services.AddScoped(typeof(ILiaotianService), typeof(LiaotianService));
services.AddScoped(typeof(IProjectService), typeof(ProjectService));
@@ -110,6 +117,34 @@
services.AddScoped(typeof(IFiMemberService), typeof(FiMemberService));
services.AddScoped(typeof(IFiBookService), typeof(FiBookService));
+ services.AddScoped(typeof(IAdmAttendanceRuleService), typeof(AdmAttendanceRuleService));
+
+ services.AddScoped(typeof(IAdmAttendanceDtlService), typeof(AdmAttendanceDtlService));
+ services.AddScoped(typeof(IAdmAttendanceService), typeof(AdmAttendanceService));
+
+ services.AddScoped(typeof(IHrJibengongziService), typeof(HrJibengongziService));
+
+ services.AddScoped(typeof(IHrJixiaotichengService), typeof(HrJixiaotichengService));
+
+ services.AddScoped(typeof(IHrSalaryService), typeof(HrSalaryService));
+
+ services.AddScoped(typeof(ICusFangwenjiluService), typeof(CusFangwenjiluService));
+
+ services.AddScoped(typeof(ILZhuanjiahuidumService), typeof(LZhuanjiahuidumService));
+
+ services.AddScoped(typeof(IWfApplytypeService), typeof(WfApplytypeService));
+ services.AddScoped(typeof(IWfRunProcessService), typeof(WfRunProcessService));
+ services.AddScoped(typeof(IWfNeeddeelService), typeof(WfNeeddeelService));
+ services.AddScoped(typeof(IWfHistoryService), typeof(WfHistorieservice));
+ services.AddScoped(typeof(IOrderBanciDtlService), typeof(OrderBanciDtlService));
+ services.AddScoped(typeof(IOrderBanciService), typeof(OrderBanciService));
+ services.AddScoped(typeof(IOrderBanciOrderService), typeof(OrderBanciOrderService));
+
+
+ //定时执行
+ services.AddHostedService<TimedBackgroundService>();
+
+
services.AddAutoMapper(typeof(AutoMapperConfigs));
services.AddUEditorService("ueditor.json", true, "wwwroot");
services.AddMvc(options =>{
--
Gitblit v1.9.1