Procházet zdrojové kódy

通讯录修改,工单分布表,话务表

duhongyu %!s(int64=6) %!d(string=před) roky
rodič
revize
c8a5d843f9

+ 196 - 27
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AddressBookController.cs

@@ -13,38 +13,54 @@ namespace CallCenterApi.Interface.Controllers
13 13
     public class AddressBookController : BaseController
14 14
     {
15 15
         private BLL.T_Cus_AddressBook bll = new BLL.T_Cus_AddressBook();
16
-        public ActionResult Add(string F_Name,string F_Sex,string F_Address, string F_Telephone,
17
-          string F_Mobile, string F_ElseMobile, string F_Position, string F_Note,int  F_Departmentid=-1,int id=0)
16
+        public class AddressBook
17
+        {
18
+          public int id { get; set; }
19
+            public string F_Name { get; set; }
20
+            public string F_Sex { get; set; }
21
+            public string F_Address { get; set; }
22
+            public string F_Telephone { get; set; }
23
+            public string F_Mobile { get; set; }
24
+            public string F_ElseMobile { get; set; }
25
+            public string F_Position { get; set; }
26
+            public string F_Note { get; set; }
27
+            public int  F_Departmentid { get; set; }
28
+            public string F_Area;
29
+            public string F_Offce;
30
+            public string F_Department;
31
+            public string code;
32
+        }
33
+        public ActionResult Add(AddressBook address  )
18 34
         {
19 35
             Model.T_Cus_AddressBook model = new Model.T_Cus_AddressBook();
20
-            if (string.IsNullOrEmpty(F_Name))
36
+            if (string.IsNullOrEmpty(address.F_Name))
21 37
             {
22 38
                 return Error("姓名不能为空");
23 39
             }
24
-            if (F_Departmentid<0)
40
+            if (address.F_Departmentid <0)
25 41
             {
26 42
                 return Error("部门不能为空");
27 43
             }
28
-            if (string.IsNullOrEmpty(F_Mobile))
44
+            if (string.IsNullOrEmpty(address.F_Mobile))
29 45
             {
30 46
                 return Error("手机号不能为空");
31 47
             }
32
-            if (id == 0)
48
+            if (address.id == 0)
33 49
             {
34
-                model.F_Name = F_Name;
35
-                model.F_Sex = F_Sex;
36
-                model.F_Address = F_Address;
37
-                model.F_Telephone = F_Telephone;
38
-                model.F_Mobile = F_Mobile;
39
-                model.F_ElseMobile = F_ElseMobile;
40
-                var deptment = new BLL.T_Sys_Department().GetModel(F_Departmentid);
50
+                model.F_Name = address.F_Name;
51
+                model.F_Sex = address.F_Sex;
52
+                model.F_Address = address.F_Address;
53
+                model.F_Telephone = address.F_Telephone;
54
+                model.F_Mobile = address.F_Mobile;
55
+                model.F_ElseMobile = address.F_ElseMobile;
56
+                var deptment = new BLL.T_Sys_Department().GetModel(address.F_Departmentid);
41 57
                  if (deptment!=null )
42 58
                 {
43 59
                     model.F_Department = deptment.F_DeptName ;
44 60
                     model.F_DepartmentId = deptment.F_DeptId  ;
45 61
                 }
46
-                model.F_Position = F_Position;
47
-                model.F_Note = F_Note;
62
+                model.F_Position = address.F_Position;
63
+                model.F_Note = address.F_Note;
48 64
                 int n = bll.Add(model);
49 65
                 if (n > 0)
50 66
                 {
@@ -57,24 +73,24 @@ namespace CallCenterApi.Interface.Controllers
57 73
             }
58 74
             else
59 75
             {
60
-                model = bll.GetModel(id);
76
+                model = bll.GetModel(address.id);
61 77
                 if (model != null)
62 78
                 {
63
-                    model.F_UserId = id;
64
-                    model.F_Name = F_Name;
65
-                    model.F_Sex = F_Sex;
66
-                    model.F_Address = F_Address;
67
-                    model.F_Telephone = F_Telephone;
68
-                    model.F_Mobile = F_Mobile;
69
-                    model.F_ElseMobile = F_ElseMobile;
70
-                    var deptment = new BLL.T_Sys_Department().GetModel(F_Departmentid);
79
+                    model.F_UserId = address.id;
80
+                    model.F_Name = address.F_Name;
81
+                    model.F_Sex = address.F_Sex;
82
+                    model.F_Address = address.F_Address;
83
+                    model.F_Telephone = address.F_Telephone;
84
+                    model.F_Mobile = address.F_Mobile;
85
+                    model.F_ElseMobile = address.F_ElseMobile;
86
+                    var deptment = new BLL.T_Sys_Department().GetModel(address.F_Departmentid);
71 87
                     if (deptment != null)
72 88
                     {
73 89
                         model.F_Department = deptment.F_DeptName;
74 90
                         model.F_DepartmentId = deptment.F_DeptId;
75 91
                     }
76
-                    model.F_Position = F_Position;
77
-                    model.F_Note = F_Note;
92
+                    model.F_Position = address.F_Position;
93
+                    model.F_Note = address.F_Note;
78 94
                     if (bll.Update(model))
79 95
                     {
80 96
                         return Success("修改成功");
@@ -87,6 +103,157 @@ namespace CallCenterApi.Interface.Controllers
87 103
                 return Error("信息不存在");
88 104
             }
89 105
         }
106
+        public List<AddressBook> AddressBooks(List<Model.T_Cus_AddressBook> addressBooks)
107
+        {
108
+            List<AddressBook> Input = new List<AddressBook>();
109
+            foreach (var it in addressBooks)
110
+            {
111
+                AddressBook model = new AddressBook();
112
+                model.id = it.F_UserId;
113
+                model.F_Name = it.F_Name;
114
+                if (!string .IsNullOrEmpty (it.F_Name))
115
+                {
116
+                    char[] strCharArr = it.F_Name.ToCharArray();
117
+                    model. code = GetSpellCode(strCharArr[0].ToString ());
118
+                }
119
+                model.F_Sex = it.F_Sex;
120
+                model.F_Address = it.F_Address;
121
+                model.F_Telephone = it.F_Telephone;
122
+                model.F_Mobile = it.F_Mobile;
123
+                model.F_ElseMobile = it.F_ElseMobile;
124
+                model.F_Position = it.F_Position;
125
+                model.F_Note = it.F_Note;
126
+                model.F_Department = it.F_Department;
127
+                var deptment = new BLL.T_Sys_Department().GetModel(it.F_DepartmentId );
128
+
129
+                if (deptment != null)
130
+                {
131
+                    var deptment1 = new BLL.T_Sys_Department().GetModel(deptment.F_ParentId);
132
+                    if (deptment.F_Layer ==1)
133
+                    {
134
+                        model.F_Area = deptment.F_DeptName;
135
+                        model.F_Offce = "";
136
+                    }
137
+                    else  if (deptment.F_Layer == 2)
138
+                    {
139
+                        model.F_Offce = deptment.F_DeptName;
140
+                        if (deptment1!=null )
141
+                        {
142
+                            model.F_Area = deptment1.F_DeptName;
143
+                        }
144
+                    }
145
+                    else if (deptment.F_Layer == 3)
146
+                    {
147
+                        if (deptment1 != null)
148
+                        {
149
+                            model.F_Offce = deptment1.F_DeptName;
150
+                            var deptment2 = new BLL.T_Sys_Department().GetModel(deptment.F_ParentId);
151
+                            if (deptment2!=null )
152
+                            {
153
+                                model.F_Area  = deptment2.F_DeptName;
154
+                            }
155
+                        }
156
+                    }
157
+                }
158
+                Input.Add(model);
159
+            }
160
+            return Input;
161
+        }
162
+        /// <summary>
163
+        /// 得到一个汉字的拼音第一个字母,如果是一个英文字母则直接返回大写字母
164
+        /// </summary>
165
+        /// <param name="CnChar">单个汉字</param>
166
+        /// <returns>单个大写字母</returns>
167
+        private  string GetSpellCode(string CnChar)
168
+        {
169
+            long iCnChar;
170
+            byte[] arrCN = System.Text.Encoding.Default.GetBytes(CnChar);
171
+
172
+            //如果是字母,则直接返回
173
+            if (arrCN.Length == 1)
174
+            {
175
+                CnChar = CnChar.ToUpper();
176
+            }
177
+            else
178
+            {
179
+                int area = (short)arrCN[0];
180
+                int pos = (short)arrCN[1];
181
+                iCnChar = (area << 8) + pos;
182
+
183
+                // iCnChar match the constant
184
+                string letter = "ABCDEFGHJKLMNOPQRSTWXYZ";
185
+                int[] areacode = { 45217, 45253, 45761, 46318, 46826, 47010, 47297, 47614,
186
+48119, 49062, 49324, 49896, 50371, 50614, 50622, 50906,
187
+51387, 51446, 52218, 52698, 52980, 53689, 54481, 55290 };
188
+                for (int i = 0; i < 23; i++)
189
+                {
190
+                    if (areacode[i] <= iCnChar && iCnChar < areacode[i + 1])
191
+                    {
192
+                        CnChar = letter.Substring(i, 1);
193
+                        break;
194
+                    }
195
+                }
196
+            }
197
+            return CnChar;
198
+        }
199
+        /// <summary>
200
+        /// 获取一条详细信息 Id
201
+        /// </summary>
202
+        /// <param name="infoid"></param>
203
+        /// <returns></returns>
204
+        public ActionResult GetAppInfo(string infoid)
205
+        {
206
+            if (infoid != null && infoid.Trim() != "")
207
+            {
208
+                Model.T_Cus_AddressBook model = bll.GetModel(int.Parse(infoid.Trim()));
209
+
210
+                if (model != null)
211
+                {
212
+                    var list = new List<Model.T_Cus_AddressBook>();
213
+                    if (model != null)
214
+                        list.Add(model);
215
+                    List<AddressBook> Input = AddressBooks(list);
216
+                    return Success("获取成功", Input);
217
+                }
218
+                else
219
+                {
220
+                    return Error("获取失败");
221
+                };
222
+            }
223
+            else
224
+            {
225
+                return Error("获取参数失败");
226
+            }
227
+        }
228
+        public ActionResult GetAppList(string keywords)
229
+        {
230
+            if (Request.IsAuthenticated)
231
+            {
232
+                int userId = CurrentUser.UserData.F_UserId;
233
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
234
+                int dptid = 0;
235
+                if (userModel != null)
236
+                {
237
+                    dptid = userModel.F_DeptId;
238
+                }
239
+                Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
240
+                DataTable dt = new DataTable();
241
+                string sql = "F_IsDelete=0 ";
242
+                if (!string.IsNullOrEmpty(keywords))
243
+                {
244
+                    sql += $"  and ( F_Name like '%" + keywords.Trim() + "%'or F_Telephone like '%" + keywords.Trim() + "%'or F_Mobile like '%" + keywords.Trim() + "%'or F_ElseMobile like '%" + keywords.Trim() + "%'or F_Department like '%" + keywords.Trim() + "%' ) ";
245
+                }
246
+                if (dptid > 0)
247
+                {
248
+                    sql += " and F_DepartmentId in ( select F_DeptId from T_Sys_Department where F_DeptCode like '" + deptModel.F_DeptCode + "%') ";
249
+                }
250
+                var modelList = bll.GetModelList(sql);
251
+                List<AddressBook> Input = AddressBooks(modelList);
252
+                var modelListOrder = Input.OrderBy(x => x.F_Name);
253
+                return Content(modelListOrder.ToJson());
254
+            }
255
+            return NoToken("未知错误,请重新登录");
256
+        }
90 257
         /// <summary>
91 258
         /// 获取一条详细信息 Id
92 259
         /// </summary>
@@ -157,7 +324,7 @@ namespace CallCenterApi.Interface.Controllers
157 324
                 if (userModel != null)
158 325
                 {
159 326
                         dptid = userModel.F_DeptId;
160
-                }
327
+                }                                                     
161 328
                 Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
162 329
                 DataTable dt = new DataTable();
163 330
                 string sql = "F_IsDelete=0 ";
@@ -171,10 +338,12 @@ namespace CallCenterApi.Interface.Controllers
171 338
                 }
172 339
                 var modelList = bll .GetModelList(sql);
173 340
                 var modelListOrder = modelList.OrderBy(x => x.F_Name );
341
+
174 342
                 return Content(modelListOrder.ToJson());
175 343
             }
176 344
             return NoToken("未知错误,请重新登录");
177 345
         }
