duhongyu лет назад: 6
Родитель
Сommit
0620353e2d

Разница между файлами не показана из-за своего большого размера
+ 10 - 4
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs


Разница между файлами не показана из-за своего большого размера
+ 1507 - 113
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs


+ 119 - 20
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -235,6 +235,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
235 235
                         }
236 236
                         sql += $" and F_State=" + (int)EnumWorkOrderState.finish + " and F_IsVisit = '" + "0" + "' "; ;
237 237
                         break;
238
+                    case 8://待审批
239
+                        if (ro.F_RoleCode == "GC")
240
+                        {
241
+                            if (GetDJDWorkOrderID(ua.F_UserCode) != "")
242
+                            {
243
+                                sql += $"  and T_Wo_WorkOrder.F_ID in ( " + GetDJDWorkOrderID(ua.F_UserCode) + ") "; ;
244
+                            }
245
+                        }
246
+                        else
247
+                        {
248
+
249
+                            return Success("暂无工单"); ;
250
+                        }
251
+                        break;
238 252
                 }
239 253
                 #endregion
240 254
                 int recordCount = 0;
@@ -269,7 +283,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
269 283
                 else
270 284
                 {
271 285
 
272
-                    return Success("暂无工单"); ;
286
+                     return Success("暂无工单"); ;
273 287
                 }
274 288
             }
275 289
             else
@@ -321,9 +335,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
321 335
         public string GetCYWorkOrderID(string user)
322 336
         {
323 337
             string str = string.Empty;
324
-
325
-            str = "select F_WoID from T_Wo_WorkOrderItem_New where F_CreateUser='" + user + "' ";
326
-
338
+            str = "select F_WoID from T_Wo_WorkOrderItem_New where F_CreateUser in(" + user + ")"
339
+            
340
+             ;
327 341
             return str;
328 342
         }
329 343
         /// <summary>
@@ -1621,9 +1635,25 @@ namespace CallCenterApi.Interface.Controllers.workorder
1621 1635
                     model.F_VisitResult = model1[i].F_VisitResult;//回访结果:非常满意、满意、一般、不满意
1622 1636
                     model.F_VisitReason = model1[i].F_VisitReason;// 回访不满意原因
1623 1637
                     model.F_Callresults = model1[i].F_Callresults;//呼叫结果
1638
+                    model.F_Highopinions = model1[i].F_Highopinions;//高层处理意见
1624 1639
 
1625
-
1626
-
1640
+                    model.F_IsAudit = model1[i].F_IsAudit;//是否审核
1641
+                    model.F_Highopinions = model1[i].F_Highopinions;//高层处理意见
1642
+                    if (model1[i].F_AuditState == 0)
1643
+                    {
1644
+                        model.F_AuditState = "同意上报";
1645
+                    }
1646
+                    else if (model1[i].F_AuditState == 1)
1647
+                    {
1648
+                        model.F_AuditState = "驳回修订";
1649
+                    }
1650
+                    else
1651
+                    {
1652
+                        model.F_AuditState = "强制结案";
1653
+                    }
1654
+                    model.F_AuditBy = model1[i].F_AuditBy;//审核人
1655
+                    model.F_AuditOn = model1[i].F_AuditOn;//审核时间
1656
+                    model.F_AuditCont = model1[i].F_AuditCont;//审核内容
1627 1657
                     model.F_IsOver = model1[i].F_IsOver;
1628 1658
                  
1629 1659
                     if (userId >0)
@@ -2006,6 +2036,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2006 2036
                                         }
2007 2037
                                         else if (deptmodel.F_DeptId == 12)
2008 2038
                                         {
2039
+                                        inputs.F_IsVisit = isvisit;
2009 2040
                                         inputs.F_ZL_CJ_IsRecord = deptment.IsRecord;//质量管理科-抽检-未备案、已备案
2010 2041
                                         inputs.F_ZL_ClaimAmount = deptment.ClaimAmount;// 质量管理科-索赔金额(单位元,对应责任单位)
2011 2042
                                         }
