1550076451 1 год назад
Родитель
Сommit
9e6d5c90dc

Разница между файлами не показана из-за своего большого размера
+ 21 - 11
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs


+ 6 - 6
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

180
         public ActionResult GetPhoneLocation()
180
         public ActionResult GetPhoneLocation()
181
         {
181
         {
182
 
182
 
183
-            if (Request.IsAuthenticated)
183
+           if (Request.IsAuthenticated)
184
             {
184
             {
185
                 string location = "未知";
185
                 string location = "未知";
186
 
186
 
198
                     else
198
                     else
199
                     {
199
                     {
200
 
200
 
201
-                        var PhoneNumber = MobiledataController.GetDetails(tel.Substring(1, 7));
202
-                        if (PhoneNumber != null)
201
+                        var PhoneNumber = MobiledataController.GetDetails(tel.Substring(1, 11));
202
+                        if (PhoneNumber != null&& PhoneNumber.Count >0)
203
                         {
203
                         {
204
                             Model.T_Sys_MobileData dModel = new Model.T_Sys_MobileData();
204
                             Model.T_Sys_MobileData dModel = new Model.T_Sys_MobileData();
205
                             dModel.F_MobileNum = tel.Substring(1, 7);
205
                             dModel.F_MobileNum = tel.Substring(1, 7);
248
                         }
248
                         }
249
                         else
249
                         else
250
                         {
250
                         {
251
-                            var PhoneNumber = MobiledataController .GetDetails (tel.Substring(0, 7));
252
-                            if (PhoneNumber != null)
251
+                            var PhoneNumber = MobiledataController .GetDetails (tel.Substring(0, 10));
252
+                            if (PhoneNumber != null && PhoneNumber.Count > 0)
253
                             {
253
                             {
254
                                 Model.T_Sys_MobileData dModel = new Model.T_Sys_MobileData();
254
                                 Model.T_Sys_MobileData dModel = new Model.T_Sys_MobileData();
255
                                 dModel.F_MobileNum = tel.Substring(0, 7);
255
                                 dModel.F_MobileNum = tel.Substring(0, 7);
288
                     }
288
                     }
289
                 }
289
                 }
290
                 return Success("归属地加载成功", location);
290
                 return Success("归属地加载成功", location);
291
-            }
291
+           }
292
                 return NoToken("未知错误,请重新登录");
292
                 return NoToken("未知错误,请重新登录");
293
          }
293
          }
294
 
294
 

+ 44 - 24
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/MobiledataController.cs

153
         //    return true; //总是接受  
153
         //    return true; //总是接受  
154
         //}
154
         //}
155
 
155
 
156
+        public ActionResult GetPhone(string moblie)
157
+        {
158
+            return Success("",GetDetails(moblie));
159
+        }
160
+
161
+
156
         public  static  Dictionary<string, string> GetDetails(string moblie)
162
         public  static  Dictionary<string, string> GetDetails(string moblie)
157
         {
163
         {
158
-            string url = "https://www.chahaoba.com/" + moblie;
159
-            HtmlDocument document = GetDocument(url);
160
-            var priceXPath = @"//*[@id='mw-content-text']";
161
-            var Node = document.DocumentNode.SelectSingleNode(priceXPath);
162
-            List<string> InnerText = new List<string>();
163
-            foreach (HtmlNode table in Node.SelectNodes("//table"))
164
+            try
164
             {
165
             {
165
-                foreach (HtmlNode row in table.SelectNodes(".//tr"))
166
+                string url = "https://www.chahaoba.com/" + moblie;
167
+                HtmlDocument document = GetDocument(url);
168
+                var priceXPath = @"//*[@id='mw-content-text']";
169
+                var Node = document.DocumentNode.SelectSingleNode(priceXPath);
170
+                List<string> InnerText = new List<string>();
171
+
172
+                foreach (HtmlNode table in Node.SelectNodes("//li"))
166
                 {
173
                 {
167
-                    foreach (HtmlNode cell in row.SelectNodes("th|td"))
168
-                    {
169
-                        InnerText.Add(cell.InnerText );
170
-                    }
174
+                    InnerText.Add(table.InnerText);
171
                 }
175
                 }
172
-            }
173
-            Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
174
-            if (InnerText != null )
175
-            {
176
-               for (int i=0;i< InnerText.Count;i ++)
176
+                Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
177
+                if (InnerText != null)
177
                 {
178
                 {
178
-                    if(InnerText[i ]== "归属省份地区")
179
+                    for (int i = 0; i < InnerText.Count; i++)
179
                     {
180
                     {
180
-                        keyValuePairs.Add("市区", InnerText[i + 1].Split('、')[0]);
181
-                        keyValuePairs.Add("省份", InnerText[i + 1].Split('、')[1]);
182
-                    }
183
-                    else if (InnerText[i] == "电信运营商")
184
-                    {
185
-                        keyValuePairs.Add("电信运营商", InnerText[i + 1]);
181
+                        if (InnerText[i].Contains("归属省份地区:"))
182
+                        {
183
+                            var address = InnerText[i].Replace("归属省份地区:", "").Split('、');
184
+                            if (address != null && address.Count() > 1)
185
+                            {
186
+                                keyValuePairs.Add("市区", InnerText[i].Replace("归属省份地区:", "").Split('、')[0]);
187
+                                keyValuePairs.Add("省份", InnerText[i].Replace("归属省份地区:", "").Split('、')[1]);
188
+                            }
189
+                            else if (address != null && address.Count() > 0)
190
+                            {
191
+                                keyValuePairs.Add("市区", InnerText[i].Replace("归属省份地区:", "").Split('、')[0]);
192
+                                keyValuePairs.Add("省份", InnerText[i].Replace("归属省份地区:", "").Split('、')[0]);
193
+                            }
194
+                        }
195
+                        else if (InnerText[i].Contains("电信运营商:"))
196
+                        {
197
+                            keyValuePairs.Add("电信运营商", InnerText[i].Replace("电信运营商:", ""));
198
+                        }
186
                     }
199
                     }
187
                 }
200
                 }
201
+                return keyValuePairs;
202
+
203
+            }
204
+            catch
205
+            {
206
+                return null;
188
             }
207
             }
189
-            return keyValuePairs;
208
+           
209
+           
190
 
210
 
191
         }
211
         }
192
         //添加/编辑号码归属地
212
         //添加/编辑号码归属地

Разница между файлами не показана из-за своего большого размера
+ 24 - 11
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs


+ 20 - 24
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

154
                 Model.T_Sys_UserAccount ua = userBLL.GetModel(userId);
154
                 Model.T_Sys_UserAccount ua = userBLL.GetModel(userId);
155
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
155
                 Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
156
                 int DTJ = 0, DFP = 0, DCL = 0, CLZ = 0, YWJ = 0, THDTJ = 0, THDFP = 0, YJGD = 0, EJGD = 0, SJGD = 0, CJSL=0,ZX=0;
156
                 int DTJ = 0, DFP = 0, DCL = 0, CLZ = 0, YWJ = 0, THDTJ = 0, THDFP = 0, YJGD = 0, EJGD = 0, SJGD = 0, CJSL=0,ZX=0;
157
-                string where = $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
157
+                string where = $" and (F_Type=" + 2 + "or (F_Duplicate!=1 and F_Duplicate!=4  and F_Type=3) or F_Type>4 )";
158
                if (ro.F_RoleCode == "DS")//电商角色
158
                if (ro.F_RoleCode == "DS")//电商角色
159
                 {
159
                 {
160
                     where += "and F_Content like  '%电商%'";
160
                     where += "and F_Content like  '%电商%'";
168
 
168
 
169
                             sql += $"  F_IsDelete=0";
169
                             sql += $"  F_IsDelete=0";
170
                             sql += "AND F_Duplicate !=5"+ where;
170
                             sql += "AND F_Duplicate !=5"+ where;
171
-                            if (ro.F_RoleCode == "XTGLY" || ro.F_RoleCode == "JCRY")
172
-                            {
173
-                                sql += "AND F_State in(0)";
174
-                            }
175
-                            else if ( ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZR" || ro.F_RoleCode == "CLZY")
171
+                            if (ro.F_RoleCode == "XTGLY" || ro.F_RoleCode == "JCRY"|| ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZR" || ro.F_RoleCode == "CLZY")
176
                             {
172
                             {
177
-                                sql += "AND F_State in(0)";
173
+                                sql += "AND F_State =0";
178
                             }
174
                             }
179
                             else 
175
                             else 
180
                             {
176
                             {
181
                                 DTJ = 0;
177
                                 DTJ = 0;
182
                                 break;
178
                                 break;
183
                             }
179
                             }
184
-                            DTJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待提交
180
+                            DTJ = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待提交
185
                             break;
181
                             break;
186
                         case 1://待分派
182
                         case 1://待分派
187
                             sql = "";
183
                             sql = "";
188
                             sql += $"  F_IsDelete=0";
184
                             sql += $"  F_IsDelete=0";
189
                             sql += "AND F_Duplicate !=5"+ where;
185
                             sql += "AND F_Duplicate !=5"+ where;
190
-                            sql += "AND F_State in (1)";
186
+                            sql += "AND F_State =1";
191
                             sql += RetuSql(ro, 0, ua);
187
                             sql += RetuSql(ro, 0, ua);
192
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZG")
188
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZG")
193
                             {
189
                             {
194
                                 DFP = 0;
190
                                 DFP = 0;
195
                                 break;
191
                                 break;
196
                             }
192
                             }
197
-                            DFP = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待分派
193
+                            DFP = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待分派
198
                             break;
194
                             break;
199
                         case 2://待处理
195
                         case 2://待处理
200
                             sql = "";
196
                             sql = "";
211
                                 DCL = 0;
207
                                 DCL = 0;
212
                                 break;
208
                                 break;
213
                             }
209
                             }
214
-                            DCL = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
210
+                            DCL = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
215
                             break;
211
                             break;
216
                         case 3://处理中
212
                         case 3://处理中
217
                             sql = "";
213
                             sql = "";
228
                                 CLZ  = 0;
224
                                 CLZ  = 0;
229
                                 break;
225
                                 break;
230
                             }
226
                             }
231
-                            CLZ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
227
+                            CLZ = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
232
                             break;
228
                             break;
233
                         case 4://退回待分派
229
                         case 4://退回待分派
234
                             sql = "";
230
                             sql = "";
241
                                 THDFP  = 0;
237
                                 THDFP  = 0;
242
                                 break;
238
                                 break;
243
                             }
239
                             }
