Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
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
bltdc
DataCenter_Core2.1_20190520
Commits
f6173c37
Commit
f6173c37
authored
Jan 05, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4633323c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
39 deletions
+40
-39
Program.cs
Bailun.DC.MonthSaleProfit/Program.cs
+18
-18
Services.cs
Bailun.DC.MonthSaleProfit/Services.cs
+5
-4
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+2
-2
Program.cs
Bailun.DC.SyncSkuFinanceCategory/Program.cs
+14
-14
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+1
-1
No files found.
Bailun.DC.MonthSaleProfit/Program.cs
View file @
f6173c37
...
@@ -7,26 +7,26 @@ namespace Bailun.DC.MonthSaleProfit
...
@@ -7,26 +7,26 @@ namespace Bailun.DC.MonthSaleProfit
{
{
class
Program
class
Program
{
{
static
async
Task
Main
(
string
[]
args
)
//static async Task Main(string[] args)
{
Console
.
WriteLine
(
"启动服务 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
{
services
.
AddHostedService
<
Services
>();
});
await
builder
.
RunConsoleAsync
();
}
//static void Main(string[] args)
//{
//{
// var _services = new Services();
// Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
// var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// {
// services.AddHostedService<Services>();
// });
// var start = DateTime.Parse("2020-12-01");
// await builder.RunConsoleAsync();
// //_services.Init(start);
// _services.InitNew(start);
// //_services.InitNew4K(start);
// //_services.InitNew4K(start);
//}
//}
static
void
Main
(
string
[]
args
)
{
var
_services
=
new
Services
();
var
start
=
DateTime
.
Parse
(
"2020-12-01"
);
//_services.Init(start);
_services
.
InitNew
(
start
);
//_services.InitNew4K(start);
//_services.InitNew4K(start);
}
}
}
}
}
Bailun.DC.MonthSaleProfit/Services.cs
View file @
f6173c37
...
@@ -477,6 +477,7 @@ namespace Bailun.DC.MonthSaleProfit
...
@@ -477,6 +477,7 @@ namespace Bailun.DC.MonthSaleProfit
fee_refund
=
0
,
fee_refund
=
0
,
fee_sales_count
=
0
,
fee_sales_count
=
0
,
fee_storage
=
0
,
fee_storage
=
0
,
fee_storage_incidentals
=
0
,
cost_fuzhuang
=
0
,
cost_fuzhuang
=
0
,
...
@@ -621,13 +622,13 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
...
@@ -621,13 +622,13 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
var
objLogistics
=
cn
.
Query
<
Models
.
mLogisticsFee
>(
sql
,
null
,
null
,
true
,
6
*
60
).
ToList
();
var
objLogistics
=
cn
.
Query
<
Models
.
mLogisticsFee
>(
sql
,
null
,
null
,
true
,
6
*
60
).
ToList
();
//物流仓储费用 = 头程运输+直邮物流费(国内发货)+尾程物流费(国外发货)+海外仓仓储
及其他费用
//物流仓储费用 = 头程运输+直邮物流费(国内发货)+尾程物流费(国外发货)+海外仓仓储
+海外仓杂费
m
.
fee_logistics_first
=
objOrder
.
Sum
(
a
=>
a
.
cost_first
??
0
)
+
objFBA
.
Sum
(
a
=>
a
.
cost_first
??
0
);
m
.
fee_logistics_first
=
objOrder
.
Sum
(
a
=>
a
.
cost_first
??
0
)
+
objFBA
.
Sum
(
a
=>
a
.
cost_first
??
0
);
m
.
fee_logistics_direct
=
objLogistics
.
Where
(
a
=>
a
.
hq_type
==
"国内仓"
)?.
Sum
(
b
=>
b
.
cost_logistics
)
??
0
;
//objOrder.Sum(a => a.cost_logistics??0);
m
.
fee_logistics_direct
=
objLogistics
.
Where
(
a
=>
a
.
hq_type
==
"国内仓"
)?.
Sum
(
b
=>
b
.
cost_logistics
)
??
0
;
//objOrder.Sum(a => a.cost_logistics??0);
m
.
fee_logistics_tail
=
objLogistics
.
Where
(
a
=>
a
.
hq_type
!=
"国内仓"
)?.
Sum
(
b
=>
b
.
cost_logistics
)
??
0
;
m
.
fee_logistics_tail
=
objLogistics
.
Where
(
a
=>
a
.
hq_type
!=
"国内仓"
)?.
Sum
(
b
=>
b
.
cost_logistics
)
??
0
;
m
.
fee_storage
=
objOrder
.
Sum
(
a
=>
a
.
total_fee
??
0
);
m
.
fee_storage
=
objOrder
.
Sum
(
a
=>
a
.
total_fee
??
0
);
m
.
fee_logistics_storage
=
m
.
fee_logistics_first
+
m
.
fee_logistics_direct
+
m
.
fee_logistics_tail
+
m
.
fee_storage
;
m
.
fee_logistics_storage
=
m
.
fee_logistics_first
+
m
.
fee_logistics_direct
+
m
.
fee_logistics_tail
+
m
.
fee_storage
+
m
.
fee_storage_incidentals
;
//付现销售费用
//付现销售费用
...
@@ -688,8 +689,8 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
...
@@ -688,8 +689,8 @@ join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
}
}
cn
.
Execute
(
"delete from dc_month_sales_profit where isedit=0 and month='"
+
m
.
month
+
"'"
);
cn
.
Execute
(
"delete from dc_month_sales_profit where isedit=0 and month='"
+
m
.
month
+
"'"
);
sql
=
$@"insert dc_month_sales_profit (month,amount_sales,amount_sales_jingyou,amount_sales_dianzi,amount_sales_jiaju,amount_sales_meirongmj,amount_sales_fuzhuang,amount_sales_other,cost,cost_jingyou,cost_dianzi,cost_jiaju,cost_meirongmj,cost_fuzhuang,cost_other,fee_platform_and_refund,fee_platform,fee_fba,fee_refund,amount_withdraw,fee_logistics_storage,fee_logistics_first,fee_logistics_direct,fee_logistics_tail,fee_storage,fee_paycash_sales,fee_sales_count,profit_sales,rate_profit_sales,managecost_bl_xg,managecost_bl_gz,managecost_meijia,managercost_yangshan,managercost_chengpincang,managercost_xinhuilan,managercost_count,fee_finance,profit,rate_profit,incoming_other,incoming_non_operating,pay_non_operating,actual_profit,dividend,profit_balance,rate_profit_actual,createtime,lastupdateuserid,lastupdateusername,lastupdatetime,isedit,managercost_dizhi,managercost_meijiashengchan,fee_ad) values
sql
=
$@"insert dc_month_sales_profit (month,amount_sales,amount_sales_jingyou,amount_sales_dianzi,amount_sales_jiaju,amount_sales_meirongmj,amount_sales_fuzhuang,amount_sales_other,cost,cost_jingyou,cost_dianzi,cost_jiaju,cost_meirongmj,cost_fuzhuang,cost_other,fee_platform_and_refund,fee_platform,fee_fba,fee_refund,amount_withdraw,fee_logistics_storage,fee_logistics_first,fee_logistics_direct,fee_logistics_tail,fee_storage,fee_paycash_sales,fee_sales_count,profit_sales,rate_profit_sales,managecost_bl_xg,managecost_bl_gz,managecost_meijia,managercost_yangshan,managercost_chengpincang,managercost_xinhuilan,managercost_count,fee_finance,profit,rate_profit,incoming_other,incoming_non_operating,pay_non_operating,actual_profit,dividend,profit_balance,rate_profit_actual,createtime,lastupdateuserid,lastupdateusername,lastupdatetime,isedit,managercost_dizhi,managercost_meijiashengchan,fee_ad
,fee_storage_incidentals
) values
('
{
m
.
month
}
',
{
m
.
amount_sales
}
,
{
m
.
amount_sales_jingyou
}
,
{
m
.
amount_sales_dianzi
}
,
{
m
.
amount_sales_jiaju
}
,
{
m
.
amount_sales_meirongmj
}
,
{
m
.
amount_sales_fuzhuang
}
,
{
m
.
amount_sales_other
}
,
{
m
.
cost
}
,
{
m
.
cost_jingyou
}
,
{
m
.
cost_dianzi
}
,
{
m
.
cost_jiaju
}
,
{
m
.
cost_meirongmj
}
,
{
m
.
cost_fuzhuang
}
,
{
m
.
cost_other
}
,
{
m
.
fee_platform_and_refund
}
,
{
m
.
fee_platform
}
,
{
m
.
fee_fba
}
,
{
m
.
fee_refund
}
,
{
m
.
amount_withdraw
}
,
{
m
.
fee_logistics_storage
}
,
{
m
.
fee_logistics_first
}
,
{
m
.
fee_logistics_direct
}
,
{
m
.
fee_logistics_tail
}
,
{
m
.
fee_storage
}
,
{
m
.
fee_paycash_sales
}
,
{
m
.
fee_sales_count
}
,
{
m
.
profit_sales
}
,
{
m
.
rate_profit_sales
}
,
{
m
.
managecost_bl_xg
}
,
{
m
.
managecost_bl_gz
}
,
{
m
.
managecost_meijia
}
,
{
m
.
managercost_yangshan
}
,
{
m
.
managercost_chengpincang
}
,
{
m
.
managercost_xinhuilan
}
,
{
m
.
managercost_count
}
,
{
m
.
fee_finance
}
,
{
m
.
profit
}
,
{
m
.
rate_profit
}
,
{
m
.
incoming_other
}
,
{
m
.
incoming_non_operating
}
,
{
m
.
pay_non_operating
}
,
{
m
.
actual_profit
}
,
{
m
.
dividend
}
,
{
m
.
profit_balance
}
,
{
m
.
rate_profit_actual
}
,'
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
',
{
m
.
lastupdateuserid
}
,'
{
m
.
lastupdateusername
}
','
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
',0,
{
m
.
managercost_dizhi
}
,
{
m
.
managercost_meijiashengchan
}
,
{
m
.
fee_ad
}
)"
;
('
{
m
.
month
}
',
{
m
.
amount_sales
}
,
{
m
.
amount_sales_jingyou
}
,
{
m
.
amount_sales_dianzi
}
,
{
m
.
amount_sales_jiaju
}
,
{
m
.
amount_sales_meirongmj
}
,
{
m
.
amount_sales_fuzhuang
}
,
{
m
.
amount_sales_other
}
,
{
m
.
cost
}
,
{
m
.
cost_jingyou
}
,
{
m
.
cost_dianzi
}
,
{
m
.
cost_jiaju
}
,
{
m
.
cost_meirongmj
}
,
{
m
.
cost_fuzhuang
}
,
{
m
.
cost_other
}
,
{
m
.
fee_platform_and_refund
}
,
{
m
.
fee_platform
}
,
{
m
.
fee_fba
}
,
{
m
.
fee_refund
}
,
{
m
.
amount_withdraw
}
,
{
m
.
fee_logistics_storage
}
,
{
m
.
fee_logistics_first
}
,
{
m
.
fee_logistics_direct
}
,
{
m
.
fee_logistics_tail
}
,
{
m
.
fee_storage
}
,
{
m
.
fee_paycash_sales
}
,
{
m
.
fee_sales_count
}
,
{
m
.
profit_sales
}
,
{
m
.
rate_profit_sales
}
,
{
m
.
managecost_bl_xg
}
,
{
m
.
managecost_bl_gz
}
,
{
m
.
managecost_meijia
}
,
{
m
.
managercost_yangshan
}
,
{
m
.
managercost_chengpincang
}
,
{
m
.
managercost_xinhuilan
}
,
{
m
.
managercost_count
}
,
{
m
.
fee_finance
}
,
{
m
.
profit
}
,
{
m
.
rate_profit
}
,
{
m
.
incoming_other
}
,
{
m
.
incoming_non_operating
}
,
{
m
.
pay_non_operating
}
,
{
m
.
actual_profit
}
,
{
m
.
dividend
}
,
{
m
.
profit_balance
}
,
{
m
.
rate_profit_actual
}
,'
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
',
{
m
.
lastupdateuserid
}
,'
{
m
.
lastupdateusername
}
','
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
',0,
{
m
.
managercost_dizhi
}
,
{
m
.
managercost_meijiashengchan
}
,
{
m
.
fee_ad
}
,
{
m
.
fee_storage_incidentals
}
)"
;
cn
.
Execute
(
sql
);
cn
.
Execute
(
sql
);
}
}
...
...
Bailun.DC.Services/OrdersServices.cs
View file @
f6173c37
...
@@ -1618,12 +1618,12 @@ namespace Bailun.DC.Services
...
@@ -1618,12 +1618,12 @@ namespace Bailun.DC.Services
if
(
createstart
.
HasValue
)
if
(
createstart
.
HasValue
)
{
{
sql
+=
" and tb.create_time>=@createstart"
;
sql
+=
" and tb.
purchase_
create_time>=@createstart"
;
sqlparam
.
Add
(
"createstart"
,
createstart
.
Value
);
sqlparam
.
Add
(
"createstart"
,
createstart
.
Value
);
}
}
if
(
createend
.
HasValue
)
if
(
createend
.
HasValue
)
{
{
sql
+=
" and tb.create_time<@createend"
;
sql
+=
" and tb.
purchase_
create_time<@createend"
;
sqlparam
.
Add
(
"createend"
,
createend
.
Value
.
AddDays
(
1
));
sqlparam
.
Add
(
"createend"
,
createend
.
Value
.
AddDays
(
1
));
}
}
...
...
Bailun.DC.SyncSkuFinanceCategory/Program.cs
View file @
f6173c37
...
@@ -11,23 +11,23 @@ namespace Bailun.DC.SyncSkuFinanceCategory
...
@@ -11,23 +11,23 @@ namespace Bailun.DC.SyncSkuFinanceCategory
/// 同步sku财务分类
/// 同步sku财务分类
/// </summary>
/// </summary>
/// <param name="args"></param>
/// <param name="args"></param>
static
async
Task
Main
(
string
[]
args
)
//
static async Task Main(string[] args)
{
//
{
Console
.
WriteLine
(
"启动服务 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
//
Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
//
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
{
//
{
services
.
AddHostedService
<
Services
>();
//
services.AddHostedService<Services>();
});
//
});
await
builder
.
RunConsoleAsync
();
//
await builder.RunConsoleAsync();
}
//
}
//
static void Main(string[] args)
static
void
Main
(
string
[]
args
)
//
{
{
//
//Console.WriteLine("Hello World!");
//Console.WriteLine("Hello World!");
//
new Services().Init();
new
Services
().
Init
();
//
}
}
}
}
}
}
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
f6173c37
...
@@ -8676,7 +8676,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -8676,7 +8676,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"销售利润"
,
"profit_sales"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"销售利润"
,
"profit_sales"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"销售毛利率"
,
"rate_profit_sales"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"销售毛利率"
,
"rate_profit_sales"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"财务费用"
,
"fee_finance"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"财务费用"
,
"fee_finance"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"管理成本合计"
,
"managercost_count"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"管理成本合计"
,
"managercost_count"
,
1
));
//listHead.Add(new Tuple<string, string, int>("香港百伦科技有限公司", "managecost_bl_xg", 0));
//listHead.Add(new Tuple<string, string, int>("香港百伦科技有限公司", "managecost_bl_xg", 0));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"广州百伦供应链科技有限公司"
,
"managecost_bl_gz"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"广州百伦供应链科技有限公司"
,
"managecost_bl_gz"
,
0
));
...
...
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