Browse Source

工单,知识库,报表修改,人员修改

duhongyu 6 years ago
parent
commit
a1154e9e5e
16 changed files with 248 additions and 70 deletions
  1. 8 0
      codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_UserAccount.cs
  2. 2 2
      codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs
  3. 25 0
      codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_UserAccount.cs
  4. 7 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AddressBookController.cs
  5. 2 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs
  6. 1 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SeatGroupController.cs
  7. 4 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs
  8. 29 10
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs
  9. 11 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeClassController.cs
  10. 23 3
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/quality/IndexBaseController.cs
  11. 2 2
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/quality/QCManageController.cs
  12. 1 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/QCResultController.cs
  13. 4 4
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/YearContrastController.cs
  14. 3 3
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/ZuoXiWorkTotalController.cs
  15. 74 29
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs
  16. 52 13
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

+ 8 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_UserAccount.cs

@@ -90,6 +90,14 @@ namespace CallCenterApi.BLL
90 90
         }
91 91
 
92 92
         /// <summary>
93
+        /// 得到一个对象实体
94
+        /// </summary>
95
+        public Model.T_Sys_UserAccount GetModelUserName(string UserName)
96
+        {
97
+            return dal.GetModelUserName(UserName);
98
+        }
99
+
100
+        /// <summary>
93 101
         /// 登录得到一个对象实体
94 102
         /// </summary>
95 103
         public Model.T_Sys_UserAccount LoginGetModel(string F_UserCode, string F_Password)

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs

@@ -53,7 +53,7 @@ namespace CallCenterApi.DAL
53 53
             strSql.Append(";select @@IDENTITY");
54 54
             SqlParameter[] parameters = {
55 55
                     new SqlParameter("@F_WorkOrderId", SqlDbType.VarChar,50),
56
-                    new SqlParameter("@F_CusPhone", SqlDbType.VarChar,20),
56
+                    new SqlParameter("@F_CusPhone", SqlDbType.VarChar,100),
57 57
                     new SqlParameter("@F_CusName", SqlDbType.NVarChar,50),
58 58
                     new SqlParameter("@F_Type", SqlDbType.Int,4),
59 59
                     new SqlParameter("@F_Content", SqlDbType.NVarChar,-1),
@@ -216,7 +216,7 @@ namespace CallCenterApi.DAL
216 216
             strSql.Append(" where F_Id=@F_Id");
217 217
             SqlParameter[] parameters = {
218 218
                     new SqlParameter("@F_WorkOrderId", SqlDbType.VarChar,50),
219
-                    new SqlParameter("@F_CusPhone", SqlDbType.VarChar,20),
219
+                    new SqlParameter("@F_CusPhone", SqlDbType.VarChar,100),
220 220
                     new SqlParameter("@F_CusName", SqlDbType.NVarChar,50),
221 221
                     new SqlParameter("@F_Type", SqlDbType.Int,4),
222 222
                     new SqlParameter("@F_Content", SqlDbType.NVarChar,-1),

+ 25 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_UserAccount.cs

@@ -337,6 +337,31 @@ namespace CallCenterApi.DAL
337 337
                 return null;
338 338
             }
339 339
         }
340
+        /// <summary>
341
+        /// 得到一个对象实体
342
+        /// </summary>
343
+        public Model.T_Sys_UserAccount GetModelUserName(string UserName)
344
+        {
345
+
346
+            StringBuilder strSql = new StringBuilder();
347
+            strSql.Append("select  top 1 F_UserId,F_UserCode,F_Password,F_ExtensionNumber,F_UserName,F_DeptId,F_RoleId,F_GroupId,F_SeatFlag,F_SeatRight,F_SeatLevel,F_SexFlag,F_RemindFlag,F_Remark,F_Telephone,F_Mobile,F_HomePhone,F_Birthday,F_CreateOn,F_CancelOn,F_DeleteFlag,F_APPOnFlag,F_LastActiveTime,F_See,F_HJType,F_PId,F_TmId,F_WorkNumber,F_DeptCode,F_WXNo,F_SeartGroupID,F_SeartGroup,F_Post from T_Sys_UserAccount WITH(NOLOCK)");
348
+            strSql.Append(" where F_UserName=@F_UserName");
349
+            SqlParameter[] parameters = {
350
+                    new SqlParameter("@F_UserName", SqlDbType.VarChar,50)
351
+            };
352
+            parameters[0].Value = UserName;
353
+
354
+            Model.T_Sys_UserAccount model = new Model.T_Sys_UserAccount();
355
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
356
+            if (ds.Tables[0].Rows.Count > 0)
357
+            {
358
+                return DataRowToModel(ds.Tables[0].Rows[0]);
359
+            }
360
+            else
361
+            {
362
+                return null;
363
+            }
364
+        }
340 365
 