346
+         
178 347
         public ActionResult GetModelList(string keywords, int pageindex = 1, int pagesize = 10)
179 348
         {
180 349
             if (Request.IsAuthenticated)

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/ApplicationsVersionController.cs

@@ -21,7 +21,7 @@ namespace CallCenterApi.Interface.Controllers
21 21
             public int  F_Type { get; set; }//应用分类(0android 1ios)
22 22
             public string  F_VersionName  { get; set; }//版本名称
23 23
             public string F_VersionCode { get; set; }//版本号
24
-            public string F_Files { get; set; }//android地址
24
+            public string F_Files { get; set; }//附件id
25 25
             public string F_Url { get; set; }//ios链接地址
26 26
             public int  F_Sort { get; set; }//F_Sort
27 27
             public string F_Remarks { get; set; }//F_Remarks
@@ -84,7 +84,7 @@ namespace CallCenterApi.Interface.Controllers
84 84
         /// </summary>
85 85
         /// <param name="ids"></param>
86 86
         /// <returns></returns>
87
-        public ActionResult DelEquipment(string[] ids)
87
+        public ActionResult DelApp(string[] ids)
88 88
         {
89 89
             if (Request.IsAuthenticated)
90 90
             {
@@ -183,7 +183,7 @@ namespace CallCenterApi.Interface.Controllers
183 183
             return model;
184 184
         }
185 185
         /// <summary>
186
-        /// 查询设备详情
186
+        /// 查询详情
187 187
         /// </summary>
188 188
         public ActionResult GetDetails(int id)
189 189
         {

+ 21 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -286,6 +286,8 @@ namespace CallCenterApi.Interface.Controllers
286 286
                     userAccountModel.F_ExtensionNumber = input.Extno.Trim();
287 287
                 if (input.DeptId != 0)
288 288
                     userAccountModel.F_DeptId = input.DeptId;
289
+                if (input.Pid  != 0)
290
+                    userAccountModel.F_PId  = input.Pid;
289 291
                 if (input.RoleId != 0)
290 292
                 {
291 293
                     userAccountModel.F_RoleId = input.RoleId;
@@ -427,7 +429,8 @@ namespace CallCenterApi.Interface.Controllers
427 429
                         userAccountModel.F_See = "3";
428 430
                     }
429 431
                 }
430
-                   
432
+                   if (input.Pid!=0)
433
+                    userAccountModel.F_PId  = input.Pid;
431 434
                 //if (input.GroupId != 0)
432 435
                 //    userAccountModel.F_GroupId = input.GroupId;
433 436
                 userAccountModel.F_SeatFlag = input.IsSeat;
@@ -582,6 +585,19 @@ namespace CallCenterApi.Interface.Controllers
582 585
             }
583 586
             return NoToken("未知错误,请重新登录");
584 587
         }
