Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
b0ae363d
Commit
b0ae363d
authored
Mar 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a1d0c270
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
45 deletions
+11
-45
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+2
-21
FinanceController.cs
Edu.WebApi/Controllers/Finance/FinanceController.cs
+9
-24
No files found.
Edu.Module.Course/OrderModule.cs
View file @
b0ae363d
...
...
@@ -1134,29 +1134,10 @@ namespace Edu.Module.Course
/// <param name="classId"></param>
/// <param name="groupId"></param>
/// <returns></returns>
public
List
<
RB_Order_ViewModel
>
GetClassOrderList_V2
(
int
classId
,
int
groupId
)
public
List
<
RB_Order_ViewModel
>
GetClassOrderList_V2
(
int
classId
,
int
groupId
,
int
SourceId
)
{
var
cModel
=
classRepository
.
GetEntity
(
classId
);
//获取订单列表
var
orderList
=
orderRepository
.
GetList
(
new
RB_Order_ViewModel
()
{
Group_Id
=
groupId
,
ClassId
=
classId
});
//if (orderList.Any())
//{
// string orderIds = string.Join(",", orderList.Select(x => x.OrderId));
// //获取备注列表
// var remarkList = order_RemarkRepository.GetList(new RB_Order_Remark_ViewModel() { }, orderIds);
// //获取名单列表
// var guestList = order_GuestRepository.GetList(new RB_Order_Guest_ViewModel() { OrderIds = orderIds });
// foreach (var item in orderList)
// {
// item.SaleRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 1).ToList();
// item.TeacherRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 2).ToList();
// item.RectorRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 3).ToList();
// item.DirectorRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 4).ToList();
// item.GuestList = guestList.Where(x => x.OrderId == item.OrderId).ToList();
// }
//}
var
orderList
=
orderRepository
.
GetList
(
new
RB_Order_ViewModel
()
{
Group_Id
=
groupId
,
ClassId
=
classId
,
SourceId
=
SourceId
});
return
orderList
;
}
...
...
Edu.WebApi/Controllers/Finance/FinanceController.cs
View file @
b0ae363d
...
...
@@ -43,14 +43,19 @@ namespace Edu.WebApi.Controllers.Finance
{
return
ApiResult
.
Failed
(
"班级Id不存在"
);
}
RB_Finance_Extend
model
=
new
RB_Finance_Extend
()
{
TCID
=
classId
,
OrderSource
=
OrderResourceEnum
.
Education
,
RB_Group_Id
=
base
.
UserInfo
.
Group_Id
,
FinanceType
=
2
};
if
(
SourceId
>
0
)
{
model
.
TCID
=
SourceId
;
model
.
OrderSource
=
OrderResourceEnum
.
EducationStudy
;
}
var
financeList
=
financeModule
.
GetFinanceInfoList
(
model
).
Where
(
t
=>
(
t
.
Status
==
FinanceAuditStatus
.
InReview
||
t
.
Status
==
FinanceAuditStatus
.
Pass
||
t
.
Status
==
FinanceAuditStatus
.
CTemporary
)).
ToList
();
//收入
decimal
IncomeReceive
=
0
;
//应收
decimal
IncomeActual
=
0
;
//实收
var
orderList
=
orderModule
.
GetClassOrderList_V2
(
classId
,
base
.
UserInfo
.
Group_Id
).
Where
(
x
=>
(
int
)
x
.
OrderState
<
3
);
var
orderList
=
orderModule
.
GetClassOrderList_V2
(
classId
,
base
.
UserInfo
.
Group_Id
,
SourceId
).
Where
(
x
=>
(
int
)
x
.
OrderState
<
3
);
IncomeReceive
=
(
orderList
!=
null
&&
orderList
.
Any
())
?
orderList
.
Sum
(
x
=>
x
.
PreferPrice
)
:
0
;
IncomeActual
=
(
orderList
!=
null
&&
orderList
.
Any
())
?
orderList
.
Sum
(
x
=>
x
.
Income
)
:
0
;
...
...
@@ -129,7 +134,6 @@ namespace Edu.WebApi.Controllers.Finance
OtherFiniceReciveList
=
recultFiniceList
.
Where
(
t
=>
t
.
Type
==
WFTempLateClassEnum
.
IN
&&
t
.
OrderID
<=
0
),
//其他收入
OtherFinicePayList
=
recultFiniceList
.
Where
(
t
=>
t
.
Type
==
WFTempLateClassEnum
.
OUT
),
//其他支出
//退费,班级费用(书本,房租等),提成,课时费确定 在弄
};
return
ApiResult
.
Success
(
""
,
resultData
);
}
...
...
@@ -146,6 +150,7 @@ namespace Edu.WebApi.Controllers.Finance
{
int
classId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
,
0
);
int
schoolId
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
);
int
SourceId
=
base
.
ParmJObj
.
GetInt
(
"SourceId"
);
List
<
ExcelDataSource
>
slist
=
new
List
<
ExcelDataSource
>();
string
ExcelName
=
"用户列表"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)
+
".xls"
;
if
(
classId
<=
0
)
...
...
@@ -162,7 +167,7 @@ namespace Edu.WebApi.Controllers.Finance
//收入
decimal
IncomeReceive
=
0
;
//应收
decimal
IncomeActual
=
0
;
//实收
var
orderList
=
orderModule
.
GetClassOrderList_V2
(
classId
,
base
.
UserInfo
.
Group_Id
).
Where
(
x
=>
(
int
)
x
.
OrderState
<
3
);
var
orderList
=
orderModule
.
GetClassOrderList_V2
(
classId
,
base
.
UserInfo
.
Group_Id
,
SourceId
).
Where
(
x
=>
(
int
)
x
.
OrderState
<
3
);
IncomeReceive
=
(
orderList
!=
null
&&
orderList
.
Any
())
?
orderList
.
Sum
(
x
=>
x
.
PreferPrice
)
:
0
;
IncomeActual
=
(
orderList
!=
null
&&
orderList
.
Any
())
?
orderList
.
Sum
(
x
=>
x
.
Income
)
:
0
;
...
...
@@ -194,26 +199,6 @@ namespace Edu.WebApi.Controllers.Finance
List
<
RB_Finance_Extend
>
financeReciveList
=
financeList
.
Where
(
t
=>
t
.
Type
==
WFTempLateClassEnum
.
IN
).
ToList
();
List
<
RB_Finance_Extend
>
financePayList
=
financeList
.
Where
(
t
=>
t
.
Type
==
WFTempLateClassEnum
.
OUT
).
ToList
();
//var recultFiniceList = financeList.Select(x => new
//{
// x.FrID,
// x.Type,
// x.TCID,
// x.OrderID,
// x.Money,
// x.PayMoney,
// AirTotalMoney = x.AirTotalMoney ?? 0,
// AirTotalPayMoney = x.AirTotalPayMoney ?? 0,
// CostTypeList = x.CostTypeList.Distinct().ToList(),
// x.OrderSource,
// AuditList = x.AuditList.Select(t => new { t.AuditEmId, t.AuditEmName, AuditDate = t.AuditDate.HasValue ? t.AuditDate.Value.ToString("yyyy/MM/dd") : "" }),
// StatusStr = EnumHelper.ToName(x.Status.Value),
// x.RB_CreateByName,
// CreateDate = x.CreateDate.Value.ToString("yyyy-MM-dd"),
// TradeDate = x.TradeDate.HasValue ? x.TradeDate.Value.ToString("yyyy-MM-dd") : "",
// TradeWayList = x.BankList?.Select(y => new { y.AccountType, y.Alias, y.BankNo, TypeName = EnumHelper.ToName(y.Type), y.CurrencyName, y.OriginalMoney, y.Money, y.Rate })
//});
#
endregion
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment