Commit 9c0d0b64 by 泽锋 李

fix

parent 6e00d159
......@@ -694,7 +694,7 @@ where bailun_sku in @skus", new { skus = skus.Split(',').ToList() });
{
bailun_sku = item.sku,
platform = item.platformDesc,
localtion = "",
localtion = item.shipAddress,
platform_sku = "",
status = item.statusDesc == "上架" ? 1 : 0,
sys_update_date = now,
......
......@@ -1010,7 +1010,25 @@ where t1.create_time>=@btime and t1.create_time<=@etime ";
item_config = item_configs.OrderBy(s => s.settlement_type).FirstOrDefault();
}
}
if (item_configs.Where(v => v.settlement_type == (int)dc_report_cash_flow_settlement_type_enum.月度固定_下期付款).Count() > 1)
{
// 取发生时间后,最早的一个付款日期
var temp_item_configs = item_configs.Where(s => s.settlement_type > occur_time.Day).OrderBy(s => s.settlement_type).ToList();
if (temp_item_configs.Count > 1)
{
item_config = temp_item_configs[1];
}
else if(temp_item_configs.Count==1)
{
// 只有一条,取下期
item_config = item_configs.OrderBy(s => s.settlement_type).FirstOrDefault();
}
else if (temp_item_configs.Count ==0)
{
// 一条都没有,取整个月第二期
item_config = item_configs.OrderBy(s => s.settlement_type).ToList()[1];
}
}
if (item_config.settlement_type == (int)dc_report_cash_flow_settlement_type_enum.等长顺延)
{
......
......@@ -20,6 +20,10 @@ namespace AutoTurnOver.Models.ApiDto
/// </summary>
public string platformDesc { get; set; }
/// <summary>
/// 海外 or 国内
/// </summary>
public string shipAddress { get; set; }
/// <summary>
/// 站点
/// </summary>
public string site { get; set; }
......
......@@ -160,7 +160,8 @@ namespace AutoTurnOver.Models
public enum dc_report_cash_flow_settlement_type_enum
{
等长顺延 = 1,
月度固定 = 2
月度固定 = 2,
月度固定_下期付款 = 3,
}
/// <summary>
......
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