This commit is contained in:
geh
2026-03-23 15:22:29 +08:00
parent 94584d242b
commit c38590add8
173 changed files with 19679 additions and 4413 deletions
@@ -34,6 +34,15 @@ namespace BLL
newRewardAndPunish.Money = RewardAndPunish.Money;
newRewardAndPunish.Type = RewardAndPunish.Type;
newRewardAndPunish.ResponseUnit = RewardAndPunish.ResponseUnit;
newRewardAndPunish.NoticeUnit = RewardAndPunish.NoticeUnit;
newRewardAndPunish.RewardAndPunishType = RewardAndPunish.RewardAndPunishType;
newRewardAndPunish.RewardAndPunishCode = RewardAndPunish.RewardAndPunishCode;
newRewardAndPunish.RewardAndPunishMan = RewardAndPunish.RewardAndPunishMan;
newRewardAndPunish.TeamGroupId = RewardAndPunish.TeamGroupId;
newRewardAndPunish.Remark = RewardAndPunish.Remark;
newRewardAndPunish.DataSource = RewardAndPunish.DataSource;
newRewardAndPunish.HazardRegisterId = RewardAndPunish.HazardRegisterId;
newRewardAndPunish.SysTemType = RewardAndPunish.SysTemType;
db.Check_RewardAndPunish.InsertOnSubmit(newRewardAndPunish);
db.SubmitChanges();
}
@@ -56,6 +65,15 @@ namespace BLL
newRewardAndPunish.Money = RewardAndPunish.Money;
newRewardAndPunish.Type = RewardAndPunish.Type;
newRewardAndPunish.ResponseUnit = RewardAndPunish.ResponseUnit;
newRewardAndPunish.NoticeUnit = RewardAndPunish.NoticeUnit;
newRewardAndPunish.RewardAndPunishType = RewardAndPunish.RewardAndPunishType;
newRewardAndPunish.RewardAndPunishCode = RewardAndPunish.RewardAndPunishCode;
newRewardAndPunish.RewardAndPunishMan = RewardAndPunish.RewardAndPunishMan;
newRewardAndPunish.TeamGroupId = RewardAndPunish.TeamGroupId;
newRewardAndPunish.Remark = RewardAndPunish.Remark;
newRewardAndPunish.DataSource = RewardAndPunish.DataSource;
newRewardAndPunish.HazardRegisterId = RewardAndPunish.HazardRegisterId;
newRewardAndPunish.SysTemType = RewardAndPunish.SysTemType;
db.SubmitChanges();
}
@@ -87,6 +105,39 @@ namespace BLL
dropName.DataBind();
Funs.FineUIPleaseSelect(dropName);
}
/// <summary>
/// 根据巡检主键删除
/// </summary>
/// <param name="checkerId"></param>
public static void DeleteRewardAndPunishByHazardRegisterId(string HazardRegisterId)
{
Model.SUBQHSEDB db = Funs.DB;
Model.Check_RewardAndPunish RewardAndPunish = db.Check_RewardAndPunish.FirstOrDefault(e => e.HazardRegisterId == HazardRegisterId);
if (RewardAndPunish != null)
{
db.Check_RewardAndPunish.DeleteOnSubmit(RewardAndPunish);
db.SubmitChanges();
}
}
public static string getCode(string SysTemType, string type)
{
var maxCode = Funs.DB.Check_RewardAndPunish
.Where(x => x.SysTemType == SysTemType && x.RewardAndPunishCode.Contains(type))
.Max(x => x.RewardAndPunishCode);
if (maxCode != null)
{
//取最后5 位
var code = maxCode.Substring(maxCode.Length - 5);
var codeNum = int.Parse(code);
codeNum++;
return $"{type}{codeNum:D5}";
}
else
{
return $"{type}00001";
}
}
}
}