1550076451 2 years ago
parent
commit
1b560e38ed

+ 80 - 4
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -7502,6 +7502,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
7502 7502
                 || userModel.F_RoleCode == "DFZF" || userModel.F_RoleCode == "WLDW") //增加新闻媒体(编号11)的添加工单权限 
7503 7503
             {
7504 7504
 
7505
+                string workorderid = RequestString.GetFormString("workorderid"); //工单编号
7506
+                int  id = RequestString.GetInt("id", 0); //编号
7507
+
7505 7508
 
7506 7509
                 string title = RequestString.GetFormString("title"); //题目
7507 7510
                 string cusname = RequestString.GetFormString("cusname");//作者
@@ -7556,7 +7559,25 @@ namespace CallCenterApi.Interface.Controllers.workorder
7556 7559
                 {
7557 7560
                     #region 保存工单信息
7558 7561
                     Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = new Model.T_Bus_WorkOrder();
7559
-                    modelT_Bus_WorkOrder.F_WorkOrderId = workorderBLL.GetNewWorkOrderID(userModel.F_UserCode);
7562
+                  
7563
+
7564
+                    if(!string .IsNullOrEmpty (workorderid))
7565
+                    {
7566
+                        if (id <= 0)
7567
+                            return Error("请输入正确编号");
7568
+                            var istrue = new BLL.T_Bus_WorkOrder().Exists(workorderid);
7569
+                        if (istrue)
7570
+                            return Error("工单编号重复");
7571
+                          modelT_Bus_WorkOrder.F_WorkOrderId = workorderBLL.GetNewWorkOrderID(DbHelperSQL.GetSingle($"exec [GetNewWorkOrderIdByYear1] '{id}'").ToString());
7572
+
7573
+                    }
7574
+                    else
7575
+                    {
7576
+                        modelT_Bus_WorkOrder.F_WorkOrderId = workorderBLL.GetNewWorkOrderID(userModel.F_UserCode);
7577
+                    }
7578
+
7579
+
7580
+                   
7560 7581
 
7561 7582
                     modelT_Bus_WorkOrder.F_ComTitle = title;//题目
7562 7583
                     modelT_Bus_WorkOrder.F_CusName = cusname;//作者
@@ -9284,7 +9305,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
9284 9305
                 string maindeptid = RequestString.GetFormString("maindeptid");
9285 9306
                 string otherdeptids = RequestString.GetFormString("otherdeptids");
9286 9307
                 DateTime limittime = DateTime.Parse(RequestString.GetFormString("limittime") );
9287
-                string assignedopinion = RequestString.GetFormString("assignedopinion");
9308
+                string assignedopinion = RequestString.GetFormString("assignedopinion");//提示信息
9309
+
9310
+
9311
+
9312
+               
9313
+                string cusaddress = RequestString.GetFormString("cusaddress");//主要网址F_CusAddress
9314
+
9315
+
9316
+                string title = RequestString.GetFormString("title");//题目F_ComTitle
9317
+
9318
+
9319
+                string keys = RequestString.GetFormString("keys");//内容简介F_Key
9320
+
9321
+
9322
+
9323
+
9288 9324
 
9289 9325
                 var modelT_Bus_AssignedInfoLasts = assignBLL.GetList(0, $" F_WorkOrderId='{workorderid}' and F_IsDelete='0' and  F_State='1' ", " F_CreateTime desc").Tables[0];
9290 9326
                 if (modelT_Bus_AssignedInfoLasts.Rows.Count > 0)
@@ -9377,6 +9413,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
9377 9413
                                     modelT_Bus_WorkOrder.F_OtherDeptIds = otherdeptids;
9378 9414
                                     modelT_Bus_WorkOrder.F_AssignUser = userModel.F_UserCode;
9379 9415
                                     modelT_Bus_WorkOrder.F_AssignTime = DateTime.Now;
9416
+                                    if (!string .IsNullOrEmpty (cusaddress))
9417
+                                        modelT_Bus_WorkOrder.F_CusAddress = cusaddress;
9418
+                                    if (!string.IsNullOrEmpty(title))
9419
+                                        modelT_Bus_WorkOrder.F_ComTitle = title;
9420
+                                    if (!string.IsNullOrEmpty(keys))
9421
+                                        modelT_Bus_WorkOrder.F_Key = keys;
9422
+
9380 9423
                                     workorderBLL.Update(modelT_Bus_WorkOrder);
9381 9424
                                     #endregion
9382 9425
 
@@ -9437,13 +9480,21 @@ namespace CallCenterApi.Interface.Controllers.workorder
9437 9480
                                     deptname += deptmasinfo.F_DeptName + ",";
9438 9481
                                 }
9439 9482
                                 int son = 0; string whorkorderid = tempT_Bus_WorkOrder.F_WorkOrderId;
9440
-                                    foreach (var deptinfo in deptlist)
9483
+
9484
+                               
9485
+                                foreach (var deptinfo in deptlist)
9441 9486
                                     {
9442 9487
                                     son++;
9443 9488
                                         #region 新增工单
9444 9489
                                     Model.T_Bus_WorkOrder modelT_Bus_WorkOrder1 = new Model.T_Bus_WorkOrder();
9445 9490
                                         modelT_Bus_WorkOrder1 = tempT_Bus_WorkOrder;
9446
-                                        modelT_Bus_WorkOrder1.F_WorkOrderId = whorkorderid +"-"+ son;
9491
+                                    if (!string.IsNullOrEmpty(cusaddress))
9492
+                                        modelT_Bus_WorkOrder1.F_CusAddress = cusaddress;
9493
+                                    if (!string.IsNullOrEmpty(title))
9494
+                                        modelT_Bus_WorkOrder1.F_ComTitle = title;
9495
+                                    if (!string.IsNullOrEmpty(keys))
9496
+                                        modelT_Bus_WorkOrder1.F_Key = keys;
9497
+                                    modelT_Bus_WorkOrder1.F_WorkOrderId = whorkorderid +"-"+ son;
9447 9498
                                     modelT_Bus_WorkOrder1.F_MainWorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
9448 9499
                                         modelT_Bus_WorkOrder1.F_Id = workorderBLL.Add(modelT_Bus_WorkOrder1);
9449 9500
                                         if (modelT_Bus_WorkOrder1.F_Id <= 0)
@@ -9622,6 +9673,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
9622 9673
                 string otherdeptids = RequestString.GetFormString("otherdeptids");
9623 9674
                 DateTime limittime = DateTime.Parse(RequestString.GetFormString("limittime"));
9624 9675
                 string assignedopinion = RequestString.GetFormString("assignedopinion");
9676
+
9677
+
9678
+                string cusaddress = RequestString.GetFormString("cusaddress");//主要网址F_CusAddress
9679
+
9680
+
9681
+                string title = RequestString.GetFormString("title");//题目F_ComTitle
9682
+
9683
+
9684
+                string keys = RequestString.GetFormString("keys");//内容简介F_Key
9685
+
9686
+
9625 9687
                 if (!string.IsNullOrEmpty(otherdeptids))
9626 9688
                 {
9627 9689
                     var both = otherdeptids.Split(',').Intersect(maindeptid.Split(','));
@@ -9679,6 +9741,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
9679 9741
                                 modelT_Bus_WorkOrder1.F_WorkOrderId = whorkorderid+"-"+ son;
9680 9742
                                 modelT_Bus_WorkOrder1.F_MainWorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
9681 9743
                                 modelT_Bus_WorkOrder1.F_Files = "";
9744
+                                if (!string.IsNullOrEmpty(cusaddress))
9745
+                                    modelT_Bus_WorkOrder1.F_CusAddress = cusaddress;
9746
+                                if (!string.IsNullOrEmpty(title))
9747
+                                    modelT_Bus_WorkOrder1.F_ComTitle = title;
9748
+                                if (!string.IsNullOrEmpty(keys))
9749
+                                    modelT_Bus_WorkOrder1.F_Key = keys;
9750
+
9682 9751
                                 modelT_Bus_WorkOrder1.F_Id = workorderBLL.Add(modelT_Bus_WorkOrder1);
9683 9752
                                
9684 9753
                                 #endregion
@@ -15188,6 +15257,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
15188 15257
                             modelT_Bus_WorkOrder.F_IsDelete = 1;
15189 15258
                             modelT_Bus_WorkOrder.F_DeleteUser= userModel.F_UserCode;
15190 15259
                             modelT_Bus_WorkOrder.F_DeleteTime = DateTime.Now;
15260
+
15261
+
15262
+                            var str = modelT_Bus_WorkOrder.F_WorkOrderId.Split('】');
15263
+                            if (str != null && str.Length > 0)
15264
+                                modelT_Bus_WorkOrder.F_WorkOrderId = $"【{str[1]}-作废-{DateTime.Now.ToString("yyyyMMdd")}】";
15265
+
15266
+
15191 15267
                             workorderBLL.Update(modelT_Bus_WorkOrder);
15192 15268
                             #endregion
15193 15269