zhoufan 7 anos atrás
pai
commit
b4cfe5027e

+ 69 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -643,6 +643,75 @@ namespace CallCenterApi.Interface.Controllers.workorder
643 643
         }
644 644
 
645 645
         /// <summary>
646
+        /// 督办或监察工单
647
+        /// </summary>
648
+        /// <returns></returns>
649
+        public ActionResult RemindWorkOrder()
650
+        {
651
+            int userId = CurrentUser.UserData.F_UserId;
652
+            Model.T_Sys_UserAccount userModel = userBLL.GetModel(userId);
653
+
654
+            string workorderid = RequestString.GetFormString("workid");
655
+            int type = RequestString.GetInt("type", 1);
656
+            string content = RequestString.GetFormString("content");
657
+            string files = RequestString.GetFormString("files");
658
+            string callid = RequestString.GetFormString("callid");
659
+
660
+            Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
661
+            if (modelT_Bus_WorkOrder != null )
662
+            {
663
+                using (TransactionScope trans = new TransactionScope())
664
+                {
665
+                    #region 插入督办记录
666
+                    Model.T_Bus_RemindRecord modelT_Bus_RemindRecord = new Model.T_Bus_RemindRecord();
667
+                    modelT_Bus_RemindRecord.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
668
+                    modelT_Bus_RemindRecord.F_Type = type;
669
+                    modelT_Bus_RemindRecord.F_Content = content;
670
+                    modelT_Bus_RemindRecord.F_File = files;
671
+                    modelT_Bus_RemindRecord.F_State = 1;
672
+                    modelT_Bus_RemindRecord.F_IsDelete = 0;
673
+                    modelT_Bus_RemindRecord.F_CreateUser = userModel.F_UserCode;
674
+                    modelT_Bus_RemindRecord.F_CreateTime = DateTime.Now;
675
+
676
+                    if (!string.IsNullOrEmpty(callid))
677
+                    {
678
+                        modelT_Bus_RemindRecord.F_CallId = callid;
679
+                        var rd = new BLL.T_Call_CallRecords().GetModelByCallId(callid);
680
+                        if (rd != null)
681
+                        {
682
+                            new BLL.T_Call_CallRecords().Update(rd);
683
+                            modelT_Bus_WorkOrder.F_CallRecordId = rd.CallRecordsId;
684
+                        }
685
+                    }
686
+
687
+                    new BLL.T_Bus_RemindRecord().Add(modelT_Bus_RemindRecord);
688
+                    #endregion
689
+
690
+                    #region 插入操作记录
691
+                    Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
692
+                    oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
693
+                    oper.F_State = modelT_Bus_WorkOrder.F_State;
694
+
695
+                    string userinfo = userModel.F_UserName + "(" + userModel.F_UserCode + ")";
696
+                    oper.F_Message = userinfo + " 催办了工单";
697
+                    oper.F_CreateUser = userModel.F_UserCode;
698
+                    oper.F_CreateTime = DateTime.Now;
699
+                    oper.F_IsDelete = 0;
700
+
701
+                    new BLL.T_Bus_Operation().Add(oper);
702
+                    #endregion
703
+
704
+                    trans.Complete();
705
+                }
706
+                return Success("操作成功");
707
+            }
708
+            else
709
+            {
710
+                return Error("操作失败");
711
+            }
712
+        }
713
+
714
+        /// <summary>
646 715
         /// 处理工单
647 716
         /// </summary>
648 717
         /// <returns></returns>