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
                     }
857
                     }
858
                 }
858
                 }
859
                 //   sql += " and (F_CreateBy= '" + ua.F_UserCode + "' or T_Wo_WorkOrder.F_ID in ( " + GetCYWorkOrderID(ua.F_UserCode) + ")) ";
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
                     Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
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
                     if (state >-1)
868
                     if (state >-1)
868
                     {
869
                     {
869
                         switch (state)
870
                         switch (state)
1817
                         }
1818
                         }
1818
                         else
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
                         var res = woBLL.Update(model);
1823
                         var res = woBLL.Update(model);
1823
                         if (res)
1824
                         if (res)
3972
                         {
3973
                         {
3973
                             if (clus.F_WorkNumber == "7000")
3974
                             if (clus.F_WorkNumber == "7000")
3974
                                 return Error("不能转派到市场管理员");
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
                 }
5109
                 }
5103
                 //处理内容
5110
                 //处理内容
5104
                 if (!string.IsNullOrEmpty(cont))
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
                 model.F_DealTime = DateTime.Now;
5118
                 model.F_DealTime = DateTime.Now;
5107
                 InToworkModel(model, input);
5119
                 InToworkModel(model, input);
5108
                 woBLL.Update(model);
5120
                 woBLL.Update(model);

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

2128
         /// <param name="id"></param>
2128
         /// <param name="id"></param>
2129
         /// <param name="type"></param>
2129
         /// <param name="type"></param>
2130
         /// <returns></returns>
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
             int userId = CurrentUser.UserData.F_UserId;
2133
             int userId = CurrentUser.UserData.F_UserId;
2134
             if (userId != 0)
2134
             if (userId != 0)
2144
                 {
2144
                 {
2145
                     msg = "" + type;
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
                 if (itemlasts != null)
2161
                 if (itemlasts != null)
2149
                 {
2162
                 {
2150
                         var obj = new
2163
                         var obj = new
2152
                             state = "success",
2165
                             state = "success",
2153
                             message = "成功",
2166
                             message = "成功",
2154
                             rows = ItemList(itemlasts),
2167
                             rows = ItemList(itemlasts),
2155
-                            total = itemlasts.Count,
2168
+                            total = recordCount,
2156
                         };
2169
                         };
2157
                         return Content(obj.ToJson());
2170
                         return Content(obj.ToJson());
2158
                 }
2171
                 }
5394
                 {
5407
                 {
5395
                     return Error("请选择接收部门");
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
                 #endregion
5426
                 #endregion
5398
                 long n = workOrder.Add(model);
5427
                 long n = workOrder.Add(model);
5399
                 if (n > 0)
5428
                 if (n > 0)
5520
                         }
5549
                         }
5521
                         else
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
                         var res = workOrder.Update(model);
5554
                         var res = workOrder.Update(model);
5526
                         if (res)
5555
                         if (res)
5826
                     {
5855
                     {
5827
                        if (clus.F_WorkNumber =="7000")
5856
                        if (clus.F_WorkNumber =="7000")
5828
                             return Error("不能转派到市场管理员");
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
                 if (ua != null)
5869
                 if (ua != null)
5833
                 {
5870
                 {
6780
                     else
6817
                     else
6781
                         model.F_Files = F_Files;
6818
                         model.F_Files = F_Files;
6782
                 }
6819
                 }
6820
+              
6783
                 if (!string.IsNullOrEmpty(cont))
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
                 model.F_DealTime = DateTime.Now;
6829
                 model.F_DealTime = DateTime.Now;
6786
                 InToworkModel(model, input);
6830
                 InToworkModel(model, input);
6787
                 workOrder.Update(model);
6831
                 workOrder.Update(model);