|
|
@@ -984,12 +984,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
984
|
984
|
{
|
|
985
|
985
|
|
|
986
|
986
|
#region 获取处理人工号 20180514 郑兵兵 无需走流程,所以注释
|
|
987
|
|
- //string clgh = string.Empty;
|
|
988
|
|
- //if (clbm != 0)
|
|
|
987
|
+ //int depid = 0; //部门id
|
|
|
988
|
+ ////string clgh = string.Empty;
|
|
|
989
|
+ //if (!string.IsNullOrEmpty(clbm)) //if (clbm != 0)
|
|
989
|
990
|
//{
|
|
990
|
|
- // if (clid != 0)
|
|
|
991
|
+ // var model_Dep = new BLL.T_Sys_Department().GetModel(clbm);
|
|
|
992
|
+ // depid = model_Dep != null ? model_Dep.F_DeptId : 0;
|
|
|
993
|
+ // if (!string.IsNullOrEmpty(clgh)) //if (clid != 0)
|
|
991
|
994
|
// {
|
|
992
|
|
- // Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
|
|
|
995
|
+ // //Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
|
|
|
996
|
+ // Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModelByName(clgh);
|
|
993
|
997
|
// if (clus != null)
|
|
994
|
998
|
// {
|
|
995
|
999
|
// clgh = clus.F_UserCode;
|
|
|
@@ -998,7 +1002,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
998
|
1002
|
// else
|
|
999
|
1003
|
// {
|
|
1000
|
1004
|
// string users = string.Empty;
|
|
1001
|
|
- // var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
|
|
|
1005
|
+ // //var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
|
|
|
1006
|
+ // var list = new BLL.T_Sys_UserAccount().GetModelList(" dbo.GetDeptName(F_DeptId)='" + clbm + "'");
|
|
1002
|
1007
|
// foreach (var l in list)
|
|
1003
|
1008
|
// {
|
|
1004
|
1009
|
// if (string.IsNullOrEmpty(users))
|
|
|
@@ -1070,11 +1075,69 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1070
|
1075
|
|
|
1071
|
1076
|
var rerere = new BLL.T_Wo_WorkOrder().Update(model);
|
|
1072
|
1077
|
#region 无需走流程
|
|
|
1078
|
+ var item = new Model.T_Wo_WorkOrderItem();
|
|
|
1079
|
+ #region 获取接收人
|
|
|
1080
|
+ int depid = 0; //部门id
|
|
|
1081
|
+ var model_Dep = new BLL.T_Sys_Department().GetModel(clbm);
|
|
|
1082
|
+ depid = model_Dep != null ? model_Dep.F_DeptId : 0;
|
|
|
1083
|
+ if (!string.IsNullOrEmpty(clgh)) //if (clid != 0)
|
|
|
1084
|
+ {
|
|
|
1085
|
+ //Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
|
|
|
1086
|
+ Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModelByName(clgh);
|
|
|
1087
|
+ if (clus != null)
|
|
|
1088
|
+ {
|
|
|
1089
|
+ item.ToUser = clus.F_UserCode;
|
|
|
1090
|
+ }
|
|
|
1091
|
+ }
|
|
|
1092
|
+ else
|
|
|
1093
|
+ {
|
|
|
1094
|
+ string users = string.Empty;
|
|
|
1095
|
+ var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
|
|
|
1096
|
+ foreach (var l in list)
|
|
|
1097
|
+ {
|
|
|
1098
|
+ if (string.IsNullOrEmpty(users))
|
|
|
1099
|
+ {
|
|
|
1100
|
+ users = l.F_UserCode;
|
|
|
1101
|
+ }
|
|
|
1102
|
+ else
|
|
|
1103
|
+ {
|
|
|
1104
|
+ users = users + "," + l.F_UserCode;
|
|
|
1105
|
+ }
|
|
|
1106
|
+ }
|
|
|
1107
|
+ item.ToUser = users;
|
|
|
1108
|
+ }
|
|
|
1109
|
+ #endregion
|
|
|
1110
|
+ item.WorkOrderID = orderid;
|
|
|
1111
|
+ item.Type = 1; //处理
|
|
|
1112
|
+ item.ToDept = depid; //部门clbm
|
|
|
1113
|
+ //item.ToUser = clus != null ? clus.F_UserCode : ""; //接收人
|
|
|
1114
|
+ item.Detail = cont;
|
|
|
1115
|
+ item.IsDel = 0;
|
|
|
1116
|
+ //转派
|
|
|
1117
|
+ if (isend == 0)
|
|
|
1118
|
+ {
|
|
|
1119
|
+ item.State = 0;
|
|
|
1120
|
+ item.IsLast = 0;
|
|
|
1121
|
+ }
|
|
|
1122
|
+ else
|
|
|
1123
|
+ {
|
|
|
1124
|
+ item.State = 2;
|
|
|
1125
|
+ item.IsLast = 1;
|
|
|
1126
|
+ item.DealUser = ua.F_UserCode;
|
|
|
1127
|
+ item.DealTime = DateTime.Now;
|
|
|
1128
|
+ }
|
|
|
1129
|
+ item.IsStart = 0;
|
|
|
1130
|
+ item.IsTimeOut = 0;
|
|
|
1131
|
+ item.CreateUser = ua.F_UserCode;
|
|
|
1132
|
+ item.CreateTime = DateTime.Now;
|
|
|
1133
|
+ long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
|
|
|
1134
|
+
|
|
|
1135
|
+
|
|
1073
|
1136
|
//int n = new BLL.T_Wo_WorkOrder().DealWorkOrder1(orderid, isend
|
|
1074
|
1137
|
// , model.Customer, model.CustomerTel, inqtimes, model.Inquser
|
|
1075
|
1138
|
// , model.County, model.Address, model.Detail, model.Clcontent, model.Answer, model.Remark
|
|
1076
|
|
- // , clbm, clgh, ua.F_UserCode, model.InfoType, model.InfoTypeID.Value, model.UnitID.Value, model.Unit);
|
|
1077
|
|
- //if (n > 0)
|
|
|
1139
|
+ // , depid, clgh, ua.F_UserCode, model.InfoType, model.InfoTypeID??0, model.UnitID??0, model.Unit);
|
|
|
1140
|
+ ////if (n > 0)
|
|
1078
|
1141
|
#endregion
|
|
1079
|
1142
|
|
|
1080
|
1143
|
if (rerere)
|