Parcourir la Source

知识库bug调整
通话记录字段调整

yuqian il y a 8 ans
Parent
commit
6eba3a6cf4

+ 1 - 1
CallCenterApi/CallCenterApi.DAL/T_Call_CallRecords.cs

@@ -1023,7 +1023,7 @@ namespace CallCenterApi.DAL
1023 1023
             strSql.Append(" select callnumber,");
1024 1024
             strSql.Append(" case calltype when 1 then '呼出' else '呼入' end calltypes, ");
1025 1025
             strSql.Append(" case callstate when 1 then '已接通' else '未接通' end callstates, ");
1026
-            strSql.Append(" case isdeal when 0 then '未处理' when 1 then '已处理' else '注销' end isdeals, ");
1026
+            //strSql.Append(" case isdeal when 0 then '未处理' when 1 then '已处理' else '注销' end isdeals, ");
1027 1027
             strSql.Append(" usercode, (select F_UserName from T_Sys_UserAccount where F_UserCode= c.UserCode) username, ");
1028 1028
             strSql.Append(" begintime, talkstarttime, talkendtime, endtime, talklongtime");
1029 1029
             strSql.Append(" FROM T_Call_CallRecords c   WITH(NOLOCK) ");

+ 4 - 1
CallCenterApi/CallCenterApi.DAL/T_RepositoryInformation.cs

@@ -145,7 +145,10 @@ namespace CallCenterApi.DAL
145 145
             strSql.Append("F_ModifyOn=@F_ModifyOn,");
146 146
             strSql.Append("F_ModifyBy=@F_ModifyBy,");
147 147
             strSql.Append("F_ModifyName=@F_ModifyName,");
148
-            strSql.Append("F_DeleteFlag=@F_DeleteFlag");
148
+            strSql.Append("F_DeleteFlag=@F_DeleteFlag,");
149
+            strSql.Append("F_CanLastLong=@F_CanLastLong,");
150
+            strSql.Append("F_StartTime=@F_StartTime,");
151
+            strSql.Append("F_EndTime=@F_EndTime ");
149 152
             strSql.Append(" where F_RepositoryId=@F_RepositoryId");
150 153
             SqlParameter[] parameters = {
151 154
                     new SqlParameter("@F_CategoryId", SqlDbType.Int,4),

+ 1 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

@@ -288,6 +288,7 @@
288 288
     <Compile Include="Models\Dto\CallRecordDto.cs" />
289 289
     <Compile Include="Models\Dto\CategoryDto.cs" />
290 290
     <Compile Include="Models\Dto\CustomerDto.cs" />
291
+    <Compile Include="Models\Dto\KnowledegDto.cs" />
291 292
     <Compile Include="Models\Dto\ModuleInfoDto.cs" />
292 293
     <Compile Include="Models\Dto\OrderDto.cs" />
293 294
     <Compile Include="Models\Dto\ProductDto.cs" />

Fichier diff supprimé car celui-ci est trop grand
+ 44 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs


+ 36 - 15
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -1,5 +1,6 @@
1 1
 using CallCenter.Utility;
2 2
 using CallCenterApi.Interface.Controllers.Base;
3
+using CallCenterApi.Interface.Models.Dto;
3 4
 using System;
4 5
 using System.Collections.Generic;
5 6
 using System.Data;
@@ -36,7 +37,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
36 37
                 sql += " and (F_Content like '%" + keywords.Trim() + "%' or F_Title like '%"
37 38
                     + keywords.Trim() + "%' or F_KeyWords like '%" + keywords.Trim() + "%')";
38 39
             }
39
-            sql += $" and  ( F_CanLastLong>0 or (DateDiff(s,F_StartTime,'{DateTime.Now}')>0  and DateDiff(s,'{DateTime.Now}',F_EndTime)>0)  )";
40
+
40 41
             if (strpageindex.Trim() != "")
