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
2f040936
Commit
2f040936
authored
May 11, 2023
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级亚马逊长期仓储费的抓取
parent
cec04702
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
AmazonDataSynchroService.cs
AutoTurnOver.Services/AmazonDataSynchroService.cs
+5
-8
Program.cs
ResetOutofstock/Program.cs
+2
-2
ResetOutofstockBackgrounService.cs
ResetOutofstock/ResetOutofstockBackgrounService.cs
+11
-1
No files found.
AutoTurnOver.Services/AmazonDataSynchroService.cs
View file @
2f040936
...
...
@@ -978,7 +978,7 @@ namespace AutoTurnOver.Services
/// <param name="data_id"></param>
public
void
AnaFbaLongTermStorageFeeReport
(
int
status
=
0
,
string
report_id
=
""
)
{
var
reportTypeEnum
=
ReportTypes
.
GET_FBA_
INVENTORY_PLANNING
_DATA
;
var
reportTypeEnum
=
ReportTypes
.
GET_FBA_
FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES
_DATA
;
var
ana_task
=
MyMySqlConnection
.
_connection
.
QueryFirstOrDefault
<
dc_base_amazon_fee_report_log
>(
" select * from dc_base_amazon_fee_report_log where report_type=@report_type and ana_status=@status order by id asc limit 1 "
,
new
{
report_type
=
reportTypeEnum
.
ToString
(),
...
...
@@ -1027,8 +1027,6 @@ namespace AutoTurnOver.Services
ana_task
.
content
=
jsonText
;
var
table
=
CsvFileHelper
.
ReadFromCSV
(
reportData
.
ReportDocumentId
,
true
,
'\t'
);
if
(
table
.
Columns
.
Contains
(
"estimated-ltsf-next-charge"
)
||
table
.
Columns
.
Contains
(
"estimated-storage-cost-next-month"
))
{
foreach
(
DataRow
row
in
table
.
Rows
)
{
try
...
...
@@ -1036,9 +1034,9 @@ namespace AutoTurnOver.Services
dc_profit_business_amazon_storage_fee
storageFee
=
new
dc_profit_business_amazon_storage_fee
{
currency
=
row
.
DataRowToString
(
"currenc
y"
),
fulfillment_center
=
row
.
DataRowToString
(
"marketplace
"
),
site
=
row
.
DataRowToString
(
"marketplace
"
),
currency
=
row
.
DataRowToString
(
"countr
y"
),
fulfillment_center
=
row
.
DataRowToString
(
"country
"
),
site
=
row
.
DataRowToString
(
"country
"
),
fee_type
=
"超长仓储费"
,
report_id
=
ana_task
.
report_id
,
account
=
pamsAccount
.
Account
,
...
...
@@ -1046,7 +1044,7 @@ namespace AutoTurnOver.Services
sku
=
row
.
DataRowToString
(
"fnsku"
),
report_end_date
=
reportData
.
DataEndTime
??
new
DateTime
(
1991
,
1
,
1
)
};
storageFee
.
fee
=
row
.
DataRowToNumber
(
"estimated-ltsf-next-charge"
)
??
(
row
.
DataRowToNumber
(
"estimated-storage-cost-next-month"
)
??
0
)
;
storageFee
.
fee
=
row
.
DataRowToNumber
(
"long-time-range-long-term-storage-fee"
)
??
0
;
storageFee
.
_date
=
reportData
.
DataStartTime
.
Value
.
ToDayHome
();
//storageFee.site = row.DataRowToString("country_code");
if
(
"GB"
.
Equals
(
storageFee
.
site
,
StringComparison
.
CurrentCultureIgnoreCase
))
...
...
@@ -1077,7 +1075,6 @@ namespace AutoTurnOver.Services
}
}
}
...
...
ResetOutofstock/Program.cs
View file @
2f040936
...
...
@@ -57,13 +57,13 @@ namespace ResetOutofstock
//new AmazonDataSynchroService().SetMarketplaceNameByDate();
//new AmazonDataSynchroService().SynchroReportIds();
//new AmazonDataSynchroService().SynchroReportId
s(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_FBA_INVENTORY_PLANNING_DATA, 16, "Eumengman", "FR"
);
//new AmazonDataSynchroService().SynchroReportId
ByCreate(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_FBA_FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES_DATA, 17, "Eumengman", "ES",DateTime.Parse("2023-03-01"),DateTime.Parse("2023-03-31 23:59:59")
);
//new AmazonDataSynchroService().SynchroReportIdByCreate(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_FBA_INVENTORY_PLANNING_DATA, version: 22, account: "Elite99 Nail Art", site: "US",
// btime: DateTime.Parse("2023-04-01"), DateTime.Parse("2023-04-24 23:59:59"));
//new AmazonDataSynchroService().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL, 13);
//new AmazonDataSynchroService().AnaFbaShipmentReport();
//new AmazonDataSynchroService().AnaFbaStorageFeeReport(status:-1);
//new AmazonDataSynchroService().AnaFbaLongTermStorageFeeReport();
//new AmazonDataSynchroService().AnaFbaLongTermStorageFeeReport(
0, "994146019488"
);
//new AmazonDataSynchroService().AnaFbaOverageStorageFeeReport(report_id: "937084019471");
//new AmazonDataSynchroService().AnaFbaStorageFeeReport(data_id: "323250019473");
...
...
ResetOutofstock/ResetOutofstockBackgrounService.cs
View file @
2f040936
...
...
@@ -691,7 +691,17 @@ namespace ResetOutofstock
{
Console
.
WriteLine
(
$"开始 拉取亚马逊 长期仓储费,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
// 下载上个月的
new
AmazonDataSynchroService
().
SynchroReportIds
(
FikaAmazonAPI
.
Utils
.
Constants
.
ReportTypes
.
GET_FBA_STORAGE_FEE_CHARGES_DATA
,
25
);
new
AmazonDataSynchroService
().
SynchroReportIdByCreate
(
FikaAmazonAPI
.
Utils
.
Constants
.
ReportTypes
.
GET_FBA_FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES_DATA
,
version
:
25
,
btime
:
DateTime
.
Now
.
AddMonths
(-
1
).
GetMonthFirstDay
().
ToDayHome
().
AddHours
(-
8
),
etime
:
DateTime
.
Now
.
AddMonths
(-
1
).
LastDayOfMonth
().
ToDayEnd
().
AddHours
(-
8
));
// 下载这个月的
new
AmazonDataSynchroService
().
SynchroReportIdByCreate
(
FikaAmazonAPI
.
Utils
.
Constants
.
ReportTypes
.
GET_FBA_FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES_DATA
,
version
:
25
,
btime
:
DateTime
.
Now
.
GetMonthFirstDay
().
ToDayHome
(),
etime
:
DateTime
.
Now
.
AddDays
(-
1
).
ToDayEnd
());
Console
.
WriteLine
(
$"结束 拉取亚马逊 长期仓储费,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Thread
.
Sleep
(
1000
*
60
*
3
);
}
...
...
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