341 366
         /// <summary>
342 367
         /// 得到一个对象实体

+ 7 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AddressBookController.cs

@@ -236,6 +236,8 @@ namespace CallCenterApi.Interface.Controllers
236 236
                 {
237 237
                     dptid = userModel.F_DeptId;
238 238
                 }
239
+                if (userModel.F_See == "5")
240
+                    return Success("暂无记录");
239 241
                 Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
240 242
                 DataTable dt = new DataTable();
241 243
                 string sql = "F_IsDelete=0 ";
@@ -324,7 +326,9 @@ namespace CallCenterApi.Interface.Controllers
324 326
                 if (userModel != null)
325 327
                 {
326 328
                         dptid = userModel.F_DeptId;
327
-                }                                                     
329
+                }
330
+                if (userModel.F_See == "5")
331
+                    return Success("暂无记录");
328 332
                 Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
329 333
                 DataTable dt = new DataTable();
330 334
                 string sql = "F_IsDelete=0 ";
@@ -355,6 +359,8 @@ namespace CallCenterApi.Interface.Controllers
355 359
                 {
356 360
                     dptid = userModel.F_DeptId;
357 361
                 }
362
+                if (userModel.F_See == "5")
363
+                    return Success("暂无记录");
358 364
                 Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(dptid);
359 365
                 DataTable dt = new DataTable();
360 366
                 string sql = "and F_IsDelete=0 ";

+ 2 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -274,6 +274,7 @@ namespace CallCenterApi.Interface.Controllers
274 274
                             dModel.F_Layer = 2;
275 275
                         else if (pdModel.F_Layer == 2)
276 276
                             dModel.F_Layer = 3;
277
+                        dModel.F_ParentName = pdModel.F_DeptName;
277 278
                     }
278 279
                 }
279 280
                 dModel.F_Sort = input.Sort;
@@ -321,6 +322,7 @@ namespace CallCenterApi.Interface.Controllers
321 322
                             dModel.F_Layer = 2;
322 323
                         else if (pdModel.F_Layer == 2)
323 324
                             dModel.F_Layer = 3;
325
+                        dModel.F_ParentName = pdModel.F_DeptName;
324 326
                     }
325 327
                 }
326 328
                 dModel.F_Sort = input.Sort;

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SeatGroupController.cs

@@ -31,7 +31,7 @@ namespace CallCenterApi.Interface.Controllers
31 31
             string sql = "";
32 32
             if (strcontent != null && strcontent != "")
33 33
             {
34
-                sql = " and( F_ZXZCode like '" + strcontent + "' or F_ZXZName  like '" + strcontent + "'  or F_WHBDKey like '" + strcontent + "%'  or F_WHWDKey  like '" + strcontent + "%'  or F_ZXAtt like '" + strcontent + "'  or F_Des like '" + strcontent + "')";
34
+                sql = " and( F_ZXZCode like '%" + strcontent + "%' or F_ZXZName  like '%" + strcontent + "%'  or F_WHBDKey like '%" + strcontent + "%'  or F_WHWDKey  like '%" + strcontent + "%'  or F_ZXAtt like '%" + strcontent + "%'  or F_Des like '%" + strcontent + "%')";
35 35
             }
36 36
             if (strpageindex.Trim() != "")