588
+        public DataTable GetFileData(string ids, string prefix)
589
+        {
590
+            DataTable dt = new DataTable();
591
+            if (!string.IsNullOrEmpty(ids))
592
+            {
593
+                dt = DbHelperSQL.Query("select * from T_Sys_Accessories where F_FileId in (" + ids + ")").Tables[0];
594
+                foreach (DataRow dr in dt.Rows)
595
+                {
596
+                    dr["F_FileUrl"] = prefix + dr["F_FileUrl"].ToString();
597
+                }
598
+            }
599
+            return dt;
600
+        }
585 601
         //获取当前用户信息
586 602
         public ActionResult GetNowUser()
587 603
         {
@@ -590,11 +606,14 @@ namespace CallCenterApi.Interface.Controllers
590 606
                 Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(CurrentUser.UserData.F_UserId);
591 607
                 if (userModel == null)
592 608
                     return Error("获取失败");
609
+                var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
593 610
                 Model.T_Sys_RoleInfo roleModel = new BLL.T_Sys_RoleInfo().GetModel(userModel.F_RoleId);
611
+             var  FileUrl = GetFileData(userModel.F_PId.ToString () , configfj.F_ParamValue);
594 612
                 var obj = new
595 613
                 {
596 614
                     user = userModel,
597
-                    role = roleModel
615
+                    role = roleModel,
616
+                    FileUrl = FileUrl
598 617
                 };
599 618
                 return Success("获取成功", obj);
600 619
             }

+ 375 - 11
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -10,11 +10,271 @@ using System.Web.Mvc;
10 10
 
11 11
 namespace CallCenterApi.Interface.Controllers.report
