Commit 152f3909 by lizefeng

fix

parent b97722f3
......@@ -137,20 +137,25 @@ namespace AutoTurnOver.Services
transferFee.other = transferFee.total;
transferFee.data_id = $"{transferFee.type}_{transferFee.account}-{transferFee.settlement_date_str}";
var events = GetFinancialEventsByGroupId(item, feeItem.FinancialEventGroupId);
transferFee.MarketplaceNameSys = ComputeMarketplaceNameByCurrency(transferFee.currency_code);
transferFee.MarketplaceName = transferFee.MarketplaceNameSys;
//// 从订单中尝试提取站点
//var currencyCodes = events.Where(s => s.AdjustmentEventList != null && s.AdjustmentEventList.Any(s => s.AdjustmentAmount!=null && !(string.IsNullOrWhiteSpace(s.AdjustmentAmount.CurrencyCode)) )).ToList();
//if(currencyCodes!=null && currencyCodes.Count >= 1)
//{
// var currencyCode = currencyCodes[0].AdjustmentEventList.FirstOrDefault(s => s.AdjustmentAmount != null && (!string.IsNullOrWhiteSpace(s.AdjustmentAmount.CurrencyCode)));
// transferFee.MarketplaceName = ComputeMarketplaceNameByCurrency(currencyCode.AdjustmentAmount.CurrencyCode);
// transferFee.MarketplaceNameSys = ComputeMarketplaceNameByCurrency(currencyCode.AdjustmentAmount.CurrencyCode);
//}
if (string.IsNullOrWhiteSpace(transferFee.MarketplaceName))
{
//从订单中尝试提取站点
var events = GetFinancialEventsByGroupId(item, feeItem.FinancialEventGroupId);
var shipmentDatas = events.Where(s => s.ShipmentEventList != null && s.ShipmentEventList.Any(s => !(string.IsNullOrWhiteSpace(s.MarketplaceName)))).ToList();
if (shipmentDatas != null && shipmentDatas.Count >= 1)
{
var shipmentEvent = shipmentDatas[0].ShipmentEventList.FirstOrDefault(s => (!string.IsNullOrWhiteSpace(s.MarketplaceName)));
transferFee.MarketplaceNameSys = shipmentEvent.MarketplaceName;
transferFee.MarketplaceName = transferFee.MarketplaceNameSys;
}
}
feeDbs.Add(transferFee);
......
......@@ -49,7 +49,7 @@ namespace ResetOutofstock
//report_invest_return_dao.SynchBtmOrderRefund();
//report_invest_return_dao.CalculationStockScore("962073701");
//dc_ana_deviation_dao.PushAnaTask();
new AmazonDataSynchroService().SynchroFinancialEventGroups("Ninezkeji", "UK");
new AmazonDataSynchroService().SynchroFinancialEventGroups("Natural Daisy Encens", "IT");
//new AmazonDataSynchroService().SetMarketplaceName(DateTime.Now);
//new AmazonDataSynchroService().SetSettlementByDate();
//new AmazonDataSynchroService().SetMarketplaceName(DateTime.Now.AddHours(-24), 372205);
......
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