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
4554fa9d
Commit
4554fa9d
authored
Jul 02, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
cfb7aaee
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
177 additions
and
39 deletions
+177
-39
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+86
-36
LiveHouseController.cs
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
+89
-1
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+2
-2
No files found.
Mall.Module.Product/ProductModule.cs
View file @
4554fa9d
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
View file @
4554fa9d
...
...
@@ -2,9 +2,11 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Google.Protobuf.WellKnownTypes
;
using
Mall.Common
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Query
;
using
Mall.Module.MarketingCenter
;
...
...
@@ -169,7 +171,7 @@ 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
},
...
...
@@ -253,6 +255,92 @@ namespace Mall.WebApi.Controllers.AppletWeChat
}
}
/// <summary>
/// 获取商品
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetGoodsList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Extend
>(
requestParm
.
msg
.
ToString
());
query
.
TenantId
=
requestParm
.
TenantId
;
query
.
MallBaseId
=
requestParm
.
MallBaseId
;
var
oldLogisticsList
=
productModule
.
GetGoodsList
(
query
).
Take
(
15
);
return
ApiResult
.
Success
(
""
,
oldLogisticsList
);
}
/// <summary>
/// 获取分销商
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetDistributorInfoList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Distributor_Info_Extend
>(
requestParm
.
msg
.
ToString
());
query
.
TenantId
=
requestParm
.
TenantId
;
query
.
MallBaseId
=
requestParm
.
MallBaseId
;
var
oldLogisticsList
=
productModule
.
GetDistributorInfoList
(
query
).
Take
(
15
);
return
ApiResult
.
Success
(
""
,
oldLogisticsList
);
}
/// <summary>
/// 获取分销商
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetTotalOrderProfitLoss
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
OrderStatistics_Query
demodel
=
JsonConvert
.
DeserializeObject
<
OrderStatistics_Query
>(
requestParm
.
msg
.
ToString
());
demodel
.
TenantId
=
requestParm
.
TenantId
;
demodel
.
MallBaseId
=
requestParm
.
MallBaseId
;
var
list
=
statisticsModule
.
GetAllOrderProfitLossList
(
demodel
);
foreach
(
var
item
in
list
)
{
item
.
ALLCommission
=
item
.
CostFreight
+
item
.
CostMoney
+
item
.
PackingMoney
+
item
.
GoodsFreight
+
item
.
OneCommission
+
item
.
TwoCommission
+
item
.
OtherPrice
;
item
.
NoPaid
=
item
.
ALLCommission
-
item
.
Paid
;
item
.
GrossProfit
=
item
.
AllPrice
-
item
.
ALLCommission
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
item
.
AllPrice
),
2
,
MidpointRounding
.
AwayFromZero
);
}
var
retult
=
new
{
TotalFinal_Price
=
list
.
Sum
(
x
=>
x
.
Final_Price
),
//结算款小计
TotalFreightMoney
=
list
.
Sum
(
x
=>
string
.
IsNullOrWhiteSpace
(
x
.
FreightMoney
)
?
0
:
Convert
.
ToDecimal
(
x
.
FreightMoney
)),
//运费小计
TotalAllPrice
=
list
.
Sum
(
x
=>
x
.
AllPrice
),
//已收小计
TotalNoAllPrice
=
list
.
Sum
(
x
=>
0
),
//未收小计
TotalPay
=
list
.
Sum
(
x
=>
x
.
AllPrice
),
//合计小计
TotalCostMoney
=
list
.
Sum
(
x
=>
x
.
CostMoney
),
//采购成本小计
TotalPackingMoney
=
list
.
Sum
(
x
=>
x
.
PackingMoney
),
//包装费摊销小计
TotalCostFreight
=
list
.
Sum
(
x
=>
x
.
CostFreight
),
//快递成本小计
TotalGoodsFreight
=
list
.
Sum
(
x
=>
x
.
GoodsFreight
),
//商品运费小计
TotalBranchCommission
=
list
.
Sum
(
x
=>
x
.
BranchCommission
),
//分公司小计
TotalGeneralAgentCommission
=
list
.
Sum
(
x
=>
x
.
GeneralAgentCommission
),
//总代理小计
TotalSpecialCommission
=
list
.
Sum
(
x
=>
x
.
SpecialCommission
),
//特一级小计
TotalOneCommission
=
list
.
Sum
(
x
=>
x
.
OneCommission
),
//一级返佣小计
TotalOneTwoCommission
=
list
.
Sum
(
x
=>
x
.
TwoCommission
),
//二级返佣小计
TotalOneOtherPrice
=
list
.
Sum
(
x
=>
x
.
OtherPrice
),
//其他费用小计
TotalALLCommission
=
list
.
Sum
(
x
=>
x
.
ALLCommission
),
//营业合计小计
TotalPaid
=
list
.
Sum
(
x
=>
x
.
Paid
),
//已付小计
TotalNoPaid
=
list
.
Sum
(
x
=>
x
.
NoPaid
),
//未付小计
TotalGrossProfit
=
list
.
Sum
(
x
=>
x
.
GrossProfit
),
//毛利小计
};
return
ApiResult
.
Success
(
""
,
retult
);
}
#
endregion
}
}
\ No newline at end of file
Mall.WindowsService/Module/FinanceModule.cs
View file @
4554fa9d
...
...
@@ -256,8 +256,8 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
WBMoney
=
(
result
.
Sum
(
x
=>
x
.
FinanceType
==
1
?
(
x
.
Final_Price
??
0
)
:
(
x
.
FreightMoney
??
0
)))
-
OriginalFee
,
RB_Branch_Id
=
Config
.
IncomeBranchId
,
RemitterName
=
item
.
RemitterName
,
TradeDate
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
AccountNumber
=
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
),
TradeDate
=
System
.
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
),
AccountNumber
=
System
.
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyyMMdd"
),
TemplateId
=
item
.
WorkFlowId
,
OrderSource
=
16
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据"
,
...
...
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