diff --git a/YLErpDAL/DataBase/APEXOracleContext.cs b/YLErpDAL/DataBase/APEXOracleContext.cs deleted file mode 100644 index 75f39eb1..00000000 --- a/YLErpDAL/DataBase/APEXOracleContext.cs +++ /dev/null @@ -1,42 +0,0 @@ - -using Microsoft.Extensions.Logging; -using YLErp.DataBase.Interceptors; - -namespace YLErp.DataBase -{ - public class APEXOracleContext:DbContext - { - private LogLevel _logLevel; - [System.Diagnostics.Conditional("DEBUG")] - public void SetDebugLog() - { - _logLevel = LogLevel.Debug; - } - protected string GetConnectionString() => AppManager.GetConnectionString("apex_oracle"); - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - var connectionString = GetConnectionString(); - optionsBuilder.LogTo(log => - { - if (_logLevel == LogLevel.Debug) - { - System.Diagnostics.Debug.WriteLine(log); - } - }); - - if (_logLevel == LogLevel.Debug) - { - optionsBuilder.AddInterceptors(DgDbCommandInterceptor.Default); - } - optionsBuilder.UseOracle(connectionString); - } - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.HasDefaultSchema(Environment.GetEnvironmentVariable("OrcaleDatabaseConfig_Schema")); // 设置默认模式 - - // 配置实体和其他模型设置 - } - // 声明数据库中的实体集合 - public DbSet ClientAMRNetBaseInfos { get; set; } - } -} diff --git a/YLErpDAL/Modules/ClientModule/ClientDutyService.cs b/YLErpDAL/Modules/ClientModule/ClientDutyService.cs index 7660792f..fface601 100644 --- a/YLErpDAL/Modules/ClientModule/ClientDutyService.cs +++ b/YLErpDAL/Modules/ClientModule/ClientDutyService.cs @@ -345,61 +345,10 @@ namespace YLErp.Modules.ClientModule return string.Join(",", result); }), - new ExcelHelper.DataColumnModel("证件类型", "IdCardType", (cv, obj) => - { - return Enum.GetName(typeof(IdCardTypeEnum), cv); - }), - new ExcelHelper.DataColumnModel("证件号码", "IdCardNo", typeof(string)), new ExcelHelper.DataColumnModel("电子邮箱", "Email", typeof(string)), - new ExcelHelper.DataColumnModel("是否接收相关邮件", "IsReceiveEmail", (cv, obj) => - { - if (cv!=null) - { - var status = (int)cv; - return status == 1 ? "是" : "否"; - }else - { - return null; - } - - }), - new ExcelHelper.DataColumnModel("联系电话", "PhoneNumber", typeof(string)), - new ExcelHelper.DataColumnModel("传真", "Fax", typeof(string)), - new ExcelHelper.DataColumnModel("联系地址", "Address", typeof(string)) + }; - if (!(PS.Config.Company == CompanyEnum.招证) && !(PS.Config.Company == CompanyEnum.东吴)) - { - dc.Add(new ExcelHelper.DataColumnModel("证件有效日期", "IdCardEffectiveDate", (cv, obj) => - { - var date = (DateTime?)cv; - if (date != null) - { - var flag = ((DateTime)date).ToString("yyyy-MM-dd") == "3000-12-31"; - return flag ? "长期有效" : ((DateTime)date).ToString("yyyy-MM-dd"); - } - else - { - return null; - } - })); - } - if (PS.Config.Company == CompanyEnum.招证 || PS.Config.Company == CompanyEnum.东吴) - { - dc.Add(new ExcelHelper.DataColumnModel("证件到期日", "DeadLine", (cv, obj) => - { - var date = (DateTime?)cv; - return date != null ? ((DateTime)date).ToString("yyyy-MM-dd") : ""; - })); - dc.Add(new ExcelHelper.DataColumnModel("授权到期日", "AuthorizeEndDate", (cv, obj) => - { - var date = (DateTime?)cv; - return date != null ? ((DateTime)date).ToString("yyyy-MM-dd") : ""; - })); - if (PS.Config.Company == CompanyEnum.东吴) - { - dc.Add(new ExcelHelper.DataColumnModel("微信号", "Weixin", typeof(string))); - } - } + new ExcelHelper().ListToExcel(dc.ToArray(), ret, "客户人员信息", true, out var buffer); return buffer; } diff --git a/YLErpDAL/Modules/ClientModule/ClientImportService.cs b/YLErpDAL/Modules/ClientModule/ClientImportService.cs index 8897d77f..562d4ea9 100644 --- a/YLErpDAL/Modules/ClientModule/ClientImportService.cs +++ b/YLErpDAL/Modules/ClientModule/ClientImportService.cs @@ -1709,19 +1709,8 @@ namespace YLErp.Modules.ClientModule } } - - if (IsReceiveEmailString == "是") - { - IsReceiveEmail = 1; - } - else if (!string.IsNullOrEmpty(IsReceiveEmailString) && IsReceiveEmailString != "否") - { - return "第" + rowNum + "行是否接收邮件:" + IsReceiveEmailString + "不合法,导入失败"; - } - else - { - IsReceiveEmail = 0; - } + //默认为1 + IsReceiveEmail = 1; if (DbContext.client_black.Any(c => c.Name == Name)) { return "" + Name + "客户已经存在于黑名单中"; diff --git a/YLErpWeb/App_Docs/导入模板/客户导入_人员信息模板.xlsx b/YLErpWeb/App_Docs/导入模板/客户导入_人员信息模板.xlsx index 0393e77a..fa5ea516 100644 Binary files a/YLErpWeb/App_Docs/导入模板/客户导入_人员信息模板.xlsx and b/YLErpWeb/App_Docs/导入模板/客户导入_人员信息模板.xlsx differ diff --git a/YLErpWeb/App_Docs/导入模板/客户导入_基本信息模板.xlsx b/YLErpWeb/App_Docs/导入模板/客户导入_基本信息模板.xlsx index 8dc0cd78..900d5e9b 100644 Binary files a/YLErpWeb/App_Docs/导入模板/客户导入_基本信息模板.xlsx and b/YLErpWeb/App_Docs/导入模板/客户导入_基本信息模板.xlsx differ diff --git a/YLErpWeb/Controllers/clientController.cs b/YLErpWeb/Controllers/clientController.cs index 102b70cc..3cc4ddc8 100644 --- a/YLErpWeb/Controllers/clientController.cs +++ b/YLErpWeb/Controllers/clientController.cs @@ -3478,25 +3478,5 @@ namespace YLErp.Web.Controllers new ClientProcessLogService(CurUser).revertBankDutyFile(clientId); return JsonSuccess(); } - /// - /// 根据客户名称模糊匹配数据 - /// - /// - /// - public JsonResult SearchClientUsccCodes(string name) - { - if (string.IsNullOrEmpty(name)) - { - return JsonSuccess(); - } - using APEXOracleContext aPEXOracleContext = new APEXOracleContext(); - var schame = Environment.GetEnvironmentVariable("OrcaleDatabaseConfig_Schema"); - var sqlstr = $"SELECT REC_ID,ENT_NAME,USCC_CODE FROM {schame}.AMR_N042_ENT_BASEINFO_COPY WHERE CONTAINS(ENT_NAME, '{name}',1) > 0 AND ROWNUM <= 10"; - // var sqlstr = $"SELECT REC_ID,ENT_NAME,USCC_CODE FROM {schame}.AMR_N042_ENT_BASEINFO_COPY WHERE ENT_NAME like '{name}%' AND ROWNUM <= 10"; - var conn= aPEXOracleContext.Database.GetDbConnection(); - var usccCodes = conn.Query(sqlstr); - //var usccCodes= aPEXOracleContext.ClientAMRNetBaseInfos.Where(x => x.ENT_NAME.StartsWith(name)).Select(s=>new {s.ENT_NAME,s.USCC_CODE}).ToList(); - return JsonSuccess("", usccCodes); - } } } \ No newline at end of file diff --git a/YLErpWeb/Views/client/_ClientDutyEdit.cshtml b/YLErpWeb/Views/client/_ClientDutyEdit.cshtml index 0ab1c19a..5c46258e 100644 --- a/YLErpWeb/Views/client/_ClientDutyEdit.cshtml +++ b/YLErpWeb/Views/client/_ClientDutyEdit.cshtml @@ -22,25 +22,25 @@ * -
+ -
+ -
+ -
+ -
+ -
+
-
+ -
+ -
+ -
+ -
+ -
+ -
+ diff --git a/YLErpWeb/Views/client/_ClientDutyList.cshtml b/YLErpWeb/Views/client/_ClientDutyList.cshtml index 292576b1..5a537546 100644 --- a/YLErpWeb/Views/client/_ClientDutyList.cshtml +++ b/YLErpWeb/Views/client/_ClientDutyList.cshtml @@ -15,42 +15,19 @@ 姓名 - 职责类型 - 证件类型 - 证件号码 - 证件有效日期 - 联系电话 - 传真 - 电子邮箱 - 接收邮件 - 联系地址 - 有效日期 - 证件有效日期 - 证件到期日 - 授权到期日 - 微信号 - 备注 - 操作 + 职责类型 + 电子邮箱 + 备注 + 操作 {{item.ContactName}} {{item.ContactTypeStr}} - {{item.IdCardType}} - {{item.IdCardNo}} - {{item.IdCardDate}} - -
{{item2}}
- - {{item.Fax}} + {{item.EmailStr}} - {{item.IsReceiveEmail === 1?"是":"否"}} - {{item.Address}} - {{item.DeadLine}} - {{item.IdCardEffectiveDateStr == "30001231"?"长期有效":item.IdCardEffectiveDate}} - {{item.AuthorizeEndDate}} - {{item.Weixin}} + {{item.Remarks}}