小程序接口修改

This commit is contained in:
2023-07-11 16:32:16 +08:00
parent ca5c3fe9a7
commit 4449a7754f
68 changed files with 4634 additions and 2984 deletions
@@ -122,12 +122,28 @@ namespace BLL
db.SubmitChanges();
}
}
/// <summary>
/// 根据专项检查ID删除一条专项检查明细信息
/// </summary>
/// <param name="checkSpecialDetailId"></param>
public static void DeleteCheckSpecialDetailById(string checkSpecialDetailId)
public static void DeleteCheckSpecialDetailsForApi(string checkSpecialId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var q = (from x in db.Check_CheckSpecialDetail where x.CheckSpecialId == checkSpecialId select x).ToList();
if (q != null)
{
//foreach (var item in q)
//{
// ////删除附件表
// BLL.CommonService.DeleteAttachFileById(item.CheckSpecialDetailId);
//}
db.Check_CheckSpecialDetail.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据专项检查ID删除一条专项检查明细信息
/// </summary>
/// <param name="checkSpecialDetailId"></param>
public static void DeleteCheckSpecialDetailById(string checkSpecialDetailId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Check_CheckSpecialDetail where x.CheckSpecialDetailId == checkSpecialDetailId select x).FirstOrDefault();
+197 -81
View File
@@ -120,12 +120,36 @@ namespace BLL
db.SubmitChanges();
}
}
/// <summary>
/// 根据专项检查ID 更新专项检查状态
/// </summary>
/// <param name="checkSpecialDetailId"></param>
public static void UpdateCheckSpecialStates(string checkSpecialId)
public static void UpdateCheckSpecialForApi(Model.Check_CheckSpecial checkSpecial)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Check_CheckSpecial newCheckSpecial = db.Check_CheckSpecial.FirstOrDefault(e => e.CheckSpecialId == checkSpecial.CheckSpecialId);
if (newCheckSpecial != null)
{
newCheckSpecial.CheckSpecialCode = checkSpecial.CheckSpecialCode;
//newCheckSpecial.ProjectId = checkSpecial.ProjectId;
newCheckSpecial.CheckPerson = checkSpecial.CheckPerson;
newCheckSpecial.CheckTime = checkSpecial.CheckTime;
newCheckSpecial.ScanUrl = checkSpecial.ScanUrl;
newCheckSpecial.DaySummary = checkSpecial.DaySummary;
newCheckSpecial.PartInUnits = checkSpecial.PartInUnits;
newCheckSpecial.PartInPersons = checkSpecial.PartInPersons;
newCheckSpecial.PartInPersonIds = checkSpecial.PartInPersonIds;
newCheckSpecial.PartInPersonNames = checkSpecial.PartInPersonNames;
newCheckSpecial.CheckAreas = checkSpecial.CheckAreas;
newCheckSpecial.States = checkSpecial.States;
newCheckSpecial.CheckType = checkSpecial.CheckType;
newCheckSpecial.CheckItemSetId = checkSpecial.CheckItemSetId;
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据专项检查ID 更新专项检查状态
/// </summary>
/// <param name="checkSpecialDetailId"></param>
public static void UpdateCheckSpecialStates(string checkSpecialId)
{
var getS = Funs.DB.Check_CheckSpecial.FirstOrDefault(x => x.CheckSpecialId == checkSpecialId);
if (getS != null && getS.States == Const.State_1)
@@ -137,13 +161,29 @@ namespace BLL
Funs.DB.SubmitChanges();
}
}
}
}
public static void UpdateCheckSpecialStatesForApi(string checkSpecialId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getS = db.Check_CheckSpecial.FirstOrDefault(x => x.CheckSpecialId == checkSpecialId);
if (getS != null && getS.States == Const.State_1)
{
var getNCDetail = db.Check_CheckSpecialDetail.FirstOrDefault(x => x.CheckSpecialId == getS.CheckSpecialId && x.CompleteStatus == false);
if (getNCDetail == null)
{
getS.States = Const.State_2;
db.SubmitChanges();
}
}
}
}
/// <summary>
/// 根据专项检查ID删除对应专项检查记录信息
/// </summary>
/// <param name="superviseCheckReportId"></param>
public static void DeleteCheckSpecial(string checkSpecialId)
/// <summary>
/// 根据专项检查ID删除对应专项检查记录信息
/// </summary>
/// <param name="superviseCheckReportId"></param>
public static void DeleteCheckSpecial(string checkSpecialId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Check_CheckSpecial where x.CheckSpecialId == checkSpecialId select x).FirstOrDefault();
@@ -205,84 +245,160 @@ namespace BLL
return name;
}
/// <summary>
///
/// </summary>
/// <param name="detailLists"></param>
/// <param name="checkSpecial"></param>
/// <returns></returns>
public static string IssueRectification(List<Model.Check_CheckSpecialDetail> detailLists, Model.Check_CheckSpecial checkSpecial)
{
string info = string.Empty;
if (detailLists.Count() > 0 && checkSpecial != null)
/// <summary>
///
/// </summary>
/// <param name="detailLists"></param>
/// <param name="checkSpecial"></param>
/// <returns></returns>
public static string IssueRectification(List<Model.Check_CheckSpecialDetail> detailLists, Model.Check_CheckSpecial checkSpecial)
{
////隐患整改单
var getDetail1 = detailLists.Where(x => x.CompleteStatus==false);
if (getDetail1.Count() > 0)
{
var getUnitList = getDetail1.Select(x => x.UnitId).Distinct();
foreach (var unitItem in getUnitList)
{
var getUnitItemList = getDetail1.Where(x => x.UnitId == unitItem);
foreach (var item in getUnitItemList)
string info = string.Empty;
if (detailLists.Count() > 0 && checkSpecial != null)
{
////隐患整改单
var getDetail1 = detailLists.Where(x => x.CompleteStatus == false);
if (getDetail1.Count() > 0)
{
Model.HSSE_Hazard_HazardRegister register = Funs.DB.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.CheckItemDetailId == item.CheckSpecialDetailId);
if (register == null)
{
register = new Model.HSSE_Hazard_HazardRegister();
}
register.ProjectId = checkSpecial.ProjectId;
register.CheckItemDetailId = item.CheckSpecialDetailId;
register.ProblemTypes = "2"; //1 安全问题 2 专项巡检
register.RegisterTypesId = item.CheckItem;
// register.CheckCycle = this.ckType.SelectedValue;
register.IsEffective = "1";
register.RegisterDate = checkSpecial.CheckTime;
register.CheckTime = checkSpecial.CheckTime;
register.ResponsibleUnit = item.UnitId;
var getUnitList = getDetail1.Select(x => x.UnitId).Distinct();
foreach (var unitItem in getUnitList)
{
var getUnitItemList = getDetail1.Where(x => x.UnitId == unitItem);
foreach (var item in getUnitItemList)
{
Model.HSSE_Hazard_HazardRegister register = Funs.DB.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.CheckItemDetailId == item.CheckSpecialDetailId);
if (register == null)
{
register = new Model.HSSE_Hazard_HazardRegister();
}
register.ProjectId = checkSpecial.ProjectId;
register.CheckItemDetailId = item.CheckSpecialDetailId;
register.ProblemTypes = "2"; //1 安全问题 2 专项巡检
register.RegisterTypesId = item.CheckItem;
// register.CheckCycle = this.ckType.SelectedValue;
register.IsEffective = "1";
register.RegisterDate = checkSpecial.CheckTime;
register.CheckTime = checkSpecial.CheckTime;
register.ResponsibleUnit = item.UnitId;
register.Place = item.WorkArea;
register.Place = item.WorkArea;
register.RegisterDef = item.Unqualified;
// register.HandleIdea = item.Suggestions;
register.ResponsibleMan = item.HSEManage;
register.Risk_Level = item.RiskLevel;
register.Requirements = item.Suggestions;
register.RegisterDef = item.Unqualified;
// register.HandleIdea = item.Suggestions;
register.ResponsibleMan = item.HSEManage;
register.Risk_Level = item.RiskLevel;
register.Requirements = item.Suggestions;
register.RectificationPeriod = item.LimitedDate;
register.CheckManId = checkSpecial.CompileMan;
//register.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim());
register.States = "1"; //待整改
if (string.IsNullOrEmpty(register.HazardRegisterId))
{
register.HazardRegisterId = Guid.NewGuid().ToString();
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
register.ImageUrl = url;
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(register);
}
else
{
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
register.ImageUrl = url;
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
BLL.HSSE_Hazard_HazardRegisterService.UpdateHazardRegister(register);
}
register.RectificationPeriod = item.LimitedDate;
register.CheckManId = checkSpecial.CompileMan;
//register.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim());
register.States = "1"; //待整改
if (string.IsNullOrEmpty(register.HazardRegisterId))
{
register.HazardRegisterId = Guid.NewGuid().ToString();
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
register.ImageUrl = url;
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(register);
}
else
{
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
register.ImageUrl = url;
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
BLL.HSSE_Hazard_HazardRegisterService.UpdateHazardRegister(register);
}
}
}
info += "整改已下发。";
}
}
info += "整改已下发。";
}
Check_CheckSpecialService.UpdateCheckSpecial(checkSpecial);
}
Check_CheckSpecialService.UpdateCheckSpecial(checkSpecial);
}
if (!string.IsNullOrEmpty(info))
{
info += "请在相应办理页面提交!";
if (!string.IsNullOrEmpty(info))
{
info += "请在相应办理页面提交!";
}
return info;
}
return info;
}
public static void SaveAttachFile(string dataId, string menuId, string url)
public static string IssueRectificationForApi(List<Model.Check_CheckSpecialDetail> detailLists, Model.Check_CheckSpecial checkSpecial)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
string info = string.Empty;
if (detailLists.Count() > 0 && checkSpecial != null)
{
////隐患整改单
var getDetail1 = detailLists.Where(x => x.CompleteStatus == false);
if (getDetail1.Count() > 0)
{
var getUnitList = getDetail1.Select(x => x.UnitId).Distinct();
foreach (var unitItem in getUnitList)
{
var getUnitItemList = getDetail1.Where(x => x.UnitId == unitItem);
foreach (var item in getUnitItemList)
{
Model.HSSE_Hazard_HazardRegister register = db.HSSE_Hazard_HazardRegister.FirstOrDefault(x => x.CheckItemDetailId == item.CheckSpecialDetailId);
if (register == null)
{
register = new Model.HSSE_Hazard_HazardRegister();
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(register);
}
register.ProjectId = checkSpecial.ProjectId;
register.CheckItemDetailId = item.CheckSpecialDetailId;
register.ProblemTypes = "2"; //1 安全问题 2 专项巡检
register.RegisterTypesId = item.CheckItem;
// register.CheckCycle = this.ckType.SelectedValue;
register.IsEffective = "1";
register.RegisterDate = checkSpecial.CheckTime;
register.CheckTime = checkSpecial.CheckTime;
register.ResponsibleUnit = item.UnitId;
register.Place = item.WorkArea;
register.RegisterDef = item.Unqualified;
// register.HandleIdea = item.Suggestions;
register.ResponsibleMan = item.HSEManage;
register.Risk_Level = item.RiskLevel;
register.Requirements = item.Suggestions;
register.RectificationPeriod = item.LimitedDate;
register.CheckManId = checkSpecial.CompileMan;
//register.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim());
register.States = "1"; //待整改
if (string.IsNullOrEmpty(register.HazardRegisterId))
{
register.HazardRegisterId = Guid.NewGuid().ToString();
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
register.ImageUrl = url;
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
db.SubmitChanges();
}
else
{
var url = AttachFileService.getFileUrl(item.CheckSpecialDetailId);
register.ImageUrl = url;
SaveAttachFile(register.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, url);
db.SubmitChanges();
}
}
}
info += "整改已下发。";
}
Check_CheckSpecialService.UpdateCheckSpecialForApi(checkSpecial);
}
if (!string.IsNullOrEmpty(info))
{
info += "请在相应办理页面提交!";
}
return info;
}
}
public static void SaveAttachFile(string dataId, string menuId, string url)
{
Model.ToDoItem toDoItem = new Model.ToDoItem
{
+38 -6
View File
@@ -162,13 +162,45 @@ namespace BLL
db.Check_IncentiveNotice.InsertOnSubmit(newIncentiveNotice);
db.SubmitChanges();
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectIncentiveNoticeMenuId, incentiveNotice.ProjectId, null, incentiveNotice.IncentiveNoticeId, incentiveNotice.CompileDate);
}
}
public static void AddIncentiveNoticeForApi(Model.Check_IncentiveNotice incentiveNotice)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Check_IncentiveNotice newIncentiveNotice = new Model.Check_IncentiveNotice
{
IncentiveNoticeId = incentiveNotice.IncentiveNoticeId,
ProjectId = incentiveNotice.ProjectId,
IncentiveNoticeCode = incentiveNotice.IncentiveNoticeCode,
UnitId = incentiveNotice.UnitId,
TeamGroupId = incentiveNotice.TeamGroupId,
IncentiveDate = incentiveNotice.IncentiveDate,
PersonId = incentiveNotice.PersonId,
BasicItem = incentiveNotice.BasicItem,
IncentiveMoney = incentiveNotice.IncentiveMoney,
TitleReward = incentiveNotice.TitleReward,
MattleReward = incentiveNotice.MattleReward,
FileContents = incentiveNotice.FileContents,
AttachUrl = incentiveNotice.AttachUrl,
CompileMan = incentiveNotice.CompileMan,
CompileDate = incentiveNotice.CompileDate,
States = incentiveNotice.States,
SignMan = incentiveNotice.SignMan,
ApproveMan = incentiveNotice.ApproveMan,
RewardType = incentiveNotice.RewardType,
Currency = incentiveNotice.Currency
};
db.Check_IncentiveNotice.InsertOnSubmit(newIncentiveNotice);
db.SubmitChanges();
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectIncentiveNoticeMenuId, incentiveNotice.ProjectId, null, incentiveNotice.IncentiveNoticeId, incentiveNotice.CompileDate);
}
}
/// <summary>
/// 修改奖励通知单
/// </summary>
/// <param name="incentiveNotice"></param>
public static void UpdateIncentiveNotice(Model.Check_IncentiveNotice incentiveNotice)
/// <summary>
/// 修改奖励通知单
/// </summary>
/// <param name="incentiveNotice"></param>
public static void UpdateIncentiveNotice(Model.Check_IncentiveNotice incentiveNotice)
{
Model.SGGLDB db = Funs.DB;
Model.Check_IncentiveNotice newIncentiveNotice = db.Check_IncentiveNotice.FirstOrDefault(e => e.IncentiveNoticeId == incentiveNotice.IncentiveNoticeId);
+36 -6
View File
@@ -52,13 +52,43 @@ namespace BLL
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
db.SubmitChanges();
}
}
public static void AddTestRecordForApi(Model.Training_TestRecord testRecord)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Training_TestRecord newTestRecord = new Model.Training_TestRecord
{
TestRecordId = testRecord.TestRecordId,
ProjectId = testRecord.ProjectId,
TestPlanId = testRecord.TestPlanId,
TestManId = testRecord.TestManId,
TestType = testRecord.TestType,
};
/// <summary>
/// 修改考试记录信息
/// </summary>
/// <param name="Training"></param>
public static void UpdateTestRecord(Model.Training_TestRecord testRecord)
if (string.IsNullOrEmpty(newTestRecord.TestType))
{
var getTrainTypeName = (from x in db.Training_TestPlan
join y in db.Training_Plan on x.PlanId equals y.PlanId
join z in db.Base_TrainType on y.TrainTypeId equals z.TrainTypeId
where x.TestPlanId == testRecord.TestPlanId
select z).FirstOrDefault();
if (getTrainTypeName != null)
{
testRecord.TestType = getTrainTypeName.TrainTypeName;
}
}
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
db.SubmitChanges();
}
}
/// <summary>
/// 修改考试记录信息
/// </summary>
/// <param name="Training"></param>
public static void UpdateTestRecord(Model.Training_TestRecord testRecord)
{
Model.SGGLDB db = Funs.DB;
Model.Training_TestRecord newTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecord.TestRecordId);
+47 -11
View File
@@ -1253,12 +1253,29 @@ namespace BLL
db.License_LicenseItem.InsertOnSubmit(newLicenseItem);
db.SubmitChanges();
}
public static void AddLicenseItemForApi(Model.License_LicenseItem licenseItem)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.License_LicenseItem newLicenseItem = new Model.License_LicenseItem
{
LicenseItemId = SQLHelper.GetNewID(),
DataId = licenseItem.DataId,
SortIndex = licenseItem.SortIndex,
SafetyMeasures = licenseItem.SafetyMeasures,
IsUsed = licenseItem.IsUsed,
ConfirmManId = licenseItem.ConfirmManId,
};
db.License_LicenseItem.InsertOnSubmit(newLicenseItem);
db.SubmitChanges();
}
}
/// <summary>
/// 修改-安全措施
/// </summary>
/// <param name="licenseItem"></param>
public static void UpdateLicenseItem(Model.License_LicenseItem licenseItem)
/// <summary>
/// 修改-安全措施
/// </summary>
/// <param name="licenseItem"></param>
public static void UpdateLicenseItem(Model.License_LicenseItem licenseItem)
{
Model.SGGLDB db = Funs.DB;
Model.License_LicenseItem newLicenseItem = db.License_LicenseItem.FirstOrDefault(e => e.LicenseItemId == licenseItem.LicenseItemId);
@@ -1346,13 +1363,32 @@ namespace BLL
};
db.License_FlowOperate.InsertOnSubmit(newFlowOperate);
db.SubmitChanges();
}
}
public static void AddFlowOperateForApi(Model.License_FlowOperate flowOperate)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.License_FlowOperate newFlowOperate = new Model.License_FlowOperate
{
FlowOperateId = SQLHelper.GetNewID(),
DataId = flowOperate.DataId,
MenuId = flowOperate.MenuId,
OperaterId = flowOperate.OperaterId,
AuditFlowName = flowOperate.AuditFlowName,
SortIndex = flowOperate.SortIndex,
RoleIds = flowOperate.RoleIds,
IsFlowEnd = flowOperate.IsFlowEnd,
};
db.License_FlowOperate.InsertOnSubmit(newFlowOperate);
db.SubmitChanges();
}
}
/// <summary>
/// 修改审核信息
/// </summary>
/// <param name="flowOperate"></param>
public static void UpdateFlowOperate(Model.License_FlowOperate flowOperate)
/// <summary>
/// 修改审核信息
/// </summary>
/// <param name="flowOperate"></param>
public static void UpdateFlowOperate(Model.License_FlowOperate flowOperate)
{
Model.SGGLDB db = Funs.DB;
Model.License_FlowOperate newFlowOperate = db.License_FlowOperate.FirstOrDefault(e => e.FlowOperateId == flowOperate.FlowOperateId);
+69 -11
View File
@@ -79,12 +79,43 @@ namespace BLL
////增加一条编码记录
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectAttendMeetingMenuId, attendMeeting.ProjectId, null, attendMeeting.AttendMeetingId, attendMeeting.CompileDate);
}
public static void AddAttendMeetingForApi(Model.Meeting_AttendMeeting attendMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
/// <summary>
/// 修改其他会议记录
/// </summary>
/// <param name="attendMeeting"></param>
public static void UpdateAttendMeeting(Model.Meeting_AttendMeeting attendMeeting)
Model.Meeting_AttendMeeting newAttendMeeting = new Model.Meeting_AttendMeeting
{
AttendMeetingId = attendMeeting.AttendMeetingId,
ProjectId = attendMeeting.ProjectId,
UnitId = attendMeeting.UnitId,
AttendMeetingCode = attendMeeting.AttendMeetingCode,
AttendMeetingName = attendMeeting.AttendMeetingName,
AttendMeetingDate = attendMeeting.AttendMeetingDate,
CompileMan = attendMeeting.CompileMan,
AttendMeetingContents = attendMeeting.AttendMeetingContents,
CompileDate = attendMeeting.CompileDate,
States = attendMeeting.States,
MeetingHours = attendMeeting.MeetingHours,
MeetingHostMan = attendMeeting.MeetingHostMan,
AttentPerson = attendMeeting.AttentPerson,
MeetingPlace = attendMeeting.MeetingPlace,
MeetingHostManId = attendMeeting.MeetingHostManId,
AttentPersonIds = attendMeeting.AttentPersonIds,
AttentPersonNum = attendMeeting.AttentPersonNum,
MeetingHostManOther = attendMeeting.MeetingHostManOther
};
db.Meeting_AttendMeeting.InsertOnSubmit(attendMeeting);
db.SubmitChanges();
////增加一条编码记录
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectAttendMeetingMenuId, attendMeeting.ProjectId, null, attendMeeting.AttendMeetingId, attendMeeting.CompileDate);
}
}
/// <summary>
/// 修改其他会议记录
/// </summary>
/// <param name="attendMeeting"></param>
public static void UpdateAttendMeeting(Model.Meeting_AttendMeeting attendMeeting)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_AttendMeeting newAttendMeeting = db.Meeting_AttendMeeting.FirstOrDefault(e => e.AttendMeetingId == attendMeeting.AttendMeetingId);
@@ -110,12 +141,39 @@ namespace BLL
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除其他会议记录
/// </summary>
/// <param name="attendMeetingId"></param>
public static void DeleteAttendMeetingById(string attendMeetingId)
public static void UpdateAttendMeetingForApi(Model.Meeting_AttendMeeting attendMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Meeting_AttendMeeting newAttendMeeting = db.Meeting_AttendMeeting.FirstOrDefault(e => e.AttendMeetingId == attendMeeting.AttendMeetingId);
if (newAttendMeeting != null)
{
//newAttendMeeting.ProjectId = attendMeeting.ProjectId;
newAttendMeeting.UnitId = attendMeeting.UnitId;
newAttendMeeting.AttendMeetingCode = attendMeeting.AttendMeetingCode;
newAttendMeeting.AttendMeetingName = attendMeeting.AttendMeetingName;
newAttendMeeting.AttendMeetingDate = attendMeeting.AttendMeetingDate;
newAttendMeeting.CompileMan = attendMeeting.CompileMan;
newAttendMeeting.AttendMeetingContents = attendMeeting.AttendMeetingContents;
newAttendMeeting.CompileDate = attendMeeting.CompileDate;
newAttendMeeting.States = attendMeeting.States;
newAttendMeeting.MeetingHours = attendMeeting.MeetingHours;
newAttendMeeting.MeetingHostMan = attendMeeting.MeetingHostMan;
newAttendMeeting.AttentPerson = attendMeeting.AttentPerson;
newAttendMeeting.MeetingPlace = attendMeeting.MeetingPlace;
newAttendMeeting.MeetingHostManId = attendMeeting.MeetingHostManId;
newAttendMeeting.AttentPersonIds = attendMeeting.AttentPersonIds;
newAttendMeeting.MeetingHostManOther = attendMeeting.MeetingHostManOther;
newAttendMeeting.AttentPersonNum = attendMeeting.AttentPersonNum;
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据主键删除其他会议记录
/// </summary>
/// <param name="attendMeetingId"></param>
public static void DeleteAttendMeetingById(string attendMeetingId)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_AttendMeeting attendMeeting = db.Meeting_AttendMeeting.FirstOrDefault(e => e.AttendMeetingId == attendMeetingId);
+67 -11
View File
@@ -51,12 +51,41 @@ namespace BLL
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectClassMeetingMenuId, classMeeting.ProjectId, null, classMeeting.ClassMeetingId, classMeeting.CompileDate);
}
/// <summary>
/// 修改班前会
/// </summary>
/// <param name="classMeeting"></param>
public static void UpdateClassMeeting(Model.Meeting_ClassMeeting classMeeting)
public static void AddClassMeetingForApi(Model.Meeting_ClassMeeting classMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Meeting_ClassMeeting newClassMeeting = new Model.Meeting_ClassMeeting
{
ClassMeetingId = classMeeting.ClassMeetingId,
ProjectId = classMeeting.ProjectId,
UnitId = classMeeting.UnitId,
TeamGroupId = classMeeting.TeamGroupId,
ClassMeetingCode = classMeeting.ClassMeetingCode,
ClassMeetingName = classMeeting.ClassMeetingName,
ClassMeetingDate = classMeeting.ClassMeetingDate,
ClassMeetingContents = classMeeting.ClassMeetingContents,
CompileMan = classMeeting.CompileMan,
CompileDate = classMeeting.CompileDate,
States = classMeeting.States,
MeetingPlace = classMeeting.MeetingPlace,
MeetingHours = classMeeting.MeetingHours,
MeetingHostMan = classMeeting.MeetingHostMan,
AttentPerson = classMeeting.AttentPerson,
AttentPersonNum = classMeeting.AttentPersonNum,
MeetingHostManOther = classMeeting.MeetingHostManOther
};
db.Meeting_ClassMeeting.InsertOnSubmit(newClassMeeting);
db.SubmitChanges();
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectClassMeetingMenuId, classMeeting.ProjectId, null, classMeeting.ClassMeetingId, classMeeting.CompileDate);
}
}
/// <summary>
/// 修改班前会
/// </summary>
/// <param name="classMeeting"></param>
public static void UpdateClassMeeting(Model.Meeting_ClassMeeting classMeeting)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_ClassMeeting newClassMeeting = db.Meeting_ClassMeeting.FirstOrDefault(e => e.ClassMeetingId == classMeeting.ClassMeetingId);
@@ -82,12 +111,39 @@ namespace BLL
db.SubmitChanges();
}
}
public static void UpdateClassMeetingForApi(Model.Meeting_ClassMeeting classMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Meeting_ClassMeeting newClassMeeting = db.Meeting_ClassMeeting.FirstOrDefault(e => e.ClassMeetingId == classMeeting.ClassMeetingId);
if (newClassMeeting != null)
{
// newClassMeeting.ProjectId = classMeeting.ProjectId;
newClassMeeting.UnitId = classMeeting.UnitId;
newClassMeeting.TeamGroupId = classMeeting.TeamGroupId;
newClassMeeting.ClassMeetingCode = classMeeting.ClassMeetingCode;
newClassMeeting.ClassMeetingName = classMeeting.ClassMeetingName;
newClassMeeting.ClassMeetingDate = classMeeting.ClassMeetingDate;
newClassMeeting.ClassMeetingContents = classMeeting.ClassMeetingContents;
newClassMeeting.CompileMan = classMeeting.CompileMan;
newClassMeeting.CompileDate = classMeeting.CompileDate;
newClassMeeting.States = classMeeting.States;
newClassMeeting.MeetingPlace = classMeeting.MeetingPlace;
newClassMeeting.MeetingHours = classMeeting.MeetingHours;
newClassMeeting.MeetingHostMan = classMeeting.MeetingHostMan;
newClassMeeting.AttentPerson = classMeeting.AttentPerson;
newClassMeeting.AttentPersonNum = classMeeting.AttentPersonNum;
newClassMeeting.MeetingHostManOther = classMeeting.MeetingHostManOther;
/// <summary>
/// 根据主键删除班前会
/// </summary>
/// <param name="classMeetingId"></param>
public static void DeleteClassMeetingById(string classMeetingId)
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据主键删除班前会
/// </summary>
/// <param name="classMeetingId"></param>
public static void DeleteClassMeetingById(string classMeetingId)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_ClassMeeting classMeeting = db.Meeting_ClassMeeting.FirstOrDefault(e => e.ClassMeetingId == classMeetingId);
+69 -11
View File
@@ -95,12 +95,42 @@ namespace BLL
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectMonthMeetingMenuId, monthMeeting.ProjectId, null, monthMeeting.MonthMeetingId, monthMeeting.CompileDate);
}
/// <summary>
/// 修改安全月例会
/// </summary>
/// <param name="monthMeeting"></param>
public static void UpdateMonthMeeting(Model.Meeting_MonthMeeting monthMeeting)
public static void AddMonthMeetingForApi(Model.Meeting_MonthMeeting monthMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Meeting_MonthMeeting newMonthMeeting = new Model.Meeting_MonthMeeting
{
MonthMeetingId = monthMeeting.MonthMeetingId,
ProjectId = monthMeeting.ProjectId,
UnitId = monthMeeting.UnitId,
MonthMeetingCode = monthMeeting.MonthMeetingCode,
MonthMeetingName = monthMeeting.MonthMeetingName,
MonthMeetingDate = monthMeeting.MonthMeetingDate,
CompileMan = monthMeeting.CompileMan,
MonthMeetingContents = monthMeeting.MonthMeetingContents,
CompileDate = monthMeeting.CompileDate,
States = monthMeeting.States,
AttentPersonNum = monthMeeting.AttentPersonNum,
MeetingHours = monthMeeting.MeetingHours,
MeetingHostMan = monthMeeting.MeetingHostMan,
AttentPerson = monthMeeting.AttentPerson,
MeetingPlace = monthMeeting.MeetingPlace,
MeetingHostManId = monthMeeting.MeetingHostManId,
AttentPersonIds = monthMeeting.AttentPersonIds,
MeetingHostManOther = monthMeeting.MeetingHostManOther
};
db.Meeting_MonthMeeting.InsertOnSubmit(newMonthMeeting);
db.SubmitChanges();
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectMonthMeetingMenuId, monthMeeting.ProjectId, null, monthMeeting.MonthMeetingId, monthMeeting.CompileDate);
}
}
/// <summary>
/// 修改安全月例会
/// </summary>
/// <param name="monthMeeting"></param>
public static void UpdateMonthMeeting(Model.Meeting_MonthMeeting monthMeeting)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_MonthMeeting newMonthMeeting = db.Meeting_MonthMeeting.FirstOrDefault(e => e.MonthMeetingId == monthMeeting.MonthMeetingId);
@@ -126,12 +156,40 @@ namespace BLL
db.SubmitChanges();
}
}
public static void UpdateMonthMeetingForApi(Model.Meeting_MonthMeeting monthMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Meeting_MonthMeeting newMonthMeeting = db.Meeting_MonthMeeting.FirstOrDefault(e => e.MonthMeetingId == monthMeeting.MonthMeetingId);
if (newMonthMeeting != null)
{
//newMonthMeeting.ProjectId = monthMeeting.ProjectId;
newMonthMeeting.UnitId = monthMeeting.UnitId;
newMonthMeeting.MonthMeetingCode = monthMeeting.MonthMeetingCode;
newMonthMeeting.MonthMeetingName = monthMeeting.MonthMeetingName;
newMonthMeeting.MonthMeetingDate = monthMeeting.MonthMeetingDate;
newMonthMeeting.CompileMan = monthMeeting.CompileMan;
newMonthMeeting.MonthMeetingContents = monthMeeting.MonthMeetingContents;
newMonthMeeting.CompileDate = monthMeeting.CompileDate;
newMonthMeeting.States = monthMeeting.States;
newMonthMeeting.AttentPersonNum = monthMeeting.AttentPersonNum;
newMonthMeeting.MeetingHours = monthMeeting.MeetingHours;
newMonthMeeting.MeetingHostMan = monthMeeting.MeetingHostMan;
newMonthMeeting.AttentPerson = monthMeeting.AttentPerson;
newMonthMeeting.MeetingPlace = monthMeeting.MeetingPlace;
newMonthMeeting.MeetingHostManId = monthMeeting.MeetingHostManId;
newMonthMeeting.AttentPersonIds = monthMeeting.AttentPersonIds;
newMonthMeeting.MeetingHostManOther = monthMeeting.MeetingHostManOther;
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据主键删除安全月例会
/// </summary>
/// <param name="monthMeetingId"></param>
public static void DeleteMonthMeetingById(string monthMeetingId)
/// <summary>
/// 根据主键删除安全月例会
/// </summary>
/// <param name="monthMeetingId"></param>
public static void DeleteMonthMeetingById(string monthMeetingId)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_MonthMeeting monthMeeting = db.Meeting_MonthMeeting.FirstOrDefault(e => e.MonthMeetingId == monthMeetingId);
+69 -10
View File
@@ -95,12 +95,43 @@ namespace BLL
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectSpecialMeetingMenuId, specialMeeting.ProjectId, null, specialMeeting.SpecialMeetingId, specialMeeting.CompileDate);
}
public static void AddSpecialMeetingForApi(Model.Meeting_SpecialMeeting specialMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Meeting_SpecialMeeting newSpecialMeeting = new Model.Meeting_SpecialMeeting
{
SpecialMeetingId = specialMeeting.SpecialMeetingId,
ProjectId = specialMeeting.ProjectId,
UnitId = specialMeeting.UnitId,
SpecialMeetingCode = specialMeeting.SpecialMeetingCode,
SpecialMeetingName = specialMeeting.SpecialMeetingName,
SpecialMeetingDate = specialMeeting.SpecialMeetingDate,
CompileMan = specialMeeting.CompileMan,
SpecialMeetingContents = specialMeeting.SpecialMeetingContents,
CompileDate = specialMeeting.CompileDate,
States = specialMeeting.States,
AttentPersonNum = specialMeeting.AttentPersonNum,
MeetingHours = specialMeeting.MeetingHours,
MeetingHostMan = specialMeeting.MeetingHostMan,
AttentPerson = specialMeeting.AttentPerson,
MeetingPlace = specialMeeting.MeetingPlace,
MeetingHostManId = specialMeeting.MeetingHostManId,
AttentPersonIds = specialMeeting.AttentPersonIds,
MeetingHostManOther = specialMeeting.MeetingHostManOther
};
db.Meeting_SpecialMeeting.InsertOnSubmit(newSpecialMeeting);
db.SubmitChanges();
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectSpecialMeetingMenuId, specialMeeting.ProjectId, null, specialMeeting.SpecialMeetingId, specialMeeting.CompileDate);
}
}
/// <summary>
/// 修改专题例会
/// </summary>
/// <param name="specialMeeting"></param>
public static void UpdateSpecialMeeting(Model.Meeting_SpecialMeeting specialMeeting)
/// <summary>
/// 修改专题例会
/// </summary>
/// <param name="specialMeeting"></param>
public static void UpdateSpecialMeeting(Model.Meeting_SpecialMeeting specialMeeting)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_SpecialMeeting newSpecialMeeting = db.Meeting_SpecialMeeting.FirstOrDefault(e => e.SpecialMeetingId == specialMeeting.SpecialMeetingId);
@@ -126,12 +157,40 @@ namespace BLL
db.SubmitChanges();
}
}
public static void UpdateSpecialMeetingForApi(Model.Meeting_SpecialMeeting specialMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Meeting_SpecialMeeting newSpecialMeeting = db.Meeting_SpecialMeeting.FirstOrDefault(e => e.SpecialMeetingId == specialMeeting.SpecialMeetingId);
if (newSpecialMeeting != null)
{
//newSpecialMeeting.ProjectId = specialMeeting.ProjectId;
newSpecialMeeting.UnitId = specialMeeting.UnitId;
newSpecialMeeting.SpecialMeetingCode = specialMeeting.SpecialMeetingCode;
newSpecialMeeting.SpecialMeetingName = specialMeeting.SpecialMeetingName;
newSpecialMeeting.SpecialMeetingDate = specialMeeting.SpecialMeetingDate;
newSpecialMeeting.CompileMan = specialMeeting.CompileMan;
newSpecialMeeting.SpecialMeetingContents = specialMeeting.SpecialMeetingContents;
newSpecialMeeting.CompileDate = specialMeeting.CompileDate;
newSpecialMeeting.States = specialMeeting.States;
newSpecialMeeting.AttentPersonNum = specialMeeting.AttentPersonNum;
newSpecialMeeting.MeetingHours = specialMeeting.MeetingHours;
newSpecialMeeting.MeetingHostMan = specialMeeting.MeetingHostMan;
newSpecialMeeting.AttentPerson = specialMeeting.AttentPerson;
newSpecialMeeting.MeetingPlace = specialMeeting.MeetingPlace;
newSpecialMeeting.MeetingHostManId = specialMeeting.MeetingHostManId;
newSpecialMeeting.AttentPersonIds = specialMeeting.AttentPersonIds;
newSpecialMeeting.MeetingHostManOther = specialMeeting.MeetingHostManOther;
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据主键删除专题例会
/// </summary>
/// <param name="specialMeetingId"></param>
public static void DeleteSpecialMeetingById(string specialMeetingId)
/// <summary>
/// 根据主键删除专题例会
/// </summary>
/// <param name="specialMeetingId"></param>
public static void DeleteSpecialMeetingById(string specialMeetingId)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_SpecialMeeting spcialMeeting = db.Meeting_SpecialMeeting.FirstOrDefault(e => e.SpecialMeetingId == specialMeetingId);
+70 -11
View File
@@ -95,12 +95,42 @@ namespace BLL
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectWeekMeetingMenuId, weekMeeting.ProjectId, null, weekMeeting.WeekMeetingId, weekMeeting.CompileDate);
}
/// <summary>
/// 修改周例会
/// </summary>
/// <param name="weekMeeting"></param>
public static void UpdateWeekMeeting(Model.Meeting_WeekMeeting weekMeeting)
public static void AddWeekMeetingForApi(Model.Meeting_WeekMeeting weekMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Meeting_WeekMeeting newWeekMeeting = new Model.Meeting_WeekMeeting
{
WeekMeetingId = weekMeeting.WeekMeetingId,
ProjectId = weekMeeting.ProjectId,
UnitId = weekMeeting.UnitId,
WeekMeetingCode = weekMeeting.WeekMeetingCode,
WeekMeetingName = weekMeeting.WeekMeetingName,
WeekMeetingDate = weekMeeting.WeekMeetingDate,
CompileMan = weekMeeting.CompileMan,
WeekMeetingContents = weekMeeting.WeekMeetingContents,
CompileDate = weekMeeting.CompileDate,
States = weekMeeting.States,
AttentPersonNum = weekMeeting.AttentPersonNum,
MeetingHours = weekMeeting.MeetingHours,
MeetingHostMan = weekMeeting.MeetingHostMan,
AttentPerson = weekMeeting.AttentPerson,
MeetingPlace = weekMeeting.MeetingPlace,
MeetingHostManId = weekMeeting.MeetingHostManId,
AttentPersonIds = weekMeeting.AttentPersonIds,
MeetingHostManOther = weekMeeting.MeetingHostManOther
};
db.Meeting_WeekMeeting.InsertOnSubmit(newWeekMeeting);
db.SubmitChanges();
////增加一条编码记录
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(BLL.Const.ProjectWeekMeetingMenuId, weekMeeting.ProjectId, null, weekMeeting.WeekMeetingId, weekMeeting.CompileDate);
}
}
/// <summary>
/// 修改周例会
/// </summary>
/// <param name="weekMeeting"></param>
public static void UpdateWeekMeeting(Model.Meeting_WeekMeeting weekMeeting)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_WeekMeeting newWeekMeeting = db.Meeting_WeekMeeting.FirstOrDefault(e => e.WeekMeetingId == weekMeeting.WeekMeetingId);
@@ -126,12 +156,41 @@ namespace BLL
db.SubmitChanges();
}
}
public static void UpdateWeekMeetingForApi(Model.Meeting_WeekMeeting weekMeeting)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
/// <summary>
/// 根据主键删除周例会
/// </summary>
/// <param name="weekMeetingId"></param>
public static void DeleteWeekMeetingById(string weekMeetingId)
Model.Meeting_WeekMeeting newWeekMeeting = db.Meeting_WeekMeeting.FirstOrDefault(e => e.WeekMeetingId == weekMeeting.WeekMeetingId);
if (newWeekMeeting != null)
{
//newWeekMeeting.ProjectId = weekMeeting.ProjectId;
newWeekMeeting.UnitId = weekMeeting.UnitId;
newWeekMeeting.WeekMeetingCode = weekMeeting.WeekMeetingCode;
newWeekMeeting.WeekMeetingName = weekMeeting.WeekMeetingName;
newWeekMeeting.WeekMeetingDate = weekMeeting.WeekMeetingDate;
newWeekMeeting.CompileMan = weekMeeting.CompileMan;
newWeekMeeting.WeekMeetingContents = weekMeeting.WeekMeetingContents;
newWeekMeeting.CompileDate = weekMeeting.CompileDate;
newWeekMeeting.States = weekMeeting.States;
newWeekMeeting.AttentPersonNum = weekMeeting.AttentPersonNum;
newWeekMeeting.MeetingHours = weekMeeting.MeetingHours;
newWeekMeeting.MeetingHostMan = weekMeeting.MeetingHostMan;
newWeekMeeting.AttentPerson = weekMeeting.AttentPerson;
newWeekMeeting.MeetingPlace = weekMeeting.MeetingPlace;
newWeekMeeting.MeetingHostManId = weekMeeting.MeetingHostManId;
newWeekMeeting.AttentPersonIds = weekMeeting.AttentPersonIds;
newWeekMeeting.MeetingHostManOther = weekMeeting.MeetingHostManOther;
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据主键删除周例会
/// </summary>
/// <param name="weekMeetingId"></param>
public static void DeleteWeekMeetingById(string weekMeetingId)
{
Model.SGGLDB db = Funs.DB;
Model.Meeting_WeekMeeting weekMeeting = db.Meeting_WeekMeeting.FirstOrDefault(e => e.WeekMeetingId == weekMeetingId);
@@ -67,12 +67,42 @@ namespace BLL
db.SubmitChanges();
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.EquipmentQualityMenuId, equipmentQuality.ProjectId, null, equipmentQuality.EquipmentQualityId, equipmentQuality.CompileDate);
}
public static void AddEquipmentQualityForApi(Model.QualityAudit_EquipmentQuality equipmentQuality)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
/// <summary>
/// 修改特殊机具设备资质
/// </summary>
/// <param name="equipmentQuality"></param>
public static void UpdateEquipmentQuality(Model.QualityAudit_EquipmentQuality equipmentQuality)
Model.QualityAudit_EquipmentQuality newEquipmentQuality = new Model.QualityAudit_EquipmentQuality
{
EquipmentQualityId = equipmentQuality.EquipmentQualityId,
ProjectId = equipmentQuality.ProjectId,
EquipmentQualityCode = equipmentQuality.EquipmentQualityCode,
UnitId = equipmentQuality.UnitId,
SpecialEquipmentId = equipmentQuality.SpecialEquipmentId,
EquipmentQualityName = equipmentQuality.EquipmentQualityName,
SizeModel = equipmentQuality.SizeModel,
FactoryCode = equipmentQuality.FactoryCode,
CertificateCode = equipmentQuality.CertificateCode,
CheckDate = equipmentQuality.CheckDate,
LimitDate = equipmentQuality.LimitDate,
InDate = equipmentQuality.InDate,
OutDate = equipmentQuality.OutDate,
ApprovalPerson = equipmentQuality.ApprovalPerson,
CarNum = equipmentQuality.CarNum,
Remark = equipmentQuality.Remark,
CompileMan = equipmentQuality.CompileMan,
CompileDate = equipmentQuality.CompileDate
};
db.QualityAudit_EquipmentQuality.InsertOnSubmit(newEquipmentQuality);
db.SubmitChanges();
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.EquipmentQualityMenuId, equipmentQuality.ProjectId, null, equipmentQuality.EquipmentQualityId, equipmentQuality.CompileDate);
}
}
/// <summary>
/// 修改特殊机具设备资质
/// </summary>
/// <param name="equipmentQuality"></param>
public static void UpdateEquipmentQuality(Model.QualityAudit_EquipmentQuality equipmentQuality)
{
Model.SGGLDB db = Funs.DB;
Model.QualityAudit_EquipmentQuality newEquipmentQuality = db.QualityAudit_EquipmentQuality.FirstOrDefault(e => e.EquipmentQualityId == equipmentQuality.EquipmentQualityId);
@@ -99,12 +129,40 @@ namespace BLL
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除特殊机具设备资质
/// </summary>
/// <param name="equipmentQualityId"></param>
public static void DeleteEquipmentQualityById(string equipmentQualityId)
public static void UpdateEquipmentQualityForApi(Model.QualityAudit_EquipmentQuality equipmentQuality)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.QualityAudit_EquipmentQuality newEquipmentQuality = db.QualityAudit_EquipmentQuality.FirstOrDefault(e => e.EquipmentQualityId == equipmentQuality.EquipmentQualityId);
if (newEquipmentQuality != null)
{
newEquipmentQuality.ProjectId = equipmentQuality.ProjectId;
newEquipmentQuality.EquipmentQualityCode = equipmentQuality.EquipmentQualityCode;
newEquipmentQuality.UnitId = equipmentQuality.UnitId;
newEquipmentQuality.SpecialEquipmentId = equipmentQuality.SpecialEquipmentId;
newEquipmentQuality.EquipmentQualityName = equipmentQuality.EquipmentQualityName;
newEquipmentQuality.SizeModel = equipmentQuality.SizeModel;
newEquipmentQuality.FactoryCode = equipmentQuality.FactoryCode;
newEquipmentQuality.CertificateCode = equipmentQuality.CertificateCode;
newEquipmentQuality.CheckDate = equipmentQuality.CheckDate;
newEquipmentQuality.LimitDate = equipmentQuality.LimitDate;
newEquipmentQuality.InDate = equipmentQuality.InDate;
newEquipmentQuality.OutDate = equipmentQuality.OutDate;
newEquipmentQuality.ApprovalPerson = equipmentQuality.ApprovalPerson;
newEquipmentQuality.CarNum = equipmentQuality.CarNum;
newEquipmentQuality.Remark = equipmentQuality.Remark;
newEquipmentQuality.CompileMan = equipmentQuality.CompileMan;
newEquipmentQuality.CompileDate = equipmentQuality.CompileDate;
newEquipmentQuality.QRCodeAttachUrl = equipmentQuality.QRCodeAttachUrl;
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据主键删除特殊机具设备资质
/// </summary>
/// <param name="equipmentQualityId"></param>
public static void DeleteEquipmentQualityById(string equipmentQualityId)
{
Model.SGGLDB db = Funs.DB;
Model.QualityAudit_EquipmentQuality equipmentQuality = db.QualityAudit_EquipmentQuality.FirstOrDefault(e => e.EquipmentQualityId == equipmentQualityId);
+49 -13
View File
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using FineUIPro;
using Model;
namespace BLL
{
@@ -125,14 +126,27 @@ namespace BLL
name = getp.PersonName;
}
return name;
}
}
public static string GetPersonNameByIdForApi(string personId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
string name = string.Empty;
var getp = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId);
if (getp != null)
{
name = getp.PersonName;
}
return name;
}
}
/// <summary>
/// 根据UserId主键获取人员信息
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public static string GetPersonIdByUserId(string userId)
/// <summary>
/// 根据UserId主键获取人员信息
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public static string GetPersonIdByUserId(string userId)
{
string personId = userId;
var getPerson = GetPersonById(userId);
@@ -151,13 +165,35 @@ namespace BLL
return personId;
}
public static string GetPersonIdByUserIdForApi(string userId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
string personId = userId;
var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == userId);
if (getPerson == null)
{
var getUser = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
if (getUser != null)
{
getPerson = db.SitePerson_Person.FirstOrDefault(e => e.IdentityCard == getUser.IdentityCard);
if (getPerson != null)
{
personId = getPerson.PersonId;
}
}
}
/// <summary>
/// 根据UserId主键获取人员信息
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public static Model.SitePerson_Person GetPersonByUserId(string userId, string projectId)
return personId;
}
}
/// <summary>
/// 根据UserId主键获取人员信息
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public static Model.SitePerson_Person GetPersonByUserId(string userId, string projectId)
{
var getPerson = GetPersonById(userId);
if (getPerson == null)
@@ -78,12 +78,40 @@ namespace BLL
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null, constructSolution.ConstructSolutionId, constructSolution.CompileDate);
}
}
/// <summary>
/// 修改施工方案/审查
/// </summary>
/// <param name="constructSolution"></param>
public static void UpdateConstructSolution(Model.Solution_ConstructSolution constructSolution)
public static void AddConstructSolutionForApi(Model.Solution_ConstructSolution constructSolution)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Solution_ConstructSolution newConstructSolution = new Model.Solution_ConstructSolution
{
ConstructSolutionId = constructSolution.ConstructSolutionId,
ProjectId = constructSolution.ProjectId,
ConstructSolutionCode = constructSolution.ConstructSolutionCode,
ConstructSolutionName = constructSolution.ConstructSolutionName,
VersionNo = constructSolution.VersionNo,
UnitId = constructSolution.UnitId,
InvestigateType = constructSolution.InvestigateType,
SolutinType = constructSolution.SolutinType,
FileContents = constructSolution.FileContents,
Remark = constructSolution.Remark,
CompileMan = constructSolution.CompileMan,
CompileManName = constructSolution.CompileManName,
CompileDate = constructSolution.CompileDate,
States = constructSolution.States
};
db.Solution_ConstructSolution.InsertOnSubmit(newConstructSolution);
db.SubmitChanges();
if (constructSolution.ConstructSolutionCode == BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null))
{
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitIdForApi(Const.ProjectConstructSolutionMenuId, constructSolution.ProjectId, null, constructSolution.ConstructSolutionId, constructSolution.CompileDate);
}
}
}
/// <summary>
/// 修改施工方案/审查
/// </summary>
/// <param name="constructSolution"></param>
public static void UpdateConstructSolution(Model.Solution_ConstructSolution constructSolution)
{
Model.SGGLDB db = Funs.DB;
Model.Solution_ConstructSolution newConstructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId);
@@ -109,12 +137,55 @@ namespace BLL
}
}
}
public static void UpdateConstructSolutionForApi(Model.Solution_ConstructSolution constructSolution)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Solution_ConstructSolution newConstructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId);
if (newConstructSolution != null)
{
newConstructSolution.ConstructSolutionName = constructSolution.ConstructSolutionName;
newConstructSolution.VersionNo = constructSolution.VersionNo;
newConstructSolution.UnitId = constructSolution.UnitId;
newConstructSolution.InvestigateType = constructSolution.InvestigateType;
newConstructSolution.SolutinType = constructSolution.SolutinType;
newConstructSolution.FileContents = constructSolution.FileContents;
newConstructSolution.Remark = constructSolution.Remark;
newConstructSolution.States = constructSolution.States;
if (!string.IsNullOrEmpty(constructSolution.QRCodeAttachUrl))
{
newConstructSolution.QRCodeAttachUrl = constructSolution.QRCodeAttachUrl;
}
/// <summary>
/// 根据主键删除施工方案/审查
/// </summary>
/// <param name="constructSolutionId"></param>
public static void DeleteConstructSolutionById(string constructSolutionId)
db.SubmitChanges();
string code = string.Empty;
var codeRecords = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == constructSolution.ConstructSolutionId);
if (codeRecords != null)
{
code = codeRecords.Code;
}
if (constructSolution.ConstructSolutionCode != code)
{
var codeRecords1 = db.Sys_CodeRecords.FirstOrDefault(x => x.DataId == constructSolution.ConstructSolutionId);
if (codeRecords1 != null)
{
///删除文件柜A中数据
// BLL.FileCabinetAItemService.DeleteFileCabinetAItemByID(dataId);
db.Sys_CodeRecords.DeleteOnSubmit(codeRecords1);
db.SubmitChanges();
}
}
}
}
}
/// <summary>
/// 根据主键删除施工方案/审查
/// </summary>
/// <param name="constructSolutionId"></param>
public static void DeleteConstructSolutionById(string constructSolutionId)
{
Model.SGGLDB db = Funs.DB;
Model.Solution_ConstructSolution constructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolutionId);
@@ -37,24 +37,26 @@ namespace BLL
public static void DeleteConstructSolution(string constructSolutionId)
{
Model.SGGLDB db = Funs.DB;
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.First(e => e.ConstructSolutionId == constructSolutionId);
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolutionId);
db.Solution_HSSEConstructSolution.DeleteOnSubmit(constructSolution);
db.SubmitChanges();
}
/// <summary>
/// 根据方案审查Id删除一个方案审查信息
/// </summary>
/// <param name="constructSolutionCode">方案审查Id</param>
public static void DeleteConstructSolutionByCQMSConstructSolutionId(string CQMSConstructSolutionId)
{
Model.SGGLDB db = Funs.DB;
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.First(e => e.CQMSConstructSolutionId == CQMSConstructSolutionId);
db.Solution_HSSEConstructSolution.DeleteOnSubmit(constructSolution);
db.SubmitChanges();
}
/// <summary>
/// 根据方案审查Id删除一个方案审查信息
/// </summary>
/// <param name="constructSolutionCode">方案审查Id</param>
public static void DeleteConstructSolutionByCQMSConstructSolutionId(string CQMSConstructSolutionId)
{
Model.SGGLDB db = Funs.DB;
Model.Solution_HSSEConstructSolution constructSolution = db.Solution_HSSEConstructSolution.FirstOrDefault(e => e.CQMSConstructSolutionId == CQMSConstructSolutionId);
if (constructSolution != null)
{
db.Solution_HSSEConstructSolution.DeleteOnSubmit(constructSolution);
db.SubmitChanges();
}
}
/// <summary>
/// 增加方案审查信息