Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
data-center-auto
Commits
08d66024
Commit
08d66024
authored
Dec 06, 2022
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增库存分计算任务
parent
8eee12ed
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
121 additions
and
4 deletions
+121
-4
report_invest_return_dao.cs
AutoTurnOver.DB/report_invest_return_dao.cs
+0
-0
BtmAdFeeResponseDto.cs
AutoTurnOver.Models/ApiDto/BtmAdFeeResponseDto.cs
+1
-0
dc_base_transfer_freight_new.cs
AutoTurnOver.Models/dc_base_transfer_freight_new.cs
+26
-0
dc_base_transfer_freight_new_order.cs
AutoTurnOver.Models/dc_base_transfer_freight_new_order.cs
+55
-0
dc_report_invest_return_analysis.cs
AutoTurnOver.Models/dc_report_invest_return_analysis.cs
+12
-0
t_base_shopify_refund.cs
AutoTurnOver.Models/t_base_shopify_refund.cs
+1
-0
Program.cs
ResetOutofstock/Program.cs
+1
-0
ResetOutofstockBackgrounService.cs
ResetOutofstock/ResetOutofstockBackgrounService.cs
+25
-4
No files found.
AutoTurnOver.DB/report_invest_return_dao.cs
View file @
08d66024
This diff is collapsed.
Click to expand it.
AutoTurnOver.Models/ApiDto/BtmAdFeeResponseDto.cs
View file @
08d66024
...
@@ -26,6 +26,7 @@ namespace AutoTurnOver.Models.ApiDto
...
@@ -26,6 +26,7 @@ namespace AutoTurnOver.Models.ApiDto
public
class
data_dto
{
public
class
data_dto
{
public
string
bailun_order_id
{
get
;
set
;
}
public
string
bailun_order_id
{
get
;
set
;
}
public
string
warehouse_code
{
get
;
set
;
}
public
string
origin_order_id
{
get
;
set
;
}
public
string
origin_order_id
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
decimal
refund_amount
{
get
;
set
;
}
public
decimal
refund_amount
{
get
;
set
;
}
...
...
AutoTurnOver.Models/dc_base_transfer_freight_new.cs
0 → 100644
View file @
08d66024
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
AutoTurnOver.Models
{
/// <summary>
/// sku 单位调拨费计算
/// </summary>
public
class
dc_base_transfer_freight_new
{
public
int
id
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
warehouse_code
{
get
;
set
;
}
/// <summary>
/// 运费单价
/// </summary>
public
decimal
freight_unit_price
{
get
;
set
;
}
/// <summary>
/// 最近30天总运费 cny
/// </summary>
public
decimal
freight
{
get
;
set
;
}
public
DateTime
update_time
{
get
;
set
;
}
public
decimal
count
{
get
;
set
;
}
}
}
AutoTurnOver.Models/dc_base_transfer_freight_new_order.cs
0 → 100644
View file @
08d66024
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
AutoTurnOver.Models
{
/// <summary>
/// sku 单位 调拨费 明细
/// </summary>
public
class
dc_base_transfer_freight_new_order
{
public
long
id
{
get
;
set
;
}
/// <summary>
/// 仓库sku
/// </summary>
public
string
bailun_sku
{
get
;
set
;
}
public
string
main_bailun_sku
{
get
;
set
;
}
/// <summary>
/// 仓库编码
/// </summary>
public
string
warehouse_code
{
get
;
set
;
}
/// <summary>
/// 调拨单号
/// </summary>
public
string
transfer_order_id
{
get
;
set
;
}
/// <summary>
/// 调拨总单运费
/// </summary>
public
decimal
order_cost
{
get
;
set
;
}
/// <summary>
/// 调拨单总总量
/// </summary>
public
decimal
order_weight
{
get
;
set
;
}
/// <summary>
/// 调拨单总产品数量
/// </summary>
public
decimal
order_sku_count
{
get
;
set
;
}
/// <summary>
/// 该sku 在该调拨单中分摊的总运费
/// </summary>
public
decimal
sku_cost
{
get
;
set
;
}
/// <summary>
/// 该sku 在该调拨单中的总重量
/// </summary>
public
decimal
sku_weight
{
get
;
set
;
}
/// <summary>
/// sku的购买数量
/// </summary>
public
decimal
sku_count
{
get
;
set
;
}
/// <summary>
/// 数据最后更新时间
/// </summary>
public
DateTime
gmt_update_time
{
get
;
set
;
}
}
}
AutoTurnOver.Models/dc_report_invest_return_analysis.cs
View file @
08d66024
...
@@ -75,6 +75,10 @@ namespace AutoTurnOver.Models
...
@@ -75,6 +75,10 @@ namespace AutoTurnOver.Models
///预计30天营业利润=预计30天内销量* 单位售价*(1-最近1个月的款率-最近1个月的平台费率最近1个月的广告费率)-预计30天内销量* 单位采购成本
///预计30天营业利润=预计30天内销量* 单位售价*(1-最近1个月的款率-最近1个月的平台费率最近1个月的广告费率)-预计30天内销量* 单位采购成本
/// </summary>
/// </summary>
public
decimal
profit_30_forecast
{
get
;
set
;
}
public
decimal
profit_30_forecast
{
get
;
set
;
}
/// <summary>
/// 单位运费
/// </summary>
public
decimal
freight_unit_price
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 可售天数:
/// 可售天数:
...
@@ -103,6 +107,10 @@ namespace AutoTurnOver.Models
...
@@ -103,6 +107,10 @@ namespace AutoTurnOver.Models
/// </summary>
/// </summary>
public
decimal
platform_fee_day_30
{
get
;
set
;
}
public
decimal
platform_fee_day_30
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 最近30天退款金额
/// </summary>
public
decimal
refund_amount_day_30
{
get
;
set
;
}
/// <summary>
/// 最近30天的销售额(usd)
/// 最近30天的销售额(usd)
/// </summary>
/// </summary>
public
decimal
amount_total_day_30
{
get
;
set
;
}
public
decimal
amount_total_day_30
{
get
;
set
;
}
...
@@ -115,6 +123,10 @@ namespace AutoTurnOver.Models
...
@@ -115,6 +123,10 @@ namespace AutoTurnOver.Models
/// </summary>
/// </summary>
public
decimal
platform_fee_rate
{
get
;
set
;
}
public
decimal
platform_fee_rate
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 退款率 (最近30天退款金额/总销售额)
/// </summary>
public
decimal
refund_rate
{
get
;
set
;
}
/// <summary>
/// 采购在途数量
/// 采购在途数量
/// </summary>
/// </summary>
public
decimal
quantity_purchase
{
get
;
set
;
}
public
decimal
quantity_purchase
{
get
;
set
;
}
...
...
AutoTurnOver.Models/t_base_shopify_refund.cs
View file @
08d66024
...
@@ -11,6 +11,7 @@ namespace AutoTurnOver.Models
...
@@ -11,6 +11,7 @@ namespace AutoTurnOver.Models
{
{
public
int
id
{
get
;
set
;
}
public
int
id
{
get
;
set
;
}
public
string
bailun_order_id
{
get
;
set
;
}
public
string
bailun_order_id
{
get
;
set
;
}
public
string
warehouse_code
{
get
;
set
;
}
public
string
origin_order_id
{
get
;
set
;
}
public
string
origin_order_id
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
decimal
refund_amount
{
get
;
set
;
}
public
decimal
refund_amount
{
get
;
set
;
}
...
...
ResetOutofstock/Program.cs
View file @
08d66024
...
@@ -48,6 +48,7 @@ namespace ResetOutofstock
...
@@ -48,6 +48,7 @@ namespace ResetOutofstock
// report_invest_return_dao.SynchBtmAdFees();
// report_invest_return_dao.SynchBtmAdFees();
//report_invest_return_dao.ShareAdFee();
//report_invest_return_dao.ShareAdFee();
//report_invest_return_dao.SynchBtmOrderRefund();
//report_invest_return_dao.SynchBtmOrderRefund();
//report_invest_return_dao.CalculationStockScore();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
ResetOutofstock/ResetOutofstockBackgrounService.cs
View file @
08d66024
...
@@ -517,7 +517,7 @@ namespace ResetOutofstock
...
@@ -517,7 +517,7 @@ namespace ResetOutofstock
}
}
});
});
Task
.
Factory
.
StartNew
(()
=>
Task
.
Factory
.
StartNew
(()
=>
{
{
...
@@ -528,7 +528,7 @@ namespace ResetOutofstock
...
@@ -528,7 +528,7 @@ namespace ResetOutofstock
{
{
Console
.
WriteLine
(
$"开始 拉取pps sku,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Console
.
WriteLine
(
$"开始 拉取pps sku,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
report_invest_return_dao
.
SynchPpsSku
();
report_invest_return_dao
.
SynchPpsSku
();
Console
.
WriteLine
(
$"结束 拉取pps sku,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Console
.
WriteLine
(
$"结束 拉取pps sku,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Thread
.
Sleep
(
10
*
60
*
1000
);
Thread
.
Sleep
(
10
*
60
*
1000
);
}
}
...
@@ -566,7 +566,7 @@ namespace ResetOutofstock
...
@@ -566,7 +566,7 @@ namespace ResetOutofstock
}
}
});
});
Task
.
Factory
.
StartNew
(()
=>
Task
.
Factory
.
StartNew
(()
=>
{
{
while
(
true
)
while
(
true
)
...
@@ -576,7 +576,6 @@ namespace ResetOutofstock
...
@@ -576,7 +576,6 @@ namespace ResetOutofstock
{
{
Console
.
WriteLine
(
$"开始 分摊广告费,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Console
.
WriteLine
(
$"开始 分摊广告费,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
report_invest_return_dao
.
ShareAdFee
();
report_invest_return_dao
.
ShareAdFee
();
Console
.
WriteLine
(
$"结束 分摊广告费,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Console
.
WriteLine
(
$"结束 分摊广告费,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Thread
.
Sleep
(
10
*
60
*
1000
);
Thread
.
Sleep
(
10
*
60
*
1000
);
}
}
...
@@ -590,6 +589,28 @@ namespace ResetOutofstock
...
@@ -590,6 +589,28 @@ namespace ResetOutofstock
}
}
});
});
Task
.
Factory
.
StartNew
(()
=>
{
while
(
true
)
{
try
{
Console
.
WriteLine
(
$"开始 计算库存分,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
report_invest_return_dao
.
CalculationStockScore
();
Console
.
WriteLine
(
$"结束 计算库存分,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Thread
.
Sleep
(
10
*
60
*
1000
);
}
catch
(
Exception
ex
)
{
Console
.
WriteLine
(
" 分摊广告费:"
+
ex
.
Message
);
Console
.
WriteLine
(
" 分摊广告费 :"
+
ex
.
StackTrace
);
}
}
});
...
...
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