12 12
 {
13
-    [Authority]
13
+  //  [Authority]
14 14
     public class BusinessController : BaseController
15 15
     {
16
+        public class Telephone
17
+        {
18
+            public List<Proportion> type;//诉求占比占比
19
+            public List<Conversation> conversations ;//24小时来电量,接通量统计
20
+            public List<TotalDate>  dates ;//话务总体数据统计展示
21
+        }
22
+        public class TotalDate
23
+        {
24
+            public string  average;
25
+            public int connection;
26
+            public int traffic;
27
+        }
28
+        public class Conversation
29
+        {
30
+            public int Incomingcall;//来电量
31
+            public int Connect;//接通量
32
+        }
33
+        public class Proportion
34
+        {
35
+            public string name;
36
+            public int total;
37
+            public string  proportion;
38
+        }
39
+        public ActionResult GetTelephoneList(string stime, string endtime)
40
+        {
41
+            string sql = $"  F_IsDelete=0";
42
+            string where = "";
43
+            DataTable dt = new DataTable();
44
+            if (stime == "")
45
+            {
46
+                sql += " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')<=0 ";
47
+                where += " and datediff(day,BeginTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')<=0 ";
48
+            }
49
+               
50
+            else
51
+            {
52
+                sql += " and datediff(day,F_CreateTime,'" + stime + "')<=0 ";
53
+                where += " and datediff(day,BeginTime,'" + stime + "')<=0 ";
54
+            }
55
+              
56
+            if (endtime == "")
57
+            {
58
+                sql += " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')>=0   ";
59
+                sql += " and datediff(day,BeginTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')>=0 ";
60
+            }
61
+            else
62
+            {
63
+                sql += " and datediff(day,F_CreateTime,'" + endtime + "')>=0   ";
64
+                sql += " and datediff(day,BeginTime,'" + endtime + "')>=0 ";
65
+            }
66
+               
67
+            var workorder = new BLL.T_Bus_WorkOrder().GetModelList(sql);
68
+            Telephone telephone = new Telephone();
69
+            telephone.type = new List<Proportion>();
70
+            for (int i=0;i <2;i++)
71
+            {
72
+                Proportion proportion = new Proportion();
73
+                if (i == 0)
74
+                    proportion.name = "咨询";
75
+                else
76
+                    proportion.name = "投诉";
77
+                proportion.total = 0;
78
+                proportion.proportion = "0.00%";
79
+                foreach (var it in workorder)
80
+                {
81
+                    if (i == 0 && it.F_Type == 1)
82
+                        proportion.total++;
83
+                    else if (i == 1 && it.F_Type == 2)
84
+                        proportion.total++;
85
+                }
86
+                telephone.type.Add(proportion);
87
+            }
88
+            Model.T_Call_CallRecords t_Call_CallRecords = new Model.T_Call_CallRecords();
89
+            var CallRecords = new BLL.T_Call_CallRecords().GetModelList(where);
90
+            telephone.conversations = new List<Conversation>();
91
+            for (int i=0;i<24;i++)
92
+            {
93
+                Conversation conversation = new Conversation();
94
+                conversation.Connect = 0;
95
+                conversation.Incomingcall = 0;
96
+                foreach (var it in CallRecords)
97
+                {
98
+                    var time = DateTime.Parse(it.BeginTime.ToString()).Hour;
99
+                   if ( time ==i )
100
+                    {
101
+                        conversation.Incomingcall++;
102
+                        if (it.CallState == 1)
103
+                            conversation.Connect++;
104
+                    }
105
+                }
106
+                telephone.conversations.Add(conversation);
107
+            }
108
+            int t = 0;
109
+            telephone.dates = new List<TotalDate>();
110
+            TotalDate totalDate = new TotalDate();
111
+            totalDate.connection = 0;
112
+            totalDate.traffic = 0;
113
+            foreach (var it in CallRecords)
114
+            {
115
+                t +=(int ) it.LongTime;
116
+                if (it.CallState == 1)
117
+                    totalDate.connection++;
118
+                totalDate.traffic++;
119
+            }
120
+            if (CallRecords.Count > 0)
121
+                totalDate.average = string.Format("{0:f2}",
122
+           (double ) t / CallRecords.Count);
123
+            telephone.dates.Add(totalDate);
124
+            return Success("获取成功", telephone);
125
+        }
126
+        public class BigDate
127
+        {
128
+            public List<Realtime> realtime;//当日工单数量实时
129
+            public List<Acceptancetime> acceptancetimes ;//24小时时段受理量/处理量分布图
130
+            public List<Quantity> states ;//工单各状态数量分布
131
+            public List<Quantity> region;//受理区域饼图
132
+        }
133
+        public class Quantity
134
+        {
135
+            public string name;
136
+            public int total;
137
+        }
138
+        public class Acceptancetime
139
+        {
140
+            public int time;
141
+            public int accept;
142
+            public int handle;
143
+        }
144
+        public class Realtime
145
+        {
146
+            public int time;
147
+            public int total;
148
+        }
149
+        /// <summary>
150
+        /// 工单分布情况表
151
+        /// </summary>
152
+        /// <param name="stime"></param>
153
+        /// <param name="endtime"></param>
154
+        /// <returns></returns>
155
+        public ActionResult GetBigdataList(string stime, string endtime)
156
+        {
157
+            string sql = $"  F_IsDelete=0";
158
+            DataTable dt = new DataTable();
159
+            if (stime=="")
160
+                sql += " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')<=0 ";
161
+            else
162
+                sql += " and datediff(day,F_CreateTime,'" + stime + "')<=0 ";
163
+            if (endtime == "")
164
+                sql += " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')>=0   ";
165
+            else
166
+                sql += " and datediff(day,F_CreateTime,'" + endtime + "')>=0   ";
167
+            var workorder = new BLL.T_Bus_WorkOrder().GetModelList(sql);
168
+            BigDate bigDate = new BigDate();
169
+            bigDate.realtime = new List<Realtime>();
170
+            bigDate.acceptancetimes = new List<Acceptancetime>();
171
+            for (int i = 0; i < 24; i++)
172
+            {
173
+                Realtime realtime = new Realtime();
174
+                Acceptancetime acceptancetime = new Acceptancetime();
175
+                realtime.time = i;
176
+                realtime.total = 0;
177
+                acceptancetime.time = i;
178
+                acceptancetime.accept = 0;
179
+                acceptancetime.handle = 0;
180
+                foreach (var it in workorder)
181
+                {
182
+                    var time = DateTime.Parse(it.F_CreateTime.ToString()).Hour;
183
+                    if (time == i)
184
+                    {
185
+                        realtime.total++;
186
+                        acceptancetime.accept++;
187
+                    }
188
+                    if(it .F_State ==4|| it.F_State == 10)
189
+                    {
190
+                        var handletime = DateTime.Parse(it.F_DealTime.ToString()).Hour;
191
+                        if (handletime == i)
192
+                        {
193
+                            acceptancetime.handle++;
194
+                        }
195
+                    }
196
+                }
197
+                bigDate.realtime.Add(realtime);
198
+                bigDate.acceptancetimes.Add(acceptancetime);
199
+            }
200
+            bigDate.states = new List<Quantity>();
201
+            bigDate.region = new List<Quantity>();
202
+            for (int i=0;i<7;i ++)
203
+            {
204
+                Quantity state = new Quantity();
205
+                state.total = 0;
206
+                foreach (var it in workorder)
207
+                {
208
+                    switch (i)
209
+                    {
210
+                        case 0:
211
+                            state.name = "待提交";
212
+                            if (it.F_State == 0)
213
+                                state.total++;
214
+                            break;
215
+                        case 1:
216
+                            state.name = "待指派";
217
+                            if (it.F_State == 1)
218
+                                state.total++;
219
+                            break;
220
+                        case 2:
221
+                            state.name  = "待处理";
222
+                            if (it.F_State == 3)
223
+                                state.total++;
224
+                            break;
225
+                        case 3:
226
+                            state.name = "处理中";
227
+                            if (it.F_State == 4)
228
+                                state.total++;
229
+                            break;
230
+                        case 4:
231
+                            state.name = "退回待提交";
232
+                            if (it.F_State == 6)
233
+                                state.total++;
234
+                            break;
235
+                        case 5:
236
+                            state.name = "退回待指派";
237
+                            if (it.F_State == 5)
238
+                                state.total++;
239
+                            break;
240
+                        case 6:
241
+                            state.name = "已处理";
242
+                            if (it.F_State == 10)
243
+                                state.total++;
244
+                            break;
245
+                    }
246
+                }
247
+                bigDate.states.Add(state);
248
+            }
249
+            var datement = new BLL.T_Sys_Department().GetModelList("isnull(F_ParentId, 1) = '1' and F_State = 1 and F_Layer = 1 order by F_Sort asc");
250
+            if (datement!=null )
251
+            {
252
+                foreach (var it in datement)
253
+                {
254
+                    Quantity  quantity = new Quantity();
255
+                    quantity.name = it.F_DeptName;
256
+                    quantity.total = 0;
257
+                    foreach (var iv in workorder)
258
+                    {
259
+                        if (iv .F_State >0 && !string .IsNullOrEmpty (iv.F_Area))
260
+                        {
261
+                            try
262
+                            {
263
+                                if (int.Parse(iv.F_Area) == it.F_DeptId)
264
+                                    quantity.total++;
265
+                            }
266
+                            catch
267
+                            {
268
+                            }
269
+                          
270
+                        }
271
+                    }
272
+                    bigDate.region.Add(quantity);
273
+                }
274
+            }
16 275
 
17
-     
276
+            return Success("获取成功", bigDate);
277
+        }
18 278
         /// <summary>
19 279
         /// 市场信息简报
20 280
         /// </summary>
@@ -273,6 +533,21 @@ namespace CallCenterApi.Interface.Controllers.report
273 533
             Date date = new Date();
274 534
             date.total = modelList.Count;
275 535
             date.name = "合计";
536
+            date.MonthCount1 = 0;
537
+            date.MonthCount1name = timeslot.stime + "-" + timeslot.etime + "月份日期";
538
+            date.MonthCountmix1 = "0.00%";
539
+            date.MonthCount2 = 0;
540
+            date.MonthCount2name = timeslot.onetime + "月份日期";
541
+            date.MonthCountmix2 = "0.00%";
542
+            date.MonthCount3 = 0;
543
+            date.MonthCount3name = timeslot.twotime + "月份日期";
544
+            date.MonthCountmix3 = "0.00%";
545
+            date.MonthCount4 = 0;
546
+            date.MonthCount4name = timeslot.threetime + "月份日期";
547
+            date.MonthCountmix4 = "0.00%";
548
+            date.MonthCount5 = 0;
549
+            date.MonthCount5name = "不清楚日期";
550
+            date.MonthCountmix5 = "0.00%";
276 551
             for (int j = 0; j < modelList.Count; j++)
277 552
             {
278 553
                 if (!string.IsNullOrEmpty(modelList[j].F_ProductDate))
@@ -328,7 +603,7 @@ namespace CallCenterApi.Interface.Controllers.report
328 603
             product.factory = new List<Factory>();
329 604
             var EquipmentNumber = new BLL.T_Sys_EquipmentNumber().GetModelList("F_IsDelete=0");
330 605
             
331
-            if (EquipmentNumber!=null && modelList.Count>0)
606
+            if (EquipmentNumber!=null )
332 607
             {
333 608
                 int total = 0;
334 609
                 foreach (var it in EquipmentNumber)
@@ -346,7 +621,8 @@ namespace CallCenterApi.Interface.Controllers.report
346 621
                             factory.number++;
347 622
                         }
348 623
                     }
349
-                    factory.proportion = string.Format("{0:f2}%", (float)factory.number / modelList.Count*100);
624
+                    if (modelList.Count > 0)
625
+                        factory.proportion = string.Format("{0:f2}%", (float)factory.number / modelList.Count*100);
350 626
                     product.factory.Add(factory);
351 627
                 }
352 628
                 product.factory.Sort((a, b) => b.number.CompareTo(a.number));
@@ -354,12 +630,13 @@ namespace CallCenterApi.Interface.Controllers.report
354 630
                 factor.name = "合计";
355 631
                 factor.number = total;
356 632
                 factor.proportion = "0.00%";
357
-                factor.proportion = string.Format("{0:f2}%", (float)total / modelList.Count * 100);
633
+                if (modelList.Count > 0)
634
+                    factor.proportion = string.Format("{0:f2}%", (float)total / modelList.Count * 100);
358 635
                 product.factory.Add(factor);
359 636
             }