244
-                            THDFP = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
240
+                            THDFP = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
245
                             break;
241
                             break;
246
                         case 5://退回待提交
242
                         case 5://退回待提交
247
                             sql = "";
243
                             sql = "";
254
                                 THDTJ  = 0;
250
                                 THDTJ  = 0;
255
                                 break;
251
                                 break;
256
                             }
252
                             }
257
-                            THDTJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
253
+                            THDTJ = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
258
                             break;
254
                             break;
259
                         case 6://已完结
255
                         case 6://已完结
260
                             sql = "";
256
                             sql = "";
274
                                 YWJ  = 0;
270
                                 YWJ  = 0;
275
                                 break;
271
                                 break;
276
                             }
272
                             }
277
-                            YWJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
273
+                            YWJ = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
278
                             break;
274
                             break;
279
                         case 7://
275
                         case 7://
280
                             sql = "";
276
                             sql = "";
290
                                 sql += "AND F_Notifications='" + ua.F_UserCode + "'";
286
                                 sql += "AND F_Notifications='" + ua.F_UserCode + "'";
291
                             if (ro.F_RoleCode == "QTJS")
287
                             if (ro.F_RoleCode == "QTJS")
292
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
288
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
293
-                            YJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
289
+                            YJGD = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
294
                             break;
