Przeglądaj źródła

指派工单修改

duhongyu 6 lat temu
rodzic
commit
58a81735d5

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

94
                     model.IconCls = "";//图标
94
                     model.IconCls = "";//图标
95
                     model.text = categorylist[i].F_QuestionName;
95
                     model.text = categorylist[i].F_QuestionName;
96
                     model.headerid = categorylist[i].F_ParentId ?? 0;   
96
                     model.headerid = categorylist[i].F_ParentId ?? 0;   
97
-                    tab2 = new BLL.T_Sys_Department().GetList("F_ParentId=" + currentID + " and F_IsDelete=0 ").Tables[0];
97
+                    tab2 = new BLL.T_Wo_QuestionManage().GetList("F_ParentId=" + currentID + " and F_IsDelete=0 ").Tables[0];
98
                     if (tab2 != null && tab2.Rows.Count > 0)
98
                     if (tab2 != null && tab2.Rows.Count > 0)
99
                     {
99
                     {
100
                         model.children = BindTree(tab2, currentID);
100
                         model.children = BindTree(tab2, currentID);

+ 10 - 26
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

26
         /// 获取工单列表
26
         /// 获取工单列表
27
         /// </summary>
27
         /// </summary>
28
         /// <returns></returns>
28
         /// <returns></returns>
29
-        public ActionResult GetList(string code,int  type, string cusname, string cusphone, string companyname, string province, string city,
30
-            string country, string township, string touser, int state=-1, int pageindex = 1,int pagesize = 10)
29
+        public ActionResult GetList(string code, string cusname, string cusphone, string companyname, string province, string city,
30
+            string country, string township, string touser, int type = 0, int state=-1, int pageindex = 1,int pagesize = 10)
31
         {
31
         {
32
 
32
 
33
             string sql = $" and F_IsDelete=0";
33
             string sql = $" and F_IsDelete=0";
241
                         deptname = deptmodel.F_DeptName + "-";
241
                         deptname = deptmodel.F_DeptName + "-";
242
                     }
242
                     }
243
                     #endregion
243
                     #endregion
244
-                    AddLog(input.F_ID, model.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单", (int)EnumItemType.update, (int)EnumItemOpt.update, "", 0, ua);
244
+                    AddLog(input.F_ID, model.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单", (int)EnumItemType.update, (int)EnumItemOpt.update, "", 0, ua,0,0);
245
                     return Success("保存成功!");
245
                     return Success("保存成功!");
246
                 }
246
                 }
247
                 else
247
                 else
437
         /// <summary>
437
         /// <summary>
438
         /// 添加工单记录
438
         /// 添加工单记录
439
         /// </summary>
439
         /// </summary>
440
-        public long AddLog(long woid, int wostate, string content, int itemtype, int opttype, string nextuser, int nextdept, Model.T_Sys_UserAccount nowUser)
440
+        public long AddLog(long woid, int wostate, string content, int itemtype, int opttype, string nextuser, int nextdept, Model.T_Sys_UserAccount nowUser ,int overtime,int sms )
441
         {
441
         {
442
             Model.T_Wo_WorkOrderItem_New itemModel = new Model.T_Wo_WorkOrderItem_New();
442
             Model.T_Wo_WorkOrderItem_New itemModel = new Model.T_Wo_WorkOrderItem_New();
443
-            string starttime = "";string endtime = "";
444
             #region 
443
             #region 
445
             //处理当前工单的记录之前的记录过期
444
             //处理当前工单的记录之前的记录过期
446
             var itemlast = itembll.GetModelList(" isnull(F_IsUsed,'0')='0' and F_ItemType=" + itemtype + " and  F_WoID=" + woid + " ");
445
             var itemlast = itembll.GetModelList(" isnull(F_IsUsed,'0')='0' and F_ItemType=" + itemtype + " and  F_WoID=" + woid + " ");
450
                 {
449
                 {
451
                     it.F_IsUsed = 1;
450
                     it.F_IsUsed = 1;
452
                     itembll.Update(it);
451
                     itembll.Update(it);
453
-                    if ( it.F_WoState == 2)
454
-                    {
455
-                        starttime = it.F_CreateTime.ToString ();
456
-                    }
457
-                    if (it.F_WoState == 10)
458
-                    {
459
-                        endtime = it.F_CreateTime.ToString();
460
-                    }
461
                 }
452
                 }
462
             }
453
             }
463
             #endregion
454
             #endregion
464
             itemModel.F_WoID = woid;
455
             itemModel.F_WoID = woid;
456
+            itemModel.F_IsSMS = sms;
465
             itemModel.F_WoState = wostate;
457
             itemModel.F_WoState = wostate;
466
             itemModel.F_ItemType = itemtype;
458
             itemModel.F_ItemType = itemtype;
467
             itemModel.F_OptType = opttype;
459
             itemModel.F_OptType = opttype;
469
             itemModel.F_NextUser = nextuser;
461
             itemModel.F_NextUser = nextuser;
470
             itemModel.F_NextDept = nextdept;
462
             itemModel.F_NextDept = nextdept;
471
             itemModel.F_IsUsed = 0;
463
             itemModel.F_IsUsed = 0;
472
-            if (starttime!=""&& endtime!="")
473
-            {
474
-                itemModel.F_LimitTime = (DateTime.Parse(endtime) - DateTime.Parse(starttime)).ToString();
475
-            }
476
-            else
477
-            {
478
-                itemModel.F_LimitTime = "0";
479
-            }
464
+            itemModel.F_LimitTime = overtime.ToString ();
480
             itemModel.F_CreateUser = nowUser.F_UserCode;
465
             itemModel.F_CreateUser = nowUser.F_UserCode;
481
             itemModel.F_CreateTime = DateTime.Now;
466
             itemModel.F_CreateTime = DateTime.Now;
482
             var res = itembll.Add(itemModel);
467
             var res = itembll.Add(itemModel);
516
         /// </summary>
501
         /// </summary>
517
         /// <returns></returns>
502
         /// <returns></returns>
518
         [Authority]
503
         [Authority]
519
-        public ActionResult AssignWorkOrder(long orderid, string cont, int clbm = 0, int clid = 0)
504
+        public ActionResult AssignWorkOrder(long orderid, string cont,int overtime=0,int sms=0,int clbm = 0, int clid = 0)
520
         {
505
         {
521
             int userId = CurrentUser.UserData.F_UserId;
506
             int userId = CurrentUser.UserData.F_UserId;
522
             string usercode = CurrentUser.UserData.F_UserCode;
507
             string usercode = CurrentUser.UserData.F_UserCode;
530
                     Model.T_Wo_WorkOrder model = workOrder.GetModel(orderid);
515
                     Model.T_Wo_WorkOrder model = workOrder.GetModel(orderid);
531
                     if (model != null)
516
                     if (model != null)
532
                     {
517
                     {
533
-                        var res = AssignWO(ua, model, cont, clbm, clid);
518
+                        var res = AssignWO(ua, model, cont, clbm, clid, overtime, sms);
534
                         if (res)
519
                         if (res)
535
                             return Success("转派成功");
520
                             return Success("转派成功");
536
                         else
521
                         else
544
         }
529
         }
545
         /// <summary>
530
         /// <summary>
546
         /// 转派工单
531
         /// 转派工单
547
-        /// 
548
         /// </summary>
532
         /// </summary>
549
-        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont, int clbm = 0, int clid = 0)
533
+        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont, int clbm = 0, int clid = 0,int overtime = 0, int sms = 0)
550
         {
534
         {
551
             string touser = ""; string tousername = "";
535
             string touser = ""; string tousername = "";
552
             #region 获取接收人
536
             #region 获取接收人
595
             if (!string.IsNullOrEmpty(cont))
579
             if (!string.IsNullOrEmpty(cont))
596
                 optcont = ",说明:" + cont;
580
                 optcont = ",说明:" + cont;
597
             var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单给 " + tousername + optcont;
581
             var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单给 " + tousername + optcont;
598
-            var itemid = AddLog(model.F_ID , wostate, content, (int)EnumItemType.deal, optbut, touser, clbm, nowUser);
582
+            var itemid = AddLog(model.F_ID , wostate, content, (int)EnumItemType.deal, optbut, touser, clbm, nowUser , overtime,sms);
599
             if (itemid > 0)
583
             if (itemid > 0)
600
             {
584
             {
601
                 #region 处理工单
585
                 #region 处理工单