360 637
             var problem = new BLL.T_Sys_DictionaryValue().GetModelList("F_DictionaryFlag='WTDM'");
361 638
             product.problem = new List<Factory>();
362
-            if (problem != null && modelList.Count > 0)
639
+            if (problem != null)
363 640
             {
364 641
                 int total = 0;
365 642
                 foreach (var it in problem)
@@ -376,6 +653,7 @@ namespace CallCenterApi.Interface.Controllers.report
376 653
                             factory.number++;
377 654
                         }
378 655
                     }
656
+                    if (modelList.Count>0)
379 657
                     factory.proportion = string.Format("{0:f2}%", (float)factory.number / modelList.Count * 100);
380 658
                     product.problem.Add(factory);
381 659
                 }
@@ -384,13 +662,14 @@ namespace CallCenterApi.Interface.Controllers.report
384 662
                 factor.name = "合计";
385 663
                 factor.number = total;
386 664
                 factor.proportion = "0.00%";
387
-                factor.proportion = string.Format("{0:f2}%", (float)total / modelList.Count * 100);
665
+                if (modelList.Count > 0)
666
+                    factor.proportion = string.Format("{0:f2}%", (float)total / modelList.Count * 100);
388 667
                 product.problem.Add(factor);
389 668
             }
390 669
            