37 37
             {

+ 4 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -134,6 +134,7 @@ namespace CallCenterApi.Interface.Controllers
134 134
                 {
135 135
                     sql += "and F_RoleId=53";
136 136
                 }
137
+                sql += "and F_See!='5'";
137 138
                 int recordCount = 0;
138 139
                 dt = BLL.PagerBLL.GetListPager(
139 140
                                         "T_Sys_UserAccount",
@@ -603,6 +604,7 @@ namespace CallCenterApi.Interface.Controllers
603 604
         {
604 605
             if (Request.IsAuthenticated)
605 606
             {
607
+            string display = Configs.GetValue("display");
606 608
                 Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(CurrentUser.UserData.F_UserId);
607 609
                 if (userModel == null)
608 610
                     return Error("获取失败");
@@ -613,7 +615,8 @@ namespace CallCenterApi.Interface.Controllers
613 615
                 {
614 616
                     user = userModel,
615 617
                     role = roleModel,
616
-                    FileUrl = FileUrl
618
+                    FileUrl = FileUrl,
619
+                    display= display
617 620
                 };
618 621
                 return Success("获取成功", obj);
619 622
             }

+ 29 - 10
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs

@@ -125,7 +125,7 @@ namespace CallCenterApi.Interface.Controllers.customer
125 125
                 if (isdc > 0)
126 126
                 {
127 127
                     string dccols = "F_Area,F_Office,F_Province,F_City,F_County,F_Name,F_Phone,F_Remarks";
128
-                    var dtdc = DbHelperSQL.Query(" select " + dccols + " from T_Bus_WorkOrder1 where 1=1 " + sql).Tables[0];
128
+                    var dtdc = DbHelperSQL.Query(" select " + dccols + " from T_Bus_WorkOrder where 1=1 " + sql).Tables[0];
129 129
                     string[] dccolnames = new string[] {"大区", "办事处", "省份", "城市", "县/区", "姓名", "电话", "备注" };
130 130
                     var msg = new NPOIHelper().ExportToExcel("客户列表", dtdc, dccolnames);
131 131
                     if (msg == "")
@@ -516,7 +516,7 @@ namespace CallCenterApi.Interface.Controllers.customer
516 516
                                 dModel.F_Office = dr["办事处"].ToString();
517 517
                                 dModel.F_Province = dr["省份"].ToString();
518 518
                                 dModel.F_City = dr["城市"].ToString();
519
-                                dModel.F_County = dr["县/区"].ToString();
519
+                                dModel.F_County = dr["区/县"].ToString();
520 520
                                 dModel.F_Name = dr["姓名"].ToString();
521 521
                                 dModel.F_Phone = dr["电话"].ToString();
522 522
                                 dModel.F_Remarks = dr["备注"].ToString();
@@ -621,13 +621,15 @@ namespace CallCenterApi.Interface.Controllers.customer
621 621
         //                    if (!string.IsNullOrEmpty(dr["投诉时间"].ToString()))
622 622
         //                        try
623 623
         //                        {
624
-        //                            dModel.F_CreateTime = DateTime.Parse("2018年12月" + dr["投诉时间"].ToString());
625
-        //                            dModel.F_WorkOrderId = DateTime.Parse("2018年12月" + dr["投诉时间"].ToString()).ToString("yyyyMMddHHmmssfff");  //工单编号  
624
+
625
+        //                            dModel.F_CreateTime = DateTime.Parse("2019年12月" + dr["投诉时间"].ToString());
626
+        //                            var a = dModel.F_CreateTime;
627
+        //                            dModel.F_WorkOrderId = DateTime.Parse("2019年12月" + dr["投诉时间"].ToString()).ToString("yyyyMMddHHmmssfff");  //工单编号  
628
+        //                            var b = dModel.F_WorkOrderId;
626 629
         //                        }
627 630
         //                        catch
628 631
         //                        {
629
-        //                            dModel.F_CreateTime = DateTime.Parse("2018年12月26日11时28分" + DateTime.Now.Second + "秒");
630
-        //                            dModel.F_WorkOrderId = DateTime.Parse("2018年12月26日11时28分" + DateTime.Now.Second + "秒").ToString("yyyyMMddHHmmssfff");
632
+        //                            return Error("第" + headrow + "行,导入失败<br>");
631 633
         //                        }
632 634
         //                    try
633 635
         //                    {
@@ -637,10 +639,9 @@ namespace CallCenterApi.Interface.Controllers.customer
637 639
         //                    {
638 640
 
639 641
         //                    }
640
-
641 642
         //                    dModel.F_CusName = dr["姓名"].ToString();
642 643
         //                    dModel.F_AddRess = dr["地址"].ToString();
643
-        //                    dModel.F_CusPhone = dr["联系电话"].ToString().Split('、')[0];
644
+        //                    dModel.F_CusPhone = dr["联系电话"].ToString();
644 645
         //                    dModel.F_ProductType = dr["产品代码"].ToString();
645 646
         //                    dModel.F_ProductName = dr["产品名称"].ToString();
646 647
         //                    dModel.F_Specifications = dr["规格"].ToString();
@@ -648,9 +649,27 @@ namespace CallCenterApi.Interface.Controllers.customer
648 649
         //                    dModel.F_Manufacturer = dr["生产厂家"].ToString();
649 650
         //                    dModel.F_ProblemCode = dr["问题代码"].ToString();
650 651
         //                    dModel.F_QualityProblem = dr["质量问题"].ToString();
651
-        //                    dModel.F_Notifications = dr["通知人"].ToString();
652
-        //                    dModel.F_ReceivingPerson = dr["接听人"].ToString();
652
+        //                    if (!string .IsNullOrEmpty (dr["通知人"].ToString()))
653
+        //                    {
654
+        //                        var user = new BLL.T_Sys_UserAccount().GetModelUserName(dr["通知人"].ToString());
655
+        //                        if (user!=null )
656
+        //                            dModel.F_Notifications = user.F_UserCode ;
657
+        //                        else
658
+        //                            dModel.F_Notifications = dr["通知人"].ToString();
659
+        //                    }
660
+        //                    if (!string.IsNullOrEmpty(dr["接听人"].ToString()))
661
+        //                    {
662
+        //                        var user = new BLL.T_Sys_UserAccount().GetModelUserName(dr["接听人"].ToString());
663
+        //                        if (user != null)
664
+        //                            dModel.F_ReceivingPerson = user.F_UserCode;
665
+        //                        else
666
+        //                            dModel.F_ReceivingPerson = dr["接听人"].ToString();
667
+        //                    }
653 668
         //                    dModel.F_DealResult = dr["落实情况"].ToString();
669
+        //                    dModel.F_Content = "导入工单";
670
+        //                    dModel.F_BatchNumber = dr["产品编码"].ToString();
671
+        //                    dModel.F_State = 10;
672
+
654 673
         //                    dModel.F_Type = 2;
655 674
         //                    #endregion
656 675
         //                    var res = new BLL.T_Bus_WorkOrder().Add(dModel);

+ 11 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeClassController.cs

@@ -133,6 +133,11 @@ namespace CallCenterApi.Interface.Controllers.knowledge
133 133
 
134 134
                     if (sort != "")
135 135
                     {
136
+                    if (double.Parse(sort.Trim()) > 100000)
137
+                    {
138
+                        return Error("排序不能过大");
139
+                    }
140
+                    else
136 141
                         dModel.F_Sort = int.Parse(sort.Trim());
137 142
                     }
138 143
                     else
@@ -179,6 +184,12 @@ namespace CallCenterApi.Interface.Controllers.knowledge
179 184
 
180 185
                             if (sort.Trim() != "")
181 186
                             {
187
+                            if (double .Parse (sort.Trim())>100000)
188
+                                {
189
+                                return Error("排序不能过大");
190
+                            }
191
+                            else 
192
+
182 193
                                 dModel.F_Sort = int.Parse(sort.Trim());
183 194
                             }
184 195
                             if (cname.Trim() != "")

+ 23 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/quality/IndexBaseController.cs

@@ -105,10 +105,20 @@ namespace CallCenterApi.Interface.Controllers.quality
105 105
                 }
106 106
                 if (!string.IsNullOrWhiteSpace(sort.Trim()))
107 107
                 {
108
-                    dModel.F_Sort = Convert.ToInt32(sort.Trim());
108
+                    if (double.Parse(sort.Trim()) > 100000)
109
+                    {
110
+                        return Error("排序过大,请重新输入");
111
+                    }
112
+                    else
113
+                        dModel.F_Sort = Convert.ToInt32(sort.Trim());
109 114
                 }
110 115
                 if (!string.IsNullOrWhiteSpace(score.Trim()))
111 116
                 {
117
+                    if (double .Parse (score.Trim())>100000)
118
+                    {
119
+                        return Error("分值过大,请重新输入");
120
+                    }
121
+                    else 
112 122
                     dModel.F_Score = Convert.ToInt32(score.Trim());
113 123
                 }
114 124
                 if (!string.IsNullOrWhiteSpace(title.Trim()))
@@ -159,11 +169,21 @@ namespace CallCenterApi.Interface.Controllers.quality
159 169
                         }
160 170
                         if (!string.IsNullOrWhiteSpace(sort.Trim()))
161 171
                         {
162
-                            dModel.F_Sort = Convert.ToInt32(sort.Trim());
172
+                            if (double.Parse(sort.Trim()) > 100000)
173
+                            {
174
+                                return Error("排序过大,请重新输入");
175
+                            }
176
+                            else
177
+                                dModel.F_Sort = Convert.ToInt32(sort.Trim());
163 178
                         }
164 179
                         if (!string.IsNullOrWhiteSpace(score.Trim()))
165 180
                         {
166
-                            dModel.F_Score = Convert.ToInt32(score.Trim());
181
+                            if (double.Parse(sort.Trim()) > 100000)
182
+                            {
183
+                                return Error("分值过大,请重新输入");
184
+                            }
185
+                            else
186
+                                dModel.F_Score = Convert.ToInt32(score.Trim());
167 187
                         }
168 188
                         if (!string.IsNullOrWhiteSpace(title.Trim()))
169 189
                         {

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/quality/QCManageController.cs

@@ -46,7 +46,7 @@ namespace CallCenterApi.Interface.Controllers.quality
46 46
 
47 47
                 if (phone.Trim() != "")
48 48
                 {
49
-                    sql += " and CallNumber='" + phone + "'";
49
+                    sql += " and CallNumber like'%" + phone + "%'";
50 50
                 }
51 51
                 if (usercode.Trim() != "")
52 52
                 {
@@ -182,7 +182,7 @@ namespace CallCenterApi.Interface.Controllers.quality
182 182
 
183 183
                 if (phone.Trim() != "")
184 184
                 {
185
-                    sql += " and CallNumber='" + phone + "'";
185
+                    sql += " and CallNumber like'%" + phone + "%'";
186 186
                 }
187 187
                 if (usercode.Trim() != "")
188 188
                 {

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/QCResultController.cs

@@ -206,7 +206,7 @@ namespace CallCenterApi.Interface.Controllers.report
206 206
                 if (string.IsNullOrEmpty(userModel.groupcode))
207 207
                 {
208 208
                     //strsql = " and UserId in(select F_UserId from T_Sys_UserAccount where F_DeptId=" + dpt.ToString() + ") ";
209
-                    strsql += " AND groupcode='" + userModel.groupcode + "' ";
209
+                   strsql += " AND groupcode='" + userModel.groupcode + "' ";
210 210
                 }
211 211
 
212 212
                 DataSet ds = DbHelperSQL.Query("select *,(select F_UserName from  T_Sys_UserAccount as b where b.F_UserId=a.UserId) as name,(select F_WorkNumber from  T_Sys_UserAccount as b where b.F_UserId=a.UserId) as wknmb from (select COUNT(*) as ct,UserId from T_Call_CallRecords WITH(NOLOCK) where F_QCState=1 " + sqltimeCallRecords + strsql + " group by  UserId) as a order by wknmb asc");

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/YearContrastController.cs

@@ -112,10 +112,10 @@ namespace CallCenterApi.Interface.Controllers.report
112 112
                 DataColumn dc1 = new DataColumn("月份", Type.GetType("System.String"));
113 113
                 DataColumn dc2 = new DataColumn(beginyear + "年客户呼叫数", Type.GetType("System.String"));
114 114
                 DataColumn dc3 = new DataColumn(beginyear + "年坐席接听数", Type.GetType("System.String"));
115
-                DataColumn dc4 = new DataColumn(beginyear + "年接率", Type.GetType("System.String"));
115
+                DataColumn dc4 = new DataColumn(beginyear + "年接率", Type.GetType("System.String"));
116 116
                 DataColumn dc5 = new DataColumn(endyear + "年客户呼叫数", Type.GetType("System.String"));
117 117
                 DataColumn dc6 = new DataColumn(endyear + "年坐席接听数", Type.GetType("System.String"));
118
-                DataColumn dc7 = new DataColumn(endyear + "年接率", Type.GetType("System.String"));
118
+                DataColumn dc7 = new DataColumn(endyear + "年接率", Type.GetType("System.String"));
119 119
 
120 120
                 dtNew.Columns.Add(dc1);
121 121
                 dtNew.Columns.Add(dc2);
@@ -139,10 +139,10 @@ namespace CallCenterApi.Interface.Controllers.report
139 139
                     drNew["月份"] = (i + 1).ToString() + "月";
140 140
                     drNew[beginyear + "年客户呼叫数"] = bkhcall[i];
141 141
                     drNew[beginyear + "年坐席接听数"] = bzxjt[i];
142
-                    drNew[beginyear + "年接率"] = bjtl[i];
142
+                    drNew[beginyear + "年接率"] = bjtl[i];
143 143
                     drNew[endyear + "年客户呼叫数"] = ekhcall[i];
144 144
                     drNew[endyear + "年坐席接听数"] = ezxjt[i];
145
-                    drNew[endyear + "年接率"] = ejtl[i];
145
+                    drNew[endyear + "年接率"] = ejtl[i];
146 146
                     dtNew.Rows.Add(drNew);
147 147
                 }
148 148
             }

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/ZuoXiWorkTotalController.cs

@@ -82,7 +82,7 @@ namespace CallCenterApi.Interface.Controllers.report
82 82
             DataColumn dc7 = new DataColumn("接通率");
83 83
             DataColumn dc8 = new DataColumn("呼损率");
84 84
             DataColumn dc9 = new DataColumn("平均排队时间");
85
-            DataColumn dc10 = new DataColumn("接听通话次数");
85
+          //  DataColumn dc10 = new DataColumn("接听通话次数");
86 86
             DataColumn dc11 = new DataColumn("通话分钟数");
87 87
             DataColumn dc13 = new DataColumn("平均接听通话分钟数");
88 88
             DataColumn dc14 = new DataColumn("平均振铃秒数");
@@ -106,7 +106,7 @@ namespace CallCenterApi.Interface.Controllers.report
106 106
             dtNew.Columns.Add(dc7);
107 107
             dtNew.Columns.Add(dc8);
108 108
             dtNew.Columns.Add(dc9);
109
-            dtNew.Columns.Add(dc10);
109
+       //     dtNew.Columns.Add(dc10);
110 110
             dtNew.Columns.Add(dc11);
111 111
             dtNew.Columns.Add(dc13);
112 112
             dtNew.Columns.Add(dc14);
@@ -276,7 +276,7 @@ namespace CallCenterApi.Interface.Controllers.report
276 276
                                 izlms = 0;
277 277
                             }
278 278
                         }
279
-                        drNew["接听通话次数"] = ijtcs.ToString();
279
+                      //  drNew["接听通话次数"] = ijtcs.ToString();
280 280
                         //drNew["通话分钟数"] = (ithms / 60).ToString();
281 281
                         drNew["通话分钟数"] = CallCenter.Utility.DateTimeConvert.parseTimeSeconds(ithms, 0);
282 282
                        

+ 74 - 29
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -78,24 +78,35 @@ namespace CallCenterApi.Interface.Controllers.workorder
78 78
         /// 获取工单列表
79 79
         /// </summary>
80 80
         /// <returns></returns>
81
-        public ActionResult GetList(string code, string starttime, string endtime,string productType,string productDate, string batchNumber,string manufacturer,string problemCode,string notifications,string keywords, string dealTimely,int area = 0,int office=0,int duplicate=-1, int see = 0, int source = 0, int type = 0, int state = -1, int pageindex = 1, int pagesize = 10,int isdc=0,int istime=0 )
81
+        public ActionResult GetList(string code, string starttime, string endtime,string duplicatetime,string endduplicatetime, string productType,string productDate, string batchNumber,string manufacturer,string problemCode,string notifications,string keywords, string dealTimely,int area = 0,int office=0,int duplicate=-1, int see = 0, int source = 0, int type = 0, int state = -1, int pageindex = 1, int pagesize = 10,int isdc=0,int istime=0 )
82 82
         {
83 83
             int userId = CurrentUser.UserData.F_UserId;
84 84
             if (userId != 0)
85 85
             {
86 86
                 string sql = $"  F_IsDelete=0";
87
+                sql += "and F_Duplicate!=5";
88
+                string where = "";
89
+                bool duplica = false;
87 90
                 DataTable dt = new DataTable();
88 91
                 #region 筛选条件
89
-                if (type > 0 && type < 5)//工单类型
90
-                    sql += $" and F_Type=" + type;
92
+                if (type > 0 && type < 4)//工单类型
93
+                {
94
+                    if (type == 1)
95
+                        sql += $" and (F_Type=" + type + "or F_Duplicate in(1))";
96
+                    else if (type == 2)
97
+                        sql += $" and (F_Type=" + type + "or (F_Duplicate in(2,0)and F_Type=3))";
98
+                    else
99
+                        sql += $" and F_Type=" + type;
100
+                }
101
+                    
91 102
                 if (source > 0)//工单来源
92 103
                     sql += $" and F_Source=" + source;
93 104
                 if (area > 0)//大区
94 105
                     sql += $" and F_Area=" + area;
95 106
                 if (office > 0)//办事处
96 107
                     sql += $" and F_Office=" + office;
97
-                if (duplicate >= 0)//办事处
98
-                    sql += $" and F_Duplicate=" + duplicate;
108
+                if (duplicate >= 0)
109
+                    sql += $" and F_Type=" + 3;
99 110
                if (!string.IsNullOrWhiteSpace(productType))//产品代码
100 111
                     sql += $" and F_ProductType = '" + productType.Trim() + "'";
101 112
                 if (!string.IsNullOrWhiteSpace(productDate))//生产日期
@@ -114,6 +125,23 @@ namespace CallCenterApi.Interface.Controllers.workorder
114 125
                     sql += " and datediff(day,F_CreateTime,'" + starttime + "')<=0 ";
115 126
                 if (!string.IsNullOrEmpty(endtime))
116 127
                     sql += " and datediff(day,F_CreateTime,'" + endtime + "')>=0   ";
128
+
129
+
130
+                if (!string.IsNullOrEmpty(duplicatetime))
131
+                {
132
+                    
133
+                    duplica = true;
134
+                    sql += $" and F_Type=" + 3;
135
+                    where += " and datediff(day,F_CreateTime,'" + duplicatetime + "')<=0 ";
136
+                }
137
+                if (!string.IsNullOrEmpty(endduplicatetime))
138
+                {
139
+                    duplica = true;
140
+                    sql += $" and F_Type=" + 3;
141
+                    where += " and datediff(day,F_CreateTime,'" + endduplicatetime + "')>=0   ";
142
+                }
143
+
144
+
117 145
                 if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
118 146
                     sql += $"  and ( F_CusName like '%" + keywords.Trim() + "%'or F_CusPhone like '%" + keywords.Trim() + "%' ) ";
119 147
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
@@ -191,6 +219,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
191 219
                             break;
192 220
                     }
193 221
                 }
222
+                if (duplica)
223
+                {
224
+                    if (GetDuplica(where) != null)
225
+                        sql += "AND F_Id in(" + GetDuplica(where) + ")";
226
+                    else
227
+                        return Success("暂无工单");
228
+                }
194 229
                 #endregion
195 230
                 string str = "";
196 231
                 string sql1 = "";
@@ -253,7 +288,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
253 288
                         drNew["通知人"] = it.F_Notifications;
254 289
                         drNew["接听人"] = it.F_ReceivingPerson;
255 290
                         drNew["落实情况"] = it.F_ImplementationSituation;
256
-                        drNew["重复投诉日期"] = it.F_CreateTime;
291
+                        var itemlast = itembll.GetModelList(" isnull(F_IsUsed,'0')='1' and F_ItemType=" + 11 + " and  F_WoID=" + it.F_Id  + " ").FirstOrDefault ();
292
+                        if (itemlast!=null )
293
+                        drNew["重复投诉日期"] = itemlast.F_CreateTime ;
257 294
                         dt.Rows.Add(drNew);
258 295
                         #endregion
259 296
                     }
