123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.CommonLogic.SystemServices;
- using EMIS.Entities;
- using EMIS.DataLogic.Common.TeachingMaterial;
- using System.Configuration;
- using EMIS.ViewModel.TeachingMaterial;
- using EMIS.ViewModel;
- using Bowin.Common.Linq.Entity;
- using EMIS.ViewModel.WorkflowManage;
- using EMIS.CommonLogic.PlugworkflowServices;
- using EMIS.ViewModel.SystemView;
- using Bowin.Common.Utility;
- using EMIS.DataLogic.Repositories;
- using System.Linq.Expressions;
- using Bowin.Common.Linq;
- namespace EMIS.CommonLogic.TeachingMaterial
- {
- public class TeachersOrderServices : BaseWorkflowServices<ET_TeachersOrder>, ITeachersOrderServices
- {
- #region --定义--
- public TeachersOrderDAL TeachersOrderDAL { get; set; }
- public TeachersOrderRepository TeachersOrderRepository { get; set; }
- public TeachingMaterialPoolRepository TeachingMaterialPoolRepository { get; set; }
- public TeachersConfirmOrderRepository TeachersConfirmOrderRepository { get; set; }
- public TeachersPreOrderRepository TeachersPreOrderRepository { get; set; }
- public UserRepository UserRepository { get; set; }
- public CoursematerialRepository CoursematerialRepository { get; set; }
- public PublishRepository PublishRepository { get; set; }
- public SchoolyearRepository SchoolyearRepository { get; set; }
- public CollegeRepository CollegeRepository { get; set; }
- public DictionaryItemRepository DictionaryItemRepository { get; set; }
- #endregion
- public TeachersOrderServices()
- {
- DataRangeUserFunc = ((x, y) => this.IsUserInDataRangeByCollege<ET_TeachersOrder>(x, y, (w => w.CollegeID)));
- }
- /// <summary>
- /// 查询教师征订记录
- /// </summary>
- /// <param name="configuretView"></param>
- /// <param name="campusID"></param>
- /// <param name="collegeID"></param>
- /// <param name="schoolyearID"></param>
- /// <param name="educationID"></param>
- /// <param name="learningformID"></param>
- /// <param name="approvalStatus"></param>
- /// <param name="pageIndex"></param>
- /// <param name="pageSize"></param>
- /// <returns></returns>
- public IGridResultSet<TeachersOrderView> GetTeachersOrderViewGrid(ViewModel.ConfiguretView configuretView, Guid? schoolyearID,
- Guid? collegeID, Guid? coursematerialID, Guid? publishID, int? ApprovalStatus, int pageIndex, int pageSize)
- {
- //.Where(x => x.ApproveStatus == (int)CF_TeachersOrderStatus.Canceled
- // || x.ApproveStatus == (int)CF_TeachersOrderStatus.UnSubmit || x.ApproveStatus == (int)CF_TeachersOrderStatus.Completed);
- var statusList = this.GetStatusViewList();
- Expression<Func<ET_TeachersOrder, bool>> exp = (x => true);
- if (schoolyearID.HasValue)
- exp = exp.And(x => x.SchoolyearID == schoolyearID);
- if (collegeID.HasValue)
- exp = exp.And(x => x.CollegeID == collegeID);
- if (coursematerialID.HasValue)
- exp = exp.And(x => x.CF_TeachingMaterialPool.EM_Coursematerial.Any(w => w.CoursematerialID == coursematerialID));
- if (publishID.HasValue)
- exp = exp.And(x => x.CF_TeachingMaterialPool.PublishID == publishID);
- if (ApprovalStatus.HasValue)
- exp = exp.And(x => x.ApprovalStatus == ApprovalStatus);
- var query = TeachersOrderDAL.GetTeachingOrderGridView(exp);
- if (!string.IsNullOrEmpty(configuretView.ConditionValue))
- //return this.GetQueryByDataRangeByCollege(query).DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).OrderBy(x => x.CreateTime).ToGridResultSet<TeachersOrderView>(pageIndex, pageSize);
- query = query.DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).OrderBy(x => x.CreateTime);
- var result = this.GetQueryByDataRangeByCollege(query).OrderBy(x => x.CreateTime).ToGridResultSet<TeachersOrderView>(pageIndex, pageSize);
- result.rows.ForEach(x => x.ApproveStatusName = statusList.Where(w => w.ID == x.ApproveStatus).Select(w => w.Name).FirstOrDefault());
- return result;
- }
- /// <summary>
- /// 导出教师征订记录
- /// </summary>
- /// <param name="configuretView"></param>
- /// <param name="campusID"></param>
- /// <param name="collegeID"></param>
- /// <param name="schoolyearID"></param>
- /// <param name="educationID"></param>
- /// <param name="learningformID"></param>
- /// <param name="approvalStatus"></param>
- /// <param name="pageIndex"></param>
- /// <param name="pageSize"></param>
- /// <returns></returns>
- public List<TeachersOrderView> GetTeachersOrderViewList(ViewModel.ConfiguretView configuretView, Guid? schoolyearID,
- Guid? collegeID, Guid? coursematerialID, Guid? publishID, int? ApprovalStatus)
- {
- var statusList = this.GetStatusViewList();
- Expression<Func<ET_TeachersOrder, bool>> exp = (x => true);
- if (schoolyearID.HasValue)
- exp = exp.And(x => x.SchoolyearID == schoolyearID);
- if (collegeID.HasValue)
- exp = exp.And(x => x.CollegeID == collegeID);
- if (coursematerialID.HasValue)
- exp = exp.And(x => x.CF_TeachingMaterialPool.EM_Coursematerial.Any(w => w.CoursematerialID == coursematerialID));
- if (publishID.HasValue)
- exp = exp.And(x => x.CF_TeachingMaterialPool.PublishID == publishID);
- if (ApprovalStatus.HasValue && ApprovalStatus != -1)
- exp = exp.And(x => x.ApprovalStatus == ApprovalStatus);
- var query = TeachersOrderDAL.GetTeachingOrderGridView(exp);
- if (!string.IsNullOrEmpty(configuretView.ConditionValue))
- //return this.GetQueryByDataRangeByCollege(query).DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).OrderBy(x => x.CreateTime).ToList();
- query = query.DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).OrderBy(x => x.CreateTime);
- var result = this.GetQueryByDataRangeByCollege(query).OrderBy(x => x.CreateTime).ToList();
- result.ForEach(x => x.ApproveStatusName = statusList.Where(w => w.ID == x.ApproveStatus).Select(w => w.Name).FirstOrDefault());
- return result;
- }
- /// <summary>
- /// 提交教师征订记录
- /// </summary>
- /// <param name="teachersOrderIDs"></param>
- /// <param name="userID"></param>
- /// <param name="comment"></param>
- public void SubmitTeachersOrder(List<Guid> teachersOrderIDs, Guid userID, string comment = "")
- {
- try
- {
- bool IsSubmit = true;
- var startStatus = this.GetStartStatus();
- var backPointStatusList = this.GetBackpointStatus();
- var statusList = this.GetStatusViewList();
- var teachersOrderList = TeachersOrderRepository.GetList(x => teachersOrderIDs.Contains(x.TeachersOrderID)).ToList();
- foreach (var teachersOrder in teachersOrderList)
- {
- if (teachersOrder.ApprovalStatus != startStatus && !backPointStatusList.Contains(teachersOrder.ApprovalStatus))
- {
- IsSubmit = false;
- }
- }
- if (!IsSubmit)
- {
- throw new Exception(
- string.Format("勾选信息状态不正确,不能提交。只能提交处于{0}状态的信息",
- string.Join("、", statusList.Where(x => x.ID == startStatus || backPointStatusList.Contains(x.ID)).OrderBy(x => x.ID).ToList())
- )
- );
- }
- var submitTeacherOrderIDList = teachersOrderList.Where(x => x.ApprovalStatus == startStatus).Select(x => x.TeachersOrderID).ToList();
- var reSubmitTeacherOrderIDList = teachersOrderList.Where(x => backPointStatusList.Contains(x.ApprovalStatus) && !submitTeacherOrderIDList.Contains(x.TeachersOrderID))
- .Select(x => x.TeachersOrderID).ToList();
- if (submitTeacherOrderIDList.Count > 0)
- {
- StartUp(submitTeacherOrderIDList, userID, comment);
- }
- if (reSubmitTeacherOrderIDList.Count > 0)
- {
- Approve(reSubmitTeacherOrderIDList, userID, Guid.Empty, comment);
- }
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 审核教师征订记录
- /// </summary>
- /// <param name="specialtyApplyIDs">专业申请ID</param>
- /// <param name="userID">当前操作用户ID</param>
- /// <param name="actionID">动作ID</param>
- /// <param name="comment">处理意见</param>
- public void ApproveTeachersOrder(List<Guid> teachersOrderIDs, Guid userID, ActionView actionView, string comment = "")
- {
- try
- {
- Approve(teachersOrderIDs, userID, actionView.ActionID, comment);
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 添加教师征订信息
- /// </summary>
- /// <param name="SpecialtyApply">申请专业实体</param>
- /// <returns></returns>
- public void AddTeachersOrder(List<TeachersOrderView> teachersOrderViews, Guid createUserID)
- {
- try
- {
- var startStatus = this.GetStartStatus();
- foreach (var teachersOrderView in teachersOrderViews)
- {
- ET_TeachersOrder teachingMaterialPool = new ET_TeachersOrder()
- {
- TeachersOrderID = Guid.NewGuid(),
- SchoolyearID = teachersOrderView.SchoolyearID.GetValueOrDefault(),
- TeachingMaterialPoolID = teachersOrderView.TeachingMaterialPoolID,
- CollegeID = teachersOrderView.CollegeID.GetValueOrDefault(),
- OrderUserID = createUserID,
- OrderDate = DateTime.Now,
- OrderDesc = teachersOrderView.OrderDesc,
- OrderQty = teachersOrderView.OrderQty.GetValueOrDefault(),
- ApprovalStatus = startStatus,
- CreateTime = DateTime.Now,
- CreateUserID = createUserID,
- ModifyTime = DateTime.Now,
- ModifyUserID = createUserID
- };
- UnitOfWork.Add(teachingMaterialPool);
- }
- UnitOfWork.Commit();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 获取流程审批步骤详细信息
- /// </summary>
- /// <param name="specialtyApplyID"></param>
- /// <returns></returns>
- public IGridResultSet<WorkflowApproveHistoryView> GetWorkflowApproveHistoryView(Guid? teachersOrderID)
- {
- try
- {
- var query = GetApproveHistoryViewList((Guid)teachersOrderID).ToList().OrderByDescending(x => x.ApproveTime);
- return query.AsQueryable<WorkflowApproveHistoryView>().ToGridResultSet<WorkflowApproveHistoryView>(0, 100);
- }
- catch (Exception)
- {
- throw;
- }
- }
- /// <summary>
- /// 删除书库信息
- /// </summary>
- /// <param name="publishID"></param>
- public void DeleteTeachersOrder(List<Guid> teachersOrderIDs)
- {
- try
- {
- var statusList = this.GetBackpointStatus();
- statusList.Add(this.GetStartStatus());
- bool? IsOrdered = false;//是否包含审核完成数据!
- var teachersOrderList = TeachersOrderRepository.GetList(x => teachersOrderIDs.Contains(x.TeachersOrderID)).ToList();
- foreach (var teachersOrder in teachersOrderList)
- {
- //teachersOrder.ApprovalStatus != (int)CF_TeachersOrderStatus.Canceled ||
- if (!statusList.Contains(teachersOrder.ApprovalStatus))
- {
- IsOrdered = true;
- }
- }
- if ((bool)IsOrdered)
- {
- throw new Exception("只能删除未提交,已退回数据!");
- }
- TeachersOrderRepository.UnitOfWork.Delete<ET_TeachersOrder>(x => teachersOrderIDs.Contains(x.TeachersOrderID));
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 编辑征订信息
- /// </summary>
- /// <param name="TeachersOrderView"></param>
- /// <param name="createUserID"></param>
- public void EditTeachersOrder(TeachersOrderView teachersOrderView, Guid createUserID)
- {
- var startStatus = this.GetStartStatus();
- List<TeachersOrderView> teachersOrderList = new List<TeachersOrderView>();
- try
- {
- if (teachersOrderView.TeachersOrderID != null && teachersOrderView.TeachersOrderID != Guid.Empty)
- {
- ET_TeachersOrder teachersOrder = TeachersOrderRepository.GetSingle(x => x.TeachersOrderID == teachersOrderView.TeachersOrderID);
- teachersOrder.OrderQty = teachersOrderView.OrderQty.GetValueOrDefault();
- teachersOrder.OrderDesc = teachersOrderView.OrderDesc;
- teachersOrder.SchoolyearID = (Guid)teachersOrderView.SchoolyearID;
- TeachingMaterialPoolRepository.UnitOfWork.Update(teachersOrder);
- TeachingMaterialPoolRepository.UnitOfWork.Commit();
- }
- else
- {
- teachersOrderList.Add(teachersOrderView);
- foreach (var teachersOrderViewS in teachersOrderList)
- {
- ET_TeachersOrder teachingMaterialPool = new ET_TeachersOrder()
- {
- TeachersOrderID = Guid.NewGuid(),
- SchoolyearID = teachersOrderViewS.SchoolyearID.GetValueOrDefault(),
- TeachingMaterialPoolID = teachersOrderViewS.TeachingMaterialPoolID,
- CollegeID = teachersOrderViewS.CollegeID.GetValueOrDefault(),
- OrderUserID = createUserID,
- OrderDate = DateTime.Now,
- OrderDesc = teachersOrderViewS.OrderDesc,
- OrderQty = teachersOrderViewS.OrderQty.GetValueOrDefault(),
- ApprovalStatus = startStatus,
- CreateTime = DateTime.Now,
- CreateUserID = createUserID
- };
- TeachersOrderRepository.UnitOfWork.Add(teachingMaterialPool);
- }
- TeachersOrderRepository.UnitOfWork.Commit();
- }
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 获取征订信息列表导出
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IList<TeachersOrderView> GetTeachersOrderViewExcel(ConfiguretView configuretView, Guid? publishID, Guid? coursematerialID, bool? isLate)
- {
- var statusList = this.GetStatusViewList();
- var queryStatusList = this.GetBackpointStatus();
- queryStatusList.Add(this.GetStartStatus());
- List<TeachersOrderView> list = new List<TeachersOrderView>();
- var query = TeachersOrderDAL.GetTeachingOrderGridView(x => true).Where(x => queryStatusList.Contains(x.ApproveStatus));
- if (!string.IsNullOrEmpty(configuretView.ConditionValue))
- list = this.GetQueryByDataRangeByCollege(query).DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).ToList();
- else
- list = this.GetQueryByDataRangeByCollege(query).ToList();
- var result = list.OrderBy(x => x.CoursematerialCode).ToList();
- result.ForEach(x => x.ApproveStatusName = statusList.Where(w => w.ID == x.ApproveStatus).Select(w => w.Name).FirstOrDefault());
- return result;
- }
- public TeachersOrderView GetSingleTeachersOrder(Guid teachersOrderID)
- {
- return TeachersOrderDAL.GetSingleTeachersOrderView(teachersOrderID);
- }
- /// <summary>
- /// 获取书库信息列表
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IGridResultSet<TeachingMaterialPoolView> GetTeachingOrderByTeachingMaterialPoolViewGrid(ConfiguretView configuretView, Guid? publishID, Guid? coursematerialID, Guid? teachingMaterialPoolID, Guid? teachersOrderID, bool? isLate, int pageIndex, int pageSize)
- {
- List<TeachingMaterialPoolView> teachingMaterialPoolViewList = new List<TeachingMaterialPoolView>();
- Expression<Func<CF_TeachingMaterialPool, bool>> teachingMaterialPoolExp = (x => true);
- if (publishID != null && publishID != Guid.Empty)
- {
- teachingMaterialPoolExp = teachingMaterialPoolExp.And(x => x.PublishID == publishID);
- }
- if (coursematerialID != null && coursematerialID != Guid.Empty)
- {
- teachingMaterialPoolExp = teachingMaterialPoolExp.And(x => x.EM_Coursematerial.Any(w => w.CoursematerialID == coursematerialID));
- }
- if (isLate != null)
- {
- teachingMaterialPoolExp = teachingMaterialPoolExp.And(x => x.IsLate == isLate);
- }
- var query = TeachersOrderDAL.GetTeachingOrderByTeachingMaterialPoolGridView(teachersOrderID, teachingMaterialPoolExp);
- if (!string.IsNullOrEmpty(configuretView.ConditionValue))
- return query.DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).OrderBy(x => x.TeachingMaterialTypeID).OrderByDescending(x => x.TeachingMaterialName).ToGridResultSet<TeachingMaterialPoolView>(pageIndex, pageSize);
- return query.OrderBy(x => x.TeachingMaterialTypeID).OrderByDescending(x => x.TeachingMaterialName).ToGridResultSet<TeachingMaterialPoolView>(pageIndex, pageSize);
- }
- /// <summary>
- /// 查询征订申请提交数据
- /// </summary>
- /// <param name="configuretView"></param>
- /// <param name="campusID"></param>
- /// <param name="collegeID"></param>
- /// <param name="schoolyearID"></param>
- /// <param name="educationID"></param>
- /// <param name="learningformID"></param>
- /// <param name="approvalStatus"></param>
- /// <param name="pageIndex"></param>
- /// <param name="pageSize"></param>
- /// <returns></returns>
- public IGridResultSet<TeachersOrderView> GetTeachersOrderExamineViewGrid(ViewModel.ConfiguretView configuretView, Guid? schoolyearID,
- Guid? collegeID, Guid? coursematerialID, Guid? publishID, int? ApprovalStatus, int pageIndex, int pageSize)
- {
- var statusList = this.GetStatusViewList();
- var approveStatusList = this.GetApproveStatusViewList().Select(x => x.ID).ToList();
- Expression<Func<ET_TeachersOrder, bool>> exp = (x => approveStatusList.Contains(x.ApprovalStatus));
- if (schoolyearID.HasValue)
- exp = exp.And(x => x.SchoolyearID == schoolyearID);
- if (collegeID.HasValue)
- exp = exp.And(x => x.CollegeID == collegeID);
- if (coursematerialID.HasValue)
- exp = exp.And(x => x.CF_TeachingMaterialPool.EM_Coursematerial.Any(w => w.CoursematerialID == coursematerialID));
- if (publishID.HasValue)
- exp = exp.And(x => x.CF_TeachingMaterialPool.PublishID == publishID);
- if (ApprovalStatus.HasValue)
- exp = exp.And(x => x.ApprovalStatus == ApprovalStatus);
- var query = TeachersOrderDAL.GetTeachingOrderGridView(exp);
- if (!string.IsNullOrEmpty(configuretView.ConditionValue))
- //return this.GetQueryByDataRangeByCollege(query).DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).OrderBy(x => x.CreateTime).ToGridResultSet<TeachersOrderView>(pageIndex, pageSize);
- query = query.DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).OrderBy(x => x.CreateTime);
- var result = this.GetQueryByDataRangeByCollege(query).OrderBy(x => x.CreateTime).ToGridResultSet<TeachersOrderView>(pageIndex, pageSize);
- result.rows.ForEach(x => x.ApproveStatusName = statusList.Where(w => w.ID == x.ApproveStatus).Select(w => w.Name).FirstOrDefault());
- return result;
- }
- public TeachersOrderView GetSingleTeachersOrderById(Guid teachersOrderID)
- {
- return TeachersOrderDAL.GetSingleTeachersOrderById(teachersOrderID);
- }
- public IGridResultSet<TeachingMaterialPoolView> GetTeachersOrderOrTeachingMaterialPoolViewGrid(ConfiguretView configuretView, Guid? teachingMaterialID, Guid? coursematerialID, bool? isLate, Guid? college, Guid? schoolyearID, int pageIndex, int pageSize)
- {
- Expression<Func<CF_TeachingMaterialPool, bool>> exp = (x => true);
- if (teachingMaterialID != null && teachingMaterialID != Guid.Empty)
- {
- exp = exp.And(x => x.TeachingMaterialPoolID == teachingMaterialID);
- }
- if (coursematerialID != null && coursematerialID != Guid.Empty)
- {
- exp = exp.And(x => x.EM_Coursematerial.Any(w => w.CoursematerialID == coursematerialID));
- }
- if (isLate != null)
- {
- exp = exp.And(x => x.IsLate == isLate);
- }
- var query = TeachersOrderDAL.GetTeachersOrderByTeachingMaterial(exp);
- if (!string.IsNullOrEmpty(configuretView.ConditionValue))
- return query.DynamicWhere(configuretView.Attribute, configuretView.Condition, configuretView.ConditionValue).OrderBy(x => x.TeachingMaterialCode.Length).ThenBy(x => x.TeachingMaterialCode).ToGridResultSet<TeachingMaterialPoolView>(pageIndex, pageSize);
- return query.OrderBy(x => x.TeachingMaterialCode.Length).ThenBy(x => x.TeachingMaterialCode).ToGridResultSet<TeachingMaterialPoolView>(pageIndex, pageSize);
- }
- /******************加载征订明细****************************/
- public IGridResultSet<TeachersOrderView> GetTeachersOrderDetailViewList(Guid? teachersOrderID, int pageIndex, int pageSize)
- {
- var statusList = this.GetStatusViewList();
- var query = TeachersOrderDAL.GetTeachingOrderGridView(x => x.TeachersOrderID == teachersOrderID);
- var result = query.OrderBy(x => x.TeachingMaterialCode.Length).ThenBy(x => x.TeachingMaterialCode).ToGridResultSet<TeachersOrderView>(0, 10);
- result.rows.ForEach(x => x.ApproveStatusName = statusList.Where(w => w.ID == x.ApproveStatus).Select(w => w.Name).FirstOrDefault());
- return result;
- }
- public void OnApproveEnd(List<Guid> teacherOrderIDList, Guid? userID)
- {
- //var teacherOrderList = TeachersOrderDAL.TeachersOrderRepository.GetList(x => teacherOrderIDList.Contains(x.TeachersOrderID)).ToList();
- //var preOrderList = TeachersOrderDAL.GetPreOrderByTeachersOrderIDList(teacherOrderIDList);
- //foreach (var teacherOrder in teacherOrderList)
- //{
- // var preOrder = preOrderList.FirstOrDefault(x => x.SchoolyearID == teacherOrder.SchoolyearID
- // && x.TeachingMaterialPoolID == teacherOrder.TeachingMaterialPoolID);
- // if (preOrder == null)
- // {
- // ET_TeachersPreOrder teacherPreOrder = new ET_TeachersPreOrder()
- // {
- // TeachersPreOrderID = Guid.NewGuid(),
- // SchoolyearID = teacherOrder.SchoolyearID,
- // TeachingMaterialPoolID = teacherOrder.TeachingMaterialPoolID,
- // PreQty = 5,
- // Desc = "预加值",
- // CreateTime = DateTime.Now,
- // CreateUserID = userID,
- // ModifyTime = DateTime.Now,
- // ModifyUserID = userID
- // };
- // UnitOfWork.Add(teacherPreOrder);
- // }
- //}
- }
- }
- }
|