提交定制会内容

This commit is contained in:
2025-06-19 18:59:39 +08:00
parent 6be8d160e0
commit e1eb091f3b
150 changed files with 24036 additions and 582 deletions
@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using FineUIPro;
using Model;
namespace BLL
@@ -204,6 +205,7 @@ namespace BLL
newHazardSelectedItem.PromptTime = hazardSelectedItem.PromptTime;
newHazardSelectedItem.Remark = hazardSelectedItem.Remark;
newHazardSelectedItem.WorkStage = hazardSelectedItem.WorkStage;
newHazardSelectedItem.IsUpdate = null;
db.SubmitChanges();
}
@@ -219,8 +221,25 @@ namespace BLL
var q = (from x in db.Hazard_HazardSelectedItem where x.HazardListId == hazardListId select x).ToList();
if (q.Count() > 0)
{
foreach (var item in q)
{
if (item.IsUpdate == true)
{
var returndata = Project_HSSEData_HSSEService.DeleteProjectSecurityRiskData(item.HazardId);
if (returndata.code == 1)
{
}
else
{
Alert.ShowInTop("记录已上报集团,集团删除失败,无法删除本地数据!", MessageBoxIcon.Warning);
return;
}
}
}
db.Hazard_HazardSelectedItem.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
}
@@ -238,7 +238,7 @@ namespace BLL
newHazardRegister.RegisterTypes3Id = hazardRegister.RegisterTypes3Id;
newHazardRegister.RegisterTypes4Id = hazardRegister.RegisterTypes4Id;
newHazardRegister.CCManIds = hazardRegister.CCManIds;
newHazardRegister.IsUpdate = null;
newHazardRegister.WorkPackageId = newHazardRegister.WorkPackageId;
newHazardRegister.WorkPackageName = newHazardRegister.WorkPackageName;
//把附件表的路径复制过来
@@ -205,6 +205,7 @@ namespace BLL
newLicenseManager.StartDate = licenseManager.StartDate;
newLicenseManager.EndDate = licenseManager.EndDate;
newLicenseManager.WorkStates = licenseManager.WorkStates;
newLicenseManager.IsUpdate = null;
db.SubmitChanges();
}
}
@@ -65,6 +65,7 @@ namespace BLL
newLargerHazard.Remark = largerHazard.Remark;
newLargerHazard.States = largerHazard.States;
newLargerHazard.Descriptions = largerHazard.Descriptions;
newLargerHazard.IsUpdate = null;
db.SubmitChanges();
}
}
+18 -13
View File
@@ -1,5 +1,7 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
{
@@ -8,7 +10,7 @@ namespace BLL
/// </summary>
public static class RectifyService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取安全隐患
@@ -24,10 +26,11 @@ namespace BLL
/// 根据上一节点id获取安全隐患
/// </summary>
/// <param name="supRectifyId"></param>
/// <param name="type"></param>
/// <returns></returns>
public static List<Model.Technique_Rectify> GetRectifyBySupRectifyId(string supRectifyId)
public static List<Model.Technique_Rectify> GetRectifyBySupRectifyId(string supRectifyId, string type)
{
return (from x in Funs.DB.Technique_Rectify where x.SupRectifyId == supRectifyId select x).ToList();
return (from x in Funs.DB.Technique_Rectify where x.SupRectifyId == supRectifyId && x.RectifyType == type select x).ToList();
}
/// <summary>
@@ -40,6 +43,7 @@ namespace BLL
Model.Technique_Rectify newRectify = new Model.Technique_Rectify
{
RectifyId = rectify.RectifyId,
RectifyType = rectify.RectifyType,
RectifyCode = rectify.RectifyCode,
RectifyName = rectify.RectifyName,
SupRectifyId = rectify.SupRectifyId,
@@ -60,6 +64,7 @@ namespace BLL
Model.Technique_Rectify newRectify = db.Technique_Rectify.FirstOrDefault(e => e.RectifyId == rectify.RectifyId);
if (newRectify != null)
{
newRectify.RectifyType = rectify.RectifyType;
newRectify.RectifyCode = rectify.RectifyCode;
newRectify.RectifyName = rectify.RectifyName;
newRectify.SupRectifyId = rectify.SupRectifyId;
@@ -109,7 +114,7 @@ namespace BLL
}
else
{
var supItemSetCount = BLL.RectifyService.GetRectifyBySupRectifyId(rectifyId);
var supItemSetCount = BLL.RectifyService.GetRectifyBySupRectifyId(rectifyId, rectify.RectifyType);
if (supItemSetCount.Count() > 0)
{
isDelete = false;
@@ -118,7 +123,15 @@ namespace BLL
}
return isDelete;
}
public static List<Model.Technique_Rectify> GetRectifyList()
{
var q = from x in Funs.DB.Technique_Rectify
where x.SupRectifyId == "0"
select x;
return q.ToList();
}
public static void InitRectifyDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string itemText)
{
dropName.DataValueField = "RectifyName";
@@ -130,13 +143,5 @@ namespace BLL
Funs.FineUIPleaseSelect(dropName, itemText);
}
}
public static List<Model.Technique_Rectify> GetRectifyList()
{
var q = from x in Funs.DB.Technique_Rectify
where x.SupRectifyId == "0"
select x;
return q.ToList();
}
}
}