|
|
@@ -122,7 +122,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
122
|
122
|
#endregion
|
|
123
|
123
|
model.Createby = ua.F_UserCode;
|
|
124
|
124
|
model.CreateTime = DateTime.Now;
|
|
125
|
|
- model.F_State = 0;
|
|
|
125
|
+ //model.F_State = 0;
|
|
126
|
126
|
long n = workOrder.Add(model);
|
|
127
|
127
|
string deptname = "";
|
|
128
|
128
|
var deptmodel = departmentBLL.GetModel(ua.F_DeptId);
|
|
|
@@ -178,9 +178,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
178
|
178
|
var model = workOrder.GetModel(input.ID);
|
|
179
|
179
|
if (model == null)
|
|
180
|
180
|
return Error("查询不到此工单!");
|
|
|
181
|
+ #region 用于保存修改记录
|
|
|
182
|
+ BLL.T_Wo_WorkOrderNew blln = new BLL.T_Wo_WorkOrderNew();
|
|
|
183
|
+ Model.T_Wo_WorkOrderNew modeln = blln.GetModel(input .ID );
|
|
|
184
|
+ string con = "";
|
|
|
185
|
+ if (modeln != null)
|
|
|
186
|
+ {
|
|
|
187
|
+ con = modeln.Problem;
|
|
|
188
|
+ }
|
|
|
189
|
+ #endregion
|
|
|
190
|
+
|
|
181
|
191
|
#region 保存
|
|
182
|
192
|
model = inputtoobj(model, input, 2);
|
|
183
|
193
|
#endregion
|
|
|
194
|
+ string detail = con;
|
|
|
195
|
+ var detailutf8 = System.Web.HttpUtility.UrlDecode(model.Problem, System.Text.Encoding.UTF8);
|
|
|
196
|
+ model.Problem = detailutf8;
|
|
184
|
197
|
bool n = workOrder.Update(model);
|
|
185
|
198
|
string deptname = "";
|
|
186
|
199
|
var deptmodel = departmentBLL.GetModel(ua.F_DeptId);
|
|
|
@@ -190,6 +203,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
190
|
203
|
}
|
|
191
|
204
|
if (n)
|
|
192
|
205
|
{
|
|
|
206
|
+ WriteWorkOrderLog(model.WorkOrderID, detail, detailutf8, ua.F_UserCode, 0, "", 1, "修改工单");
|
|
193
|
207
|
AddLog((int)model.ID, (int)model.F_State, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单", (int)EnumItemType.update, (int)EnumItemOpt.update, "", 0, ua);
|
|
194
|
208
|
return Success("修改成功!");
|
|
195
|
209
|
}
|
|
|
@@ -200,6 +214,38 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
200
|
214
|
else
|
|
201
|
215
|
return Error("无操作权限!");
|
|
202
|
216
|
}
|
|
|
217
|
+
|
|
|
218
|
+ #region 添加修改日志
|
|
|
219
|
+ /// <summary>
|
|
|
220
|
+ /// 工单修改操作日志
|
|
|
221
|
+ /// </summary>
|
|
|
222
|
+ /// <param name="WorkOrderID">工单编号</param>
|
|
|
223
|
+ /// <param name="BeforeContent">之前内容</param>
|
|
|
224
|
+ /// <param name="UpdateContent">修改内容</param>
|
|
|
225
|
+ /// <param name="UserCode">修改人code</param>
|
|
|
226
|
+ /// <param name="DelUserCode">删除人code</param>
|
|
|
227
|
+ /// <param name="TypeId">类型(0添加,1修改)</param>
|
|
|
228
|
+ /// <param name="AreaId">区域id</param>
|
|
|
229
|
+ /// <param name="ProId">区域id</param>
|
|
|
230
|
+ /// <param name="StageId">项目Id</param>
|
|
|
231
|
+ /// <param name="remark">期(一期,二期 ...)</param>
|
|
|
232
|
+ public void WriteWorkOrderLog(string WorkOrderID, string BeforeContent, string UpdateContent, string UserCode, int IsDelete, string DelUserCode, int TypeId, string Remark)
|
|
|
233
|
+ {
|
|
|
234
|
+ BLL.T_Wo_WorkOrder_Logs blllogs = new BLL.T_Wo_WorkOrder_Logs();
|
|
|
235
|
+ var model = new Model.T_Wo_WorkOrder_Logs();
|
|
|
236
|
+ model.WorkOrderID = WorkOrderID; //工单编号
|
|
|
237
|
+ model.BeforeContent = BeforeContent; //之前内容
|
|
|
238
|
+ model.UpdateContent = UpdateContent; //修改内容
|
|
|
239
|
+ model.UserCode = UserCode; //修改人code
|
|
|
240
|
+ model.AddTime = DateTime.Now; //添加时间
|
|
|
241
|
+ model.IsDelete = IsDelete; //是否删除(0正常1删除)
|
|
|
242
|
+ model.DelUserCode = DelUserCode; //删除人code
|
|
|
243
|
+ model.TypeId = TypeId; //类型(0添加,1修改)
|
|
|
244
|
+ model.Remark = Remark; //备注
|
|
|
245
|
+ blllogs.Add(model);
|
|
|
246
|
+ }
|
|
|
247
|
+ #endregion
|
|
|
248
|
+
|
|
203
|
249
|
/// <summary>
|
|
204
|
250
|
/// 删除工单
|
|
205
|
251
|
/// </summary>
|
|
|
@@ -543,6 +589,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
543
|
589
|
model.Problem = input.Problem;//问题描述
|
|
544
|
590
|
model.IsDelete = 0;//问题描述
|
|
545
|
591
|
model.IsOver = input.IsOver;
|
|
|
592
|
+ model.F_State = 0;
|
|
|
593
|
+ if (input.IsOver == 1)
|
|
|
594
|
+ {
|
|
|
595
|
+ model.DealContents = input.DealContents;
|
|
|
596
|
+ model.DealBy = usercode;
|
|
|
597
|
+ model.DealTime = DateTime.Now;
|
|
|
598
|
+ model.F_State = (int)EnumWorkOrderState.finish;//2;
|
|
|
599
|
+ }
|
|
|
600
|
+
|
|
546
|
601
|
return model;
|
|
547
|
602
|
}
|
|
548
|
603
|
public long AddLog(long woid, int wostate, string content, int itemtype, int opttype, string nextuser, int nextdept, Model.T_Sys_UserAccount nowUser)
|