@@ -2061,7 +2092,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2061 2092
         /// <returns></returns>
2062 2093
         [Authority]
2063 2094
         public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment, int isvisit=1,
2064
-            float overtime =0,int sms=0,int clbm = 0, int clid = 0)
2095
+            float overtime =0,int sms=0,int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0)
2065 2096
         {
2066 2097
             int userId = CurrentUser.UserData.F_UserId;
2067 2098
             string usercode = CurrentUser.UserData.F_UserCode;
@@ -2121,6 +2152,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2121 2152
                                     }
2122 2153
                                     else if (deptmodel.F_DeptId == 12)
2123 2154
                                     {
2155
+                                        input.F_IsVisit = isvisit;
2124 2156
                                         input.F_ZL_CJ_IsRecord = deptment.IsRecord;//质量管理科-抽检-未备案、已备案
2125 2157
                                         input.F_ZL_ClaimAmount = deptment.ClaimAmount;// 质量管理科-索赔金额(单位元,对应责任单位)
2126 2158
                                     }
@@ -2146,7 +2178,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2146 2178
                    
2147 2179
                     if (model != null)
2148 2180
                     {
2149
-                        var res = AssignWO(ua, model, input,cont, clbm, clid, overtime, sms );
2181
+                        var res = AssignWO(ua, model, input,cont, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid);
2150 2182
                         if (res)
2151 2183
                             return Success("转派成功");
2152 2184
                         else
@@ -2215,7 +2247,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2215 2247
         [Authority]
2216 2248
         public ActionResult DealWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,
2217 2249
             string uncont="",
2218
-          int isvisit=0,  int isover = 0)
2250
+          int isvisit=1,  int isover = 0)
2219 2251
         {
2220 2252
             int userId = CurrentUser.UserData.F_UserId;
2221 2253
             if (userId != 0)
@@ -2264,6 +2296,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2264 2296
                                 }
2265 2297
                                 else if (deptmodel.F_DeptId == 12)
2266 2298
                                 {
2299
+                                    input.F_IsVisit = isvisit;
2267 2300
                                     input.F_ZL_CJ_IsRecord = deptment.IsRecord;//质量管理科-抽检-未备案、已备案
2268 2301
                                 }
2269 2302
                             }
@@ -2299,6 +2332,36 @@ namespace CallCenterApi.Interface.Controllers.workorder
2299 2332
             return Error("无操作权限!");
2300 2333
         }
2301 2334
         /// <summary>
2335
+        /// 高层审批
2336
+        /// </summary>
2337
+        /// <param name="input"></param>
2338
+        /// <returns></returns>
2339
+        [Authority]
2340
+        public ActionResult HigApprovalOrder( long orderid, string cont)
2341
+        {
2342
+            int userId = CurrentUser.UserData.F_UserId;
2343
+            if (userId != 0)
2344
+            {
2345
+                Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
2346
+                if (ua != null)
2347
+                {
2348
+                    Model.T_Wo_WorkOrder model = workOrder  .GetModel(orderid);
2349
+                    //验证信息
2350
+                    if (model != null)
2351
+                    {
2352
+                        model.F_Highopinions = cont;
2353
+                        bool n = workOrder.Update(model);
2354
+                        if (n)
2355
+                            return Success("审批成功");
2356
+                        else
2357
+                            return Error("审批失败!");
2358
+                    }
2359
+                    return Error("工单不存在");
2360
+                }
2361
+            }
2362
+            return Error("无操作权限");
2363
+        }
2364
+        /// <summary>
2302 2365
         /// 退回工单
2303 2366
         /// </summary>
2304 2367
         /// <param name="input"></param>
@@ -2334,7 +2397,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2334 2397
         /// <param name="input"></param>
2335 2398
         /// <returns></returns>
2336 2399
         [Authority]
