20240308 会议管理

This commit is contained in:
2024-03-08 23:33:10 +08:00
parent 75fc3cf2f5
commit a59e10daa2
37 changed files with 6024 additions and 431 deletions
+1
View File
@@ -756,6 +756,7 @@
<Compile Include="TestRun\DriverSub\DriverSubService.cs" />
<Compile Include="TestRun\DriverSummary\DriverSummaryService.cs" />
<Compile Include="TestRun\FeedingTestRunService.cs" />
<Compile Include="TestRun\Meeting\MeetingItemService.cs" />
<Compile Include="TestRun\Meeting\MeetingService.cs" />
<Compile Include="TestRun\PersonTrain\DriverPrepareTrainPlanService.cs" />
<Compile Include="TestRun\PersonTrain\PersonTrainPlanService.cs" />
@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 参会人
/// </summary>
public class MeetingItemService
{
/// <summary>
/// 根据会议Id获取参会人信息
/// </summary>
/// <param name="meetingId"></param>
/// <returns></returns>
public static List<Model.Driver_MeetingItem> GetMeetingItemByMeetingId(string meetingId)
{
return (from x in Funs.DB.Driver_MeetingItem where x.MeetingId == meetingId select x).ToList();
}
/// <summary>
/// 根据会议Id和参会人Id获取参会人信息
/// </summary>
/// <param name="meetingId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public static Model.Driver_MeetingItem GetMeetingItemByMeetingIdAndUserId(string meetingId,string userId)
{
return (from x in Funs.DB.Driver_MeetingItem where x.MeetingId == meetingId && x.UserId == userId select x).FirstOrDefault();
}
/// <summary>
/// 添加参会人信息
/// </summary>
/// <param name="item"></param>
public static void AddMeetingItem(Model.Driver_MeetingItem item)
{
Model.Driver_MeetingItem newItem = new Model.Driver_MeetingItem
{
MeetingItemId = item.MeetingItemId,
MeetingId = item.MeetingId,
UserId = item.UserId,
IsMeeting = item.IsMeeting,
Feedback = item.Feedback
};
Funs.DB.Driver_MeetingItem.InsertOnSubmit(newItem);
Funs.DB.SubmitChanges();
}
/// <summary>
/// 修改参会人信息
/// </summary>
/// <param name="item"></param>
public static void UpdateMeetingItem(Model.Driver_MeetingItem item)
{
Model.Driver_MeetingItem newItem = Funs.DB.Driver_MeetingItem.FirstOrDefault(e => e.MeetingItemId == item.MeetingItemId);
if (newItem != null)
{
newItem.IsMeeting = item.IsMeeting;
newItem.Feedback = item.Feedback;
Funs.DB.SubmitChanges();
}
}
/// <summary>
/// 根据会议Id删除参会人信息
/// </summary>
/// <param name="meetingId"></param>
public static void DeleteMeetingItemByMeetingId(string meetingId)
{
var item = (from x in Funs.DB.Driver_MeetingItem where x.MeetingId == meetingId select x).ToList();
if (item != null)
{
Funs.DB.Driver_MeetingItem.DeleteAllOnSubmit(item);
Funs.DB.SubmitChanges();
}
}
}
}
+11 -10
View File
@@ -1,15 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Linq;
namespace BLL
{
/// <summary>
/// 会议管理
/// </summary>
public static class MeetingService
public static class MeetingService
{
/// <summary>
/// 根据主键获取会议信息
@@ -40,6 +36,10 @@ namespace BLL
newMeeting.MeetingType = meeting.MeetingType;
newMeeting.AttachUrl = meeting.AttachUrl;
newMeeting.Remark = meeting.Remark;
newMeeting.MeetingCode = meeting.MeetingCode;
newMeeting.CompileMan = meeting.CompileMan;
newMeeting.CompileDate = meeting.CompileDate;
newMeeting.States = meeting.States;
Funs.DB.Driver_Meeting.InsertOnSubmit(newMeeting);
Funs.DB.SubmitChanges();
@@ -65,6 +65,8 @@ namespace BLL
//newMeeting.MeetingType = meeting.MeetingType;
newMeeting.AttachUrl = meeting.AttachUrl;
newMeeting.Remark = meeting.Remark;
newMeeting.MeetingCode = meeting.MeetingCode;
newMeeting.States = meeting.States;
Funs.DB.SubmitChanges();
}
@@ -79,10 +81,9 @@ namespace BLL
Model.Driver_Meeting meeting = Funs.DB.Driver_Meeting.FirstOrDefault(e => e.MeetingId == meetingId);
if (meeting != null)
{
if (!string.IsNullOrEmpty(meeting.AttachUrl))
{
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, meeting.AttachUrl);//删除附件
}
CommonService.DeleteAttachFileById(meetingId + "#1");//删除会议纪要附件
CommonService.DeleteAttachFileById(meetingId + "#2");//删除签到表附件
CommonService.DeleteFlowOperateByID(meetingId);//删除流程表
Funs.DB.Driver_Meeting.DeleteOnSubmit(meeting);
Funs.DB.SubmitChanges();
}