Commit 4b0fb674 by guotao

新增fba实时库存下载服务

parent 6067470b
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Models
{
/// <summary>
/// fba 实时库存
/// </summary>
public class dc_fba_inventory_realtime
{
public int id { get; set; }
public string seller_sku { get; set; }
public string fulfillment_channel_sku { get; set; }
public string asin { get; set; }
public string condition_type { get; set; }
public string warehouse_condition_code { get; set; }
public decimal quantity_available { get; set; }
public string unique_id { get; set; }
public DateTime last_update_date { get; set; }
public string account { get; set; }
public string site { get; set; }
public string marketplaceId { get; set; }
}
}
using AutoTurnOver.DB;
using AutoTurnOver.Models;
using AutoTurnOver.Services;
using AutoTurnOver.Utility;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace ResetOutofstock
{
/// <summary>
/// 读取fba实时库存
/// </summary>
class AnaFbaInventoryRabbitBackgroundService : RabbitWorkerBase<t_task_queue>
{
public AnaFbaInventoryRabbitBackgroundService() : base("fba实时库存", "aims:AnaFbaInventory:input", 1)
{
}
protected override async Task DoWork(t_task_queue taskDto)
{
try
{
var pars = taskDto.id.Split("_");
new AmazonDataSynchroService().AnaFbaInventoryReport(int.Parse(pars[0]), pars[1]);
Console.WriteLine($"fba实时库存 完成 ");
}
catch (Exception e)
{
RabbitMQHelper.EnqueneMsg("aims:AnaFbaInventory:input", taskDto);
Console.WriteLine($"fba实时库存 数据异常,异常原因为:{e.Message},异常堆栈为:{e.StackTrace}");
}
}
}
}
......@@ -39,6 +39,7 @@ namespace AutoTurnOver.RabbitMqService
services.AddHostedService<AnaFbaInventoryStorageFeeRabbitBackgroundService>();
services.AddHostedService<AnaFbaOverageStorageFeeRabbitBackgroundService>();
services.AddHostedService<SynchroFinancialEventGroupsRabbitBackgroundService>();
services.AddHostedService<AnaFbaInventoryRabbitBackgroundService>();
}
......
......@@ -27,6 +27,7 @@ using FikaAmazonAPI.AmazonSpApiSDK.Models.Reports;
using System.Text;
using FikaAmazonAPI.ReportGeneration;
using System.Data;
using FikaAmazonAPI.AmazonSpApiSDK.Models.Shipping;
namespace AutoTurnOver.Services
{
......@@ -44,7 +45,7 @@ namespace AutoTurnOver.Services
}
}
public void SynchroFinancialEventGroups(string account = null, string siteEn = null,int accountId = 0)
public void SynchroFinancialEventGroups(string account = null, string siteEn = null, int accountId = 0)
{
// 拉取亚马逊账号
var amazonAccounts = ApiServices.GetAmazonAccountList();
......@@ -95,6 +96,7 @@ namespace AutoTurnOver.Services
//new_task_synchro_log.end_time = new DateTime(2023, 1, 31, 23, 59, 59);
var now = DateTime.Now;
//var evens = GetFinancialEvents(item, new_task_synchro_log.start_time, new_task_synchro_log.end_time);
var fees = GetFinancialEventGroups(item, new_task_synchro_log.start_time, new_task_synchro_log.end_time);
//var json = fees.ToJson();
foreach (var feeItem in fees.Where(s => s.FundTransferStatus == "Succeeded" || (s.ProcessingStatus == "Open" && s.FinancialEventGroupEnd == null)))
......@@ -138,30 +140,30 @@ namespace AutoTurnOver.Services
// 当前账单未完结, 读取预留金额
// 提取预留金额
// 预留金额
decimal reserveAmount = 0M;
var events = GetFinancialEvents(item, feeItem.FinancialEventGroupId);
var reserveCreditDatas = events.Where(s => s.AdjustmentEventList != null && s.AdjustmentEventList.Any(s => s.AdjustmentType == "ReserveCredit")).ToList();
if (reserveCreditDatas.Count >= 1)
{
var reserveAmountData = reserveCreditDatas.FirstOrDefault(s => s.AdjustmentEventList.Any(s1 => s1.AdjustmentType == "ReserveCredit")).AdjustmentEventList.FirstOrDefault(s => s.AdjustmentType == "ReserveCredit");
if (reserveAmountData != null && reserveAmountData.AdjustmentAmount != null)
{
reserveAmount = (decimal)reserveAmountData.AdjustmentAmount.CurrencyAmount;
}
}
var reserveAmountDeeData = transferFee.ToJson().ToObj<dc_base_amazon_fee>();
reserveAmountDeeData.total = reserveAmount;
reserveAmountDeeData.other = reserveAmount;
reserveAmountDeeData.type = "Current Reserve Amount From Financial API";
reserveAmountDeeData.type_cn = "预留金额 预估 ( 财务 API )";
reserveAmountDeeData.description = "";
reserveAmountDeeData.data_id = $"{reserveAmountDeeData.type}_{reserveAmountDeeData.account}-{reserveAmountDeeData.settlement_date_str}";
if (feeItem.FinancialEventGroupEnd != null)
{
reserveAmountDeeData.type_cn = "预留金额 ( 财务 API )";
}
feeDbs.Add(reserveAmountDeeData);
//decimal reserveAmount = 0M;
//var events = GetFinancialEventsByGroupId(item, feeItem.FinancialEventGroupId);
//var reserveCreditDatas = events.Where(s => s.AdjustmentEventList != null && s.AdjustmentEventList.Any(s => s.AdjustmentType == "ReserveCredit")).ToList();
//if (reserveCreditDatas.Count >= 1)
//{
// var reserveAmountData = reserveCreditDatas.FirstOrDefault(s => s.AdjustmentEventList.Any(s1 => s1.AdjustmentType == "ReserveCredit")).AdjustmentEventList.FirstOrDefault(s => s.AdjustmentType == "ReserveCredit");
// if (reserveAmountData != null && reserveAmountData.AdjustmentAmount != null)
// {
// reserveAmount = (decimal)reserveAmountData.AdjustmentAmount.CurrencyAmount;
// }
//}
//var reserveAmountDeeData = transferFee.ToJson().ToObj<dc_base_amazon_fee>();
//reserveAmountDeeData.total = reserveAmount;
//reserveAmountDeeData.other = reserveAmount;
//reserveAmountDeeData.type = "Current Reserve Amount From Financial API";
//reserveAmountDeeData.type_cn = "预留金额 预估 ( 财务 API )";
//reserveAmountDeeData.description = "";
//reserveAmountDeeData.data_id = $"{reserveAmountDeeData.type}_{reserveAmountDeeData.account}-{reserveAmountDeeData.settlement_date_str}";
//if (feeItem.FinancialEventGroupEnd != null)
//{
// reserveAmountDeeData.type_cn = "预留金额 ( 财务 API )";
//}
//feeDbs.Add(reserveAmountDeeData);
// 保存到数据库
foreach (var itemFee in feeDbs)
......@@ -1389,6 +1391,120 @@ namespace AutoTurnOver.Services
}
MyMySqlConnection._connection.Update(ana_task);
}
/// <summary>
/// fba实时库存
/// </summary>
/// <param name="status"></param>
/// <param name="data_id"></param>
public void AnaFbaInventoryReport(int status = 0, string report_id = "")
{
var reportTypeEnum = ReportTypes.GET_AFN_INVENTORY_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 desc limit 1 ", new
{
report_type = reportTypeEnum.ToString(),
status = status
});
if (!string.IsNullOrWhiteSpace(report_id))
{
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 report_id=@report_id order by id desc limit 1 ", new
{
report_type = reportTypeEnum.ToString(),
report_id = report_id
});
}
if (ana_task == null)
{
return;
}
try
{
var pamsAccount = ApiServices.GetAmazonAccountList().FirstOrDefault(s => s.Id == ana_task.pams_account_id);
var reportData = DownloadReportData(pamsAccount, ana_task.report_id);
if (string.IsNullOrWhiteSpace(reportData.ReportDocumentId))
{
if (reportData.ProcessingStatus == Report.ProcessingStatusEnum.FATAL || reportData.ProcessingStatus == Report.ProcessingStatusEnum.CANCELLED)
{
ana_task.ana_status = -2;
MyMySqlConnection._connection.Update(ana_task);
return;
}
else
{
ana_task.report_par_json = reportData.ToJson();
MyMySqlConnection._connection.Update(ana_task);
return;
}
}
StringBuilder response_str = new StringBuilder() { };
using (StreamReader sr = new StreamReader(reportData.ReportDocumentId))
{
response_str.AppendLine(sr.ReadToEnd());
sr.Close();
}
string jsonText = response_str.ToString();
ana_task.content = jsonText;
var table = CsvFileHelper.ReadFromCSV(reportData.ReportDocumentId, true, '\t');
foreach (DataRow row in table.Rows)
{
try
{
dc_fba_inventory_realtime fbanIventory = new dc_fba_inventory_realtime
{
seller_sku = row.DataRowToString("seller-sku"),
fulfillment_channel_sku = row.DataRowToString("fulfillment-channel-sku"),
asin = row.DataRowToString("asin"),
condition_type = row.DataRowToString("condition-type"),
account = pamsAccount.Account,
marketplaceId = reportData.MarketplaceIds[0],
last_update_date = DateTime.Now,
quantity_available = row.DataRowToNumber("Quantity Available") ?? 0,
warehouse_condition_code = row.DataRowToString("Warehouse-Condition-code"),
site = MarketPlace.GetMarketplaceById(reportData.MarketplaceIds[0]).Country.Code
};
if ("GB".Equals(fbanIventory.site, StringComparison.CurrentCultureIgnoreCase))
{
fbanIventory.site = "UK";
}
fbanIventory.unique_id = $"{fbanIventory.account}-{fbanIventory.marketplaceId}-{fbanIventory.seller_sku}-{fbanIventory.warehouse_condition_code}";
fbanIventory.id = MyMySqlConnection._connection.QueryFirstOrDefault<int?>(" select id from dc_fba_inventory_realtime where unique_id=@unique_id ", new { unique_id = fbanIventory.unique_id }) ?? 0;
if (fbanIventory.id > 0)
{
MyMySqlConnection._connection.Update(fbanIventory);
}
else
{
MyMySqlConnection._connection.Insert(fbanIventory);
}
}
catch (Exception ex)
{
throw;
}
}
ana_task.ana_error = "";
ana_task.ana_stack_trace = "";
ana_task.ana_status = 1;
}
catch (Exception ex)
{
ana_task.ana_error = ex.Message;
ana_task.ana_stack_trace = ex.StackTrace;
ana_task.ana_status = -1;
}
MyMySqlConnection._connection.Update(ana_task);
}
/// <summary>
/// 根据站点推算币种
......@@ -1682,10 +1798,10 @@ namespace AutoTurnOver.Services
}
}
feeShipmentEvent.date = postedDate == null ? new DateTime(1991, 1, 1) : postedDate.Value;
feeShipmentEvent.data_id = $"{account.Account}_OtherTransaction_{transactionID}_{feeShipmentEvent.AmazonOrderId}_{ feeShipmentEvent.description}_{feeShipmentEvent.settlement_id}_{feeShipmentEvent.date.ToString("yyyy-MM-ddTHH:mm:ss")}";
feeShipmentEvent.data_id = $"{account.Account}_OtherTransaction_{transactionID}_{feeShipmentEvent.AmazonOrderId}_{feeShipmentEvent.description}_{feeShipmentEvent.settlement_id}_{feeShipmentEvent.date.ToString("yyyy-MM-ddTHH:mm:ss")}";
if (feeShipmentEvent.type == "Payable to Amazon")
{
feeShipmentEvent.description = $"计划于 { feeShipmentEvent.date.AddHours(8).ToString("yyyy/MM/dd")}* 扣除 {feeShipmentEvent.total} {feeShipmentEvent.currency_code} 的金额";
feeShipmentEvent.description = $"计划于 {feeShipmentEvent.date.AddHours(8).ToString("yyyy/MM/dd")}* 扣除 {feeShipmentEvent.total} {feeShipmentEvent.currency_code} 的金额";
}
return feeShipmentEvent;
}
......@@ -1775,13 +1891,30 @@ namespace AutoTurnOver.Services
/// <param name="btime"></param>
/// <param name="etime"></param>
/// <returns></returns>
public List<FinancialEvents> GetFinancialEvents(AmazonAccountDto account, string groupId)
public List<FinancialEvents> GetFinancialEventsByGroupId(AmazonAccountDto account, string groupId)
{
AmazonConnection amazonConnection = MapAmazonConnection(account);
var reports = amazonConnection.Financial.ListFinancialEventsByGroupId(groupId);
return reports;
}
/// <summary>
/// 查询时间组
/// </summary>
/// <param name="account"></param>
/// <param name="groupId"></param>
/// <param name="btime"></param>
/// <param name="etime"></param>
/// <returns></returns>
public List<FinancialEvents> GetFinancialEvents(AmazonAccountDto account, DateTime btime, DateTime etime)
{
AmazonConnection amazonConnection = MapAmazonConnection(account);
ParameterListFinancialEvents par = new ParameterListFinancialEvents { };
par.PostedBefore = etime;
par.PostedAfter = btime;
var reports = amazonConnection.Financial.ListFinancialEvents(par);
return reports.ToList();
}
/// <summary>
/// 生成报告
......
......@@ -165,5 +165,154 @@ namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Finances
yield break;
}
}
/// <summary>
/// An adjustment to the seller&#39;s account.
/// </summary>
[DataContract]
public partial class CapacityReservationBillingEvent : IEquatable<CapacityReservationBillingEvent>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="CapacityReservationBillingEvent" /> class.
/// </summary>
/// <param name="AdjustmentType">The type of adjustment. Possible values: * FBAInventoryReimbursement - An FBA inventory reimbursement to a seller&#39;s account. This occurs if a seller&#39;s inventory is damaged. * ReserveEvent - A reserve event that is generated at the time of a settlement period closing. This occurs when some money from a seller&#39;s account is held back. * PostageBilling - The amount paid by a seller for shipping labels. * PostageRefund - The reimbursement of shipping labels purchased for orders that were canceled or refunded. * LostOrDamagedReimbursement - An Amazon Easy Ship reimbursement to a seller&#39;s account for a package that we lost or damaged. * CanceledButPickedUpReimbursement - An Amazon Easy Ship reimbursement to a seller&#39;s account. This occurs when a package is picked up and the order is subsequently canceled. This value is used only in the India marketplace. * ReimbursementClawback - An Amazon Easy Ship reimbursement clawback from a seller&#39;s account. This occurs when a prior reimbursement is reversed. This value is used only in the India marketplace. * SellerRewards - An award credited to a seller&#39;s account for their participation in an offer in the Seller Rewards program. Applies only to the India marketplace..</param>
/// <param name="PostedDate">The date and time when the financial event was posted..</param>
/// <param name="AdjustmentAmount">The amount adjusted as part of this event..</param>
/// <param name="AdjustmentItemList">A list of information about adjustments to an account..</param>
public CapacityReservationBillingEvent(string TransactionType = default(string), DateTime? PostedDate = default(DateTime?), Currency TransactionAmount = default(Currency), string Description = default(string))
{
this.TransactionType = TransactionType;
this.PostedDate = PostedDate;
this.TransactionAmount = TransactionAmount;
this.Description = Description;
}
/// <summary>
/// The type of adjustment. Possible values: * FBAInventoryReimbursement - An FBA inventory reimbursement to a seller&#39;s account. This occurs if a seller&#39;s inventory is damaged. * ReserveEvent - A reserve event that is generated at the time of a settlement period closing. This occurs when some money from a seller&#39;s account is held back. * PostageBilling - The amount paid by a seller for shipping labels. * PostageRefund - The reimbursement of shipping labels purchased for orders that were canceled or refunded. * LostOrDamagedReimbursement - An Amazon Easy Ship reimbursement to a seller&#39;s account for a package that we lost or damaged. * CanceledButPickedUpReimbursement - An Amazon Easy Ship reimbursement to a seller&#39;s account. This occurs when a package is picked up and the order is subsequently canceled. This value is used only in the India marketplace. * ReimbursementClawback - An Amazon Easy Ship reimbursement clawback from a seller&#39;s account. This occurs when a prior reimbursement is reversed. This value is used only in the India marketplace. * SellerRewards - An award credited to a seller&#39;s account for their participation in an offer in the Seller Rewards program. Applies only to the India marketplace.
/// </summary>
/// <value>The type of adjustment. Possible values: * FBAInventoryReimbursement - An FBA inventory reimbursement to a seller&#39;s account. This occurs if a seller&#39;s inventory is damaged. * ReserveEvent - A reserve event that is generated at the time of a settlement period closing. This occurs when some money from a seller&#39;s account is held back. * PostageBilling - The amount paid by a seller for shipping labels. * PostageRefund - The reimbursement of shipping labels purchased for orders that were canceled or refunded. * LostOrDamagedReimbursement - An Amazon Easy Ship reimbursement to a seller&#39;s account for a package that we lost or damaged. * CanceledButPickedUpReimbursement - An Amazon Easy Ship reimbursement to a seller&#39;s account. This occurs when a package is picked up and the order is subsequently canceled. This value is used only in the India marketplace. * ReimbursementClawback - An Amazon Easy Ship reimbursement clawback from a seller&#39;s account. This occurs when a prior reimbursement is reversed. This value is used only in the India marketplace. * SellerRewards - An award credited to a seller&#39;s account for their participation in an offer in the Seller Rewards program. Applies only to the India marketplace.</value>
[DataMember(Name = "TransactionType", EmitDefaultValue = false)]
public string TransactionType { get; set; }
/// <summary>
/// The date and time when the financial event was posted.
/// </summary>
/// <value>The date and time when the financial event was posted.</value>
[DataMember(Name = "PostedDate", EmitDefaultValue = false)]
public DateTime? PostedDate { get; set; }
/// <summary>
/// The amount adjusted as part of this event.
/// </summary>
/// <value>The amount adjusted as part of this event.</value>
[DataMember(Name = "TransactionAmount", EmitDefaultValue = false)]
public Currency TransactionAmount { get; set; }
/// <summary>
/// A list of information about adjustments to an account.
/// </summary>
/// <value>A list of information about adjustments to an account.</value>
[DataMember(Name = "Description", EmitDefaultValue = false)]
public string Description { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class CapacityReservationBillingEvent {\n");
sb.Append(" TransactionType: ").Append(TransactionType).Append("\n");
sb.Append(" PostedDate: ").Append(PostedDate).Append("\n");
sb.Append(" TransactionAmount: ").Append(TransactionAmount).Append("\n");
sb.Append(" Description: ").Append(Description).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as CapacityReservationBillingEvent);
}
/// <summary>
/// Returns true if AdjustmentEvent instances are equal
/// </summary>
/// <param name="input">Instance of AdjustmentEvent to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(CapacityReservationBillingEvent input)
{
if (input == null)
return false;
return
(
this.TransactionType == input.TransactionType ||
(this.TransactionType != null &&
this.TransactionType.Equals(input.TransactionType))
) &&
(
this.PostedDate == input.PostedDate ||
(this.PostedDate != null &&
this.PostedDate.Equals(input.PostedDate))
) &&
(
this.TransactionAmount == input.TransactionAmount ||
(this.TransactionAmount != null &&
this.TransactionAmount.Equals(input.TransactionAmount))
) &&
(
this.Description == input.Description ||
(this.Description != null &&
this.Description.Equals(input.Description))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.TransactionType != null)
hashCode = hashCode * 59 + this.TransactionType.GetHashCode();
if (this.PostedDate != null)
hashCode = hashCode * 59 + this.PostedDate.GetHashCode();
if (this.TransactionAmount != null)
hashCode = hashCode * 59 + this.TransactionAmount.GetHashCode();
if (this.Description != null)
hashCode = hashCode * 59 + this.Description.GetHashCode();
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}
......@@ -100,4 +100,87 @@ namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Finances
}
}
/// <summary>
/// A list of adjustment event information for the seller&#39;s account.
/// </summary>
[DataContract]
public partial class CapacityReservationBillingEventList : List<CapacityReservationBillingEvent>, IEquatable<CapacityReservationBillingEventList>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="AdjustmentEventList" /> class.
/// </summary>
[JsonConstructorAttribute]
public CapacityReservationBillingEventList() : base()
{
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class CapacityReservationBillingEventList {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as CapacityReservationBillingEventList);
}
/// <summary>
/// Returns true if AdjustmentEventList instances are equal
/// </summary>
/// <param name="input">Instance of AdjustmentEventList to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(CapacityReservationBillingEventList input)
{
if (input == null)
return false;
return base.Equals(input);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = base.GetHashCode();
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}
......@@ -162,6 +162,11 @@ namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Finances
/// </summary>
[DataMember(Name = "AdjustmentEventList", EmitDefaultValue = false)]
public AdjustmentEventList AdjustmentEventList { get; set; }
/// <summary>
/// Gets or Sets AdjustmentEventList
/// </summary>
[DataMember(Name = "CapacityReservationBillingEventList", EmitDefaultValue = false)]
public AdjustmentEventList CapacityReservationBillingEventList { get; set; }
/// <summary>
/// Gets or Sets SAFETReimbursementEventList
......
......@@ -49,16 +49,16 @@ namespace ResetOutofstock
//report_invest_return_dao.SynchBtmOrderRefund();
//report_invest_return_dao.CalculationStockScore("962073701");
//dc_ana_deviation_dao.PushAnaTask();
new AmazonDataSynchroService().SynchroFinancialEventGroups("Natural Daisy Encens", "ES");
//new AmazonDataSynchroService().SynchroFinancialEventGroups("Natural Daisy Encens", "ES");
//new AmazonDataSynchroService().SetMarketplaceName(DateTime.Now);
//new AmazonDataSynchroService().SetSettlementByDate();
//new AmazonDataSynchroService().SetMarketplaceNameByDate();
//new AmazonDataSynchroService().SynchroReportIds();
//new AmazonDataSynchroService().SynchroReportIdByCreate(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_FBA_REIMBURSEMENTS_DATA, 17, "Siqidzi", "ES",DateTime.Parse("2023-03-01"),DateTime.Parse("2023-03-31 23:59:59"));
//new AmazonDataSynchroService().SynchroReportIdByCreate(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_AFN_INVENTORY_DATA, 17, "Siqidzi", "ES");
//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().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_AFN_INVENTORY_DATA, 13, "Natural Daisy Encens", "ES");
//new AmazonDataSynchroService().AnaFbaShipmentReport();
//new AmazonDataSynchroService().AnaFbaStorageFeeReport(status:-1);
//new AmazonDataSynchroService().AnaFbaLongTermStorageFeeReport(3);
......@@ -66,6 +66,7 @@ namespace ResetOutofstock
//new AmazonDataSynchroService().AnaFbaOverageStorageFeeReport(report_id: "937084019471");
//new AmazonDataSynchroService().AnaFbaStorageFeeReport(data_id: "323250019473");
//new AmazonDataSynchroService().AnaFbaInventoryReport();
//new AmazonDataSynchroService().SynchroReportIdByCreate(
// FikaAmazonAPI.Utils.Constants.ReportTypes.GET_FBA_STORAGE_FEE_CHARGES_DATA,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment