duhongyu %!s(int64=5) %!d(string=hace) años
padre
commit
1d7c3b1168

+ 19 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -857,13 +857,14 @@ namespace CallCenterApi.Interface.Controllers.weixin
857 857
                     }
858 858
                 }
859 859
                 //   sql += " and (F_CreateBy= '" + ua.F_UserCode + "' or T_Wo_WorkOrder.F_ID in ( " + GetCYWorkOrderID(ua.F_UserCode) + ")) ";
860
-                if (ua != null)
860
+                if (source == 3)
861
+                {
862
+                    sql += $" and F_WxOpenId ='" + OpenId + "'";
863
+                }
864
+                else   if (ua != null)
861 865
                 {
862 866
                     Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
863
-                    if (source == 3)
864
-                    {
865
-                        sql += $" and F_WxOpenId ='" + OpenId + "'";
866
-                    }
867
+                   
867 868
                     if (state >-1)
868 869
                     {
869 870
                         switch (state)
@@ -1817,7 +1818,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1817 1818
                         }
1818 1819
                         else
1819 1820
                         {
1820
-                            model.F_Annotation = model.F_Annotation + "" + cont + "-" + ua.F_UserName  + "(" + ua.F_WorkNumber + ")" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); ;
1821
+                            model.F_Annotation = model.F_Annotation + "\n" + cont + "-" + ua.F_UserName  + "(" + ua.F_WorkNumber + ")" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); ;
1821 1822
                         }
1822 1823
                         var res = woBLL.Update(model);
1823 1824
                         if (res)
@@ -3972,6 +3973,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
3972 3973
                         {
3973 3974
                             if (clus.F_WorkNumber == "7000")
3974 3975
                                 return Error("不能转派到市场管理员");
3976
+                            else if (clus.F_RoleId == 58)
3977
+                                return Error("不能转派到业务员");
3978
+                            else if (clus.F_RoleId == 60)
3979
+                                return Error("不能转派到分公司经理");
3980
+                            else if (clus.F_RoleId == 62)
3981
+                                return Error("不能转派到大区经理");
3975 3982
                         }
3976 3983
 
3977 3984
                     }
@@ -5102,7 +5109,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
5102 5109
                 }
5103 5110
                 //处理内容
5104 5111
                 if (!string.IsNullOrEmpty(cont))
5105
-                    model.F_DealContent += cont + ";";
5112
+                {
5113
+                    if (model.F_Source == "3")
5114
+                        model.F_DealContent = cont;
5115
+                    else
5116
+                        model.F_DealContent += cont + ";";
5117
+                }
5106 5118
                 model.F_DealTime = DateTime.Now;
5107 5119
                 InToworkModel(model, input);
5108 5120
                 woBLL.Update(model);

+ 49 - 5
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -2128,7 +2128,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2128 2128
         /// <param name="id"></param>
2129 2129
         /// <param name="type"></param>
2130 2130
         /// <returns></returns>
2131
-        public ActionResult GetItemList(int id, int type=1)
2131
+        public ActionResult GetItemList(int id, int type=1,int pageindex=1,int pagesize=10)
2132 2132
         {
2133 2133
             int userId = CurrentUser.UserData.F_UserId;
2134 2134
             if (userId != 0)
@@ -2144,7 +2144,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
2144 2144
                 {
2145 2145
                     msg = "" + type;
2146 2146
                 }
2147
-                var itemlasts = itembll.GetModelList("  F_ItemType in(" + msg + ") and  F_WoID=" + id + " ");
2147
+                string sql = "and  F_ItemType in(" + msg + ") and  F_WoID=" + id + " ";
2148
+                DataTable dt = new DataTable();
2149
+                int recordCount;
2150
+                dt = BLL.PagerBLL.GetListPager(
2151
+                                         "T_Wo_WorkOrderItem_New",
2152
+                                         "F_ID",
2153
+                                         "*",
2154
+                                         sql,
2155
+                                         "ORDER BY F_ID desc",
2156
+                                          pagesize,
2157
+                                          pageindex,
2158
+                                         true,
2159
+                                         out recordCount);
2160
+                List<Model.T_Wo_WorkOrderItem_New> itemlasts = new BLL.T_Wo_WorkOrderItem_New().DataTableToList(dt);
2148 2161
                 if (itemlasts != null)
2149 2162
                 {
2150 2163
                         var obj = new
@@ -2152,7 +2165,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2152 2165
                             state = "success",
2153 2166
                             message = "成功",
2154 2167
                             rows = ItemList(itemlasts),
2155
-                            total = itemlasts.Count,
2168
+                            total = recordCount,
2156 2169
                         };
2157 2170
                         return Content(obj.ToJson());
2158 2171
                 }
@@ -5394,6 +5407,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
5394 5407
                 {
5395 5408
                     return Error("请选择接收部门");
5396 5409
                 }
5410
+                else if (clid != 0)
5411
+                {
5412
+                    Model.T_Sys_UserAccount clus = sysUserAccountBll.GetModel(clid);
5413
+                    if (clus != null)
5414
+                    {
5415
+                        if (clus.F_WorkNumber == "7000")
5416
+                            return Error("不能转派到市场管理员");
5417
+                        else if (clus.F_RoleId == 58)
5418
+                            return Error("不能转派到业务员");
5419
+                        else if (clus.F_RoleId == 60)
5420
+                            return Error("不能转派到分公司经理");
5421
+                        else if (clus.F_RoleId == 62)
5422
+                            return Error("不能转派到大区经理");
5423
+
5424
+                    }
5425
+                }
5397 5426
                 #endregion
5398 5427
                 long n = workOrder.Add(model);
5399 5428
                 if (n > 0)
@@ -5520,7 +5549,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5520 5549
                         }
5521 5550
                         else
5522 5551
                         {
5523
-                            model.F_Annotation = model.F_Annotation + "" + cont + "-" + ua.F_UserName + "(" + ua.F_WorkNumber + ")"+DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); ; ;
5552
+                            model.F_Annotation = model.F_Annotation + "\n" + cont + "-" + ua.F_UserName + "(" + ua.F_WorkNumber + ")"+DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); ; ;
5524 5553
                         }
5525 5554
                         var res = workOrder.Update(model);
5526 5555
                         if (res)
@@ -5826,8 +5855,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
5826 5855
                     {
5827 5856
                        if (clus.F_WorkNumber =="7000")
5828 5857
                             return Error("不能转派到市场管理员");
5858
+                       else if (clus.F_RoleId == 58)
5859
+                            return Error("不能转派到业务员");
5860
+                        else if (clus.F_RoleId == 60)
5861
+                            return Error("不能转派到分公司经理");
5862
+                        else if (clus.F_RoleId == 62)
5863
+                            return Error("不能转派到大区经理");
5864
+                      
5829 5865
                     }
5830 5866
 
5867
+
5831 5868
                 }
5832 5869
                 if (ua != null)
5833 5870
                 {
@@ -6780,8 +6817,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
6780 6817
                     else
6781 6818
                         model.F_Files = F_Files;
6782 6819
                 }
6820
+              
6783 6821
                 if (!string.IsNullOrEmpty(cont))
6784
-                    model.F_DealContent += cont + ";";
6822
+                {
6823
+                    if (model.F_Source == "3")
6824
+                        model.F_DealContent = cont ;
6825
+                    else
6826
+                        model.F_DealContent += cont + ";";
6827
+                }
6828
+                   
6785 6829
                 model.F_DealTime = DateTime.Now;
6786 6830
                 InToworkModel(model, input);
6787 6831
                 workOrder.Update(model);