391 670
             var productcode = new BLL.T_Sys_DictionaryValue().GetModelList("F_DictionaryFlag='CPDM'");
392 671
             product.product = new List<Factory>();
393
-            if (productcode != null && modelList.Count > 0)
672
+            if (productcode != null )
394 673
             {
395 674
                 int total = 0;
396 675
                 foreach (var it in productcode)
@@ -407,7 +686,8 @@ namespace CallCenterApi.Interface.Controllers.report
407 686
                             factory.number++;
408 687
                         }
409 688
                     }
410
-                    factory.proportion = string.Format("{0:f2}%", (float)factory.number / modelList.Count * 100);
689
+                    if (modelList.Count > 0)
690
+                        factory.proportion = string.Format("{0:f2}%", (float)factory.number / modelList.Count * 100);
411 691
                     product.product.Add(factory);
412 692
                 }
413 693
                 product.product.Sort((a, b) => b.number.CompareTo(a.number));
@@ -415,7 +695,8 @@ namespace CallCenterApi.Interface.Controllers.report
415 695
                 factor.name = "合计";
416 696
                 factor.number = total;
417 697
                 factor.proportion = "0.00%";
418
-                factor.proportion = string.Format("{0:f2}%", (float)total / modelList.Count * 100);
698
+                if (modelList.Count > 0)
699
+                    factor.proportion = string.Format("{0:f2}%", (float)total / modelList.Count * 100);
419 700
                 product.product.Add(factor);
420 701
             }
421 702
            
@@ -431,7 +712,15 @@ namespace CallCenterApi.Interface.Controllers.report
431 712
                     return Error("导出失败");
432 713
                 }
433 714
             }
434
-            return Success("获取成功", product);
715
+            var msg = time.Year + "年" + time.Month + "月份投诉产品日期分布情况表";
716
+            var obj = new
717
+            {
718
+                state = "success",
719
+                message = "成功",
720
+                rows = product,
721
+                msg= msg,
722
+            };
723
+            return Success("获取成功", obj);
435 724
             #endregion
436 725
            
437 726
         }
@@ -478,7 +767,82 @@ namespace CallCenterApi.Interface.Controllers.report
478 767
             }
479 768
             return Success("成功", obj);
480 769
         }
770
+        public class Feedback
771
+        {
772
+            public string name;
773
+            public int daynumber;
774
+            public int mounthnumber;
775
+            public int Totalnumber;
776
+            public string Proportion;
777
+        }
778
+        BLL.T_Bus_WorkOrder workOrder = new BLL.T_Bus_WorkOrder();
779
+        /// <summary>
780
+        /// 市场反馈一览表
781
+        /// </summary>
782
+        /// <returns></returns>
783
+        public ActionResult GetFeedbacklList(string stime, string endtime)
784
+        {
785
+            string sql = $"  F_IsDelete=0";
786
+            DataTable dt = new DataTable();
787
+            #region 筛选条件
788
+            List<Feedback> modelList = new List<Feedback>(5);
789
+            string smonthtime = "";
790
+            if (!string.IsNullOrEmpty(stime))
791
+            {
792
+                smonthtime = stime.Trim() + " 00:00:01 "; ;
793
+            }
794
+            else
795
+            {
796
+                smonthtime = DateTime.Now.Date.ToString("yyyy-MM-01 00:00:00");
797
+            }
798
+            if (string.IsNullOrEmpty(endtime))
799
+            {
800
+                endtime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
801
+            }
802
+            else
803
+            {
804
+                endtime = endtime + " 23:59:59 "; ;
805
+            }
806
+            string sdaytime = DateTime.Now.Date.ToString("yy" +
807
+                "yy-MM-dd 00:00:00");
808
+            var WTDM = new BLL.T_Sys_DictionaryValue().GetModelList(" F_DictionaryFlag='" + "WTDM" + "' and F_State=1 ");
809
+            int daynumber = 0; int mounthnumber = 0;int Totalnumber = 0;
810
+            if (WTDM!=null )
811
+            {
812
+                foreach (var it in WTDM)
813
+                {
814
+                    Feedback model = new Feedback();
815
+                    model.name = it.F_Name ;
816
+                    float a = workOrder.GetModelList(sql).Count;
817
+                    model.daynumber = workOrder.GetModelList(sql + $" and datediff(day,F_CreateTime,'{sdaytime}')<=0 and datediff(day,F_CreateTime,'{endtime}')>=0 " + "and F_ProblemCode='" + it .F_Name +"'").Count;
818
+                    daynumber += model.daynumber;
819
+                    model.mounthnumber = workOrder.GetModelList(sql + $" and datediff(day,F_CreateTime,'{smonthtime}')<=0 and datediff(day,F_CreateTime,'{endtime}')>=0 " + "and F_ProblemCode='" + it.F_Name + "'").Count;
820
+                    mounthnumber += model.mounthnumber;
821
+                    model.Totalnumber = workOrder.GetModelList(sql + "and F_ProblemCode='"+it .F_Name  + "'").Count;
822
+                    Totalnumber += model.Totalnumber;
823
+                    model.Proportion = string.Format("{0:f2}%", model.Totalnumber / a * 100);
824
+                    modelList.Add(model);
825
+                }
826
+            }
827
+            Feedback modeltotal = new Feedback();
828
+            modeltotal.name = "合计";
829
+            float b = workOrder.GetModelList(sql).Count;
830
+            modeltotal.daynumber = daynumber;
831
+            modeltotal.mounthnumber = mounthnumber;
832
+            modeltotal.Totalnumber = Totalnumber ;
833
+            modeltotal.Proportion = string.Format("{0:f2}%", modeltotal.Totalnumber / b  * 100);
834
+            modelList.Add(modeltotal);
835
+            #endregion
836
+            modelList.Sort((a, c) => c.Totalnumber .CompareTo(a.Totalnumber));
837
+            var obj = new
838
+            {
839
+                state = "success",
840
+                message = "成功",
841
+                rows = modelList
842
+            };
481 843
 
844
+            return Content(obj.ToJson()); ;
845
+        }
482 846
         /// <summary>