@@ -293,7 +330,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
293 330
                     dt.Columns.Add("落实情况");
294 331
                     dt.Columns.Add("处理进度");
295 332
                     dt.Columns.Add("工单类别");
296
-                    dt.Columns.Add("重复工单");
333
+                    
297 334
                     #endregion
298 335
                     foreach (var it in depts)
299 336
                     {
@@ -326,7 +363,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
326 363
                                 drNew["办事处"]  = "";
327 364
                             }
328 365
                         }
329
-                        drNew["投诉时间"] = DateTime.Parse(it.F_CreateTime.ToString()).ToString("dd日HH时mm分");//
366
+                        drNew["投诉时间"] = DateTime.Parse(it.F_CreateTime.ToString()).ToString("yyyy年MM月dd日HH时mm分");//
330 367
                         drNew["序号"] = it.F_SerialNumber;//
331 368
                         drNew["姓名"] = it.F_CusName;//姓名
332 369
                         drNew["地址"] = it.F_AddRess;//地址
@@ -375,12 +412,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
375 412
                             drNew["处理进度"] = "已完结";
376 413
                         if (it .F_Type==1)
377 414
                         drNew["工单类别"] = "咨询";
378
-                        else
415
+                        else if(it.F_Type == 2)
379 416
                             drNew["工单类别"] = "投诉";