290
                             break;
295
                         case 8://
291
                         case 8://
296
                             sql = "";
292
                             sql = "";
305
                                 sql += "AND F_Notifications='" + ua.F_UserCode + "'";
301
                                 sql += "AND F_Notifications='" + ua.F_UserCode + "'";
306
                             if (ro.F_RoleCode == "QTJS")
302
                             if (ro.F_RoleCode == "QTJS")
307
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
303
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
308
-                            EJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
304
+                            EJGD = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
309
                             break;
305
                             break;
310
                         case 9://
306
                         case 9://
311
                             sql = "";
307
                             sql = "";
319
                                 sql += "AND F_Notifications='" + ua.F_UserCode + "'";
315
                                 sql += "AND F_Notifications='" + ua.F_UserCode + "'";
320
                             if (ro.F_RoleCode == "QTJS")
316
                             if (ro.F_RoleCode == "QTJS")
321
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
317
                                 sql += "AND F_CreateUser=" + ua.F_UserCode;
322
-                            SJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
318
+                            SJGD = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
323
                             break;
319
                             break;
324
                         case 10://
320
                         case 10://
325
                             sql = "";
321
                             sql = "";
344
                                 CJSL = 0;
340
                                 CJSL = 0;
345
                                 break;
341
                                 break;
