Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
75a8f220
Commit
75a8f220
authored
Jun 08, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
cc9395bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
230 additions
and
226 deletions
+230
-226
StatisticsModule.cs
Mall.Module.MarketingCenter/StatisticsModule.cs
+230
-226
No files found.
Mall.Module.MarketingCenter/StatisticsModule.cs
View file @
75a8f220
...
...
@@ -649,26 +649,26 @@ namespace Mall.Module.MarketingCenter
RList
.
Add
(
new
{
Date
=
"环比成长"
,
PeopleNum
=
Math
.
Round
(
sPeopleNum
>
0
?
PeopleNum
-
sPeopleNum
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
OrderNum
=
Math
.
Round
(
sOrderNum
>
0
?
OrderNum
-
sOrderNum
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PayMoney
=
Math
.
Round
(
sPayMoney
>
0
?
PayMoney
-
sPayMoney
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
BuyNum
=
Math
.
Round
(
sBuyNum
>
0
?
BuyNum
-
sBuyNum
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgOrderNum
=
Math
.
Round
(
sAvgOrderNum
>
0
?
AvgOrderNum
-
sAvgOrderNum
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyNum
=
Math
.
Round
(
sAvgBuyNum
>
0
?
AvgBuyNum
-
sAvgBuyNum
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgUnitPrice
=
Math
.
Round
(
sAvgUnitPrice
>
0
?
AvgUnitPrice
-
sAvgUnitPrice
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyPrice
=
Math
.
Round
(
sAvgBuyPrice
>
0
?
AvgBuyPrice
-
sAvgBuyPrice
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MemberNum
=
Math
.
Round
(
sMemberNum
>
0
?
MemberNum
-
sMemberNum
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PaymentNum
=
Math
.
Round
(
sPaymentNum
>
0
?
PaymentNum
-
sPaymentNum
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MOrderRate
=
Math
.
Round
(
sMOrderRate
>
0
?
MOrderRate
-
sMOrderRate
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PeopleNum
=
Math
.
Round
(
sPeopleNum
>
0
?
(
PeopleNum
-
sPeopleNum
)
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
OrderNum
=
Math
.
Round
(
sOrderNum
>
0
?
(
OrderNum
-
sOrderNum
)
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PayMoney
=
Math
.
Round
(
sPayMoney
>
0
?
(
PayMoney
-
sPayMoney
)
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
BuyNum
=
Math
.
Round
(
sBuyNum
>
0
?
(
BuyNum
-
sBuyNum
)
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgOrderNum
=
Math
.
Round
(
sAvgOrderNum
>
0
?
(
AvgOrderNum
-
sAvgOrderNum
)
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyNum
=
Math
.
Round
(
sAvgBuyNum
>
0
?
(
AvgBuyNum
-
sAvgBuyNum
)
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgUnitPrice
=
Math
.
Round
(
sAvgUnitPrice
>
0
?
(
AvgUnitPrice
-
sAvgUnitPrice
)
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyPrice
=
Math
.
Round
(
sAvgBuyPrice
>
0
?
(
AvgBuyPrice
-
sAvgBuyPrice
)
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MemberNum
=
Math
.
Round
(
sMemberNum
>
0
?
(
MemberNum
-
sMemberNum
)
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PaymentNum
=
Math
.
Round
(
sPaymentNum
>
0
?
(
PaymentNum
-
sPaymentNum
)
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MOrderRate
=
Math
.
Round
(
sMOrderRate
>
0
?
(
MOrderRate
-
sMOrderRate
)
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyNum
=
Math
.
Round
(
sReBuyNum
>
0
?
(
ReBuyNum
-
sReBuyNum
)
/
sReBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyRate
=
Math
.
Round
(
sReBuyRate
>
0
?
ReBuyRate
-
sReBuyRate
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
NewPeopleNum
=
Math
.
Round
(
sNewPeopleNum
>
0
?
NewPeopleNum
-
sNewPeopleNum
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PXNum
=
Math
.
Round
(
sPXNum
>
0
?
PXNum
-
sPXNum
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
VipNum
=
Math
.
Round
(
sVipNum
>
0
?
VipNum
-
sVipNum
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
YXNum
=
Math
.
Round
(
sYXNum
>
0
?
YXNum
-
sYXNum
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
JXNum
=
Math
.
Round
(
sJXNum
>
0
?
JXNum
-
sJXNum
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
Profit
=
Math
.
Round
(
sProfit
>
0
?
Profit
-
sProfit
/
sProfit
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ProfitRate
=
Math
.
Round
(
sProfitRate
>
0
?
ProfitRate
-
sProfitRate
/
sProfitRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyRate
=
Math
.
Round
(
sReBuyRate
>
0
?
(
ReBuyRate
-
sReBuyRate
)
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
NewPeopleNum
=
Math
.
Round
(
sNewPeopleNum
>
0
?
(
NewPeopleNum
-
sNewPeopleNum
)
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PXNum
=
Math
.
Round
(
sPXNum
>
0
?
(
PXNum
-
sPXNum
)
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
VipNum
=
Math
.
Round
(
sVipNum
>
0
?
(
VipNum
-
sVipNum
)
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
YXNum
=
Math
.
Round
(
sYXNum
>
0
?
(
YXNum
-
sYXNum
)
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
JXNum
=
Math
.
Round
(
sJXNum
>
0
?
(
JXNum
-
sJXNum
)
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
Profit
=
Math
.
Round
(
sProfit
>
0
?
(
Profit
-
sProfit
)
/
sProfit
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ProfitRate
=
Math
.
Round
(
sProfitRate
>
0
?
(
ProfitRate
-
sProfitRate
)
/
sProfitRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
});
#
endregion
...
...
@@ -771,26 +771,26 @@ namespace Mall.Module.MarketingCenter
RList
.
Add
(
new
{
Date
=
"环比成长"
,
PeopleNum
=
Math
.
Round
(
sPeopleNum
>
0
?
PeopleNum
-
sPeopleNum
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
OrderNum
=
Math
.
Round
(
sOrderNum
>
0
?
OrderNum
-
sOrderNum
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PayMoney
=
Math
.
Round
(
sPayMoney
>
0
?
PayMoney
-
sPayMoney
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
BuyNum
=
Math
.
Round
(
sBuyNum
>
0
?
BuyNum
-
sBuyNum
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgOrderNum
=
Math
.
Round
(
sAvgOrderNum
>
0
?
AvgOrderNum
-
sAvgOrderNum
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyNum
=
Math
.
Round
(
sAvgBuyNum
>
0
?
AvgBuyNum
-
sAvgBuyNum
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgUnitPrice
=
Math
.
Round
(
sAvgUnitPrice
>
0
?
AvgUnitPrice
-
sAvgUnitPrice
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyPrice
=
Math
.
Round
(
sAvgBuyPrice
>
0
?
AvgBuyPrice
-
sAvgBuyPrice
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MemberNum
=
Math
.
Round
(
sMemberNum
>
0
?
MemberNum
-
sMemberNum
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PaymentNum
=
Math
.
Round
(
sPaymentNum
>
0
?
PaymentNum
-
sPaymentNum
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MOrderRate
=
Math
.
Round
(
sMOrderRate
>
0
?
MOrderRate
-
sMOrderRate
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PeopleNum
=
Math
.
Round
(
sPeopleNum
>
0
?
(
PeopleNum
-
sPeopleNum
)
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
OrderNum
=
Math
.
Round
(
sOrderNum
>
0
?
(
OrderNum
-
sOrderNum
)
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PayMoney
=
Math
.
Round
(
sPayMoney
>
0
?
(
PayMoney
-
sPayMoney
)
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
BuyNum
=
Math
.
Round
(
sBuyNum
>
0
?
(
BuyNum
-
sBuyNum
)
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgOrderNum
=
Math
.
Round
(
sAvgOrderNum
>
0
?
(
AvgOrderNum
-
sAvgOrderNum
)
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyNum
=
Math
.
Round
(
sAvgBuyNum
>
0
?
(
AvgBuyNum
-
sAvgBuyNum
)
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgUnitPrice
=
Math
.
Round
(
sAvgUnitPrice
>
0
?
(
AvgUnitPrice
-
sAvgUnitPrice
)
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyPrice
=
Math
.
Round
(
sAvgBuyPrice
>
0
?
(
AvgBuyPrice
-
sAvgBuyPrice
)
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MemberNum
=
Math
.
Round
(
sMemberNum
>
0
?
(
MemberNum
-
sMemberNum
)
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PaymentNum
=
Math
.
Round
(
sPaymentNum
>
0
?
(
PaymentNum
-
sPaymentNum
)
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MOrderRate
=
Math
.
Round
(
sMOrderRate
>
0
?
(
MOrderRate
-
sMOrderRate
)
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyNum
=
Math
.
Round
(
sReBuyNum
>
0
?
(
ReBuyNum
-
sReBuyNum
)
/
sReBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyRate
=
Math
.
Round
(
sReBuyRate
>
0
?
ReBuyRate
-
sReBuyRate
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
NewPeopleNum
=
Math
.
Round
(
sNewPeopleNum
>
0
?
NewPeopleNum
-
sNewPeopleNum
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PXNum
=
Math
.
Round
(
sPXNum
>
0
?
PXNum
-
sPXNum
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
VipNum
=
Math
.
Round
(
sVipNum
>
0
?
VipNum
-
sVipNum
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
YXNum
=
Math
.
Round
(
sYXNum
>
0
?
YXNum
-
sYXNum
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
JXNum
=
Math
.
Round
(
sJXNum
>
0
?
JXNum
-
sJXNum
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
Profit
=
Math
.
Round
(
sProfit
>
0
?
Profit
-
sProfit
/
sProfit
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ProfitRate
=
Math
.
Round
(
sProfitRate
>
0
?
ProfitRate
-
sProfitRate
/
sProfitRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyRate
=
Math
.
Round
(
sReBuyRate
>
0
?
(
ReBuyRate
-
sReBuyRate
)
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
NewPeopleNum
=
Math
.
Round
(
sNewPeopleNum
>
0
?
(
NewPeopleNum
-
sNewPeopleNum
)
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PXNum
=
Math
.
Round
(
sPXNum
>
0
?
(
PXNum
-
sPXNum
)
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
VipNum
=
Math
.
Round
(
sVipNum
>
0
?
(
VipNum
-
sVipNum
)
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
YXNum
=
Math
.
Round
(
sYXNum
>
0
?
(
YXNum
-
sYXNum
)
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
JXNum
=
Math
.
Round
(
sJXNum
>
0
?
(
JXNum
-
sJXNum
)
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
Profit
=
Math
.
Round
(
sProfit
>
0
?
(
Profit
-
sProfit
)
/
sProfit
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ProfitRate
=
Math
.
Round
(
sProfitRate
>
0
?
(
ProfitRate
-
sProfitRate
)
/
sProfitRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
});
#
endregion
...
...
@@ -818,49 +818,51 @@ namespace Mall.Module.MarketingCenter
#
endregion
}
else
if
(
Convert
.
ToDateTime
(
SDate
).
Day
==
MaxDay
)
{
int
NowDay
=
MaxDay
-
20
;
int
PreDay
=
Convert
.
ToDateTime
(
prvETime
).
Day
-
20
;
#
region
本月
decimal
PeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PeopleNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
OrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
OrderNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PayMoney
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PayMoney
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
BuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
BuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgOrderNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgUnitPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgUnitPrice
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgBuyPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyPrice
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
MemberNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MemberNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PaymentNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PaymentNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
MOrderRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MOrderRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ReBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ReBuyRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
NewPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
NewPeopleNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
VipNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
VipNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
YXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
YXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
JXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
JXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
Profit
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
Profit
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ProfitRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ProfitRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PeopleNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
OrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
OrderNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PayMoney
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PayMoney
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
BuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
BuyNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgOrderNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgUnitPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgUnitPrice
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgBuyPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyPrice
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
MemberNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MemberNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PaymentNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PaymentNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
MOrderRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MOrderRate
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ReBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ReBuyRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyRate
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
NewPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
NewPeopleNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PXNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
VipNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
VipNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
YXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
YXNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
JXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
JXNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
Profit
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
Profit
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ProfitRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ProfitRate
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
#
endregion
#
region
上月
decimal
sPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PeopleNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
OrderNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPayMoney
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PayMoney
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
BuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgOrderNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgUnitPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgUnitPrice
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgBuyPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyPrice
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sMemberNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MemberNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPaymentNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PaymentNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sMOrderRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MOrderRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sReBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sReBuyRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sNewPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
NewPeopleNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sVipNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
VipNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sYXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
YXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sJXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
JXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sProfit
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
Profit
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sProfitRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ProfitRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PeopleNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
OrderNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPayMoney
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PayMoney
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
BuyNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgOrderNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgUnitPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgUnitPrice
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgBuyPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyPrice
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sMemberNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MemberNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPaymentNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PaymentNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sMOrderRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MOrderRate
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sReBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sReBuyRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyRate
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sNewPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
NewPeopleNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PXNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sVipNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
VipNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sYXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
YXNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sJXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
JXNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sProfit
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
Profit
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sProfitRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ProfitRate
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
#
endregion
#
region
平均
RList
.
Add
(
new
...
...
@@ -892,26 +894,26 @@ namespace Mall.Module.MarketingCenter
RList
.
Add
(
new
{
Date
=
"环比成长"
,
PeopleNum
=
Math
.
Round
(
sPeopleNum
>
0
?
PeopleNum
-
sPeopleNum
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
OrderNum
=
Math
.
Round
(
sOrderNum
>
0
?
OrderNum
-
sOrderNum
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PayMoney
=
Math
.
Round
(
sPayMoney
>
0
?
PayMoney
-
sPayMoney
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
BuyNum
=
Math
.
Round
(
sBuyNum
>
0
?
BuyNum
-
sBuyNum
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgOrderNum
=
Math
.
Round
(
sAvgOrderNum
>
0
?
AvgOrderNum
-
sAvgOrderNum
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyNum
=
Math
.
Round
(
sAvgBuyNum
>
0
?
AvgBuyNum
-
sAvgBuyNum
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgUnitPrice
=
Math
.
Round
(
sAvgUnitPrice
>
0
?
AvgUnitPrice
-
sAvgUnitPrice
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyPrice
=
Math
.
Round
(
sAvgBuyPrice
>
0
?
AvgBuyPrice
-
sAvgBuyPrice
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MemberNum
=
Math
.
Round
(
sMemberNum
>
0
?
MemberNum
-
sMemberNum
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PaymentNum
=
Math
.
Round
(
sPaymentNum
>
0
?
PaymentNum
-
sPaymentNum
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MOrderRate
=
Math
.
Round
(
sMOrderRate
>
0
?
MOrderRate
-
sMOrderRate
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PeopleNum
=
Math
.
Round
(
sPeopleNum
>
0
?
(
PeopleNum
-
sPeopleNum
)
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
OrderNum
=
Math
.
Round
(
sOrderNum
>
0
?
(
OrderNum
-
sOrderNum
)
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PayMoney
=
Math
.
Round
(
sPayMoney
>
0
?
(
PayMoney
-
sPayMoney
)
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
BuyNum
=
Math
.
Round
(
sBuyNum
>
0
?
(
BuyNum
-
sBuyNum
)
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgOrderNum
=
Math
.
Round
(
sAvgOrderNum
>
0
?
(
AvgOrderNum
-
sAvgOrderNum
)
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyNum
=
Math
.
Round
(
sAvgBuyNum
>
0
?
(
AvgBuyNum
-
sAvgBuyNum
)
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgUnitPrice
=
Math
.
Round
(
sAvgUnitPrice
>
0
?
(
AvgUnitPrice
-
sAvgUnitPrice
)
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
AvgBuyPrice
=
Math
.
Round
(
sAvgBuyPrice
>
0
?
(
AvgBuyPrice
-
sAvgBuyPrice
)
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MemberNum
=
Math
.
Round
(
sMemberNum
>
0
?
(
MemberNum
-
sMemberNum
)
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PaymentNum
=
Math
.
Round
(
sPaymentNum
>
0
?
(
PaymentNum
-
sPaymentNum
)
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
MOrderRate
=
Math
.
Round
(
sMOrderRate
>
0
?
(
MOrderRate
-
sMOrderRate
)
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyNum
=
Math
.
Round
(
sReBuyNum
>
0
?
(
ReBuyNum
-
sReBuyNum
)
/
sReBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyRate
=
Math
.
Round
(
sReBuyRate
>
0
?
ReBuyRate
-
sReBuyRate
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
NewPeopleNum
=
Math
.
Round
(
sNewPeopleNum
>
0
?
NewPeopleNum
-
sNewPeopleNum
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PXNum
=
Math
.
Round
(
sPXNum
>
0
?
PXNum
-
sPXNum
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
VipNum
=
Math
.
Round
(
sVipNum
>
0
?
VipNum
-
sVipNum
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
YXNum
=
Math
.
Round
(
sYXNum
>
0
?
YXNum
-
sYXNum
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
JXNum
=
Math
.
Round
(
sJXNum
>
0
?
JXNum
-
sJXNum
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
Profit
=
Math
.
Round
(
sProfit
>
0
?
Profit
-
sProfit
/
sProfit
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ProfitRate
=
Math
.
Round
(
sProfitRate
>
0
?
ProfitRate
-
sProfitRate
/
sProfitRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ReBuyRate
=
Math
.
Round
(
sReBuyRate
>
0
?
(
ReBuyRate
-
sReBuyRate
)
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
NewPeopleNum
=
Math
.
Round
(
sNewPeopleNum
>
0
?
(
NewPeopleNum
-
sNewPeopleNum
)
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
PXNum
=
Math
.
Round
(
sPXNum
>
0
?
(
PXNum
-
sPXNum
)
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
VipNum
=
Math
.
Round
(
sVipNum
>
0
?
(
VipNum
-
sVipNum
)
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
YXNum
=
Math
.
Round
(
sYXNum
>
0
?
(
YXNum
-
sYXNum
)
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
JXNum
=
Math
.
Round
(
sJXNum
>
0
?
(
JXNum
-
sJXNum
)
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
Profit
=
Math
.
Round
(
sProfit
>
0
?
(
Profit
-
sProfit
)
/
sProfit
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
ProfitRate
=
Math
.
Round
(
sProfitRate
>
0
?
(
ProfitRate
-
sProfitRate
)
/
sProfitRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
,
});
#
endregion
...
...
@@ -946,26 +948,26 @@ namespace Mall.Module.MarketingCenter
RList
.
Add
(
new
{
Date
=
"月平均"
,
PeopleNum
=
yPeopleNum
,
OrderNum
=
yOrderNum
,
PayMoney
=
yPayMoney
,
BuyNum
=
yBuyNum
,
AvgOrderNum
=
yAvgOrderNum
,
AvgBuyNum
=
yAvgBuyNum
,
AvgUnitPrice
=
yAvgUnitPrice
,
AvgBuyPrice
=
yAvgBuyPrice
,
MemberNum
=
yMemberNum
,
PaymentNum
=
yPaymentNum
,
MOrderRate
=
yMOrderRate
,
ReBuyNum
=
yReBuyNum
,
ReBuyRate
=
yReBuyRate
,
NewPeopleNum
=
yNewPeopleNum
,
PXNum
=
yPXNum
,
VipNum
=
yVipNum
,
YXNum
=
yYXNum
,
JXNum
=
yJXNum
,
Profit
=
yProfit
,
ProfitRate
=
yProfitRate
PeopleNum
=
Math
.
Round
(
yPeopleNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
OrderNum
=
Math
.
Round
(
yOrderNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
PayMoney
=
Math
.
Round
(
yPayMoney
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
BuyNum
=
Math
.
Round
(
yBuyNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
AvgOrderNum
=
Math
.
Round
(
yAvgOrderNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
AvgBuyNum
=
Math
.
Round
(
yAvgBuyNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
AvgUnitPrice
=
Math
.
Round
(
yAvgUnitPrice
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
AvgBuyPrice
=
Math
.
Round
(
yAvgBuyPrice
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
MemberNum
=
Math
.
Round
(
yMemberNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
PaymentNum
=
Math
.
Round
(
yPaymentNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
MOrderRate
=
Math
.
Round
(
yMOrderRate
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
ReBuyNum
=
Math
.
Round
(
yReBuyNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
ReBuyRate
=
Math
.
Round
(
yReBuyRate
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
NewPeopleNum
=
Math
.
Round
(
yNewPeopleNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
PXNum
=
Math
.
Round
(
yPXNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
VipNum
=
Math
.
Round
(
yVipNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
YXNum
=
Math
.
Round
(
yYXNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
JXNum
=
Math
.
Round
(
yJXNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
Profit
=
Math
.
Round
(
yProfit
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
,
ProfitRate
=
Math
.
Round
(
yProfitRate
/
3
,
2
,
MidpointRounding
.
AwayFromZero
)
});
#
endregion
...
...
@@ -1230,24 +1232,24 @@ namespace Mall.Module.MarketingCenter
{
ExcelRows
=
new
List
<
ExcelColumn
>(
23
)
{
new
ExcelColumn
(
value
:
"环比成长"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPeopleNum
>
0
?
PeopleNum
-
sPeopleNum
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sOrderNum
>
0
?
OrderNum
-
sOrderNum
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPayMoney
>
0
?
PayMoney
-
sPayMoney
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sBuyNum
>
0
?
BuyNum
-
sBuyNum
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgOrderNum
>
0
?
AvgOrderNum
-
sAvgOrderNum
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyNum
>
0
?
AvgBuyNum
-
sAvgBuyNum
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgUnitPrice
>
0
?
AvgUnitPrice
-
sAvgUnitPrice
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyPrice
>
0
?
AvgBuyPrice
-
sAvgBuyPrice
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMemberNum
>
0
?
MemberNum
-
sMemberNum
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPaymentNum
>
0
?
PaymentNum
-
sPaymentNum
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMOrderRate
>
0
?
MOrderRate
-
sMOrderRate
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPeopleNum
>
0
?
(
PeopleNum
-
sPeopleNum
)
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sOrderNum
>
0
?
(
OrderNum
-
sOrderNum
)
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPayMoney
>
0
?
(
PayMoney
-
sPayMoney
)
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sBuyNum
>
0
?
(
BuyNum
-
sBuyNum
)
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgOrderNum
>
0
?
(
AvgOrderNum
-
sAvgOrderNum
)
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyNum
>
0
?
(
AvgBuyNum
-
sAvgBuyNum
)
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgUnitPrice
>
0
?
(
AvgUnitPrice
-
sAvgUnitPrice
)
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyPrice
>
0
?
(
AvgBuyPrice
-
sAvgBuyPrice
)
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMemberNum
>
0
?
(
MemberNum
-
sMemberNum
)
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPaymentNum
>
0
?
(
PaymentNum
-
sPaymentNum
)
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMOrderRate
>
0
?
(
MOrderRate
-
sMOrderRate
)
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyNum
>
0
?
(
ReBuyNum
-
sReBuyNum
)
/
sReBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyRate
>
0
?
ReBuyRate
-
sReBuyRate
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sNewPeopleNum
>
0
?
NewPeopleNum
-
sNewPeopleNum
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPXNum
>
0
?
PXNum
-
sPXNum
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sVipNum
>
0
?
VipNum
-
sVipNum
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sYXNum
>
0
?
YXNum
-
sYXNum
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sJXNum
>
0
?
JXNum
-
sJXNum
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyRate
>
0
?
(
ReBuyRate
-
sReBuyRate
)
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sNewPeopleNum
>
0
?
(
NewPeopleNum
-
sNewPeopleNum
)
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPXNum
>
0
?
(
PXNum
-
sPXNum
)
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sVipNum
>
0
?
(
VipNum
-
sVipNum
)
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sYXNum
>
0
?
(
YXNum
-
sYXNum
)
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sJXNum
>
0
?
(
JXNum
-
sJXNum
)
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
},
ColumnHight
=
30
};
...
...
@@ -1389,24 +1391,24 @@ namespace Mall.Module.MarketingCenter
{
ExcelRows
=
new
List
<
ExcelColumn
>(
23
)
{
new
ExcelColumn
(
value
:
"环比成长"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPeopleNum
>
0
?
PeopleNum
-
sPeopleNum
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sOrderNum
>
0
?
OrderNum
-
sOrderNum
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPayMoney
>
0
?
PayMoney
-
sPayMoney
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sBuyNum
>
0
?
BuyNum
-
sBuyNum
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgOrderNum
>
0
?
AvgOrderNum
-
sAvgOrderNum
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyNum
>
0
?
AvgBuyNum
-
sAvgBuyNum
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgUnitPrice
>
0
?
AvgUnitPrice
-
sAvgUnitPrice
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyPrice
>
0
?
AvgBuyPrice
-
sAvgBuyPrice
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMemberNum
>
0
?
MemberNum
-
sMemberNum
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPaymentNum
>
0
?
PaymentNum
-
sPaymentNum
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMOrderRate
>
0
?
MOrderRate
-
sMOrderRate
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPeopleNum
>
0
?
(
PeopleNum
-
sPeopleNum
)
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sOrderNum
>
0
?
(
OrderNum
-
sOrderNum
)
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPayMoney
>
0
?
(
PayMoney
-
sPayMoney
)
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sBuyNum
>
0
?
(
BuyNum
-
sBuyNum
)
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgOrderNum
>
0
?
(
AvgOrderNum
-
sAvgOrderNum
)
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyNum
>
0
?
(
AvgBuyNum
-
sAvgBuyNum
)
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgUnitPrice
>
0
?
(
AvgUnitPrice
-
sAvgUnitPrice
)
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyPrice
>
0
?
(
AvgBuyPrice
-
sAvgBuyPrice
)
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMemberNum
>
0
?
(
MemberNum
-
sMemberNum
)
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPaymentNum
>
0
?
(
PaymentNum
-
sPaymentNum
)
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMOrderRate
>
0
?
(
MOrderRate
-
sMOrderRate
)
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyNum
>
0
?
(
ReBuyNum
-
sReBuyNum
)
/
sReBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyRate
>
0
?
ReBuyRate
-
sReBuyRate
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sNewPeopleNum
>
0
?
NewPeopleNum
-
sNewPeopleNum
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPXNum
>
0
?
PXNum
-
sPXNum
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sVipNum
>
0
?
VipNum
-
sVipNum
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sYXNum
>
0
?
YXNum
-
sYXNum
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sJXNum
>
0
?
JXNum
-
sJXNum
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyRate
>
0
?
(
ReBuyRate
-
sReBuyRate
)
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sNewPeopleNum
>
0
?
(
NewPeopleNum
-
sNewPeopleNum
)
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPXNum
>
0
?
(
PXNum
-
sPXNum
)
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sVipNum
>
0
?
(
VipNum
-
sVipNum
)
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sYXNum
>
0
?
(
YXNum
-
sYXNum
)
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sJXNum
>
0
?
(
JXNum
-
sJXNum
)
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
},
ColumnHight
=
30
};
...
...
@@ -1470,49 +1472,51 @@ namespace Mall.Module.MarketingCenter
}
else
if
(
Convert
.
ToDateTime
(
SDate
).
Day
==
MaxDay
)
{
int
NowDay
=
MaxDay
-
20
;
int
PreDay
=
Convert
.
ToDateTime
(
prvETime
).
Day
-
20
;
#
region
本月
decimal
PeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PeopleNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
OrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
OrderNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PayMoney
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PayMoney
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
BuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
BuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgOrderNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgUnitPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgUnitPrice
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgBuyPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyPrice
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
MemberNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MemberNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PaymentNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PaymentNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
MOrderRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MOrderRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ReBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ReBuyRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
NewPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
NewPeopleNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
VipNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
VipNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
YXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
YXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
JXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
JXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
Profit
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
Profit
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ProfitRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ProfitRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PeopleNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
OrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
OrderNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PayMoney
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PayMoney
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
BuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
BuyNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgOrderNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgUnitPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgUnitPrice
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
AvgBuyPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyPrice
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
MemberNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MemberNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PaymentNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PaymentNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
MOrderRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MOrderRate
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ReBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ReBuyRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyRate
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
NewPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
NewPeopleNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
PXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PXNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
VipNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
VipNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
YXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
YXNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
JXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
JXNum
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
Profit
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
Profit
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
ProfitRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
list
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ProfitRate
))
/
NowDay
,
2
,
MidpointRounding
.
AwayFromZero
);
#
endregion
#
region
上月
decimal
sPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PeopleNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
OrderNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPayMoney
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PayMoney
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
BuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgOrderNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgUnitPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgUnitPrice
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgBuyPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyPrice
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sMemberNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MemberNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPaymentNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PaymentNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sMOrderRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MOrderRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sReBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sReBuyRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sNewPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
NewPeopleNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sVipNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
VipNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sYXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
YXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sJXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
JXNum
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sProfit
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
Profit
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sProfitRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ProfitRate
))
/
10
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PeopleNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
OrderNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPayMoney
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PayMoney
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
BuyNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgOrderNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgOrderNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgUnitPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgUnitPrice
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sAvgBuyPrice
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
AvgBuyPrice
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sMemberNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MemberNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPaymentNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PaymentNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sMOrderRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
MOrderRate
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sReBuyNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sReBuyRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ReBuyRate
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sNewPeopleNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
NewPeopleNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sPXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
PXNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sVipNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
VipNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sYXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
YXNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sJXNum
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
JXNum
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sProfit
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
Profit
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
decimal
sProfitRate
=
Math
.
Round
(
Convert
.
ToDecimal
(
prvlist
.
Where
(
x
=>
x
.
Date
.
Day
>
20
).
Sum
(
x
=>
x
.
ProfitRate
))
/
PreDay
,
2
,
MidpointRounding
.
AwayFromZero
);
#
endregion
#
region
平均
...
...
@@ -1548,24 +1552,24 @@ namespace Mall.Module.MarketingCenter
{
ExcelRows
=
new
List
<
ExcelColumn
>(
23
)
{
new
ExcelColumn
(
value
:
"环比成长"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPeopleNum
>
0
?
PeopleNum
-
sPeopleNum
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sOrderNum
>
0
?
OrderNum
-
sOrderNum
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPayMoney
>
0
?
PayMoney
-
sPayMoney
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sBuyNum
>
0
?
BuyNum
-
sBuyNum
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgOrderNum
>
0
?
AvgOrderNum
-
sAvgOrderNum
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyNum
>
0
?
AvgBuyNum
-
sAvgBuyNum
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgUnitPrice
>
0
?
AvgUnitPrice
-
sAvgUnitPrice
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyPrice
>
0
?
AvgBuyPrice
-
sAvgBuyPrice
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMemberNum
>
0
?
MemberNum
-
sMemberNum
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPaymentNum
>
0
?
PaymentNum
-
sPaymentNum
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMOrderRate
>
0
?
MOrderRate
-
sMOrderRate
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPeopleNum
>
0
?
(
PeopleNum
-
sPeopleNum
)
/
sPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sOrderNum
>
0
?
(
OrderNum
-
sOrderNum
)
/
sOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPayMoney
>
0
?
(
PayMoney
-
sPayMoney
)
/
sPayMoney
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sBuyNum
>
0
?
(
BuyNum
-
sBuyNum
)
/
sBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgOrderNum
>
0
?
(
AvgOrderNum
-
sAvgOrderNum
)
/
sAvgOrderNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyNum
>
0
?
(
AvgBuyNum
-
sAvgBuyNum
)
/
sAvgBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgUnitPrice
>
0
?
(
AvgUnitPrice
-
sAvgUnitPrice
)
/
sAvgUnitPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sAvgBuyPrice
>
0
?
(
AvgBuyPrice
-
sAvgBuyPrice
)
/
sAvgBuyPrice
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMemberNum
>
0
?
(
MemberNum
-
sMemberNum
)
/
sMemberNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPaymentNum
>
0
?
(
PaymentNum
-
sPaymentNum
)
/
sPaymentNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sMOrderRate
>
0
?
(
MOrderRate
-
sMOrderRate
)
/
sMOrderRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyNum
>
0
?
(
ReBuyNum
-
sReBuyNum
)
/
sReBuyNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyRate
>
0
?
ReBuyRate
-
sReBuyRate
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sNewPeopleNum
>
0
?
NewPeopleNum
-
sNewPeopleNum
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPXNum
>
0
?
PXNum
-
sPXNum
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sVipNum
>
0
?
VipNum
-
sVipNum
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sYXNum
>
0
?
YXNum
-
sYXNum
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sJXNum
>
0
?
JXNum
-
sJXNum
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sReBuyRate
>
0
?
(
ReBuyRate
-
sReBuyRate
)
/
sReBuyRate
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sNewPeopleNum
>
0
?
(
NewPeopleNum
-
sNewPeopleNum
)
/
sNewPeopleNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sPXNum
>
0
?
(
PXNum
-
sPXNum
)
/
sPXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sVipNum
>
0
?
(
VipNum
-
sVipNum
)
/
sVipNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sYXNum
>
0
?
(
YXNum
-
sYXNum
)
/
sYXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:(
Math
.
Round
(
sJXNum
>
0
?
(
JXNum
-
sJXNum
)
/
sJXNum
:
1
,
4
,
MidpointRounding
.
AwayFromZero
)
*
100
).
ToString
()+
"%"
){
},
},
ColumnHight
=
30
};
...
...
@@ -1607,24 +1611,24 @@ namespace Mall.Module.MarketingCenter
{
ExcelRows
=
new
List
<
ExcelColumn
>(
23
)
{
new
ExcelColumn
(
value
:
"月平均"
){
},
new
ExcelColumn
(
value
:
(
yPeopleNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yOrderNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yPayMoney
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yBuyNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yAvgOrderNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yAvgBuyNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yAvgUnitPrice
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yAvgBuyPrice
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yMemberNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yPaymentNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yMOrderRate
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:
(
yReBuyNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yReBuyRate
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:
(
yNewPeopleNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yPXNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yVipNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yYXNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
(
yJXNum
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yPeopleNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yOrderNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yPayMoney
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yBuyNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yAvgOrderNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yAvgBuyNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yAvgUnitPrice
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yAvgBuyPrice
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yMemberNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yPaymentNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yMOrderRate
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yReBuyNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yReBuyRate
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()+
"%"
){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yNewPeopleNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yPXNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yVipNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yYXNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
new
ExcelColumn
(
value
:
Math
.
Round
(
yJXNum
/
3
,
2
,
MidpointRounding
.
AwayFromZero
).
ToString
()){
},
},
ColumnHight
=
30
};
...
...
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