duhongyu 4 年之前
父節點
當前提交
6321ec4bec

+ 6 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

27
             string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
27
             string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
28
             string tasktype = HttpUtility.UrlDecode(RequestString.GetQueryString("tasktype"));
28
             string tasktype = HttpUtility.UrlDecode(RequestString.GetQueryString("tasktype"));
29
             string extnumber = HttpUtility.UrlDecode(RequestString.GetQueryString("extnumber"));
29
             string extnumber = HttpUtility.UrlDecode(RequestString.GetQueryString("extnumber"));
30
+            string PhoneType = HttpUtility.UrlDecode(RequestString.GetQueryString("phoneType"));
30
             int type = RequestString.GetInt("type", 0);
31
             int type = RequestString.GetInt("type", 0);
31
             int islike = RequestString.GetInt("islike", 1);
32
             int islike = RequestString.GetInt("islike", 1);
32
 
33
 
50
             {
51
             {
51
                 sql += " and UserCode in(" + usercode + ")";
52
                 sql += " and UserCode in(" + usercode + ")";
52
             }
53
             }
54
+            if (PhoneType != null && PhoneType.Trim() != "")
55
+            {
56
+                sql += " and PhoneType='"+ PhoneType + "'";
57
+            }
58
+            
53
             if (islike > 0)
59
             if (islike > 0)
54
             {
60
             {
55
                 if (phone != null && phone.Trim() != "")
61
                 if (phone != null && phone.Trim() != "")

+ 15 - 12
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

2099
                     }
2099
                     }
2100
                     else
2100
                     else
2101
                     {
2101
                     {
2102
-                        int[] sts = new int[] { (int)EnumWorkState.receive, (int)EnumWorkState.dealing };
2103
-                        sql += " and F_WorkState in (" + string.Join(",", sts.Select(p => p.ToString())) + ")";
2104
-                        //sql += " and F_WorkState in (2,4,8)";
2102
+                        if (distribute!=0)
2103
+                        {
2104
+                            int[] sts = new int[] { (int)EnumWorkState.receive, (int)EnumWorkState.dealing };
2105
+                            sql += " and F_WorkState in (" + string.Join(",", sts.Select(p => p.ToString())) + ")";
2106
+                        }
2107
+                      
2108
+                    
2105
                     }
2109
                     }
2106
                     sql += "and F_WorkOrderID  not in (select F_WorkOrderID from T_Bus_RemindRecord where F_Type=1 and F_IsDelete=0)";
2110
                     sql += "and F_WorkOrderID  not in (select F_WorkOrderID from T_Bus_RemindRecord where F_Type=1 and F_IsDelete=0)";
2107
                     if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
2111
                     if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