380
-                        if (it .F_Duplicate==0)
381
-                        drNew["重复工单"] = "未重复";
382
-                        else
383
-                            drNew["重复工单"] = "重复";
417
+                        else 
418
+                           drNew["工单类别"] = "重复";
384 419
                         dt.Rows.Add(drNew);
385 420
                         #endregion
386 421
                     }
@@ -407,7 +442,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
407 442
                             "F_Id",
408 443
                             "*",
409 444
                             sql,
410
-                            "ORDER BY T_Bus_WorkOrder.F_Id desc",
445
+                            "ORDER BY T_Bus_WorkOrder.F_CreateTime desc",
411 446
                             pagesize,
412 447
                             pageindex,
413 448
                             true,
@@ -529,7 +564,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
529 564
                         model.F_OfficName = it.F_Office;
530 565
                     }
531 566
                 }
532
-                model.F_CreateTime = DateTime .Parse (it.F_CreateTime.ToString ()).ToString ("dd日HH时mm分")  ;//投诉时间
567
+                model.F_CreateTime = DateTime .Parse (it.F_CreateTime.ToString ()).ToString ("yyyy年MM月dd日HH时mm分")  ;//投诉时间
533 568
                 model.F_DealTimely = it.F_DealTimely;//重要级别
534 569
                 model.F_Reason = it.F_Reason;//重要级别原因
