Explorar el Código

添加根据工号获取坐席组号接口

mengjie %!s(int64=8) %!d(string=hace) años
padre
commit
9ad1344ed8

+ 9 - 1
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_UserAccount.cs

217
         //{
217
         //{
218
         //return dal.GetList(PageSize,PageIndex,strWhere);
218
         //return dal.GetList(PageSize,PageIndex,strWhere);
219
         //}
219
         //}
220
-
220
+        /// <summary>
221
+        /// 根据工号获取坐席组
222
+        /// </summary>
223
+        /// <param name="strWhere"></param>
224
+        /// <returns></returns>
225
+        public string GetGroup(string strWhere)
226
+        {
227
+            return dal.GetGroup(strWhere);
228
+        }
221
         #endregion  BasicMethod
229
         #endregion  BasicMethod
222
         #region  ExtensionMethod
230
         #region  ExtensionMethod
223
 
231
 

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

700
             return DbHelperSQL.Query(strSql.ToString());
700
             return DbHelperSQL.Query(strSql.ToString());
701
         }
701
         }
702
 
702
 
703
+        /// <summary>
704
+        /// 根据工号获取坐席组
705
+        /// </summary>
706
+        /// <param name="strWhere"></param>
707
+        /// <returns></returns>
708
+        public string GetGroup(string strWhere)
709
+        {
710
+            StringBuilder strSql = new StringBuilder();
711
+            strSql.Append("SELECT TOP 1 F_SeartGroup FROM T_Sys_UserAccount ");
712
+            if (strWhere.Trim() != "")
713
+            {
714
+                strSql.Append(" where " + strWhere);
715
+            }
716
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
717
+            if (obj == null)
718
+            {
719
+                return "";
720
+            }
721
+            else
722
+            {
723
+                return Convert.ToString(obj);
724
+            }
725
+        }
703
         #endregion  BasicMethod
726
         #endregion  BasicMethod
704
         #region  ExtensionMethod
727
         #region  ExtensionMethod
705
 
728
 

+ 16 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

495
             return res;
495
             return res;
496
         }
496
         }
497
 
497
 
498
+        //根据工号获取坐席组号
499
+        public ActionResult GetSeatGroup(string worknum)
500
+        {
501
+            ActionResult res = NoToken("未知错误,请重新登录");
502
+            if (Request.IsAuthenticated)
503
+            {
504
+                string strwhere = "";
505
+                if (worknum != "")
506
+                {
507
+                    strwhere = " F_WorkNumber='" + worknum + "'";
508
+                }
509
+                string setgroup = sysUserAccountBll.GetGroup(strwhere);
510
+                res = Success("坐席组号获取成功", setgroup);
511
+            }
512
+            return res;
513
+        }
498
     }
514
     }
499
 }
515
 }