20260817 积分、扣分
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -403,6 +404,34 @@ namespace FineUIPro.Web.Check.HSE
|
||||
Grid1.DataBind();
|
||||
BindGrid();
|
||||
Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success);
|
||||
|
||||
#region 删除对应的扣分流水
|
||||
var u = BLL.UserService.GetUserByUserId(model.RectificationUserId);
|
||||
if (u != null)
|
||||
{
|
||||
var scoreFlowLog = BLL.ScoreFlowLogService.GetScoreFlowLogByDataSourceId(u.IdentityCard, model.CheckDate.Year, model.CheckId);
|
||||
if (scoreFlowLog != null)
|
||||
{
|
||||
//删除人员记分流水
|
||||
var updateScoreFlowLogList = BLL.ScoreFlowLogService.GetScoreFlowLogByCompileDate(scoreFlowLog.IdentityCard, scoreFlowLog.Year, scoreFlowLog.CompileDate);
|
||||
foreach (var item in updateScoreFlowLogList)
|
||||
{
|
||||
item.CurrentScore = item.CurrentScore + (-scoreFlowLog.Score);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
BLL.ScoreFlowLogService.DeleteScoreFlowLogByDataSourceId(scoreFlowLog.IdentityCard, scoreFlowLog.Year, scoreFlowLog.DataSourceId);
|
||||
|
||||
//删除人员记分情况
|
||||
var updateScoreUserList = BLL.ScoreUserService.GetScoreUserByCompileDate(scoreFlowLog.IdentityCard, scoreFlowLog.Year, scoreFlowLog.CompileDate);
|
||||
foreach (var item in updateScoreUserList)
|
||||
{
|
||||
item.Score = item.Score + (-scoreFlowLog.Score);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
BLL.ScoreUserService.DeleteScoreUserByDataSourceId(scoreFlowLog.IdentityCard, scoreFlowLog.Year, scoreFlowLog.DataSourceId);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user