|
|
@@ -2,6 +2,7 @@
|
|
2
|
2
|
using CallCenterApi.Common;
|
|
3
|
3
|
using CallCenterApi.DB;
|
|
4
|
4
|
using CallCenterApi.Interface.Controllers.Base;
|
|
|
5
|
+using CallCenterAPI.WechatSDK;
|
|
5
|
6
|
using System;
|
|
6
|
7
|
using System.Collections.Generic;
|
|
7
|
8
|
using System.Data;
|
|
|
@@ -15,6 +16,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
15
|
16
|
{
|
|
16
|
17
|
BLL.T_Wo_WorkOrder_Logs blllogs = new BLL.T_Wo_WorkOrder_Logs();
|
|
17
|
18
|
BLL.T_Wo_WorkOrder bll = new BLL.T_Wo_WorkOrder();
|
|
|
19
|
+ private BLL.T_Sys_UserAccount sysUserAccountBll = new BLL.T_Sys_UserAccount();
|
|
|
20
|
+ private BLL.T_Sys_DictionaryValue dicvalueBll = new BLL.T_Sys_DictionaryValue();
|
|
18
|
21
|
|
|
19
|
22
|
#region 工单状态
|
|
20
|
23
|
public ActionResult GetWorkState()
|
|
|
@@ -820,6 +823,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
820
|
823
|
item.ToUser = users;
|
|
821
|
824
|
}
|
|
822
|
825
|
#endregion
|
|
|
826
|
+ #region 工单记录
|
|
823
|
827
|
item.WorkOrderID = orderid;
|
|
824
|
828
|
item.Type = 1; //处理
|
|
825
|
829
|
item.ToDept = clbm; //部门
|
|
|
@@ -841,9 +845,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
841
|
845
|
item.IsTimeOut = 0;
|
|
842
|
846
|
item.CreateUser = ua.F_UserCode;
|
|
843
|
847
|
item.CreateTime = DateTime.Now;
|
|
|
848
|
+ #endregion
|
|
844
|
849
|
long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
|
|
845
|
850
|
if (itemid > 0)
|
|
846
|
851
|
{
|
|
|
852
|
+ #region
|
|
847
|
853
|
string strmsg = string.Empty;
|
|
848
|
854
|
|
|
849
|
855
|
strmsg = ua.F_UserName + "完结了工单,单号:" + model.WorkOrderID;
|
|
|
@@ -876,7 +882,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
876
|
882
|
//model.Detail = detail;
|
|
877
|
883
|
|
|
878
|
884
|
new BLL.T_Wo_WorkOrder().Update(model);
|
|
879
|
|
-
|
|
|
885
|
+ #endregion
|
|
880
|
886
|
#region 消息表
|
|
881
|
887
|
Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
882
|
888
|
msg.Type = 1;//处理
|
|
|
@@ -890,6 +896,29 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
890
|
896
|
|
|
891
|
897
|
new BLL.T_Msg_List().Add(msg);
|
|
892
|
898
|
#endregion
|
|
|
899
|
+ #region 派单后发送微信推送
|
|
|
900
|
+ if (clid != 0)
|
|
|
901
|
+ {
|
|
|
902
|
+ if (model.State == 1)
|
|
|
903
|
+ {//已派单状态
|
|
|
904
|
+ var modelUser2 = sysUserAccountBll.GetModel(clid); //被指派人
|
|
|
905
|
+ if (modelUser2 != null)
|
|
|
906
|
+ {
|
|
|
907
|
+ if (!string.IsNullOrEmpty(modelUser2.F_WxOpenId))
|
|
|
908
|
+ {
|
|
|
909
|
+ var dicv = dicvalueBll.GetModel(model.TypeClass.Value);
|
|
|
910
|
+ string content = string.Empty;
|
|
|
911
|
+ if (dicv != null)
|
|
|
912
|
+ {
|
|
|
913
|
+ content = "客户" + model.Customer + "提出的" + dicv.F_Name + "类型的工单已派单,"
|
|
|
914
|
+ + "\n反馈内容为:" + (string.IsNullOrEmpty(model.Detail) ? "" : model.Detail);
|
|
|
915
|
+ }
|
|
|
916
|
+ WxHelper.SendWechatMsg(model.WorkOrderID, "派单成功!", "派单成功,请查看工单详情", content, "", orderid.ToString(), modelUser2.F_WxOpenId);
|
|
|
917
|
+ }
|
|
|
918
|
+ }
|
|
|
919
|
+ }
|
|
|
920
|
+ }
|
|
|
921
|
+ #endregion
|
|
893
|
922
|
res = Success("处理成功");
|
|
894
|
923
|
}
|
|
895
|
924
|
}
|