duhongyu %!s(int64=5) %!d(string=před) roky
rodič
revize
70cf4d08e3

+ 9 - 5
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -444,11 +444,15 @@ namespace CallCenterApi.Interface.Controllers.knowledge
444 444
                             {
445 445
                                 Model.T_RepositoryLog logModel = new BLL.T_RepositoryLog().GetModel(auditModel.F_AfterLogID.Value);
446 446
                                 Model.T_RepositoryInformation infoModel = infoBLL.GetModel(auditModel.F_RepositoryId.Value);
447
-                                infoModel.F_Title = logModel.F_Title;
448
-                                infoModel.F_CategoryId = logModel.F_IntExpand1;
449
-                                infoModel.F_Description = logModel.F_Description;
450
-                                infoModel.F_Content = logModel.F_Content;
451
-                                return infoBLL.Update(infoModel);
447
+                                if (logModel!=null && infoModel!=null )
448
+                                {
449
+                                    infoModel.F_Title = logModel.F_Title;
450
+                                    infoModel.F_CategoryId = logModel.F_IntExpand1;
451
+                                    infoModel.F_Description = logModel.F_Description;
452
+                                    infoModel.F_Content = logModel.F_Content;
453
+                                    return infoBLL.Update(infoModel);
454
+                                }
455
+                               
452 456
                             }
453 457
                             if (auditModel.F_Action == 3)
454 458
                             {

+ 32 - 4
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/TotalCallController.cs

@@ -158,7 +158,16 @@ namespace CallCenterApi.Interface.Controllers.report
158 158
                 string sql = "";
159 159
                 if (!string.IsNullOrEmpty(years))
160 160
                 {
161
-                    sql += $" and CONVERT(char(4),BeginTime,20) = '{years}' ";
161
+                    try
162
+                    {
163
+                        DateTime time = DateTime.Parse(years);
164
+                        sql += $" and CONVERT(char(4),BeginTime,20) = '{time.Year }' ";
165
+                    }
166
+                    catch
167
+                    {
168
+                        sql += $" and CONVERT(char(4),BeginTime,20) = '{years }' ";
169
+                    }
170
+                   
162 171
                 }
163 172
                 DataTable dtNew = new DataTable();
164 173
                 #region
@@ -184,7 +193,16 @@ namespace CallCenterApi.Interface.Controllers.report
184 193
                 }
185 194
                 else
186 195
                 {
187
-                    dtNow = DateTime.Parse(years + "年");
196
+                    try
197
+                    {
198
+                        DateTime time = DateTime.Parse(years);
199
+                        dtNow = DateTime.Parse(time.Year + "年");
200
+                    }
201
+                    catch
202
+                    {
203
+                        dtNow = DateTime.Parse(years + "年");
204
+                    }
205
+                    
188 206
                 }
189 207
                 int monthcount = 0;
190 208
                 for (int i = 1; i <= 12; i++)
@@ -408,8 +426,18 @@ namespace CallCenterApi.Interface.Controllers.report
408 426
                 }
409 427
                 if (!string.IsNullOrEmpty(years))
410 428
                 {
411
-                    sql += $" and CONVERT(char(4),BeginTime,20) = '{years}' ";
412
-                    dtNow = DateTime.Parse(years + "年");
429
+                    try
430
+                    {
431
+                        DateTime time = DateTime.Parse(years);
432
+                        sql += $" and CONVERT(char(4),BeginTime,20) = '{time.Year }' ";
433
+                        dtNow = DateTime.Parse(time.Year + "年");
434
+                    }
435
+                    catch
436
+                    {
437
+                        sql += $" and CONVERT(char(4),BeginTime,20) = '{years}' ";
438
+                        dtNow = DateTime.Parse(years + "年");
439
+                    }
440
+                   
413 441
                 }
414 442
                 else
415 443
                     dtNow = DateTime.Now;

+ 1 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -338,6 +338,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
338 338
             };
339 339
             return ccc;
340 340
         }
341
+
341 342
         /// <summary>
342 343
         /// 获取坐席处理列表
343 344
         /// </summary>