Commit 48707a99 authored by liudong1993's avatar liudong1993

日期统计

parent a0869354
......@@ -421,10 +421,10 @@ group by g.Id;";
/// <returns></returns>
public List<RB_Class_Check_ViewModel> GetClassStudentHoursListForOrderMonth(int groupId, string orderIds)
{
string sql = $@"SELECT g.OrderId,DATE_FORMAT(c.CreateTime,'%Y-%m') as MonthDateStr,SUM(c.CurrentDeductionHours) CurrentDeductionHours FROM rb_order_guest g
string sql = $@"SELECT g.OrderId,DATE_FORMAT(c.ClassDate,'%Y-%m') as MonthDateStr,SUM(c.CurrentDeductionHours) CurrentDeductionHours FROM rb_order_guest g
left join rb_class_check c on g.Id = c.OrderGuestId
WHERE g.Group_Id ={groupId} and g.`Status`=0 and g.GuestState <>2 and c.`Status` =0 and g.OrderId in({orderIds})
group by g.OrderId,DATE_FORMAT(c.CreateTime,'%Y-%m');";
group by g.OrderId,DATE_FORMAT(c.ClassDate,'%Y-%m');";
return Get<RB_Class_Check_ViewModel>(sql).ToList();
}
......
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