2110
                         {
2114
                         {
2111
                             if (distribute == 0)
2115
                             if (distribute == 0)
2112
                             {
2116
                             {
2113
-                                sql += "and F_WorkOrderId in   (  select F_WorkOrderId from T_Bus_AssignedInfo as a  where F_State=1 and F_IsDelete=0 and ISNULL(F_FeedbackTime, '')='' and F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1) and (F_IsNext =" + distribute + " or  F_IsNext='' )and not exists(select 1 from T_Bus_AssignedInfo  where F_WorkOrderId = a.F_WorkOrderId and F_Id > a.F_Id  )and F_WorkState  in (2,4)  ";
2117
+                                sql += "and F_WorkOrderId in   (  select F_WorkOrderId from T_Bus_AssignedInfo as a  where F_State=1 and F_IsDelete=0 and ISNULL(F_FeedbackTime, '')='' and F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1) and (F_IsNext =" + distribute + " or  F_IsNext='' )and not exists(select 1 from T_Bus_AssignedInfo  where F_WorkOrderId = a.F_WorkOrderId and F_Id > a.F_Id  )and (F_WorkState  in (2,4) or (F_WorkState=8 and F_Identification=0) ) ";
2118
+                               
2114
                                 if (isys > -1)
2119
                                 if (isys > -1)
2115
                                 {
2120
                                 {
2116
                                     if (isys == 0)
2121
                                     if (isys == 0)
2327
                     //    sql += " and F_WorkOrderId in (select F_WorkOrderId from T_Bus_AssignedInfo WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and "
2332
                     //    sql += " and F_WorkOrderId in (select F_WorkOrderId from T_Bus_AssignedInfo WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and "
2328
                     //  + "  F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1))";
2333
                     //  + "  F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1))";
2329
                     //}
2334
                     //}
2330
-
2335
+                    sql += "and (F_Identification!=0 or F_Identification is null) ";
2331
                     if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
2336
                     if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
2332
                     {
2337
                     {
2333
                         sql += " and F_WorkOrderId in (select F_WorkOrderId from T_Bus_AssignedInfo a  WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and "
2338
                         sql += " and F_WorkOrderId in (select F_WorkOrderId from T_Bus_AssignedInfo a  WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and "
10170
                             string creattime = ((DateTime)modelT_Bus_WorkOrder1.F_CreateTime).ToString("yyyy-MM-dd") + " 00:00:00";
10175
                             string creattime = ((DateTime)modelT_Bus_WorkOrder1.F_CreateTime).ToString("yyyy-MM-dd") + " 00:00:00";
10171
                             string endtime = ((DateTime)modelT_Bus_WorkOrder1.F_CreateTime).ToString("yyyy-MM-dd") + " 23:59:59";
10176
                             string endtime = ((DateTime)modelT_Bus_WorkOrder1.F_CreateTime).ToString("yyyy-MM-dd") + " 23:59:59";
10172
                             modelT_Bus_WorkOrder1.F_WorkOrderId = workorderBLL.GetNewWorkOrderID((int)modelT_Bus_WorkOrder.F_InfoSource, (int)modelT_Bus_WorkOrder.F_SourceArea, creattime, endtime);
10177
                             modelT_Bus_WorkOrder1.F_WorkOrderId = workorderBLL.GetNewWorkOrderID((int)modelT_Bus_WorkOrder.F_InfoSource, (int)modelT_Bus_WorkOrder.F_SourceArea, creattime, endtime);
10173
-                            modelT_Bus_WorkOrder1.F_MainWorkorder1 = modelT_Bus_WorkOrder.F_WorkOrderId;
10178
+                            modelT_Bus_WorkOrder1.F_MainWorkorder1 = workorderid;
10174
                             modelT_Bus_WorkOrder1.F_Id = workorderBLL.Add(modelT_Bus_WorkOrder1);
10179
                             modelT_Bus_WorkOrder1.F_Id = workorderBLL.Add(modelT_Bus_WorkOrder1);
10175
                             if (modelT_Bus_WorkOrder1.F_Id <= 0)
10180
                             if (modelT_Bus_WorkOrder1.F_Id <= 0)
10176
                             {
10181
                             {
10177
                                 errdeptid += deptinfo.F_DeptName + ",";
10182
                                 errdeptid += deptinfo.F_DeptName + ",";
10178
                                 continue;
10183
                                 continue;
10179
                             }
10184
                             }
10185
+                            modelT_Bus_WorkOrder.F_SubWorkorder1 = modelT_Bus_WorkOrder1.F_WorkOrderId;
10186
+                            new BLL.T_Bus_WorkOrder().Update(modelT_Bus_WorkOrder);
10180
                             #endregion
10187
                             #endregion
10181
                             #region 交办
10188
                             #region 交办
10182
                             #region 插入交办记录
10189
                             #region 插入交办记录
14279
                 string visituser = RequestString.GetFormString("visituser");//回访人
14286
                 string visituser = RequestString.GetFormString("visituser");//回访人
14280
                 int type = RequestString.GetInt("type", 0);//回访方式
14287
                 int type = RequestString.GetInt("type", 0);//回访方式
14281
                 int issatisfie = RequestString.GetInt("issatisfie", 0);//0不满意 1满意
14288
                 int issatisfie = RequestString.GetInt("issatisfie", 0);//0不满意 1满意
14282
-                int state = RequestString.GetInt("state", 0);//0保存 1保存并下一步
14289
+                int state = RequestString.GetInt("state", 1);//0保存 1保存并下一步
14283
                 int visitid = RequestString.GetInt("visitid", 0);
14290
                 int visitid = RequestString.GetInt("visitid", 0);
14284
                 string result = RequestString.GetFormString("result");//回访情况
14291
                 string result = RequestString.GetFormString("result");//回访情况
14285
                 int nexttype = RequestString.GetInt("nexttype", 0);//1重办 2退回重办
14292
                 int nexttype = RequestString.GetInt("nexttype", 0);//1重办 2退回重办
14596
             if (f >= 2)
14603
             if (f >= 2)
14597
             {
14604
             {
14598
                 Model.T_Bus_RemindRecord modelT_Bus_RemindRecord = new Model.T_Bus_RemindRecord();
14605
                 Model.T_Bus_RemindRecord modelT_Bus_RemindRecord = new Model.T_Bus_RemindRecord();
14599
-                var modelRemindlist = new BLL.T_Bus_RemindRecord().GetModelList(" F_State=0 and F_IsDelete=0 and F_Type =1 and F_WorkOrderId= '" + modelT_Bus_WorkOrder.F_WorkOrderId + "  order by F_CreateTime desc");
14606
+                var modelRemindlist = new BLL.T_Bus_RemindRecord().GetModelList(" F_State=0 and F_IsDelete=0 and F_Type =1 and F_WorkOrderId= '" + modelT_Bus_WorkOrder.F_WorkOrderId + "'  order by F_CreateTime desc");
14600
                 if (modelRemindlist != null && modelRemindlist.Count > 0)
14607
                 if (modelRemindlist != null && modelRemindlist.Count > 0)
14601
                 {
14608
                 {
14602
                     modelT_Bus_RemindRecord = modelRemindlist.FirstOrDefault();
14609
                     modelT_Bus_RemindRecord = modelRemindlist.FirstOrDefault();
15963
         //[Authority]
15970
         //[Authority]
15964
         public ActionResult FinishWorkOrder()
15971
         public ActionResult FinishWorkOrder()
15965
         {
15972
         {
15966
-
15967
-
15968
-
15969
-
15970
             //if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY")
15973
             //if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY")
15971
             if (User.F_RoleCode == "ZJZY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXHWY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD")
15974
             if (User.F_RoleCode == "ZJZY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXHWY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD")
15972
             {
15975
             {