483 847
         /// 工单类型报表
484 848
         /// </summary>

+ 5 - 5
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -198,18 +198,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
198 198
                     str = DateTime.Parse(starttime).ToString("yyyy年MM月dd日") + "至" +
199 199
                         DateTime.Parse(endtime).ToString("yyyy年MM月dd日") + "消费者重复投诉表";
200 200
                 }
201
-                else if (istime == 0&&isdc ==1)
201
+                else if (istime == 0)
202 202
                 {
203 203
                     sql +=  " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')<=0 ";
204 204
                     sql += " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')>=0   ";
205 205
                     str = DateTime.Now.ToString("yyyy年MM月dd日") + "消费者重复投诉表";
206 206
                 }
207
-                else if (istime> 0 && isdc == 1)
207
+                else if (istime> 0 )
208 208
                 {
209 209
                     sql +=  " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM")
210 210
                       +  "-01"+ "')<=0 ";
211 211
                     sql += " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')>=0   ";
212
-                    str = DateTime.Now.ToString("yyyy年MM月") + "消费者重复投诉表";
212
+                        str = DateTime.Now.ToString("yyyy年MM月") + "消费者重复投诉表";
213 213
                 }
214 214
                 if (isdc ==1)
215 215
                 {
@@ -322,7 +322,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
322 322
                                 drNew["办事处"]  = "";
323 323
                             }
324 324
                         }
325
-                        drNew["投诉时间"] = it.F_CreateTime ;//
325
+                        drNew["投诉时间"] = DateTime.Parse(it.F_CreateTime.ToString()).ToString("dd日hh时mm分");//
326 326
                         drNew["序号"] = it.F_SerialNumber;//
327 327
                         drNew["姓名"] = it.F_CusName;//姓名
328 328
                         drNew["地址"] = it.F_AddRess;//地址
@@ -1093,7 +1093,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1093 1093
                 #region 处理工单
1094 1094
                 model.F_State = wostate;
1095 1095
                 //处理内容
1096
-                if (!string.IsNullOrEmpty(cont))
1096
+                if (!string.IsNullOrEmpty(model.F_DealResult))
1097 1097
                     model.F_DealResult +=";" +cont ;
1098 1098
                 else
1099 1099
                     model.F_DealResult += cont ;

+ 188 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

@@ -114,6 +114,193 @@ namespace CallCenterApi.Interface.Controllers.workorder
114 114
                 return Error("授权过期,请联系系统厂家。");
115 115
             }
116 116
         }
