葛恒:奖惩

This commit is contained in:
2026-03-16 20:12:55 +08:00
parent 13364fcbf7
commit ab33ffa365
53 changed files with 6455 additions and 1032 deletions
@@ -74,7 +74,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
this.txtUnitName.Text = registration.ResponsibilityUnitName;
this.txtWorkAreaName.Text = registration.WorkAreaName;
this.txtRegisterTypesName.Text = registration.RegisterTypesName;
this.txtRequirements.Text = registration.Requirements;
this.txtRequirements.Text = registration.Requirements;
this.txtPunishPersonName.Text = registration.PunishPersonName;
if (registration.CheckCycle == "D")
{
this.txtType.Text = "日检";
@@ -156,6 +157,44 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
if (this.ckConfirm.SelectedValue == "True") //通过
{
register.States = "3"; //已闭环
if (!string.IsNullOrEmpty(register.CheckItemDetailId))
{
var checkSpecialDetail = Check_CheckSpecialDetailService.GetCheckSpecialDetailByCheckSpecialDetailId(register.CheckItemDetailId);
if (checkSpecialDetail != null)
{
checkSpecialDetail.CompleteStatus = true;
Check_CheckSpecialDetailService.UpdateCheckSpecialDetail(checkSpecialDetail);
var checkSpecialDetails = Check_CheckSpecialDetailService.GetCheckSpecialDetailByCheckSpecialId(checkSpecialDetail.CheckSpecialId);
var getDails = checkSpecialDetails.Where(x => x.CompleteStatus == false);
if (getDails.Count() == 0)
{
var checkSpecial = Check_CheckSpecialService.GetCheckSpecialByCheckSpecialId(checkSpecialDetail.CheckSpecialId);
checkSpecial.States = Const.State_2;
Check_CheckSpecialService.UpdateCheckSpecial(checkSpecial);
}
}
}
//确认的时候把数据添加到奖惩管理表
if (!string.IsNullOrEmpty(register.PunishPerson))
{
Model.Check_RewardAndPunish RewardAndPunish = new Model.Check_RewardAndPunish();
RewardAndPunish.RewardAndPunishID = SQLHelper.GetNewID(typeof(Model.Check_RewardAndPunish));
RewardAndPunish.ProjectId = this.CurrUser.LoginProjectId;
RewardAndPunish.Type = 2;
RewardAndPunish.ResponseUnit = register.ResponsibleUnit;
RewardAndPunish.Date = register.CheckTime;
RewardAndPunish.Description = register.RegisterDef;
RewardAndPunish.CreateMan = register.CheckManId;
RewardAndPunish.RewardAndPunishCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5",
"Check_RewardAndPunish", "RewardAndPunishCode", $"CF");
RewardAndPunish.RewardAndPunishMan = register.PunishPerson;
RewardAndPunish.TeamGroupId = BLL.PersonService.GetPersonById(register.PunishPerson).TeamGroupId;
RewardAndPunish.DataSource = "1";
RewardAndPunish.SysTemType = "1";
RewardAndPunish.HazardRegisterId = register.HazardRegisterId;
BLL.RewardAndPunishService.AddRewardAndPunish(RewardAndPunish);
}
}
else //未通过
{