41 42
             {
42 43
                 pageindex = Convert.ToInt32(strpageindex);
@@ -61,21 +62,41 @@ namespace CallCenterApi.Interface.Controllers.knowledge
61 62
             System.Collections.Generic.List<Model.T_RepositoryInformation> modelList = new BLL.T_RepositoryInformation().DataTableToList(dt);
62 63
 
63 64
             var userList = userAccountBLL.DataTableToList(userAccountBLL.GetList("").Tables[0]);
65
+            List<KnowledegDto> list = new List<KnowledegDto>();
64 66
             modelList.ForEach(x =>
65 67
             {
66
-                x.F_CreateName = userList.SingleOrDefault(m => m.F_UserId == x.F_CreateBy)?.F_UserName ?? "";
67
-            });
68
-
69
-            //if (modelList.Count > 0)
70
-            //{
71
-            //    res = Success("加载成功", modelList);
72
-            //}
73
-            //else
74
-            //    res = Error("加载失败");
68
+                var time = "<span style='color:red;'>已失效</span>";
69
+                if (x.F_CanLastLong > 0)
70
+                {
71
+                    time = "永久有效";
72
+                }
73
+                else
74
+                {
75
+                    if (x.F_StartTime == null || x.F_EndTime == null)
76
+                    {
77
+                        time = "<span style='color:red;'>已失效</span>";
78
+                    }
79
+                    else if (DateTime.Now > x.F_StartTime && DateTime.Now < x.F_EndTime)
80
+                    {
81
+                        time = $"{x.F_StartTime?.ToString("yyyy-MM-dd HH:mm:ss") ?? ""} 至 {x.F_EndTime?.ToString("yyyy-MM-dd HH:mm:ss")}";
82
+                    }
83
+                }
75 84
 
85
+                list.Add(new Models.Dto.KnowledegDto
86
+                {
87
+                    F_RepositoryId = x.F_RepositoryId.ToString(),
88
+                    F_CustomerName = userList.SingleOrDefault(m => m.F_UserId == x.F_CreateBy)?.F_UserName ?? "",
89
+                    F_Title = x.F_Title,
90
+                    F_KeyWords = x.F_KeyWords,
91
+                    F_CreateOn = x.F_CreateOn?.ToString("yyyy-MM-dd HH:mm:ss") ?? "",
92
+                    F_CreateName = userList.SingleOrDefault(m => m.F_UserId == x.F_CreateBy)?.F_UserName ?? "",
93
+                    F_CanLastLong = x.F_CanLastLong.ToString(),
94
+                    F_Time = time
95
+                });
96
+            });
76 97
             var obj = new
77 98
             {
78
-                rows = modelList,
99
+                rows = list,
79 100
                 total = recordCount
80 101
             };
81 102
 
@@ -119,8 +140,8 @@ namespace CallCenterApi.Interface.Controllers.knowledge
119 140
             {
120 141
                 if (canlastlong <= 0)
121 142
                 {
122
-                    start = start ?? DateTime.Now.Date;
123
-                    end = end ?? DateTime.Now.Date.AddDays(8).AddSeconds(-1);
143
+                    if (start == null || end == null)
144
+                        return Error("非永久有效的知识库必须填写有效时间段");
124 145
                 }
125 146
 
126 147
 
@@ -200,8 +221,8 @@ namespace CallCenterApi.Interface.Controllers.knowledge
200 221
                         dModel.F_ModifyOn = DateTime.Now;
201 222
                         if (canlastlong <= 0)
202 223
                         {
203
-                            start = start ?? DateTime.Now.Date;
204
-                            end = end ?? DateTime.Now.Date.AddDays(8).AddSeconds(-1);
224
+                            if (start == null || end == null)
225
+                                return Error("非永久有效的知识库必须填写有效时间段");
205 226
                         }
206 227
                         dModel.F_CanLastLong = canlastlong;
207 228
                         dModel.F_StartTime = start;

Fichier diff supprimé car celui-ci est trop grand
+ 65 - 6
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs


+ 19 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Dto/KnowledegDto.cs

@@ -0,0 +1,19 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Web;
5
+
6
+namespace CallCenterApi.Interface.Models.Dto
7
+{
8
+    public class KnowledegDto
9
+    {
10
+        public string F_RepositoryId { get; set; }
11
+        public string F_CustomerName { get; set; }
12
+        public string F_Title { get; set; }
13
+        public string F_KeyWords { get; set; }
14
+        public string F_CreateOn { get; set; }
15
+        public string F_CreateName { get; set; }
16
+        public string F_CanLastLong { get; set; }
17
+        public string F_Time { get; set; }
18
+    }
19
+}