346
                             }
342
                             }
347
-                            CJSL = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//
343
+                            CJSL = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//
348
                             break;
344
                             break;
349
                         case 11://咨询
345
                         case 11://咨询
350
                             sql = "";
346
                             sql = "";
351
                             sql += $"  F_IsDelete=0";
347
                             sql += $"  F_IsDelete=0";
352
                             sql += "AND F_Duplicate !=5"  ;
348
                             sql += "AND F_Duplicate !=5"  ;
353
-                            sql += " and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ))";
349
+                            sql += " and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2  and F_Type<5))";
354
                             sql += RetuSql(ro, 0, ua);
350
                             sql += RetuSql(ro, 0, ua);
355
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
351
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
356
                                 sql += "AND F_Notifications='" + ua.F_UserCode + "'";
352
                                 sql += "AND F_Notifications='" + ua.F_UserCode + "'";
359
                                 ZX = 0;
355
                                 ZX = 0;
360
                                 break;
356
                                 break;
361
                             }
357
                             }
362
-                            ZX = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
358
+                            ZX = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
363
                             break;
359
                             break;
364
 
360
 
365
                     }
361
                     }
429
                     {
425
                     {
430
                         if (state != 11)
426
                         if (state != 11)
431
                         {
427
                         {
432
-                            sql += $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
428
+                            sql += $" and (F_Type=" + 2 + "or (F_Duplicate!=1 and F_Duplicate!=4  and F_Typ=3 ) or F_Type>4)";
433
                         }
429
                         }
434
                     }
430
                     }
435
                       
431
                       
646
                                 return Error("无操作权限");
642
                                 return Error("无操作权限");
647
                             break;
643
                             break;
648
                         case 11:
644
                         case 11:
649
-                            sql += $" and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ))";
645
+                            sql += $" and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ) and F_Type<5)";
650
                             sql += RetuSql(ro, see, ua);
646
                             sql += RetuSql(ro, see, ua);
651
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
647
                             if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
652
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
648
                                 sql += "AND F_DealUser=" + ua.F_UserCode;
843
             string[] ccc = {
839
             string[] ccc = {
844
                    "工单编号","大区","办事处","投诉时间","序号","姓名","地址","联系电话","产品代码",
840
                    "工单编号","大区","办事处","投诉时间","序号","姓名","地址","联系电话","产品代码",
845
                   "产品名称","规格","生产日期","产品编码","生产厂家","问题代码","质量问题","通知人"
841
                   "产品名称","规格","生产日期","产品编码","生产厂家","问题代码","质量问题","通知人"
846
-                  ,"接听人" ,"落实情况","处理进度","工单类别","分派时间","接单时间","处理时间","备注"
842
+                  ,"接听人" ,"落实情况","处理进度","工单类别","产品类型","分派时间","接单时间","处理时间","备注"
847
             };
843
             };
848
             return ccc;
844
             return ccc;
849
         }
845
         }

+ 5 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderInput.cs

402
         /// 产品类型
402
         /// 产品类型
403
         /// </summary>
403
         /// </summary>
404
         public string F_ProductTypes { set; get; }
404
         public string F_ProductTypes { set; get; }
405
+        /// <summary>
406
+        /// 投诉类型
407
+        /// </summary>
408
+        public string F_ComplaintType { set; get; }
409
+        
405
     }
410
     }
406
 }
411
 }

+ 6 - 4
codegit/CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs

604
        /// 产品类型
604
        /// 产品类型
605
        /// </summary>
605
        /// </summary>
606
        public string F_ProductTypes { set; get; }
606
        public string F_ProductTypes { set; get; }
607
+        /// <summary>
608
+        /// 投诉类型
609
+        /// </summary>
610
+        public string F_ComplaintType { set; get; }
607
 
611
 
612
+    #endregion Model
608
 
613
 
609
-
610
-        #endregion Model
611
-
612
-    }
614
+}
613
 }
615
 }
614
 
616