Просмотр исходного кода

综合保障中心 编辑时 没有转派的操作,只修改基础的信息

liyuanyuan лет назад: 3
Родитель
Сommit
b1a15c74ae
1 измененных файлов с 59 добавлено и 51 удалено
  1. 59 51
      RMYY_CallCenter_Api/Controllers/FaultRepairController.cs

+ 59 - 51
RMYY_CallCenter_Api/Controllers/FaultRepairController.cs

@@ -250,64 +250,72 @@ namespace RMYY_CallCenter_Api.Controllers
250 250
             model.F_Content = input.Content;
251 251
             model.F_PlaceOfRepair = input.PlaceOfRepair;
252 252
             model.F_File = input.File;
253
-            bool addassignlog = false;
253
+          //  bool addassignlog = false;
254 254
 
255 255
             //综合保障中心没有直接结束的按钮
256
-            if (input.IsEnd == 1)
257
-            {
258
-                model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.finish;
259
-                model.F_MaintenanceDept = User.F_DeptId.ToString();
260
-                model.F_Endtime = DateTime.Now;
261
-                model.F_Maintenancer = User.F_UserCode;
262
-            }
263
-        
264
-            else if (!string.IsNullOrEmpty(input.MaintenanceDept))
265
-            {
266
-                if (   string.IsNullOrEmpty(model.F_MaintenanceDept))  
267
-                {
268
-                    model.F_AssignTime = DateTime.Now;
269
-                    model.F_AssignUser = User.F_UserCode;
270
-                    List<Model.T_Sys_GongDan> listgd = gdbll.GetModelList(" F_GDId='" + model.F_WorkOrderCategory + "'");
271
-                    int timeout = listgd.First().F_TimeOut;
272
-                    model.F_Deadline = DateTime.Now.AddHours(timeout);
273
-                    model.F_MaintenanceDept = input.MaintenanceDept;
274
-                    if (!string .IsNullOrEmpty(input.Maintenancer))
275
-                    model.F_Maintenancer = input.Maintenancer;
276
-                    else
277
-                    {
278
-                        var user = GetBeOnDuty(input.MaintenanceDept);
279
-                        if (user != null && user.Count > 1)
280
-                        {
281
-                            model.F_Maintenancer = user[0];
282
-                        }
283
-                        else
284
-                        {
285
-                            return Error("请选择指派人员");
286
-                        }
287
-                    }
288
-                    model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.receive;
289
-                    addassignlog = true;
290
-                }
291
-              
292
-            }
293
-            else
294
-            {
295
-                model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.neworder;
296
-            }
256
+            #region  综合保障中心 编辑时 没有转派的操作,只修改基础的信息
257
+            //if (input.IsEnd == 1)
258
+            //{
259
+            //    model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.finish;
260
+            //    model.F_MaintenanceDept = User.F_DeptId.ToString();
261
+            //    model.F_Endtime = DateTime.Now;
262
+            //    model.F_Maintenancer = User.F_UserCode;
263
+            //}
264
+
265
+            //else if (!string.IsNullOrEmpty(input.MaintenanceDept))
266
+            //{
267
+            //    if (   string.IsNullOrEmpty(model.F_MaintenanceDept))  
268
+            //    {
269
+            //        model.F_AssignTime = DateTime.Now;
270
+            //        model.F_AssignUser = User.F_UserCode;
271
+            //        List<Model.T_Sys_GongDan> listgd = gdbll.GetModelList(" F_GDId='" + model.F_WorkOrderCategory + "'");
272
+            //        int timeout = listgd.First().F_TimeOut;
273
+            //        model.F_Deadline = DateTime.Now.AddHours(timeout);
274
+            //        model.F_MaintenanceDept = input.MaintenanceDept;
275
+            //        if (!string .IsNullOrEmpty(input.Maintenancer))
276
+            //        model.F_Maintenancer = input.Maintenancer;
277
+            //        else
278
+            //        {
279
+            //            var user = GetBeOnDuty(input.MaintenanceDept);
280
+            //            if (user != null && user.Count > 1)
281
+            //            {
282
+            //                model.F_Maintenancer = user[0];
283
+            //            }
284
+            //            else
285
+            //            {
286
+            //                return Error("请选择指派人员");
287
+            //            }
288
+            //        }
289
+            //        model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.receive;
290
+            //        addassignlog = true;
291
+            //    }
292
+
293
+            //}
294
+            //else
295
+            //{
296
+            //    model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.neworder;
297
+            //}
298
+
299
+
300
+            #endregion
301
+
297 302
 
298 303
             model.F_UpdateTime = DateTime.Now;
299 304
           
300 305
 
301 306
             if (baseBll.Update(model) )
302
-            {                   
303
-                if (addassignlog)
304
-                {
305
-                    AddAssignlog(model.F_WorkOrderCode, input.MaintenanceDept,  input.Maintenancer);
306
-                }
307
-                if (input.IsEnd == 1)
308
-                {
309
-                    AddOperatorLog("完结了工单", (int)EnumOperatorType.dealed, model.F_WorkOrderCode);
310
-                }
307
+            {
308
+                //if (addassignlog)
309
+                //{
310
+                //    AddAssignlog(model.F_WorkOrderCode, input.MaintenanceDept,  input.Maintenancer);
311
+                //}
312
+                //if (input.IsEnd == 1)
313
+                //{
314
+                //    AddOperatorLog("完结了工单", (int)EnumOperatorType.dealed, model.F_WorkOrderCode);
315
+                //}
316
+
317
+                AddOperatorLog(User.F_UserName + "编辑了工单", (int)EnumOperatorType.update, model.F_WorkOrderCode);
318
+
311 319
                 return Success("编辑成功!");
312 320
             }
313 321
             else return Error("编辑失败!");