117
+        public ActionResult GetCount()
118
+        {
119
+            int userId = CurrentUser.UserData.F_UserId;
120
+            if (userId != 0)
121
+            {
122
+                string sql = "";
123
+                DataTable dt = new DataTable();
124
+                Model.T_Sys_UserAccount ua = userBLL.GetModel(userId);
125
+                Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
126
+                int DTJ = 0, DFP = 0, DCL = 0, CLZ = 0, YWJ = 0, THDTJ = 0, THDFP = 0, YJGD = 0, EJGD = 0, SJGD = 0;  
127
+                for (int i=0;i<10;i ++)
128
+                {
129
+                    switch (i )
130
+                    {
131
+                        case 0://待提交
132
+                            sql = "";
133
+                            sql += $"  F_IsDelete=0";
134
+                            if (ro.F_RoleCode == "XTGLY" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZR"|| ro.F_RoleCode == "CLZY")
135
+                            {
136
+                                sql += "AND F_State in(0)";
137
+                            }
138
+                            else
139
+                            {
140
+                                DTJ = 0;
141
+                                break;
142
+                            }
143
+                            DTJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待提交
144
+                            break;
145
+                        case 1://待分派
146
+                            sql = "";
147
+                            sql += $"  F_IsDelete=0";
148
+                            sql += "AND F_State in (1)";
149
+                            sql += RetuSql(ro, 0, ua);
150
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
151
+                            {
152
+                                DFP = 0;
153
+                                break;
154
+                            }
155
+                            DFP = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待分派
156
+                            break;
157
+                        case 2://待处理
158
+                            sql = "";
159
+                            sql += $"  F_IsDelete=0";
160
+                            sql += "AND F_State=3";
161
+                            sql += RetuSql(ro, 0, ua);
162
+                            if (ro.F_RoleCode == "YWY")
163
+                            {
164
+                                sql += "AND F_Notifications=" + ua.F_UserCode;
165
+                            }
166
+                            if (ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
167
+                            {
168
+                                DCL = 0;
169
+                                break;
170
+                            }
171
+                            DCL = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
172
+                            break;
173
+                        case 3://处理中
174
+                            sql = "";
175
+                            sql += $"  F_IsDelete=0";
176
+                            sql += "AND F_State=4";
177
+                            sql += RetuSql(ro, 0, ua);
178
+                            if (ro.F_RoleCode == "YWY")
179
+                            {
180
+                                sql += "AND F_Notifications=" + ua.F_UserCode;
181
+                            }
182
+                            if (ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
183
+                            {
184
+                                CLZ  = 0;
185
+                                break;
186
+                            }
187
+                            CLZ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
188
+                            break;
189
+                        case 4://退回待分派
190
+                            sql = "";
191
+                            sql += $"  F_IsDelete=0";
192
+                            sql += "AND F_State=5";
193
+                            sql += RetuSql(ro, 0, ua);
194
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
195
+                            {
196
+                                THDFP  = 0;
197
+                                break;
198
+                            }
199
+                            THDFP = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
200
+                            break;
201
+                        case 5://退回待提交
202
+                            sql = "";
203
+                            sql += $" F_IsDelete=0";
204
+                            sql += "AND F_State=6";
205
+                            sql += RetuSql(ro, 0, ua);
206
+                            if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS")
207
+                            {
208
+                                THDTJ  = 0;
209
+                                break;
210
+                            }
211
+                            THDTJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
212
+                            break;
213
+                        case 6://已完结
214
+                            sql = "";
215
+                            sql += $"  F_IsDelete=0";
216
+                            sql += "AND F_State=10";
217
+                            sql += RetuSql(ro, 0, ua);
218
+                            if (ro.F_RoleCode == "YWY")
219
+                                sql += "AND F_DealUser=" + ua.F_UserCode;
220
+                            if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
221
+                                sql += "AND F_CreateUser=" + ua.F_UserCode;
222
+                            if (ro.F_RoleCode == "QTJS")
223
+                            {
224
+                                YWJ  = 0;
225
+                                break;
226
+                            }
227
+                            YWJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
228
+                            break;
229
+                        case 7://已完结
230
+                            sql = "";
231
+                            sql += $"  F_IsDelete=0";
232
+                            sql += $" and F_DealTimely = 'Ⅰ级'";
233
+                            sql += RetuSql(ro, 0, ua);
234
+                            if (ro.F_RoleCode == "YWY")
235
+                                sql += "AND F_DealUser=" + ua.F_UserCode;
236
+                            if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
237
+                                sql += "AND F_CreateUser=" + ua.F_UserCode;
238
+                            if (ro.F_RoleCode == "QTJS")
239
+                            {
240
+                                YJGD  = 0;
241
+                                break;
242
+                            }
243
+                            YJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
244
+                            break;
245
+                        case 8://已完结
246
+                            sql = "";
247
+                            sql += $" F_IsDelete=0";
248
+                            sql += $" and F_DealTimely = 'Ⅱ级'";
249
+                            sql += RetuSql(ro, 0, ua);
250
+                            if (ro.F_RoleCode == "YWY")
251
+                                sql += "AND F_DealUser=" + ua.F_UserCode;
252
+                            if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
253
+                                sql += "AND F_CreateUser=" + ua.F_UserCode;
254
+                            if (ro.F_RoleCode == "QTJS")
255
+                            {
256
+                                EJGD  = 0;
257
+                                break;
258
+                            }
259
+                            EJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
260
+                            break;
261
+                        case 9://已完结
262
+                            sql = "";
263
+                            sql += $"  F_IsDelete=0";
264
+                            sql += $" and F_DealTimely = '普通工单'";
265
+                            sql += RetuSql(ro, 0, ua);
266
+                            if (ro.F_RoleCode == "YWY")
267
+                                sql += "AND F_DealUser=" + ua.F_UserCode;
268
+                            if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX")
269
+                                sql += "AND F_CreateUser=" + ua.F_UserCode;
270
+                            if (ro.F_RoleCode == "QTJS")
271
+                            {
272
+                                SJGD  = 0;
273
+                                break;
274
+                            }
275
+                            SJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
276
+                            break;
277
+
278
+                    }
279
+
280
+                }
281
+                var obj = new
282
+                {
283
+                    state = "success",
284
+                    message = "成功",
285
+                    DTJ = DTJ,
286
+                    DFP = DFP,
287
+                    DCL = DCL,
288
+                    CLZ = CLZ,
289
+                    YWJ = YWJ,
290
+                    THDTJ = THDTJ,
291
+                    THDFP = THDFP,
292
+                    YJGD = YJGD,
293
+                    EJGD = EJGD,
294
+                    SJGD = SJGD,
295
+                };
296
+                return Content(obj.ToJson()); ;
297
+            }
298
+            else
299
+            {
300
+                return Error("无操作权限!");
301
+            }
302
+
303
+        }
117 304
         // GET: WorkOrderNew
118 305
         /// <summary>
119 306
         /// 获取工单列表
@@ -1022,7 +1209,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1022 1209
                 #region 处理工单
1023 1210
                 model.F_State = wostate;
1024 1211
                 //处理内容
1025
-                if (!string.IsNullOrEmpty(cont))
1212
+                if (!string.IsNullOrEmpty(model.F_DealResult))
1026 1213
                     model.F_DealResult += ";"+ cont ;
1027 1214
                 else
1028 1215
                     model.F_DealResult += cont;

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/UserAccountInput.cs

@@ -20,6 +20,7 @@ namespace CallCenterApi.Interface.Models.Input
20 20
         public int RoleId { get; set; } = 0;
21 21
         public string  Post { get; set; } 
22 22
         public int GroupId { get; set; } = 0;
23
+        public int Pid { get; set; } = 0;
23 24
         public bool IsSeat { get; set; } = false;
24 25
         public string SearRight { get; set; }
25 26
         public string Sex { get; set; }