535 570
                 model.F_SerialNumber = it.F_SerialNumber;//序号
@@ -577,6 +612,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
577 612
             return Input;
578 613
         }
579 614
         /// <summary>
615
+        /// 获取高层审批
616
+        /// </summary>
617
+        /// <param name="user"></param>
618
+        /// <returns></returns>
619
+        public string GetDuplica(string time)
620
+        {
621
+            string str = string.Empty;
622
+            str = "select F_WoID from T_Wo_WorkOrderItem_New where   F_ItemType=" + 11 + time;
623
+            return str;
624
+        }
625
+        /// <summary>
580 626
         /// 注解
581 627
         /// </summary>
582 628
         /// <param name="orderid"></param>
@@ -614,7 +660,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
614 660
             return Error("无操作权限");
615 661
         }
616 662
         /// <summary>
617
-        /// 注解
663
+        /// 标记重复工单
618 664
         /// </summary>
619 665
         /// <param name="orderid"></param>
620 666
         /// <param name="cont"></param>
@@ -639,12 +685,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
639 685
                     {
640 686
                         if (isbj==1)
641 687
                         {
642
-                            model.F_Duplicate = 1;
688
+                            model.F_Duplicate = model.F_Type;
689
+                           model.F_Type  = 3;
643 690
                         }
644 691
                         var res = workorderBLL.Update(model);
645 692
                         if (res)
646 693
                         {
647
-                            AddLog(model.F_Id, (int)model.F_State , deptname + ua.F_UserName + "标记重复工单", 0, 0, "",0 ,ua,1);
694
+                            AddLog(model.F_Id, (int)model.F_State , deptname + ua.F_UserName + "标记重复工单", 11, 11, "",0 ,ua,1);
648 695
                             return Success("标记重复成功");
649 696
                         }
650 697
                           
@@ -737,7 +784,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
737 784
             {
738 785
                 int userId = CurrentUser.UserData.F_UserId;
739 786
                 Model.T_Sys_UserAccount userModel = userBLL.GetModel(userId);
740
-                if (!(input.F_Type > 0 && input.F_Type < 3))
787
+                if (!(input.F_Type > 0 && input.F_Type < 4))
741 788
                     return Error("工单类型错误!");
742 789
                 if (string.IsNullOrEmpty(input.F_CusName))
743 790
                     return Error("请输入来电人姓名!");
@@ -802,7 +849,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
802 849
                 Model.T_Sys_UserAccount userModel = userBLL.GetModel(userId);
803 850
                 if (input.F_Id <= 0)
804 851
                     return Error("参数错误!");
805
-                if (!(input.F_Type > 0 && input.F_Type < 3))
852
+                if (!(input.F_Type > 0 && input.F_Type < 4))
806 853
                     return Error("工单类型错误!");
807 854
                 if (string.IsNullOrEmpty(input.F_CusName))
808 855
                     return Error("请输入来电人姓名!");
@@ -869,8 +916,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
869 916
 
870 917
                         if (!string.IsNullOrEmpty(idd.Trim()))
871 918
                         {
872
-                            if (itembll.DeleteList(idd.TrimEnd(',')))
873
-                            {
919
+                           
874 920
                                 if (workorderBLL.DeleteList(idd.TrimEnd(',')))
875 921
                                 {
876 922
 
@@ -881,11 +927,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
881 927
                                 {
882 928
                                     return Error("设置失败");
883 929
                                 }
884
-                            }
885
-                            else
886
-                            {
887
-                                return Error("设置失败");
888
-                            }
930
+                            
889 931
 
890 932
                         }
891 933
                         else
@@ -1288,7 +1330,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
1288 1330
             model.F_Type = input.F_Type;//工单类型1咨询2投诉
1289 1331
             model.F_Area = input.F_Area;//大区
1290 1332
             model.F_Office = input.F_Office;//办事处
1291
-            model.F_DealTimely = input.F_DealTimely;// 重要级别1红色2绿色3普通工单
1333
+            if (!string.IsNullOrEmpty(input.F_DealTimely))
1334
+                model.F_DealTimely = input.F_DealTimely;// 重要级别1红色2绿色3普通工单
1335
+            else
1336
+                model.F_DealTimely = "普通工单";
1292 1337
             model.F_Reason = input.F_Reason;// 重要级别原因
1293 1338
             model.F_CusName = input.F_CusName;//来电人姓名
1294 1339
             model.F_CusPhone = input.F_CusPhone;//来电人电话
@@ -1302,7 +1347,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1302 1347
             model.F_ProblemCode = input.F_ProblemCode;//问题代码
1303 1348
             model.F_QualityProblem = input.F_QualityProblem;//质量问题
1304 1349
         //    model.F_ImplementationSituation = input.F_ImplementationSituation;//落实情况
1305
-            model.F_Duplicate = input.F_Duplicate;//是否重复工单0否1是
1350
+            model.F_Duplicate = 0;//是否重复工单0否1是
1306 1351
             model.F_Content = input.F_Content;//备注
1307 1352
             #endregion
1308 1353
             if (type == 1)

File diff suppressed because it is too large
+ 52 - 13
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs