duhongyu 5 年之前
父节点
当前提交
70cf4d08e3

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

444
                             {
444
                             {
445
                                 Model.T_RepositoryLog logModel = new BLL.T_RepositoryLog().GetModel(auditModel.F_AfterLogID.Value);
445
                                 Model.T_RepositoryLog logModel = new BLL.T_RepositoryLog().GetModel(auditModel.F_AfterLogID.Value);
446
                                 Model.T_RepositoryInformation infoModel = infoBLL.GetModel(auditModel.F_RepositoryId.Value);
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
                             if (auditModel.F_Action == 3)
457
                             if (auditModel.F_Action == 3)
454
                             {
458
                             {

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

158
                 string sql = "";
158
                 string sql = "";
159
                 if (!string.IsNullOrEmpty(years))
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
                 DataTable dtNew = new DataTable();
172
                 DataTable dtNew = new DataTable();
164
                 #region
173
                 #region
184
                 }
193
                 }
185
                 else
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
                 int monthcount = 0;
207
                 int monthcount = 0;
190
                 for (int i = 1; i <= 12; i++)
208
                 for (int i = 1; i <= 12; i++)
408
                 }
426
                 }
409
                 if (!string.IsNullOrEmpty(years))
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
                 else
442
                 else
415
                     dtNow = DateTime.Now;
443
                     dtNow = DateTime.Now;

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

338
             };
338
             };
339
             return ccc;
339
             return ccc;
340
         }
340
         }
341
+
341
         /// <summary>
342
         /// <summary>
342
         /// 获取坐席处理列表
343
         /// 获取坐席处理列表
343
         /// </summary>
344
         /// </summary>