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
2fb7ea3c
Commit
2fb7ea3c
authored
Jan 03, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单查询报错处理
parent
10d97747
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
138 additions
and
107 deletions
+138
-107
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+138
-107
No files found.
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
2fb7ea3c
...
...
@@ -2134,100 +2134,113 @@ namespace Edu.WebApi.Controllers.Course
demodel
.
Group_Id
=
userInfo
.
Group_Id
;
var
orderList
=
orderModule
.
GetMyOrderPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
demodel
);
var
orderS
=
orderModule
.
GetMyOrderStatisticsModule
(
demodel
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
var
obj
=
new
List
<
object
>
list
=
new
List
<
object
>();
foreach
(
var
item
in
orderList
)
{
Statistics
=
new
List
<
object
>
ClassList
=
new
List
<
object
>();
if
(
item
.
ClassList
!=
null
&&
item
.
ClassList
.
Count
>
0
)
{
PreferPrice
=
orderS
?.
PreferPrice
??
0
,
Income
=
orderS
?.
Income
??
0
,
DueInMoney
=
orderS
?.
DueInMoney
??
0
,
GuestNum
=
orderS
?.
GuestNum
??
0
,
CancelNum
=
orderS
?.
CancelNum
??
0
,
CommissionMoney
=
(
orderS
?.
CommissionMoney
??
0
)
>
0
?
(
orderS
?.
CommissionMoney
??
0
)
:
0
,
ExtraRewardMoney
=
orderS
?.
ExtraRewardMoney
??
0
,
BrokerageMoney
=
orderS
?.
BrokerageMoney
??
0
},
List
=
orderList
?.
Select
(
x
=>
new
foreach
(
var
cItem
in
item
.
ClassList
)
{
try
{
ClassList
.
Add
(
new
{
cItem
.
ClassId
,
cItem
.
ClassName
,
cItem
.
CouseId
,
cItem
.
CourseSubjectName
,
cItem
.
CourseName
,
cItem
.
TeacherName
,
cItem
.
Teacher_Id
,
OpenTimeStr
=
Common
.
ConvertHelper
.
FormatDate
(
cItem
.
OpenTime
)
});
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetOrderPageListStatistics-Item:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
item
));
}
}
}
list
.
Add
(
new
{
ClassList
=
x
.
ClassList
?.
Select
(
z
=>
new
{
z
.
ClassId
,
z
.
ClassName
,
z
.
CouseId
,
z
.
CourseSubjectName
,
z
.
CourseName
,
z
.
TeacherName
,
z
.
Teacher_Id
,
OpenTimeStr
=
StringHelper
.
FormatDate
(
z
.
OpenTime
)
})
,
x
.
OrderId
,
x
.
ClassId
,
x
.
ClassNo
,
x
.
OrderType
,
x
.
SourceId
,
x
.
ClassSchoolId
,
x
.
ClassName
,
OpenTime
=
Common
.
ConvertHelper
.
FormatDate
(
x
.
OpenTime
),
x
.
JoinType
,
JoinTypeName
=
x
.
JoinType
.
ToName
(),
x
.
TargetJoinType
,
TargetJoinTypeName
=
x
.
TargetJoinType
.
ToName
(),
x
.
SourceOrderId
,
x
.
SourceClassName
,
x
.
TargetOrderId
,
x
.
TargetClassName
,
x
.
StartClassHours
,
x
.
CourseName
,
x
.
TradeWay
,
x
.
Class_Price
,
x
.
Unit_Price
,
x
.
GuestNum
,
x
.
PreferPrice
,
x
.
Income
,
x
.
Refund
,
x
.
DiscountMoney
,
x
.
PlatformTax
,
DueInMoney
=
x
.
PreferPrice
-
(
x
.
Income
-
x
.
Refund
+
x
.
PlatformTax
+
x
.
DiscountMoney
),
x
.
OrderState
,
OrderStateName
=
x
.
OrderState
.
ToName
(),
x
.
OrderSource
,
OrderSourceName
=
x
.
OrderSource
.
ToName
(),
x
.
EnterID
,
EnterName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
EnterID
)?.
AccountName
??
""
,
x
.
CreateBy
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CreateBy
)?.
AccountName
??
""
,
x
.
CourseConsultantId
,
ConsultantName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
CourseConsultantId
)?.
AccountName
??
""
,
IsAchievements
=
x
.
YFCommission
>
0
?
1
:
2
,
YFCommissionMoney
=
x
.
YFCommission
>
0
?
x
.
YFCommission
:
GetOrderYFCommission
(
x
),
x
.
CommissionMoney
,
x
.
ExtraCommissionMoney
,
x
.
ExtraRewardMoney
,
x
.
ExtraDeductMoney
,
IsCommissionGive
=
x
.
YFCommission
>
0
?
1
:
x
.
IsCommissionGive
,
x
.
CommissionBack
,
CreateTime
=
x
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
SaleRemark
=
x
?.
SaleRemark
??
""
,
TeacherRemark
=
x
?.
TeacherRemark
??
""
,
RectorRemark
=
x
?.
RectorRemark
??
""
,
DirectorRemark
=
x
?.
DirectorRemark
??
""
,
x
.
OfferId
,
x
.
HelpEnterId
,
HelpEnterName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
HelpEnterId
)?.
AccountName
,
x
.
GeneralOccupation
,
x
.
EduOccupation
,
x
.
IsLessPrice
,
x
.
LessPrice
,
x
.
OrderNature
,
OrderNatureName
=
x
.
OrderNature
.
ToName
(),
x
.
OldPreferPrice
,
x
.
EffectStatus
,
x
.
EffectStatusStr
,
EffectTime
=
Common
.
ConvertHelper
.
FormatDate
(
x
.
EffectTime
),
x
.
UpOrderId
,
x
.
VisitorReserveId
,
x
.
RenewOrderId
,
x
.
FirstOrderId
,
x
.
IsBackClass
,
x
.
CourseSubject
,
x
.
CourseSubjectName
,
x
.
CustomerId
,
x
.
CustomerName
,
x
.
CustomerTel
,
x
.
ClassScrollType
,
SplitDetailsList
=
x
?.
SplitDetailsList
?.
Select
(
qitem
=>
new
ClassList
,
item
.
OrderId
,
item
.
ClassId
,
item
.
ClassNo
,
item
.
OrderType
,
item
.
SourceId
,
item
.
ClassSchoolId
,
item
.
ClassName
,
OpenTime
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
OpenTime
),
item
.
JoinType
,
JoinTypeName
=
item
.
JoinType
.
ToName
(),
item
.
TargetJoinType
,
TargetJoinTypeName
=
item
.
TargetJoinType
.
ToName
(),
item
.
SourceOrderId
,
item
.
SourceClassName
,
item
.
TargetOrderId
,
item
.
TargetClassName
,
item
.
StartClassHours
,
item
.
CourseName
,
item
.
TradeWay
,
item
.
Class_Price
,
item
.
Unit_Price
,
item
.
GuestNum
,
item
.
PreferPrice
,
item
.
Income
,
item
.
Refund
,
item
.
DiscountMoney
,
item
.
PlatformTax
,
DueInMoney
=
item
.
PreferPrice
-
(
item
.
Income
-
item
.
Refund
+
item
.
PlatformTax
+
item
.
DiscountMoney
),
item
.
OrderState
,
OrderStateName
=
item
.
OrderState
.
ToName
(),
item
.
OrderSource
,
OrderSourceName
=
item
.
OrderSource
.
ToName
(),
item
.
EnterID
,
EnterName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
EnterID
)?.
AccountName
??
""
,
item
.
CreateBy
,
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
,
item
.
CourseConsultantId
,
ConsultantName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CourseConsultantId
)?.
AccountName
??
""
,
IsAchievements
=
item
.
YFCommission
>
0
?
1
:
2
,
YFCommissionMoney
=
item
.
YFCommission
>
0
?
item
.
YFCommission
:
GetOrderYFCommission
(
item
),
item
.
CommissionMoney
,
item
.
ExtraCommissionMoney
,
item
.
ExtraRewardMoney
,
item
.
ExtraDeductMoney
,
IsCommissionGive
=
item
.
YFCommission
>
0
?
1
:
item
.
IsCommissionGive
,
item
.
CommissionBack
,
CreateTime
=
item
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
SaleRemark
=
item
?.
SaleRemark
??
""
,
TeacherRemark
=
item
?.
TeacherRemark
??
""
,
RectorRemark
=
item
?.
RectorRemark
??
""
,
DirectorRemark
=
item
?.
DirectorRemark
??
""
,
item
.
OfferId
,
item
.
HelpEnterId
,
HelpEnterName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
HelpEnterId
)?.
AccountName
,
item
.
GeneralOccupation
,
item
.
EduOccupation
,
item
.
IsLessPrice
,
item
.
LessPrice
,
item
.
OrderNature
,
OrderNatureName
=
item
.
OrderNature
.
ToName
(),
item
.
OldPreferPrice
,
item
.
EffectStatus
,
item
.
EffectStatusStr
,
EffectTime
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
EffectTime
),
item
.
UpOrderId
,
item
.
VisitorReserveId
,
item
.
RenewOrderId
,
item
.
FirstOrderId
,
item
.
IsBackClass
,
item
.
CourseSubject
,
item
.
CourseSubjectName
,
item
.
CustomerId
,
item
.
CustomerName
,
item
.
CustomerTel
,
item
.
ClassScrollType
,
SplitDetailsList
=
item
?.
SplitDetailsList
?.
Select
(
qitem
=>
new
{
qitem
.
S_ClassId
,
qitem
.
S_ClassName
,
...
...
@@ -2240,35 +2253,35 @@ namespace Edu.WebApi.Controllers.Course
T_JoinTypeName
=
qitem
.
T_JoinType
.
ToName
(),
qitem
.
T_OrderId
}),
SaleRemarkList
=
x
?.
SaleRemarkList
.
Select
(
z
=>
new
SaleRemarkList
=
item
?.
SaleRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
TeacherRemarkList
=
x
?.
TeacherRemarkList
.
Select
(
z
=>
new
TeacherRemarkList
=
item
?.
TeacherRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
RectorRemarkList
=
x
?.
RectorRemarkList
.
Select
(
z
=>
new
RectorRemarkList
=
item
?.
RectorRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
DirectorRemarkList
=
x
?.
DirectorRemarkList
.
Select
(
z
=>
new
DirectorRemarkList
=
item
?.
DirectorRemarkList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
Content
,
CreateBy
=
z
.
CreateByName
,
CreateTime
=
z
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}),
GuestList
=
x
?.
GuestList
.
Select
(
z
=>
new
GuestList
=
item
?.
GuestList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
GuestName
,
...
...
@@ -2283,7 +2296,7 @@ namespace Edu.WebApi.Controllers.Course
z
.
ContractUrl
,
z
.
ContractUrlList
,
}),
ContractList
=
x
?.
ContractList
.
Select
(
z
=>
new
ContractList
=
item
?.
ContractList
.
Select
(
z
=>
new
{
z
.
Id
,
z
.
StudentName
,
...
...
@@ -2291,16 +2304,34 @@ namespace Edu.WebApi.Controllers.Course
z
.
GuestId
,
z
.
Status
,
}),
x
.
CreateType
,
CreateTypeName
=
x
.
CreateType
.
ToName
(),
x
.
StuSourceIdName
,
x
.
BrokerageMoney
,
x
.
StudyBroadRebateMoney
,
x
.
TextbookFee
,
x
.
CoursewareFee
,
x
.
SellPriceType
,
x
.
TotalClassHours
,
})
item
.
CreateType
,
CreateTypeName
=
item
.
CreateType
.
ToName
(),
item
.
StuSourceIdName
,
item
.
BrokerageMoney
,
item
.
StudyBroadRebateMoney
,
item
.
TextbookFee
,
item
.
CoursewareFee
,
item
.
SellPriceType
,
item
.
TotalClassHours
,
});
}
var
orderS
=
orderModule
.
GetMyOrderStatisticsModule
(
demodel
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
var
obj
=
new
{
Statistics
=
new
{
PreferPrice
=
orderS
?.
PreferPrice
??
0
,
Income
=
orderS
?.
Income
??
0
,
DueInMoney
=
orderS
?.
DueInMoney
??
0
,
GuestNum
=
orderS
?.
GuestNum
??
0
,
CancelNum
=
orderS
?.
CancelNum
??
0
,
CommissionMoney
=
(
orderS
?.
CommissionMoney
??
0
)
>
0
?
(
orderS
?.
CommissionMoney
??
0
)
:
0
,
ExtraRewardMoney
=
orderS
?.
ExtraRewardMoney
??
0
,
BrokerageMoney
=
orderS
?.
BrokerageMoney
??
0
},
List
=
list
};
pageModel
.
PageData
=
obj
;
return
ApiResult
.
Success
(
""
,
pageModel
);
...
...
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