修改日志,增加操作模块

master
leo 3 years ago
parent e85db5311e
commit 43343af9e6

@ -733,7 +733,7 @@ namespace FactorySystemApi.Controllers
HalfMaterialTaskBll halfMaterialTaskBll = new HalfMaterialTaskBll();
halfMaterialTaskBll.CloseHalfMaterialTask(teamId, userId, (int)Constant.HalfMaterialProcessType.BOM);
OperateLogBll.Add(teamwork.FID, 2, "BOM下载成功", userId);
OperateLogBll.Add(4, teamwork.FID, 2, "BOM下载成功", userId);
HalfMaterialTeamworkBll.ChangeTeamProcess(teamwork.FID);
result = 1;
}
@ -748,7 +748,7 @@ namespace FactorySystemApi.Controllers
}
catch (Exception ex)
{
OperateLogBll.Add(teamwork.FID, 2, "BOM下载失败请稍后重试对接", userId);
OperateLogBll.Add(4, teamwork.FID, 2, "BOM下载失败请稍后重试对接", userId);
BaseBll.CreateTaskData2(teamwork.FID, userId, ((int)Constant.HalfMaterialTask.BOM).ToString());
BaseBll.UpdateTeamProcess2(teamwork.FID, (int)Constant.HalfMaterialTask., 2, 1);
ExceptionHelper.AddSystemJournal(Request, specifList[0], ex.Message, userId, "DockGetBomData");

@ -76,12 +76,13 @@ namespace FactorySystemApi.Controllers
var teamId = int.Parse(inParams["teamId"].ToString());
var type = int.Parse(inParams["type"].ToString());
var desc = inParams["desc"].ToString();
var module = inParams.ContainsKey("module") ? int.Parse(inParams["module"].ToString()) : 0;
var apiResult = new ApiResult();
return ExceptionHelper.TryReturnException(() =>
{
if (Request.Properties["token"] is ApiAuthInfo user)
{
OperateLogBll.Add(teamId, type, desc, user.FID);
OperateLogBll.Add(module, teamId, type, desc, user.FID);
}
}, apiResult, Request);
}

@ -141,7 +141,7 @@ namespace FactorySystemApi.Controllers
}
if (viewList.Find(s => string.IsNullOrEmpty(s.FGroupCode)) == null)
{
OperateLogBll.Add(viewList[0].FTeamID, (int)Constant.TaskType., "组编号申请对接成功", user.FID);
OperateLogBll.Add(2, viewList[0].FTeamID, (int)Constant.TaskType., "组编号申请对接成功", user.FID);
apiResult.Data = _taskBll.DockMaterialGroup(viewList, user.FID);
}
else
@ -151,14 +151,14 @@ namespace FactorySystemApi.Controllers
{
errorMsg += res.MATNR + " " + res.MSGTX;
}
OperateLogBll.Add(viewList[0].FTeamID, (int)Constant.TaskType., "组编号申请对接失败:" + errorMsg + "。", user.FID);
OperateLogBll.Add(2, viewList[0].FTeamID, (int)Constant.TaskType., "组编号申请对接失败:" + errorMsg + "。", user.FID);
apiResult.Data = 0;
}
}
catch (Exception ex)
{
ExceptionHelper.WriteMessage("组编号申请对接失败:" + ex.Message, 1);
OperateLogBll.Add(viewList[0].FTeamID, (int)Constant.TaskType., "组编号申请对接失败:" + ex.Message, user.FID);
OperateLogBll.Add(2, viewList[0].FTeamID, (int)Constant.TaskType., "组编号申请对接失败:" + ex.Message, user.FID);
}
}
}, apiResult, Request, inParam);

@ -588,14 +588,14 @@ namespace FactorySystemApi.Controllers
//BaseBll.CreateTaskData(teamwork.FID, userId, "14");
////成品视图物料组复核,有权限的所有
//BaseBll.CreateTaskData(teamwork.FID, userId, "12");
OperateLogBll.Add(teamwork.FID, 2, "BOM下载成功", userId);
OperateLogBll.Add(2, teamwork.FID, 2, "BOM下载成功", userId);
TeamworkBll.ChangeTeamProcess(teamwork.FID);
result = 1;
}
}
else
{
OperateLogBll.Add(teamwork.FID, 2, "BOM下载失败BOM数据为空", userId);
OperateLogBll.Add(2, teamwork.FID, 2, "BOM下载失败BOM数据为空", userId);
BaseBll.CreateTaskData(teamwork.FID, userId, ((int)Constant.TaskType.BOM).ToString());
BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType., 2, 1);
TeamworkBll.ChangeTeamProcess(teamwork.FID);
@ -603,7 +603,7 @@ namespace FactorySystemApi.Controllers
}
catch (Exception ex)
{
OperateLogBll.Add(teamwork.FID, 2, "BOM下载失败请稍后重试对接", userId);
OperateLogBll.Add(2, teamwork.FID, 2, "BOM下载失败请稍后重试对接", userId);
BaseBll.CreateTaskData(teamwork.FID, userId, ((int)Constant.TaskType.BOM).ToString());
BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType., 2, 1);
ExceptionHelper.AddSystemJournal(Request, specifList[0], ex.Message, userId, "DockGetBomData");

@ -69,11 +69,12 @@ namespace FactorySystemBll
/// <param name="type">来源类型</param>
/// <param name="desc">描述</param>
/// <param name="userId">操作人</param>
public static void Add(int teamId, int type, string desc, int userId)
public static void Add(int module, int teamId, int type, string desc, int userId)
{
var db = AppSettingsHelper.GetSqlSugar();
db.Insertable(new TFS_OperateLog
{
FModule = module,
FTeamID = teamId,
FType = type,
FDesc = desc,

Loading…
Cancel
Save