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
91cc79ad
Commit
91cc79ad
authored
Dec 22, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
939ee838
01a3d36d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
144 additions
and
75 deletions
+144
-75
RB_Order_Remark_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Order_Remark_ViewModel.cs
+4
-1
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+105
-49
RB_Order_RemarkRepository.cs
Edu.Repository/Course/RB_Order_RemarkRepository.cs
+6
-4
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+8
-8
FinanceController.cs
Edu.WebApi/Controllers/Finance/FinanceController.cs
+21
-13
No files found.
Edu.Model/ViewModel/Course/RB_Order_Remark_ViewModel.cs
View file @
91cc79ad
...
...
@@ -9,6 +9,9 @@ namespace Edu.Model.ViewModel.Course
[
Serializable
]
public
class
RB_Order_Remark_ViewModel
:
Model
.
Entity
.
Course
.
RB_Order_Remark
{
/// <summary>
/// 姓名
/// </summary>
public
string
CreateByName
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/TeachingRewardsModule.cs
View file @
91cc79ad
This diff is collapsed.
Click to expand it.
Edu.Repository/Course/RB_Order_RemarkRepository.cs
View file @
91cc79ad
...
...
@@ -25,18 +25,20 @@ namespace Edu.Repository.Course
if
(
demodel
.
OrderId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Remark
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
where
+=
$@" and
r.
{
nameof
(
RB_Order_Remark
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
orderIds
))
{
where
+=
$@" and
{
nameof
(
RB_Order_Remark
.
OrderId
)}
in(
{
orderIds
}
)"
;
where
+=
$@" and
r.
{
nameof
(
RB_Order_Remark
.
OrderId
)}
in(
{
orderIds
}
)"
;
}
if
(
demodel
.
Type
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Remark
.
Type
)}
=
{
demodel
.
Type
}
"
;
where
+=
$@" and
r.
{
nameof
(
RB_Order_Remark
.
Type
)}
=
{
demodel
.
Type
}
"
;
}
string
sql
=
$@" select * from RB_Order_Remark where
{
where
}
order by Id desc"
;
string
sql
=
$@" select r.*,e.EmName as CreateByName from RB_Order_Remark r
left join rb_employee e on r.CreateBy = e.EmployeeId
where
{
where
}
order by r.Id desc"
;
return
Get
<
RB_Order_Remark_ViewModel
>(
sql
).
ToList
();
}
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
91cc79ad
...
...
@@ -161,28 +161,28 @@ namespace Edu.WebApi.Controllers.Course
{
z
.
Id
,
z
.
Content
,
CreateBy
=
UserReidsCache
.
GetUserLoginInfo
(
z
.
CreateBy
)?.
AccountName
??
""
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
TeacherRemarkList
=
x
.
TeacherRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
UserReidsCache
.
GetUserLoginInfo
(
z
.
CreateBy
)?.
AccountName
??
""
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
RectorRemarkList
=
x
.
RectorRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
UserReidsCache
.
GetUserLoginInfo
(
z
.
CreateBy
)?.
AccountName
??
""
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
DirectorRemarkList
=
x
.
DirectorRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
UserReidsCache
.
GetUserLoginInfo
(
z
.
CreateBy
)?.
AccountName
??
""
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
GuestList
=
x
.
GuestList
.
Select
(
z
=>
new
...
...
@@ -863,28 +863,28 @@ namespace Edu.WebApi.Controllers.Course
{
z
.
Id
,
z
.
Content
,
CreateBy
=
UserReidsCache
.
GetUserLoginInfo
(
z
.
CreateBy
)?.
AccountName
??
""
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
TeacherRemarkList
=
x
.
TeacherRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
UserReidsCache
.
GetUserLoginInfo
(
z
.
CreateBy
)?.
AccountName
??
""
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
RectorRemarkList
=
x
.
RectorRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
UserReidsCache
.
GetUserLoginInfo
(
z
.
CreateBy
)?.
AccountName
??
""
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
DirectorRemarkList
=
x
.
DirectorRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
UserReidsCache
.
GetUserLoginInfo
(
z
.
CreateBy
)?.
AccountName
??
""
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
GuestList
=
x
.
GuestList
.
Select
(
z
=>
new
...
...
Edu.WebApi/Controllers/Finance/FinanceController.cs
View file @
91cc79ad
...
...
@@ -27,6 +27,7 @@ namespace Edu.WebApi.Controllers.Finance
private
readonly
FinanceModule
financeModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
FinanceModule
>();
private
readonly
OrderModule
orderModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
OrderModule
>();
private
readonly
ClassModule
classModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
ClassModule
>();
private
readonly
TeachingRewardsModule
teachingRewardsModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
TeachingRewardsModule
>();
/// <summary>
/// 获取班级收支明细
...
...
@@ -48,7 +49,7 @@ namespace Edu.WebApi.Controllers.Finance
//收入
decimal
IncomeReceive
=
0
;
//应收
decimal
IncomeActual
=
0
;
//实收
var
orderList
=
orderModule
.
GetClassOrderList_V2
(
classId
,
base
.
UserInfo
.
Group_Id
);
var
orderList
=
orderModule
.
GetClassOrderList_V2
(
classId
,
base
.
UserInfo
.
Group_Id
)
.
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
;
...
...
@@ -60,19 +61,22 @@ namespace Edu.WebApi.Controllers.Finance
//支出
decimal
PayReceive
=
0
;
//应付
decimal
PayActual
=
0
;
//实付
PayReceive
=
(
financeList
!=
null
&&
financeList
.
Any
())
?
financeList
.
Where
(
x
=>
x
.
Type
==
WFTempLateClassEnum
.
OUT
&&
x
.
OrderID
<=
0
).
Sum
(
x
=>
x
.
Money
??
0
)
:
0
;
PayActual
=
(
financeList
!=
null
&&
financeList
.
Any
())
?
financeList
.
Where
(
x
=>
x
.
Type
==
WFTempLateClassEnum
.
OUT
&&
x
.
OrderID
<=
0
).
Sum
(
x
=>
x
.
PayMoney
??
0
)
:
0
;
PayReceive
=
(
financeList
!=
null
&&
financeList
.
Any
())
?
financeList
.
Where
(
x
=>
x
.
Type
==
WFTempLateClassEnum
.
OUT
).
Sum
(
x
=>
x
.
Money
??
0
)
:
0
;
PayActual
=
(
financeList
!=
null
&&
financeList
.
Any
())
?
financeList
.
Where
(
x
=>
x
.
Type
==
WFTempLateClassEnum
.
OUT
).
Sum
(
x
=>
x
.
PayMoney
??
0
)
:
0
;
//利润
decimal
ProfitActual
=
0
;
//实际利润
decimal
ProfitNow
=
0
;
//当前利润
ProfitActual
=
(
Income
Actual
+
OtherIncomeActual
)
-
PayReceive
;
ProfitActual
=
(
Income
Receive
+
OtherIncomeReceive
)
-
PayReceive
;
ProfitNow
=
(
IncomeActual
+
OtherIncomeActual
)
-
PayActual
;
//提成
decimal
SaleCommission
=
0
;
//销售提成
decimal
TeacherProfitNow
=
0
;
//老师提成
decimal
MeritsProfit
=
0
;
//绩效提成
decimal
SaleCommission
=
(
orderList
!=
null
&&
orderList
.
Any
())
?
orderList
.
Sum
(
x
=>
x
.
CommissionMoney
)
:
0
;
;
//销售提成
var
teacherProfitList
=
teachingRewardsModule
.
GetBonusDetailList
(
new
RB_Teaching_BonusDetail_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
classId
,
School_Id
=
schoolId
});
decimal
TeacherProfitNow
=
(
teacherProfitList
!=
null
&&
teacherProfitList
.
Any
())
?
teacherProfitList
.
Sum
(
x
=>
x
.
Money
)
:
0
;
//老师提成
var
meritsProfitList
=
teachingRewardsModule
.
GetTeachingPerfList
(
new
RB_Teaching_Perf_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
classId
,
School_Id
=
schoolId
});
decimal
MeritsProfit
=
(
meritsProfitList
!=
null
&&
meritsProfitList
.
Any
())
?
(
meritsProfitList
.
OrderByDescending
(
x
=>
x
.
CreateTime
).
FirstOrDefault
()?.
Money
??
0
)
:
0
;
//绩效提成
var
classInfo
=
classModule
.
GetClassAndCourseListRepository
(
new
Model
.
ViewModel
.
Course
.
RB_Class_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
classId
,
School_Id
=
schoolId
}).
FirstOrDefault
();
var
recultFiniceList
=
financeList
.
Select
(
x
=>
new
...
...
@@ -169,19 +173,23 @@ namespace Edu.WebApi.Controllers.Finance
//支出
decimal
PayReceive
=
0
;
//应付
decimal
PayActual
=
0
;
//实付
PayReceive
=
(
financeList
!=
null
&&
financeList
.
Any
())
?
financeList
.
Where
(
x
=>
x
.
Type
==
WFTempLateClassEnum
.
OUT
&&
x
.
OrderID
<=
0
).
Sum
(
x
=>
x
.
Money
??
0
)
:
0
;
PayActual
=
(
financeList
!=
null
&&
financeList
.
Any
())
?
financeList
.
Where
(
x
=>
x
.
Type
==
WFTempLateClassEnum
.
OUT
&&
x
.
OrderID
<=
0
).
Sum
(
x
=>
x
.
PayMoney
??
0
)
:
0
;
PayReceive
=
(
financeList
!=
null
&&
financeList
.
Any
())
?
financeList
.
Where
(
x
=>
x
.
Type
==
WFTempLateClassEnum
.
OUT
).
Sum
(
x
=>
x
.
Money
??
0
)
:
0
;
PayActual
=
(
financeList
!=
null
&&
financeList
.
Any
())
?
financeList
.
Where
(
x
=>
x
.
Type
==
WFTempLateClassEnum
.
OUT
).
Sum
(
x
=>
x
.
PayMoney
??
0
)
:
0
;
//利润
decimal
ProfitActual
=
0
;
//实际利润
decimal
ProfitNow
=
0
;
//当前利润
ProfitActual
=
(
Income
Actual
+
OtherIncomeActual
)
-
PayReceive
;
ProfitActual
=
(
Income
Receive
+
OtherIncomeReceive
)
-
PayReceive
;
ProfitNow
=
(
IncomeActual
+
OtherIncomeActual
)
-
PayActual
;
//提成
decimal
SaleCommission
=
0
;
//销售提成
decimal
TeacherProfitNow
=
0
;
//老师提成
decimal
MeritsProfit
=
0
;
//绩效提成
//提成
decimal
SaleCommission
=
(
orderList
!=
null
&&
orderList
.
Any
())
?
orderList
.
Sum
(
x
=>
x
.
CommissionMoney
)
:
0
;
;
//销售提成
var
teacherProfitList
=
teachingRewardsModule
.
GetBonusDetailList
(
new
RB_Teaching_BonusDetail_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
classId
});
decimal
TeacherProfitNow
=
(
teacherProfitList
!=
null
&&
teacherProfitList
.
Any
())
?
teacherProfitList
.
Sum
(
x
=>
x
.
Money
)
:
0
;
//老师提成
var
meritsProfitList
=
teachingRewardsModule
.
GetTeachingPerfList
(
new
RB_Teaching_Perf_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
classId
});
decimal
MeritsProfit
=
(
meritsProfitList
!=
null
&&
meritsProfitList
.
Any
())
?
(
meritsProfitList
.
OrderByDescending
(
x
=>
x
.
CreateTime
).
FirstOrDefault
()?.
Money
??
0
)
:
0
;
//绩效提成
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
...
...
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