Commit 79931969 authored by 黄奎's avatar 黄奎

页面修改

parent a0be93d8
...@@ -119,9 +119,9 @@ namespace Edu.Module.Course ...@@ -119,9 +119,9 @@ namespace Edu.Module.Course
/// </summary> /// </summary>
/// <param name="dmodel"></param> /// <param name="dmodel"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Order_ReturnComission_ViewModel> GetCommissionUserList(RB_Order_ReturnComission_ViewModel dmodel) public List<RB_Order_ReturnComission_ViewModel> GetCommissionUserListModule(RB_Order_ReturnComission_ViewModel dmodel)
{ {
var list = order_ReturnComissionRepository.GetCommissionUserList(dmodel); var list = order_ReturnComissionRepository.GetCommissionUserListRepository(dmodel);
if (list.Any()) if (list.Any())
{ {
//分成三个部门 内部人员 同行 学员 //分成三个部门 内部人员 同行 学员
......
...@@ -159,7 +159,7 @@ where {where} order by r.Id desc"; ...@@ -159,7 +159,7 @@ where {where} order by r.Id desc";
/// </summary> /// </summary>
/// <param name="dmodel"></param> /// <param name="dmodel"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Order_ReturnComission_ViewModel> GetCommissionUserList(RB_Order_ReturnComission_ViewModel demodel) public List<RB_Order_ReturnComission_ViewModel> GetCommissionUserListRepository(RB_Order_ReturnComission_ViewModel demodel)
{ {
string where = $@" 1=1"; string where = $@" 1=1";
...@@ -204,8 +204,11 @@ where {where} order by r.Id desc"; ...@@ -204,8 +204,11 @@ where {where} order by r.Id desc";
where += $@" and r.{nameof(RB_Order_ReturnComission_ViewModel.Status)} in(1,2)"; where += $@" and r.{nameof(RB_Order_ReturnComission_ViewModel.Status)} in(1,2)";
} }
string sql = $@" select r.OrderSourceType,r.OrderSourceId,r.SchoolId,count(0) as StudentCount,sum(r.CommissionMoeny) as CommissionMoeny string sql = $@"
from RB_Order_ReturnComission r where {where} group by r.OrderSourceType,r.OrderSourceId,r.SchoolId"; select r.OrderSourceType,r.OrderSourceId,r.SchoolId,count(0) as StudentCount,sum(r.CommissionMoeny) as CommissionMoeny
from RB_Order_ReturnComission r
where {where}
group by r.OrderSourceType,r.OrderSourceId,r.SchoolId";
return Get<RB_Order_ReturnComission_ViewModel>(sql).ToList(); return Get<RB_Order_ReturnComission_ViewModel>(sql).ToList();
} }
......
...@@ -132,7 +132,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -132,7 +132,7 @@ namespace Edu.WebApi.Controllers.Course
return ApiResult.ParamIsNull("请传递期数id"); return ApiResult.ParamIsNull("请传递期数id");
} }
var list = customerCommissionModule.GetCommissionUserList(dmodel); var list = customerCommissionModule.GetCommissionUserListModule(dmodel);
if (dmodel.UserDept > 0) if (dmodel.UserDept > 0)
{ {
list = list.Where(x => x.UserDept == dmodel.UserDept).ToList(); list = list.Where(x => x.UserDept == dmodel.UserDept).ToList();
...@@ -341,15 +341,15 @@ namespace Edu.WebApi.Controllers.Course ...@@ -341,15 +341,15 @@ namespace Edu.WebApi.Controllers.Course
{ {
financeConfig = new RB_Finance_Config_ViewModel(); financeConfig = new RB_Finance_Config_ViewModel();
} }
var list = customerCommissionModule.GetCommissionUserList(dmodel); var list = customerCommissionModule.GetCommissionUserListModule(dmodel);
if (list == null || !list.Any(x => x.OrderSourceType == Common.Enum.User.StuCreateTypeEnum.EmployeeInput)) if (list == null || !list.Any(x => x.OrderSourceType == StuCreateTypeEnum.EmployeeInput))
{ {
return ApiResult.Failed("暂无个人直客数据"); return ApiResult.Failed("暂无个人直客数据");
} }
List<object> financeList = new List<object>(); List<object> financeList = new List<object>();
foreach (var item in list.Where(x => x.OrderSourceType == Common.Enum.User.StuCreateTypeEnum.EmployeeInput).GroupBy(x => x.SchoolId))//先区分出校区 foreach (var item in list.Where(x => x.OrderSourceType == StuCreateTypeEnum.EmployeeInput).GroupBy(x => x.SchoolId))//先区分出校区
{ {
foreach (var deptItem in list.Where(x => x.SchoolId == item.Key && x.OrderSourceType == Common.Enum.User.StuCreateTypeEnum.EmployeeInput).GroupBy(x => x.UserDept))//区分出同一个校区不同部门 foreach (var deptItem in list.Where(x => x.SchoolId == item.Key && x.OrderSourceType == StuCreateTypeEnum.EmployeeInput).GroupBy(x => x.UserDept))//区分出同一个校区不同部门
{ {
var tempList = list.Where(x => x.SchoolId == item.Key && x.UserDept == deptItem.Key); var tempList = list.Where(x => x.SchoolId == item.Key && x.UserDept == deptItem.Key);
if (tempList != null && tempList.Any()) if (tempList != null && tempList.Any())
...@@ -433,7 +433,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -433,7 +433,7 @@ namespace Edu.WebApi.Controllers.Course
msg = sign, msg = sign,
}; };
System.Threading.Tasks.Task.Run(() => System.Threading.Tasks.Task.Run(() =>
SetFinance(resultInfo, dmodel.BatchId) SetFinance(resultInfo, dmodel.BatchId)
); );
return ApiResult.Success("财务单据生成中,请稍后刷新查看"); return ApiResult.Success("财务单据生成中,请稍后刷新查看");
} }
......
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
"MongoDBName": "Edu", "MongoDBName": "Edu",
"WkHtmlToPdfPath": "D:/wkhtmltopdf/bin/", "WkHtmlToPdfPath": "D:/wkhtmltopdf/bin/",
"FinanceKey": "FinanceMallInsertToERPViitto2020", "FinanceKey": "FinanceMallInsertToERPViitto2020",
"PaymentFinanceApi": "http://192.168.10.65:8083/api/Mall/InsertFinanceBatchForMallOut", "PaymentFinanceApi": "http://192.168.10.214/api/Mall/InsertFinanceBatchForMallOut",
"IncomeFinanceApi": "http://192.168.10.65:8083/api/Mall/InsertFinanceBatchForMallIn", "IncomeFinanceApi": "http://192.168.10.214/api/Mall/InsertFinanceBatchForMallIn",
"sTenpayNotifyUrl": "http://eduapi.oytour.com/api/WeChatPay/WxPayCallback", //下单回调地址 "sTenpayNotifyUrl": "http://eduapi.oytour.com/api/WeChatPay/WxPayCallback", //下单回调地址
"sTenpayNotifyRefundUrl": "http://eduapi.oytour.com/api/WeChatPay/Refunds", //退款回调地址 "sTenpayNotifyRefundUrl": "http://eduapi.oytour.com/api/WeChatPay/Refunds", //退款回调地址
"SellFinanceApi": "http://127.0.0.1/api/Mall/InsertFinanceBatchForEduOut", "SellFinanceApi": "http://192.168.10.214/api/Mall/InsertFinanceBatchForEduOut",
"FinanceDateBase": "reborn_finance", "FinanceDateBase": "reborn_finance",
"EduDateBase": "reborn_edu", "EduDateBase": "reborn_edu",
"JHTenantId": "15", "JHTenantId": "15",
......
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