2337
-        public ActionResult ReturnvisitOrder(long orderid, string cont, string reason, string call )
2400
+        public ActionResult ReturnvisitOrder(long orderid, string cont, string reason, string call ,int  isOver=0)
2338 2401
         {
2339 2402
             int userId = CurrentUser.UserData.F_UserId;
2340 2403
             if (userId != 0)
@@ -2346,7 +2409,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2346 2409
                     //验证信息
2347 2410
                     if (model != null)
2348 2411
                     {
2349
-                        var res = Retu(ua, model, cont, reason, call);
2412
+                        var res = Retu(ua, model, cont, reason, call, isOver);
2350 2413
                         if (res)
2351 2414
                             return Success("回访成功");
2352 2415
                         else
@@ -2609,7 +2672,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2609 2672
         /// <summary>
2610 2673
         /// 回访工单
2611 2674
         /// </summary>
2612
-        public bool Retu(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont,string reason, string call)
2675
+        public bool Retu(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont,string reason, string call, int isOver = 0)
2613 2676
         {
2614 2677
             #region 工单处理
2615 2678
             int overtime = 0, sms = 0;
@@ -2626,8 +2689,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
2626 2689
                 }
2627 2690
             }
2628 2691
             var opt = "回访";
2692
+
2629 2693
             int optbut = (int)EnumItemOpt.visit;
2630 2694
             int wostate = (int)EnumWorkOrderState.evaluate;
2695
+            if (isOver==0)
2696
+            {                                                                                                                                                                                                                                                                                                                                                                                                    
2697
+                wostate = (int)EnumWorkOrderState.finish;
2698
+            }
2631 2699
             #region 读取当前登录人部门
2632 2700
             string deptname = "";
2633 2701
             var deptmodel = departmentBLL.GetModel(nowUser.F_DeptId);
@@ -2642,10 +2710,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
2642 2710
             var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and  F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_CreateTime desc").FirstOrDefault();
2643 2711
             if (itemlast != null)
2644 2712
                 touser = itemlast.F_CreateUser;
2645
-            var itemid = AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.deal, optbut, touser, 0, nowUser, overtime, sms);
2713
+            var itemid = AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.evaluate, optbut, touser, 0, nowUser, overtime, sms);
2646 2714
             if (itemid > 0)
