Commit 2aa530a9 authored by 黄奎's avatar 黄奎

页面修改

parent 1651da2e
......@@ -19,6 +19,7 @@ using Edu.Model.Entity.Course;
using Edu.Model.ViewModel.Contract;
using Edu.Common.Enum.Course;
using Edu.Model.ViewModel.User;
using Edu.Model.ViewModel.Grade;
namespace Edu.Module.Course
{
......@@ -287,12 +288,16 @@ namespace Edu.Module.Course
});
if (guestList != null && guestList.Count > 0)
{
foreach (var item in guestList.Take(1))
foreach (var item in guestList)
{
var checkModel = class_CheckRepository.GetClassCheckListRepository(new RB_Class_Check_ViewModel()
{
OrderGuestId = item.Id
}).OrderByDescending(qitem => qitem.ClassDate).FirstOrDefault();
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_Order_Guest_ViewModel.GuestState),(int)GuestStateEnum.Graduate},
{ nameof(RB_Order_Guest_ViewModel.GraduationTime),DateTime.Now},
{ nameof(RB_Order_Guest_ViewModel.GraduationTime),(checkModel?.CreateTime?? DateTime.Now)},
};
flag = order_GuestRepository.Update(fileds, new WhereHelper(nameof(RB_Order_Guest_ViewModel.Id), item.Id));
}
......
......@@ -156,7 +156,7 @@ namespace Edu.Repository.Sell
//查询课时完成的学员
if (demodel.QFinishGuest == 1)
{
where += string.Format(" AND ( A.TotalHours<=A.ValidClassHours AND A.CompleteHours=A.ValidClassHours AND B.OrderState<>3 AND (IFNULL(A.GraduationTime,'')='' OR A.GuestState={0})) ", (int)GuestStateEnum.Graduate);
where += string.Format(" AND A.TotalHours>0 AND A.TotalHours=A.CompleteHours AND (A.GuestState<>{0} OR (IFNULL(A.GraduationTime,'')='' AND A.GuestState={0})) ", (int)GuestStateEnum.Graduate);
}
string sql = $@"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment