瀏覽代碼

Merge branch 'master' of http://192.168.1.222:3000/lihai/XiXianDC_ZhuBiao_API

mengjie 6 年之前
父節點
當前提交
f9621451f6

+ 9 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_Department.cs

@@ -66,6 +66,15 @@ namespace CallCenterApi.BLL
66 66
         }
67 67
 
68 68
         /// <summary>
69
+        /// 得到一个对象实体
70
+        /// </summary>
71
+        public Model.T_Sys_Department GetModel(string F_DeptName)
72
+        {
73
+
74
+            return dal.GetModel(F_DeptName);
75
+        }
76
+
77
+        /// <summary>
69 78
         /// 获得数据列表
70 79
         /// </summary>
71 80
         public DataSet GetList(string strWhere)

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

@@ -88,6 +88,14 @@ namespace CallCenterApi.BLL
88 88
         {
89 89
             return dal.GetModel(F_UserCode);
90 90
         }
91
+
92
+        /// <summary>
93
+        /// 得到一个对象实体
94
+        /// </summary>
95
+        public Model.T_Sys_UserAccount GetModelByName(string F_UserName)
96
+        {
97
+            return dal.GetModel(F_UserName);
98
+        }
91 99
         /// <summary>
92 100
         /// 根据Openid 获取用户
93 101
         /// </summary>

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

@@ -146,15 +146,7 @@ namespace CallCenterApi.BLL
146 146
 
147 147
         #endregion  BasicMethod
148 148
         #region  ExtensionMethod
149
-
150
-        /// <summary>
151
-        /// 处理工单
152
-        /// </summary>
153
-        public int DealWorkOrder(string strorderid,int isend,string strcont,int jsbm,string jsgh,string clgh
154
-            ,int isaudit, string infotype, int infotypeid, int unitid, string unit)
155
-        {
156
-            return dal.DealWorkOrder(strorderid, isend, strcont, jsbm, jsgh, clgh, isaudit, infotype,infotypeid,unitid,unit);
157
-        }
149
+            
158 150
         /// <summary>
159 151
         /// 处理工单
160 152
         /// </summary>

+ 26 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_Department.cs

@@ -224,6 +224,32 @@ namespace CallCenterApi.DAL
224 224
                 return null;
225 225
             }
226 226
         }
227
+        
228
+        /// <summary>
229
+        /// 得到一个对象实体
230
+        /// </summary>
231
+        public Model.T_Sys_Department GetModel(string F_DeptName)
232
+        {
233
+
234
+            StringBuilder strSql = new StringBuilder();
235
+            strSql.Append("select TOP 1 F_DeptId,F_DeptCode,(SELECT B.F_DeptName FROM T_Sys_Department B WHERE B.F_DeptId=A.F_ParentId) AS F_ParentName,F_ParentId,F_ParentCode,F_DeptName,F_State,F_Layer,F_Type,F_Sort,F_Remark,F_Telephone,F_Mobile,F_OtherPhone,F_Email,F_Header from T_Sys_Department  A");
236
+            strSql.Append(" where F_DeptName=@F_DeptName");
237
+            SqlParameter[] parameters = {
238
+                    new SqlParameter("@F_DeptName", SqlDbType.VarChar,50)
239
+            };
240
+            parameters[0].Value = F_DeptName;
241
+
242
+            Model.T_Sys_Department model = new Model.T_Sys_Department();
243
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
244
+            if (ds.Tables[0].Rows.Count > 0)
245
+            {
246
+                return DataRowToModel(ds.Tables[0].Rows[0]);
247
+            }
248
+            else
249
+            {
250
+                return null;
251
+            }
252
+        }
227 253
 
228 254
 
229 255
         /// <summary>

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

@@ -367,6 +367,32 @@ namespace CallCenterApi.DAL
367 367
         /// <summary>
368 368
         /// 得到一个对象实体
369 369
         /// </summary>
