|
|
@@ -238,8 +238,38 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
238
|
238
|
modelT_Bus_WorkOrder1.F_MainDeptId = deptinfo.F_DeptId;//承办单位
|
|
239
|
239
|
workorderBLL.Update(modelT_Bus_WorkOrder1);
|
|
240
|
240
|
#endregion
|
|
|
241
|
+ #region 发送短信提醒
|
|
|
242
|
+ string mcontent = "你有新工单:" + modelT_Bus_WorkOrder.F_WorkOrderId + ",请及时查收处理。";
|
|
|
243
|
+ string workorderid = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
241
|
244
|
|
|
242
|
|
- // SMSController.AddSmS(userId, "交办了这条工单", "交办了这条工单", "110", "交办的模板id");
|
|
|
245
|
+ DataTable userlist = new BLL.T_Sys_UserAccount().GetList(" F_DeptId= '" + deptinfo.F_DeptId + "' ").Tables[0];
|
|
|
246
|
+ List<string> _lists = userlist.AsEnumerable().Select(t => t.Field<string>("F_Telephone")).ToList();
|
|
|
247
|
+
|
|
|
248
|
+ foreach (string item in _lists)
|
|
|
249
|
+ {
|
|
|
250
|
+ if (!string.IsNullOrEmpty(item))
|
|
|
251
|
+ {
|
|
|
252
|
+
|
|
|
253
|
+ if (item.Contains(","))
|
|
|
254
|
+ {
|
|
|
255
|
+ string[] strlist = item.Split(',');
|
|
|
256
|
+
|
|
|
257
|
+ foreach (string item1 in strlist)
|
|
|
258
|
+ {
|
|
|
259
|
+ bool n1 = SMSController.AddSmS(userModel.F_UserId, workorderid, mcontent, item1, "269418", workorderid);
|
|
|
260
|
+ }
|
|
|
261
|
+
|
|
|
262
|
+ }
|
|
|
263
|
+ else
|
|
|
264
|
+ {
|
|
|
265
|
+ bool n2 = SMSController.AddSmS(userModel.F_UserId, workorderid, mcontent, item, "269418", workorderid);
|
|
|
266
|
+ }
|
|
|
267
|
+ }
|
|
|
268
|
+ }
|
|
|
269
|
+
|
|
|
270
|
+
|
|
|
271
|
+
|
|
|
272
|
+ #endregion
|
|
243
|
273
|
#region 操作记录表--交办
|
|
244
|
274
|
|
|
245
|
275
|
var msgss = userinfo + " 登记并交办了工单,承办单位:" + deptinfo.F_DeptName;
|
|
|
@@ -312,7 +342,38 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
312
|
342
|
}
|
|
313
|
343
|
newids += modelT_Bus_WorkOrder1.F_WorkOrderId + ",";
|
|
314
|
344
|
|
|
315
|
|
- // SMSController.AddSmS(userId, "交办了这条工单", "交办了这条工单", "110", "交办的模板id");
|
|
|
345
|
+ #region 发送短信提醒 一个部门下会有多个用户的电话
|
|
|
346
|
+ string mcontent = "你有新工单:" + modelT_Bus_WorkOrder1.F_WorkOrderId + ",请及时查收处理。";
|
|
|
347
|
+ string workorderid = modelT_Bus_WorkOrder1.F_WorkOrderId;
|
|
|
348
|
+
|
|
|
349
|
+ DataTable userlist = new BLL.T_Sys_UserAccount().GetList(" F_DeptId= '"+ deptinfo.F_DeptId+ "' ").Tables[0];
|
|
|
350
|
+ List<string> _lists = userlist.AsEnumerable().Select(t => t.Field<string>("F_Telephone")).ToList();
|
|
|
351
|
+
|
|
|
352
|
+ foreach (string item in _lists)
|
|
|
353
|
+ {
|
|
|
354
|
+ if (!string.IsNullOrEmpty(item))
|
|
|
355
|
+ {
|
|
|
356
|
+ if (item.Contains(","))
|
|
|
357
|
+ {
|
|
|
358
|
+ string[] strlist = item.Split(',');
|
|
|
359
|
+
|
|
|
360
|
+ foreach (string item1 in strlist)
|
|
|
361
|
+ {
|
|
|
362
|
+ bool n1 = SMSController.AddSmS(userModel.F_UserId, workorderid, mcontent, item1, "269418", workorderid);
|
|
|
363
|
+ }
|
|
|
364
|
+
|
|
|
365
|
+ }
|
|
|
366
|
+ else
|
|
|
367
|
+ {
|
|
|
368
|
+ bool n2 = SMSController.AddSmS(userModel.F_UserId, workorderid, mcontent, item, "269418", workorderid);
|
|
|
369
|
+ }
|
|
|
370
|
+ }
|
|
|
371
|
+ }
|
|
|
372
|
+
|
|
|
373
|
+
|
|
|
374
|
+ #endregion
|
|
|
375
|
+
|
|
|
376
|
+
|
|
316
|
377
|
}
|
|
317
|
378
|
newids = newids.Trim(','); deptname = deptname.Trim(',');
|
|
318
|
379
|
var msgs = "";
|
|
|
@@ -2683,7 +2744,35 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2683
|
2744
|
workorderBLL.Update(modelT_Bus_WorkOrder1);
|
|
2684
|
2745
|
#endregion
|
|
2685
|
2746
|
|
|
2686
|
|
- // SMSController.AddSmS(userId, "交办了这条工单", "交办了这条工单", "110", "交办的模板id");
|
|
|
2747
|
+ #region 发送短信提醒
|
|
|
2748
|
+ string mcontent = "你有新工单:" + modelT_Bus_WorkOrder.F_WorkOrderId + ",请及时查收处理。";
|
|
|
2749
|
+ string workorderid = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
|
2750
|
+ DataTable userlist = new BLL.T_Sys_UserAccount().GetList(" F_DeptId= '" + deptinfo.F_DeptId + "' ").Tables[0];
|
|
|
2751
|
+ List<string> _lists = userlist.AsEnumerable().Select(t => t.Field<string>("F_Telephone")).ToList();
|
|
|
2752
|
+
|
|
|
2753
|
+ foreach (string item in _lists)
|
|
|
2754
|
+ {
|
|
|
2755
|
+ if (!string.IsNullOrEmpty(item))
|
|
|
2756
|
+ {
|
|
|
2757
|
+ if (item.Contains(","))
|
|
|
2758
|
+ {
|
|
|
2759
|
+ string[] strlist = item.Split(',');
|
|
|
2760
|
+
|
|
|
2761
|
+ foreach (string item1 in strlist)
|
|
|
2762
|
+ {
|
|
|
2763
|
+ bool n1 = SMSController.AddSmS(userModel.F_UserId, workorderid, mcontent, item1, "269418", workorderid);
|
|
|
2764
|
+ }
|
|
|
2765
|
+
|
|
|
2766
|
+ }
|
|
|
2767
|
+ else
|
|
|
2768
|
+ {
|
|
|
2769
|
+ bool n2 = SMSController.AddSmS(userModel.F_UserId, workorderid, mcontent, item, "269418", workorderid);
|
|
|
2770
|
+ }
|
|
|
2771
|
+ }
|
|
|
2772
|
+
|
|
|
2773
|
+ }
|
|
|
2774
|
+
|
|
|
2775
|
+ #endregion
|
|
2687
|
2776
|
#region 操作记录表--交办
|
|
2688
|
2777
|
|
|
2689
|
2778
|
var msgss = userinfo + " 登记并交办了工单,承办单位:" + deptinfo.F_DeptName;
|
|
|
@@ -2729,8 +2818,39 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2729
|
2818
|
modelT_Bus_AssignedInfo.F_IsStandard = 0;
|
|
2730
|
2819
|
assignBLL.Add(modelT_Bus_AssignedInfo);
|
|
2731
|
2820
|
|
|
|
2821
|
+ #region 发送短信提醒
|
|
|
2822
|
+ string mcontent = "你有新工单:" + modelT_Bus_WorkOrder1.F_WorkOrderId + ",请及时查收处理。";
|
|
|
2823
|
+ string workorderid = modelT_Bus_WorkOrder1.F_WorkOrderId;
|
|
|
2824
|
+
|
|
|
2825
|
+ DataTable userlist = new BLL.T_Sys_UserAccount().GetList(" F_DeptId= '" + deptinfo.F_DeptId + "' ").Tables[0];
|
|
|
2826
|
+ List<string> _lists = userlist.AsEnumerable().Select(t => t.Field<string>("F_Telephone")).ToList();
|
|
|
2827
|
+
|
|
|
2828
|
+ foreach (string item in _lists)
|
|
|
2829
|
+ {
|
|
|
2830
|
+ if (!string.IsNullOrEmpty(item))
|
|
|
2831
|
+ {
|
|
|
2832
|
+ if (item.Contains(","))
|
|
|
2833
|
+ {
|
|
|
2834
|
+ string[] strlist = item.Split(',');
|
|
|
2835
|
+
|
|
|
2836
|
+ foreach (string item1 in strlist)
|
|
|
2837
|
+ {
|
|
|
2838
|
+ bool n = SMSController.AddSmS(userModel.F_UserId, workorderid, mcontent, item1, "269418", workorderid);
|
|
|
2839
|
+ }
|
|
|
2840
|
+
|
|
|
2841
|
+ }
|
|
|
2842
|
+ else
|
|
|
2843
|
+ {
|
|
|
2844
|
+ bool n = SMSController.AddSmS(userModel.F_UserId, workorderid, mcontent, item, "269418", workorderid);
|
|
|
2845
|
+ }
|
|
|
2846
|
+ }
|
|
|
2847
|
+ }
|
|
|
2848
|
+
|
|
|
2849
|
+
|
|
2732
|
2850
|
#endregion
|
|
2733
|
|
-
|
|
|
2851
|
+
|
|
|
2852
|
+ #endregion
|
|
|
2853
|
+
|
|
2734
|
2854
|
if (modelT_Bus_AssignedInfo != null && modelT_Bus_AssignedInfo.F_State == 1)
|
|
2735
|
2855
|
{
|
|
2736
|
2856
|
#region 保存工单信息
|
|
|
@@ -2756,7 +2876,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2756
|
2876
|
}
|
|
2757
|
2877
|
newids += modelT_Bus_WorkOrder1.F_WorkOrderId + ",";
|
|
2758
|
2878
|
|
|
2759
|
|
- // SMSController.AddSmS(userId, "交办了这条工单", "交办了这条工单", "110", "交办的模板id");
|
|
|
2879
|
+
|
|
2760
|
2880
|
}
|
|
2761
|
2881
|
newids = newids.Trim(','); deptname = deptname.Trim(',');
|
|
2762
|
2882
|
var msgs = "";
|
|
|
@@ -5342,7 +5462,40 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5342
|
5462
|
modelT_Bus_RemindRecord.F_CreateUser = userModel.F_UserCode;
|
|
5343
|
5463
|
modelT_Bus_RemindRecord.F_CreateTime = DateTime.Now;
|
|
5344
|
5464
|
new BLL.T_Bus_RemindRecord().Add(modelT_Bus_RemindRecord);
|
|
5345
|
|
- // SMSController.AddSmS(userId, "催办了这条工单", "催办了这条工单", "110", "催办的模板id");
|
|
|
5465
|
+
|
|
|
5466
|
+ #region 发送短信提醒
|
|
|
5467
|
+ int depid = (int)modelT_Bus_AssignedInfo.F_MainDeptId;
|
|
|
5468
|
+
|
|
|
5469
|
+ string mcontent = "你有督办工单:" + modelT_Bus_WorkOrder.F_WorkOrderId + ",请及时查收处理。";
|
|
|
5470
|
+ string mworkorderid = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
|
5471
|
+ DataTable userlist = new BLL.T_Sys_UserAccount().GetList(" F_DeptId= '" + depid + "' ").Tables[0];
|
|
|
5472
|
+ List<string> _lists = userlist.AsEnumerable().Select(t => t.Field<string>("F_Telephone")).ToList();
|
|
|
5473
|
+
|
|
|
5474
|
+ foreach (string item in _lists)
|
|
|
5475
|
+ {
|
|
|
5476
|
+ if (!string.IsNullOrEmpty(item))
|
|
|
5477
|
+ {
|
|
|
5478
|
+ if (item.Contains(","))
|
|
|
5479
|
+ {
|
|
|
5480
|
+ string[] strlist = item.Split(',');
|
|
|
5481
|
+
|
|
|
5482
|
+ foreach (string item1 in strlist)
|
|
|
5483
|
+ {
|
|
|
5484
|
+ bool n = SMSController.AddSmS(userModel.F_UserId, mworkorderid, mcontent, item1, "269420", mworkorderid);
|
|
|
5485
|
+ }
|
|
|
5486
|
+
|
|
|
5487
|
+ }
|
|
|
5488
|
+ else
|
|
|
5489
|
+ {
|
|
|
5490
|
+ bool n = SMSController.AddSmS(userModel.F_UserId, mworkorderid, mcontent, item, "269420", mworkorderid);
|
|
|
5491
|
+ }
|
|
|
5492
|
+ }
|
|
|
5493
|
+ }
|
|
|
5494
|
+
|
|
|
5495
|
+ // bool n = SMSController.AddSmS(userModel.F_UserId, mworkorderid, mcontent, deptinfo.F_DeptPhone, "269420", mworkorderid);
|
|
|
5496
|
+
|
|
|
5497
|
+ #endregion
|
|
|
5498
|
+
|
|
5346
|
5499
|
|
|
5347
|
5500
|
}
|
|
5348
|
5501
|
else if (type == 2)
|
|
|
@@ -5354,7 +5507,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5354
|
5507
|
oldrecord.F_Content = overseeopinion;
|
|
5355
|
5508
|
oldrecord.F_CreateTime = DateTime.Now;
|
|
5356
|
5509
|
remindBLL.Update(oldrecord);
|
|
5357
|
|
- // SMSController.AddSmS(userId, "督办了这条工单", "督办了这条工单", "110", "督办的模板id");
|
|
|
5510
|
+
|
|
5358
|
5511
|
|
|
5359
|
5512
|
}
|
|
5360
|
5513
|
else
|
|
|
@@ -5371,7 +5524,45 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5371
|
5524
|
modelT_Bus_RemindRecord.F_CreateUser = userModel.F_UserCode;
|
|
5372
|
5525
|
modelT_Bus_RemindRecord.F_CreateTime = DateTime.Now;
|
|
5373
|
5526
|
new BLL.T_Bus_RemindRecord().Add(modelT_Bus_RemindRecord);
|
|
5374
|
|
- // SMSController.AddSmS(userId, "催办了这条工单", "催办了这条工单", "110", "催办的模板id");
|
|
|
5527
|
+
|
|
|
5528
|
+
|
|
|
5529
|
+
|
|
|
5530
|
+ #region 发送短信提醒
|
|
|
5531
|
+ int depid = (int)modelT_Bus_AssignedInfo.F_MainDeptId;
|
|
|
5532
|
+
|
|
|
5533
|
+ string mcontent = "你有催办工单:" + modelT_Bus_WorkOrder.F_WorkOrderId + ",请及时查收处理。";
|
|
|
5534
|
+ string mworkorderid = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
|
5535
|
+ DataTable userlist = new BLL.T_Sys_UserAccount().GetList(" F_DeptId= '" + depid + "' ").Tables[0];
|
|
|
5536
|
+ List<string> _lists = userlist.AsEnumerable().Select(t => t.Field<string>("F_Telephone")).ToList();
|
|
|
5537
|
+
|
|
|
5538
|
+
|
|
|
5539
|
+ foreach (string item in _lists)
|
|
|
5540
|
+ {
|
|
|
5541
|
+ if (!string.IsNullOrEmpty(item))
|
|
|
5542
|
+ {
|
|
|
5543
|
+ if (item.Contains(","))
|
|
|
5544
|
+ {
|
|
|
5545
|
+ string[] strlist = item.Split(',');
|
|
|
5546
|
+
|
|
|
5547
|
+ foreach (string item1 in strlist)
|
|
|
5548
|
+ {
|
|
|
5549
|
+ bool n = SMSController.AddSmS(userModel.F_UserId, mworkorderid, mcontent, item1, "270565", mworkorderid);
|
|
|
5550
|
+ }
|
|
|
5551
|
+
|
|
|
5552
|
+ }
|
|
|
5553
|
+ else
|
|
|
5554
|
+ {
|
|
|
5555
|
+ bool n = SMSController.AddSmS(userModel.F_UserId, mworkorderid, mcontent, item, "270565", workorderid);
|
|
|
5556
|
+ }
|
|
|
5557
|
+ }
|
|
|
5558
|
+ }
|
|
|
5559
|
+
|
|
|
5560
|
+ #endregion
|
|
|
5561
|
+
|
|
|
5562
|
+
|
|
|
5563
|
+
|
|
|
5564
|
+
|
|
|
5565
|
+
|
|
5375
|
5566
|
}
|
|
5376
|
5567
|
}
|
|
5377
|
5568
|
#endregion
|
|
|
@@ -5379,9 +5570,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5379
|
5570
|
#region 插入操作记录
|
|
5380
|
5571
|
string typename = "督办";
|
|
5381
|
5572
|
if (type == 2) { typename = "催办"; }
|
|
5382
|
|
- //if (type == 1 && state == 0) { typename = "提交督办"; }
|
|
5383
|
|
- //if (type == 1 && state == 1) { typename = "督办"; }
|
|
5384
|
|
- //if (type == 1 && state == 2) { typename = "退回督办"; }
|
|
|
5573
|
+
|
|
5385
|
5574
|
Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
5386
|
5575
|
oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
5387
|
5576
|
oper.F_AssignedId = modelT_Bus_AssignedInfo.F_Id;
|
|
|
@@ -5445,8 +5634,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5445
|
5634
|
return Error("办理时限不能小于当前时间");
|
|
5446
|
5635
|
}
|
|
5447
|
5636
|
|
|
5448
|
|
- //if (modelT_Bus_WorkOrder.F_WorkState == 7)
|
|
5449
|
|
- //if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.visit)
|
|
|
5637
|
+
|
|
5450
|
5638
|
if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.resubmit)
|
|
5451
|
5639
|
{
|
|
5452
|
5640
|
using (TransactionScope trans = new TransactionScope())
|
|
|
@@ -5490,6 +5678,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5490
|
5678
|
workorderBLL.Update(modelT_Bus_WorkOrder);
|
|
5491
|
5679
|
#endregion
|
|
5492
|
5680
|
|
|
|
5681
|
+
|
|
|
5682
|
+
|
|
|
5683
|
+
|
|
|
5684
|
+
|
|
|
5685
|
+
|
|
5493
|
5686
|
#region 插入操作记录
|
|
5494
|
5687
|
Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
5495
|
5688
|
oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
|
@@ -5498,7 +5691,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5498
|
5691
|
|
|
5499
|
5692
|
string deptname = "";
|
|
5500
|
5693
|
#region 20191021调整为多个承办单位时调整
|
|
5501
|
|
- //var deptinfo = new BLL.T_Sys_Department().GetModel(modelT_Bus_AssignedInfo.F_MainDeptId.Value);
|
|
5502
|
5694
|
var deptinfo = new BLL.T_Sys_Department().GetModel(maindeptid);
|
|
5503
|
5695
|
if (deptinfo != null) { deptname = deptinfo.F_DeptName; }
|
|
5504
|
5696
|
#endregion
|