Commit b3e178de by 泽锋 李

下采购单时,自定义运输方式

parent 175f3db3
...@@ -208,7 +208,7 @@ namespace AutoTurnOver.DB ...@@ -208,7 +208,7 @@ namespace AutoTurnOver.DB
} }
int purchase_advise_id = conn.Insert<dc_auto_purchase_advise>(new dc_auto_purchase_advise { buy_sys_plan_no = "自动下首单", create_time = DateTime.Now, no = purchase_advise.MaxNo() }, t) ?? 0; int purchase_advise_id = conn.Insert<dc_auto_purchase_advise>(new dc_auto_purchase_advise { buy_sys_plan_no = "自动下首单", create_time = DateTime.Now, no = purchase_advise.MaxNo(), sendtype = itemGroup.Max(v=>v.sendtype)}, t) ?? 0;
foreach (var item in data_detailed_list) foreach (var item in data_detailed_list)
{ {
conn.Insert(new dc_auto_purchase_advise_detailed conn.Insert(new dc_auto_purchase_advise_detailed
......
...@@ -1034,9 +1034,10 @@ and EXISTS ( ...@@ -1034,9 +1034,10 @@ and EXISTS (
} }
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
parameters.Add("ids", ids); parameters.Add("ids", ids);
string sql = @" select t1.*,t2.unit_price,t3.hq_type as 'warehouse_type' from dc_auto_purchase_advise_detailed as t1 string sql = @" select t1.*,t2.unit_price,t3.hq_type as 'warehouse_type',t4.sendtype from dc_auto_purchase_advise_detailed as t1
left join dc_base_sku as t2 on t1.bailun_sku = t2.bailun_sku left join dc_base_sku as t2 on t1.bailun_sku = t2.bailun_sku
left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code
left join dc_auto_purchase_advise as t4 on t1.main_id = t4.id
where t1.id in @ids "; where t1.id in @ids ";
if (ispush != null) if (ispush != null)
{ {
......
...@@ -33,6 +33,11 @@ namespace AutoTurnOver.Models ...@@ -33,6 +33,11 @@ namespace AutoTurnOver.Models
/// 1 = 广州03 服装 /// 1 = 广州03 服装
/// </summary> /// </summary>
public int? type { get; set; } public int? type { get; set; }
/// <summary>
/// 运输方式
/// </summary>
public int? sendtype { get; set; }
} }
/// <summary> /// <summary>
...@@ -202,6 +207,11 @@ namespace AutoTurnOver.Models ...@@ -202,6 +207,11 @@ namespace AutoTurnOver.Models
/// 仓库类型 /// 仓库类型
/// </summary> /// </summary>
public string warehouse_type { get; set; } public string warehouse_type { get; set; }
/// <summary>
/// 运输方式
/// </summary>
public int? sendtype { get; set; }
} }
public class dc_auto_purchase_advise_detailed_dto : dc_auto_purchase_advise_detailed public class dc_auto_purchase_advise_detailed_dto : dc_auto_purchase_advise_detailed
......
...@@ -136,6 +136,12 @@ namespace AutoTurnOver.Services ...@@ -136,6 +136,12 @@ namespace AutoTurnOver.Services
bp_remark = $"用户{user.UserName} 在 aims 操作推送-"+ remarks bp_remark = $"用户{user.UserName} 在 aims 操作推送-"+ remarks
}; };
var sendtype = item.Max(s => s.sendtype);
if (sendtype > 0)
{
data.bp_sendtype = sendtype.Value;
}
data.bi_buyplandetail = item.GroupBy(s=>s.bailun_sku).Select(s => new bi_buyplandetail data.bi_buyplandetail = item.GroupBy(s=>s.bailun_sku).Select(s => new bi_buyplandetail
{ {
bd_count = s.Sum(g=> g.quantity_actual > 0 ? g.quantity_actual : g.quantity_final_advise), bd_count = s.Sum(g=> g.quantity_actual > 0 ? g.quantity_actual : g.quantity_final_advise),
......
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