2647 2715
             {
2648 2716
                 #region 处理工单
2717
+                model.F_State  = wostate;
2649 2718
                 model.F_VisitOn = DateTime .Now ;
2650 2719
                 model.F_VisitResult = cont ;
2651 2720
                 model.F_VisitReason = reason;
@@ -2715,7 +2784,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2715 2784
             {
2716 2785
                 #region 处理工单
2717 2786
                 model.F_VisitOn = DateTime.Now;
2718
-                
2787
+                model.F_State = wostate;
2719 2788
                 workOrder.Update(model);
2720 2789
                 #endregion
2721 2790
                 #region 推送消息
@@ -2813,12 +2882,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
2813 2882
                 #endregion
2814 2883
                 #region 向上一级操作人员推送消息
2815 2884
                 var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and  F_WoID='" + model.F_ID  + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_CreateTime desc").FirstOrDefault();
2816
-                if (itemlast.F_CreateUser != model.F_CreateBy)
2885
+                if (itemlast!=null )
2817 2886
                 {
2818
-                    sendsysmsg(model, nowUser, itemlast.F_CreateUser, (int)itemid, opt);
2819
-                    var lastUser = sysUserAccountBll.GetModel(itemlast.F_CreateUser);
2820
-                    if (lastUser != null && !string.IsNullOrEmpty(lastUser.F_WxOpenId))
2821
-                       sendwxmsg(model, lastUser.F_WxOpenId, nowUser, opt);
2887
+                    if (itemlast.F_CreateUser != model.F_CreateBy)
2888
+                    {
2889
+                        sendsysmsg(model, nowUser, itemlast.F_CreateUser, (int)itemid, opt);
2890
+                        var lastUser = sysUserAccountBll.GetModel(itemlast.F_CreateUser);
2891
+                        if (lastUser != null && !string.IsNullOrEmpty(lastUser.F_WxOpenId))
2892
+                            sendwxmsg(model, lastUser.F_WxOpenId, nowUser, opt);
2893
+                    }
2822 2894
                 }
2823 2895
                 #endregion
2824 2896
                 #region 办理完结向客户发送消息
@@ -2964,13 +3036,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
2964 3036
         /// <summary>
2965 3037
         /// 转派工单
2966 3038
         /// </summary>
2967
-        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, int clbm = 0, int clid = 0, float overtime = 0, int sms = 0)
3039
+        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, int clbm = 0, int clid = 0, float overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0)
2968 3040
         {
2969 3041
             string touser = ""; string tousername = "";
3042
+            int deptid = 0;
2970 3043
             #region 获取接收人
2971 3044
             if (clid != 0)
2972 3045
             {
2973 3046
                 Model.T_Sys_UserAccount clus = sysUserAccountBll.GetModel(clid);
3047
+                deptid = clus.F_DeptId;
2974 3048
                 if (clus != null)
2975 3049
                 {
2976 3050
                     touser = clus.F_UserCode;
@@ -2980,6 +3054,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2980 3054
             else
2981 3055
             {
2982 3056
                 string users = string.Empty;
3057
+                deptid = clbm;
2983 3058
                 var list = sysUserAccountBll.GetModelList(" F_DeptId='" + clbm + "'");
2984 3059
                 foreach (var l in list)
2985 3060
                 {
@@ -2996,6 +3071,30 @@ namespace CallCenterApi.Interface.Controllers.workorder
2996 3071
                 }
2997 3072
                 touser = users;
2998 3073
             }
3074
+            if (isApprovalp != 0&& deptid == 37)
3075
+            {
3076
+                if (hclid != 0)
3077
+                {
3078
+                    Model.T_Sys_UserAccount clus = sysUserAccountBll .GetModel(hclid);
3079
+                    if (clus != null)
3080
+                    {
3081
+                        if (string.IsNullOrEmpty(touser))
3082
+                        {
3083
+                            touser = touser + "," + clus.F_UserCode;
3084
+                            tousername = tousername + "," + clus.F_UserName + "(" + clus.F_UserCode + ")";
3085
+                        }
3086
+                    }
3087
+                }
3088
+                else
3089
+                {
3090
+                    var list = sysUserAccountBll .GetModelList(" F_DeptId='" + hclbm + "'");
3091
+                    foreach (var l in list)
3092
+                    {
3093
+                        touser = touser + "," + l.F_UserCode;
3094
+                        tousername = tousername + "," + l.F_UserName + "(" + l.F_UserCode + ")";
3095
+                    }
3096
+                }
3097
+            }
2999 3098
             #endregion
3000 3099
             #region 工单处理
3001 3100
             var opt = "指派";

+ 8 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderNewInput.cs

@@ -509,7 +509,7 @@ namespace CallCenterApi.Interface.Models.Input
509 509
         /// <summary>
510 510
         /// 审核状态
511 511
         /// </summary>
512
-        public int? F_AuditState
512
+        public string  F_AuditState
513 513
         {
514 514
             get; set;
515 515
         }
@@ -675,6 +675,12 @@ namespace CallCenterApi.Interface.Models.Input
675 675
         {
676 676
             get; set;
677 677
         }
678
-
678
+        /// <summary>
679
+        /// 高层处理意见
680
+        /// </summary>
681
+        public string F_Highopinions
682
+        {
683
+            get;set;
684
+        }
679 685
     }
680 686
 }

+ 12 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

@@ -94,6 +94,18 @@ namespace CallCenterApi.Model
94 94
         private string _f_companyname;
95 95
         private string _f_wxopenid;
96 96
         private string _f_callresults;
97
+        private string _f_highopinions;
98
+        /// <summary>
99
+        /// 高层处理意见
100
+        /// </summary>
101
+        public string F_Highopinions
102
+        {
103
+            set { _f_highopinions = value; }
104
+            get { return _f_highopinions; }
105
+        }
106
+        /// <summary>
107
+        /// 呼叫结果
108
+        /// </summary>
97 109
         public string F_Callresults
98 110
         {
99 111
             set { _f_callresults = value; }