Selaa lähdekoodia

营销管理 督办统计

duhongyu 4 vuotta sitten
vanhempi
commit
e2972883e9

+ 8 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Assessment/DataAssessmentController.cs

@@ -290,12 +290,19 @@ namespace CallCenterApi.Interface.Controllers.Assessment
290 290
                 edate = endtime.Value .ToString("yyyy-MM-dd")+" 23:59:59" ;
291 291
                 month = endtime.Value.Month.ToString();
292 292
             }
293
+            string sourcesql = "";
294
+            if (source >0)
295
+            {
296
+                sourcesql = source.ToString();
297
+            }
293 298
             #endregion
294 299
             Dictionary<string, string> paras = new Dictionary<string, string>();
295 300
             paras.Add("@deptid", deptid.ToString());
296 301
             paras.Add("@sdate", strdate);
297 302
             paras.Add("@edate", edate);
298
-            paras.Add("@source", source.ToString ());
303
+            paras.Add("@source", sourcesql);
304
+
305
+
299 306
             
300 307
             var list = DbHelperSQL.RunProcedure("P_DeptDBData", paras, "DeptData").Tables[0];
301 308
             //var list = DbHelperSQL.Query(sqlass).Tables[0];

+ 65 - 13
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -201,7 +201,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
201 201
                 {
202 202
                     if (jianhang > 0)
203 203
                     {
204
+                        if (jianhang==3)
205
+                            sql += " and F_InfoSource = '2501' ";
206
+                        else 
204 207
                         sql += " and F_InfoSource != '1' ";
208
+                        
205 209
                     }
206 210
                     else
207 211
                     {
@@ -764,7 +768,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
764 768
             int phoneType = RequestString.GetInt("phoneType", 0);
765 769
             if (jianhang > 0)
766 770
             {
767
-                sql += " and F_InfoSource != '1' ";
771
+                if (jianhang == 3)
772
+                    sql += " and F_InfoSource = '2501' ";
773
+                else
774
+                    sql += " and F_InfoSource != '1' ";
768 775
             }
769 776
             else
770 777
             {
@@ -1503,7 +1510,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
1503 1510
             int phoneType = RequestString.GetInt("phoneType", 0);
1504 1511
             if (jianhang > 0)
1505 1512
             {
1506
-                sql += " and F_InfoSource != '1' ";
1513
+                if (jianhang == 3)
1514
+                    sql += " and F_InfoSource = '2501' ";
1515
+                else
1516
+                    sql += " and F_InfoSource != '1' ";
1507 1517
             }
1508 1518
             else
1509 1519
             {
@@ -1981,7 +1991,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1981 1991
                         sql += " and F_WorkState in (" + string.Join(",", sts.Select(p => p.ToString())) + ")";
1982 1992
                         //sql += " and F_WorkState in (2,4,8)";
1983 1993
                     }
1984
-                    sql += "and WorkOrderID  not in (select F_WorkOrderID from T_Bus_RemindRecord where F_Type=1 and F_IsDelete=0)";
1994
+                    sql += "and F_WorkOrderID  not in (select F_WorkOrderID from T_Bus_RemindRecord where F_Type=1 and F_IsDelete=0)";
1985 1995
                         if (userModel.F_RoleCode != "GLY" && userModel.F_RoleCode != "DDZG")
1986 1996
                         {
1987 1997
                             if (distribute > -1)
@@ -2361,9 +2371,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
2361 2371
             }
2362 2372
             else if (jianhang == 1)
2363 2373
             {
2374
+
2364 2375
                 sql += " and F_InfoSource != '1' ";
2365 2376
             }
2366
-            string incomingcall = RequestString.GetString("incomingcall");//来电电话
2377
+            else if (jianhang == 3)
2378
+                sql += " and F_InfoSource = '2501' ";
2379
+            
2380
+                string incomingcall = RequestString.GetString("incomingcall");//来电电话
2367 2381
             if (incomingcall.Trim() != "" && incomingcall != "undefined")
2368 2382
             {
2369 2383
                 sql += " and F_PhoneType = '" + incomingcall + "' ";
@@ -2827,7 +2841,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2827 2841
             int phoneType = RequestString.GetInt("phoneType", 0);
2828 2842
             if (jianhang > 0)
2829 2843
             {
2830
-                sql += " and F_InfoSource != '1' ";
2844
+                if (jianhang == 3)
2845
+                    sql += " and F_InfoSource = '2501' ";
2846
+                else
2847
+                    sql += " and F_InfoSource != '1' ";
2831 2848
             }
2832 2849
             else
2833 2850
             {
@@ -3262,7 +3279,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
3262 3279
             int phoneType = RequestString.GetInt("phoneType", 0);
3263 3280
             if (jianhang > 0)
3264 3281
             {
3265
-                sql += " and F_InfoSource != '1' ";
3282
+                if (jianhang == 3)
3283
+                    sql += " and F_InfoSource = '2501' ";
3284
+                else
3285
+                    sql += " and F_InfoSource != '1' ";
3266 3286
             }
3267 3287
             else
3268 3288
             {
@@ -3600,7 +3620,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
3600 3620
             int pageindex = 1;
3601 3621
             string strpagesize = RequestString.GetQueryString("pagesize");
3602 3622
             int pagesize = 10;
3603
-
3623
+            int jianhang = RequestString.GetInt("jianhang", 0);
3624
+            if (jianhang == 3)
3625
+                sql += " and F_InfoSource = '2501' ";
3604 3626
             #region 模块
3605 3627
             switch (strtab)
3606 3628
             {
@@ -3673,6 +3695,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
3673 3695
                     sql += "  and F_WorkOrderID in(select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0)" +
3674 3696
                         "and F_MainDeptID3 ='"+ userModel.F_DeptId + "'";
3675 3697
                     break;
3698
+                case "6"://已完结
3699
+                    sql += " and F_WorkState = '9' ";
3700
+                    sql += "  and F_WorkOrderID in(select F_WorkOrderID from T_Bus_Feedback_Next WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_Type in (1,2) ";
3701
+                    if (userModel.F_RoleCode != "GLY" && userModel.F_RoleCode != "DDZG")
3702
+                    {
3703
+                        sql += " and F_CreateUser='" + userModel.F_UserCode + "')";
3704
+                    }
3705
+                    else
3706
+                    {
3707
+                        sql += ")";
3708
+                    }
3709
+                    break;
3676 3710
                     //
3677 3711
 
3678 3712
             }
@@ -4087,7 +4121,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
4087 4121
             int phoneType = RequestString.GetInt("phoneType", 0);
4088 4122
             if (jianhang > 0)
4089 4123
             {
4090
-                sql += " and F_InfoSource != '1' ";
4124
+                if (jianhang == 3)
4125
+                    sql += " and F_InfoSource = '2501' ";
4126
+                else
4127
+                    sql += " and F_InfoSource != '1' ";
4091 4128
             }
4092 4129
             else
4093 4130
             {
@@ -4458,7 +4495,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
4458 4495
             int phoneType = RequestString.GetInt("phoneType", 0);
4459 4496
             if (jianhang > 0)
4460 4497
             {
4461
-                sql += " and F_InfoSource != '1' ";
4498
+                if (jianhang == 3)
4499
+                    sql += " and F_InfoSource = '2501' ";
4500
+                else
4501
+                    sql += " and F_InfoSource != '1' ";
4462 4502
             }
4463 4503
             else
4464 4504
             {
@@ -4841,7 +4881,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
4841 4881
             {
4842 4882
                 sql += " and F_InfoSource != '1' ";
4843 4883
             }
4844
-            string incomingcall = RequestString.GetString("incomingcall");//来电电话
4884
+           else  if (jianhang == 3)
4885
+                sql += " and F_InfoSource = '2501' ";
4886
+            
4887
+                string incomingcall = RequestString.GetString("incomingcall");//来电电话
4845 4888
             if (incomingcall.Trim() != "" && incomingcall != "undefined")
4846 4889
             {
4847 4890
                 sql += " and F_PhoneType = '" + incomingcall + "' ";
@@ -5731,7 +5774,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
5731 5774
             int phoneType = RequestString.GetInt("phoneType", 0);
5732 5775
             if (jianhang > 0)
5733 5776
             {
5734
-                sql += " and F_InfoSource != '1' ";
5777
+                if (jianhang == 3)
5778
+                    sql += " and F_InfoSource = '2501' ";
5779
+                else
5780
+                    sql += " and F_InfoSource != '1' ";
5735 5781
             }
5736 5782
             else
5737 5783
             {
@@ -6127,7 +6173,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
6127 6173
             int phoneType = RequestString.GetInt("phoneType", 0);
6128 6174
             if (jianhang > 0)
6129 6175
             {
6130
-                sql += " and F_InfoSource != '1' ";
6176
+                if (jianhang == 3)
6177
+                    sql += " and F_InfoSource = '2501' ";
6178
+                else
6179
+                    sql += " and F_InfoSource != '1' ";
6131 6180
             }
6132 6181
             else
6133 6182
             {
@@ -6513,7 +6562,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
6513 6562
             int phoneType = RequestString.GetInt("phoneType", 0);
6514 6563
             if (jianhang > 0)
6515 6564
             {
6516
-                sql += " and F_InfoSource != '1' ";
6565
+                if (jianhang == 3)
6566
+                    sql += " and F_InfoSource = '2501' ";
6567
+                else
6568
+                    sql += " and F_InfoSource != '1' ";
6517 6569
             }
6518 6570
             else
6519 6571
             {