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
c97527f9
Commit
c97527f9
authored
Aug 20, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
a307d82b
63d0adc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
LiveHouseController.cs
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
+20
-10
No files found.
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
View file @
c97527f9
...
...
@@ -150,8 +150,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item
.
ALLCommission
=
item
.
CostFreight
+
item
.
CostMoney
+
item
.
PackingMoney
+
item
.
GoodsFreight
+
item
.
FXCommission
+
item
.
LiveCommission
+
item
.
OtherPrice
;
item
.
NoPaid
=
item
.
ALLCommission
;
item
.
Paid
=
item
.
PaidCostMoney
+
item
.
RemitFXCommission
+
(!
string
.
IsNullOrWhiteSpace
(
item
.
LiveFinanceIds
)
?
item
.
LiveCommission
:
0
);
item
.
GrossProfit
=
item
.
AllPrice
-
item
.
ALLCommission
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
item
.
AllPrice
),
2
,
MidpointRounding
.
AwayFromZero
);
item
.
GrossProfit
=
(
item
.
AllPrice
+
item
.
RealMoney
)
-
item
.
CouponMoney
-
item
.
RefundActual
-
item
.
ALLCommission
-
item
.
PayMoney
;
item
.
GrossProfitRate
=
(
item
.
AllPrice
+
item
.
RealMoney
)
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
(
item
.
AllPrice
+
item
.
RealMoney
-
item
.
RefundActual
)
),
2
,
MidpointRounding
.
AwayFromZero
);
}
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
;
...
...
@@ -325,9 +325,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
new
ExcelColumn
(
value
:
"其他"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"已付"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"应付"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"退款金额"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"实际收入"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"实际支出"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"优惠金额"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"实际退款金额"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"其他实际收入"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"其他实际支出"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"毛利"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"分公司名称"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"分公司结算"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
...
...
@@ -352,8 +353,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item
.
ALLCommission
=
item
.
CostFreight
+
item
.
CostMoney
+
item
.
PackingMoney
+
item
.
GoodsFreight
+
item
.
FXCommission
+
item
.
LiveCommission
+
item
.
OtherPrice
;
item
.
NoPaid
=
item
.
ALLCommission
;
item
.
Paid
=
item
.
PaidCostMoney
+
item
.
RemitFXCommission
+
(!
string
.
IsNullOrWhiteSpace
(
item
.
LiveFinanceIds
)
?
item
.
LiveCommission
:
0
);
item
.
GrossProfit
=
item
.
AllPrice
-
item
.
ALLCommission
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
item
.
AllPrice
),
2
,
MidpointRounding
.
AwayFromZero
);
item
.
GrossProfit
=
(
item
.
AllPrice
+
item
.
RealMoney
)
-
item
.
CouponMoney
-
item
.
RefundActual
-
item
.
ALLCommission
-
item
.
PayMoney
;
item
.
GrossProfitRate
=
(
item
.
AllPrice
+
item
.
RealMoney
)
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
(
item
.
AllPrice
+
item
.
RealMoney
-
item
.
RefundActual
)),
2
,
MidpointRounding
.
AwayFromZero
);
//item.GrossProfit = item.AllPrice - item.ALLCommission;
//item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
}
#
region
组装数据
int
Num
=
0
;
...
...
@@ -409,12 +412,13 @@ namespace Mall.WebApi.Controllers.AppletWeChat
// datarow.ExcelRows.Add(new ExcelColumn(value: item.ALLCommission.ToString("#0.00")) { });
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
Paid
.
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
NoPaid
.
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
CouponMoney
.
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
RefundActual
.
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
RealMoney
.
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
PayMoney
.
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
GrossProfit
.
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
CompanyName
)
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
Math
.
Round
((
item
.
GrossProfit
*
item
.
CompanyProfitRate
),
2
,
MidpointRounding
.
AwayFromZero
).
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
Math
.
Round
((
item
.
GrossProfit
*
item
.
CompanyProfitRate
),
2
,
MidpointRounding
.
AwayFromZero
).
ToString
(
"#0.00"
))
{
});
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
GrossProfitRate
.
ToString
(
"#0.00"
))
{
});
slist
.
Add
(
datarow
);
}
...
...
@@ -498,8 +502,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
// item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.OneCommission + item.TwoCommission + item.OtherPrice;
item
.
NoPaid
=
item
.
ALLCommission
;
item
.
Paid
=
item
.
PaidCostMoney
+
item
.
RemitFXCommission
+
(!
string
.
IsNullOrWhiteSpace
(
item
.
LiveFinanceIds
)
?
item
.
LiveCommission
:
0
);
item
.
GrossProfit
=
item
.
AllPrice
-
item
.
ALLCommission
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
item
.
AllPrice
),
2
,
MidpointRounding
.
AwayFromZero
);
item
.
GrossProfit
=
(
item
.
AllPrice
+
item
.
RealMoney
)
-
item
.
CouponMoney
-
item
.
RefundActual
-
item
.
ALLCommission
-
item
.
PayMoney
;
item
.
GrossProfitRate
=
(
item
.
AllPrice
+
item
.
RealMoney
)
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
(
item
.
AllPrice
+
item
.
RealMoney
-
item
.
RefundActual
)),
2
,
MidpointRounding
.
AwayFromZero
);
//item.GrossProfit = item.AllPrice - item.ALLCommission;
//item.GrossProfitRate = item.AllPrice == 0 ? 0 : Math.Round((item.GrossProfit / item.AllPrice), 2, MidpointRounding.AwayFromZero);
}
var
retult
=
new
...
...
@@ -526,6 +532,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
TotalPaid
=
list
.
Sum
(
x
=>
x
.
Paid
),
//已付小计
TotalNoPaid
=
list
.
Sum
(
x
=>
x
.
NoPaid
),
//未付小计
TotalGrossProfit
=
list
.
Sum
(
x
=>
x
.
GrossProfit
),
//毛利小计
TotalRealMoney
=
list
.
Sum
(
x
=>
x
.
RealMoney
),
//其他实收
TotalPayMoney
=
list
.
Sum
(
x
=>
x
.
PayMoney
),
//其他实付
TotalCouponMoney
=
list
.
Sum
(
x
=>
x
.
CouponMoney
),
//优惠金额
TotalCompanyProfit
=
list
.
Sum
(
x
=>
Math
.
Round
((
x
.
GrossProfit
*
x
.
CompanyProfitRate
),
2
,
MidpointRounding
.
AwayFromZero
)),
//公司结算金额
};
...
...
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