Преглед на файлове

mssql版本生成的数据库文档

zhangkun преди 5 години
родител
ревизия
049f343339

+ 10 - 0
代码/System.Common/Helpers/NPOIHelper.cs

@@ -721,10 +721,12 @@ namespace System.Common.Helpers
721 721
                     {
722 722
                         foreach (var item in colname)
723 723
                         {
724
+                            int itemcount = 0;
724 725
                             for (int j = 0; j < objs.Columns.Count; j++)
725 726
                             {
726 727
                                 if (objs.Columns[j].ColumnName == item)
727 728
                                 {
729
+                                    itemcount++;
728 730
                                     string strsj = string.Empty;
729 731
                                     if (objs.Rows[i][j] != null)
730 732
                                     {
@@ -734,8 +736,16 @@ namespace System.Common.Helpers
734 736
                                     cell.SetCellValue(strsj);
735 737
                                     cell.CellStyle = cellStyle;
736 738
                                     iCellIndex++;
739
+                                    break;
737 740
                                 }
738 741
                             }
742
+                            if (itemcount == 0)
743
+                            {
744
+                                ICell cell = irow.CreateCell(iCellIndex);
745
+                                cell.SetCellValue("a/N");
746
+                                cell.CellStyle = cellStyle;
747
+                                iCellIndex++;
748
+                            }
739 749
                         }
740 750
                     }
741 751
                     else

+ 1 - 1
代码/TVShoppingCallCenter_ZLJ/Controllers/System/DictionaryController.cs

@@ -63,7 +63,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
63 63
             List<IConditionalModel> conModels = new List<IConditionalModel>();
64 64
             #region 条件筛选
65 65
             conModels.Add(new ConditionalModel() { FieldName = "F_State", ConditionalType = ConditionalType.Equal, FieldValue = ((int)EnumDelState.Enabled).ToString() });
66
-            conModels.Add(new ConditionalModel() { FieldName = "F_IsLeaf", ConditionalType = ConditionalType.Equal, FieldValue = isleaf.ToString() });
66
+            conModels.Add(new ConditionalModel() { FieldName = "F_IsLeaf", ConditionalType = ConditionalType.Equal, FieldValue = isleaf==true?"1":"0" });
67 67
             if(!string.IsNullOrEmpty(code))
68 68
                 conModels.Add(new ConditionalModel() { FieldName = "F_ValueCode", ConditionalType = ConditionalType.Equal, FieldValue = code });
69 69
             if (!string.IsNullOrEmpty(keyword))

+ 14 - 3
代码/TVShoppingCallCenter_ZLJ/Controllers/hangfire/HangfireController.cs

@@ -337,6 +337,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.hangfire
337 337
             List<cdr> modellist=  await busCdrRepository.GetListALL(q=>q.id>maxid||q.end_time>= dtime);
338 338
             int totle = 0;
339 339
             int n = 0;
340
+            int n1 = 0;
340 341
             if (modellist != null && modellist.Count > 0)
341 342
             {
342 343
 
@@ -373,12 +374,22 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.hangfire
373 374
                         CallId = modelcdr.uuid,
374 375
                         CdrId= modelcdr.id
375 376
                     };
376
-                    modelRecordList.Add(modelRecord);                  
377
+                    n++;
378
+                    n1++;
379
+                    modelRecordList.Add(modelRecord);
380
+                    if (n >= 500)
381
+                    { 
382
+                        await busCallRecordsRepository.AddAndUpdateList(modelRecordList);
383
+                        modelRecordList.Clear();
384
+                        n = 0;
385
+                    }
386
+                    
377 387
                 }
378 388
                 //T_Call_CallRecords modelreturn= await busCallRecordsRepository.AddAndUpdateList(modelRecordList,s=>new {s.EndTime,s.TalkEndTime,s.IvrEndTime });
379
-                T_Call_CallRecords modelreturn = await busCallRecordsRepository.AddAndUpdateList(modelRecordList);
389
+                //T_Call_CallRecords modelreturn = 
390
+                    await busCallRecordsRepository.AddAndUpdateList(modelRecordList);
380 391
             }
381
-            return Success($"同步情况  成功/总数 = {n}/{totle}");
392
+            return Success($"同步情况  成功/总数 = {n1}/{totle}");
382 393
         }
383 394
         #endregion
384 395
     }

+ 2 - 2
代码/TVShoppingCallCenter_ZLJ/Startup.cs

@@ -95,7 +95,7 @@ namespace TVShoppingCallCenter_ZLJ
95 95
             });
96 96
             #endregion
97 97
             #region 配置数据库