370
+        public Model.T_Sys_UserAccount GetModelByName(string F_UserName)
371
+        {
372
+
373
+            StringBuilder strSql = new StringBuilder();
374
+            strSql.Append("select  top 1 * from T_Sys_UserAccount ");
375
+            strSql.Append(" where F_UserName=@F_UserName");
376
+            SqlParameter[] parameters = {
377
+                    new SqlParameter("@F_UserName", SqlDbType.VarChar,50)
378
+            };
379
+            parameters[0].Value = F_UserName;
380
+
381
+            Model.T_Sys_UserAccount model = new Model.T_Sys_UserAccount();
382
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
383
+            if (ds.Tables[0].Rows.Count > 0)
384
+            {
385
+                return DataRowToModel(ds.Tables[0].Rows[0]);
386
+            }
387
+            else
388
+            {
389
+                return null;
390
+            }
391
+        }
392
+
393
+        /// <summary>
394
+        /// 得到一个对象实体
395
+        /// </summary>
370 396
         public Model.T_Sys_UserAccount GetModel(int F_UserId)
371 397
         {
372 398
 

+ 70 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -984,12 +984,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
984 984
                         {
985 985
 
986 986
                             #region 获取处理人工号 20180514 郑兵兵 无需走流程,所以注释
987
-                            //string clgh = string.Empty;
988
-                            //if (clbm != 0)
987
+                            //int depid = 0; //部门id
988
+                            ////string clgh = string.Empty;
989
+                            //if (!string.IsNullOrEmpty(clbm))   //if (clbm != 0)
989 990
                             //{
990
-                            //    if (clid != 0)
991
+                            //    var model_Dep = new BLL.T_Sys_Department().GetModel(clbm);
992
+                            //    depid = model_Dep != null ? model_Dep.F_DeptId : 0;
993
+                            //    if (!string.IsNullOrEmpty(clgh))  //if (clid != 0)
991 994
                             //    {
992
-                            //        Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
995
+                            //        //Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
996
+                            //        Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModelByName(clgh);
993 997
                             //        if (clus != null)
994 998
                             //        {
995 999
                             //            clgh = clus.F_UserCode;
@@ -998,7 +1002,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
998 1002
                             //    else
999 1003
                             //    {
1000 1004
                             //        string users = string.Empty;
1001
-                            //        var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
1005
+                            //        //var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
1006
+                            //        var list = new BLL.T_Sys_UserAccount().GetModelList(" dbo.GetDeptName(F_DeptId)='" + clbm + "'");
1002 1007
                             //        foreach (var l in list)
1003 1008
                             //        {
1004 1009
                             //            if (string.IsNullOrEmpty(users))
@@ -1070,11 +1075,69 @@ namespace CallCenterApi.Interface.Controllers.workorder
1070 1075
 
1071 1076
                             var rerere = new BLL.T_Wo_WorkOrder().Update(model);
1072 1077
                             #region 无需走流程
1078
+                            var item = new Model.T_Wo_WorkOrderItem();
1079
+                            #region 获取接收人
1080
+                            int depid = 0; //部门id
1081
+                            var model_Dep = new BLL.T_Sys_Department().GetModel(clbm);
1082
+                            depid = model_Dep != null ? model_Dep.F_DeptId : 0;
1083
+                            if (!string.IsNullOrEmpty(clgh))  //if (clid != 0)
1084
+                            {
1085
+                                //Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
1086
+                                Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModelByName(clgh);
1087
+                                if (clus != null)
1088
+                                {
1089
+                                    item.ToUser = clus.F_UserCode;
1090
+                                }
1091
+                            }
1092
+                            else
1093
+                            {
1094
+                                string users = string.Empty;
1095
+                                var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
1096
+                                foreach (var l in list)
1097
+                                {
1098
+                                    if (string.IsNullOrEmpty(users))
1099
+                                    {
1100
+                                        users = l.F_UserCode;
1101
+                                    }
1102
+                                    else
1103
+                                    {
1104
+                                        users = users + "," + l.F_UserCode;
1105
+                                    }
1106
+                                }
1107
+                                item.ToUser = users;
1108
+                            }
1109
+                            #endregion
1110
+                            item.WorkOrderID = orderid;
1111
+                            item.Type = 1;      //处理
1112
+                            item.ToDept = depid; //部门clbm
1113
+                            //item.ToUser = clus != null ? clus.F_UserCode : "";  //接收人
1114
+                            item.Detail = cont;
1115
+                            item.IsDel = 0;
1116
+                            //转派
1117
+                            if (isend == 0)
1118
+                            {
1119
+                                item.State = 0;
1120
+                                item.IsLast = 0;
1121
+                            }
1122
+                            else
1123
+                            {
1124
+                                item.State = 2;
1125
+                                item.IsLast = 1;
1126
+                                item.DealUser = ua.F_UserCode;
1127
+                                item.DealTime = DateTime.Now;
1128
+                            }
1129
+                            item.IsStart = 0;
1130
+                            item.IsTimeOut = 0;
1131
+                            item.CreateUser = ua.F_UserCode;
1132
+                            item.CreateTime = DateTime.Now;
1133
+                            long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
1134
+
1135
+
1073 1136
                             //int n = new BLL.T_Wo_WorkOrder().DealWorkOrder1(orderid, isend
1074 1137
                             //    , model.Customer, model.CustomerTel, inqtimes, model.Inquser
1075 1138
                             //    , model.County, model.Address, model.Detail, model.Clcontent, model.Answer, model.Remark
1076
-                            //    , clbm, clgh, ua.F_UserCode, model.InfoType, model.InfoTypeID.Value, model.UnitID.Value, model.Unit);
1077
-                            //if (n > 0)
1139
+                            //    , depid, clgh, ua.F_UserCode, model.InfoType, model.InfoTypeID??0, model.UnitID??0, model.Unit);
1140
+                            ////if (n > 0)
1078 1141
                             #endregion
1079 1142
 
1080 1143
                             if (rerere)

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

@@ -52,8 +52,8 @@ namespace CallCenterApi.Model
52 52
         private DateTime? _appointtime;
53 53
         private string _clcontent;
54 54
         private string _infotype;
55
-        private int? _infotypeid;
56
-        private int? _isreward;
55
+        private int? _infotypeid = 0;
56
+        private int? _isreward = 0;
57 57
         private string _rewardamount;
58 58
         private string _rewardtime;
59 59
         private int? _unitid;

+ 1 - 1
ivr/IVR_XinXiangMD.xml

@@ -23,7 +23,7 @@
23 23
 		<cell Name="CELL_COMPARE" Pos="6" Data1Type="2" Data2Type="1" Data3Type="1" Data1="BlackListVerify" Data2="0" Data3="" VarType="1" CompareType="2" TruePos="7" FalsePos="12" Note="判断黑名单" />
24 24
 		<cell Name="CELL_SQL" Pos="7" ConnStr="Provider=SQLOLEDB.1;Password=hykj800100;Persist Security Info=True;User ID=sa;Initial Catalog=CallCenter_XiXianDC;Data Source=192.168.1.2" 
25 25
 		SqlStr="update T_Call_CallRecords set CallState=1,DealType=1,IsDeal=1 where CallId='%[CallID]'" IsSaved="no" SuccessPos="26" FailPos="26" Note="黑名单通话记录" />
26
-		
26
+
27 27
 		<cell Name="CELL_AUDIODTMF" Pos="12" PlayType="2" ContentType="1" Content="D:\Midware\wav\欢迎词.wav" TTSNumMode="1" TTSSpeed="50" TTSVolume="50" 
28 28
 		TTSEngine="0" StopWhenDtmf="2" MaxKeyCount="1" KeyPressInterval="0" FinishKey="#" KeyVar="" SuccessPos="8" FailPos="24" HangupPos="25" Note="放欢迎词" />
29 29
 		<!--