where+=$@" and o.{nameof(RB_Order_ViewModel.CustomerId)} = {demodel.CustomerId}";
}
//HK 03 - 15修改
if(demodel.CreateBy>0||demodel.EnterID>0)
if(demodel.CreateBy>0||demodel.EnterID>0)
{
varcreateBy=0;
if(demodel.CreateBy>0)
...
...
@@ -281,7 +281,7 @@ ORDER BY {orderBy}
}
if(createBy<=0&&demodel.EnterID>0)
{
createBy=demodel.EnterID;
createBy=demodel.EnterID;
}
where+=$@" and (o.{nameof(RB_Order_ViewModel.CreateBy)} = {createBy} OR o.{nameof(RB_Order_ViewModel.EnterID)}={createBy} OR o.{nameof(RB_Order_ViewModel.CourseConsultantId)}={createBy} )";
}
...
...
@@ -355,7 +355,7 @@ WHERE {where} ORDER BY {orderBy}
{
where+=$@" and o.{nameof(RB_Order_ViewModel.OrderForm)} ={(int)demodel.OrderForm}";
}
if(demodel.Dept_Id>0)
{
where+=$@" and o.{nameof(RB_Order_ViewModel.Dept_Id)} ={demodel.Dept_Id}";
FROM rb_order o WHERE o.Group_Id ={group_Id} and o.OrderState <>3 and o.CreateTime >='{startMonth}' and o.CreateTime <='{endMonth} 23:59:59' and o.CourseConsultantId >0 {(empId>0?" and o.CourseConsultantId ="+empId:"")}
FROM rb_order o WHERE o.Group_Id ={group_Id} and o.OrderState <>3 and o.CreateTime >='{startMonth}' and o.CreateTime <='{endMonth} 23:59:59' and o.CourseConsultantId >0 {(empId>0?" and o.CourseConsultantId ="+empId:"")}