98
-            BaseContext.DB_ConnectionString = Configuration.GetConnectionString("MySqlConnection");
98
+            BaseContext.DB_ConnectionString = Configuration.GetConnectionString("DefaultConnection");
99 99
             BaseMysqlContext.DB_ConnectionString = Configuration.GetConnectionString("MySqlConnection");
100 100
             #endregion
101 101
 
@@ -146,7 +146,7 @@ namespace TVShoppingCallCenter_ZLJ
146 146
             services.AddTransient<IBus_SMSTemplateRepository, Bus_SMSTemplateRepository>();
147 147
             services.AddTransient<ICall_CallRecordsRepository, Call_CallRecordsRepository>();
148 148
             services.AddTransient<ICDRRepository, CDRRepository>();
149
-            services.AddHangfire(x => x.UseStorage(new MySqlStorage(BaseMysqlContext.DB_ConnectionString, new MySqlStorageOptions
149
+            services.AddHangfire(x => x.UseStorage(new MySqlStorage(BaseContext.DB_ConnectionString, new MySqlStorageOptions
150 150
             {
151 151
                 TransactionIsolationLevel = IsolationLevel.ReadCommitted,
152 152
                 QueuePollInterval = TimeSpan.FromSeconds(15),

+ 5 - 4
代码/TVShoppingCallCenter_ZLJ/appsettings.json

@@ -16,8 +16,9 @@
16 16
     "stock1": "41.07.011" //新乡仓
17 17
   },
18 18
   "ConnectionStrings": {
19
-    "DefaultConnection": "Data Source=192.168.8.3;User ID=sa;pwd=800100;Initial Catalog=TVCallCenter_ZLJ;MultipleActiveResultSets=true;Pooling=true;Min Pool Size=15;Max Pool Size=100;",
20
-    "MySqlConnection": "server=192.168.8.18;User ID=root;Password=mysql;database=TVCallCenter_ZLJ;charset=utf8mb4;Allow User Variables=true;"
19
+    //"DefaultConnection": "Data Source=192.168.8.3;User ID=sa;pwd=800100;Initial Catalog=TVCallCenter_ZLJ;MultipleActiveResultSets=true;Pooling=true;Min Pool Size=15;Max Pool Size=100;",
20
+    "DefaultConnection": "server=192.168.8.18;User ID=root;Password=mysql;database=TVCallCenter_ZLJ;charset=utf8mb4;Allow User Variables=true;",
21
+    "MySqlConnection": "server=192.168.8.18;User ID=root;Password=mysql;database=freeswitch;charset=utf8mb4;Allow User Variables=true;"
21 22
   },
22 23
   "Jwt": {
23 24
     "Issuer": "HnjySignToken",
@@ -32,8 +33,8 @@
32 33
     "ordertrackkey": "F_Id,F_TrackingNo,ProductNumberName",
33 34
     "ordertracktvalue": "订单号,运单号,物流状态",
34 35
 
35
-    "vipkey": "F_Name,F_Birthday,F_Age,F_Sex,F_ShoeSize,F_Mobile,F_Mobile1,F_Phone,F_Recommender,F_Label,F_Note,F_Nickname,F_RegTime,F_Province,F_City,F_Area,F_Town,F_Postcode,F_Address,F_Address1,F_Score,F_Money,F_TotalScore,F_Saleperson,F_Contact,F_Type",
36
-    "vipvalue": "姓名,生日,年龄,性别,鞋码,手机号1,手机号2,固定电话,推荐人,标签,备注,昵称,注册时间,省份,城市,县区,乡镇,邮编,地址,备用地址,会员积分,累计消费,累计积分,销售负责人,最近联系时间,会员类型"
36
+    "vipkey": "F_Name,F_Birthday,F_Age,F_Sex,F_ShoeSize,F_Mobile,F_Mobile1,F_Phone,F_Recommender,F_Label,F_Note,F_Nickname,F_CreateOn,F_Province,F_City,F_Area,F_Town,F_Postcode,F_Address,F_Address1,F_Score,F_Money,F_TotalScore,F_Saleperson,F_Type",
37
+    "vipvalue": "姓名,生日,年龄,性别,鞋码,手机号1,手机号2,固定电话,推荐人,标签,备注,昵称,注册时间,省份,城市,县区,乡镇,邮编,地址,备用地址,会员积分,累计消费,累计积分,销售负责人,会员类型"
37 38
 
38 39
     //在这里可以成对配置导入模板的 表头与对象属性名对应关系 备用省份,备用城市,备用县区,备用乡镇,备用邮编, F_Province1,F_City1,F_Area1,F_Town1,F_Postcode1,
39 40
   },

BIN
文档/开发文档/MsSql注释说明.docx