map_ids=conn.Query<int>(" select t1.id from dc_base_mother_sku_map as t1 where t1.bailun_sku_warehouse_code=@bailun_sku_warehouse_codes ",new{bailun_sku_warehouse_codes=datas.Select(s=>s.bailun_sku_warehouse_code).ToList()}).ToList()
},newUserData{UserName="system"});
}
return"";
return"";
...
@@ -895,7 +904,7 @@ GROUP BY t1.bailun_sku,t3.hq_type
...
@@ -895,7 +904,7 @@ GROUP BY t1.bailun_sku,t3.hq_type
@@ -564,93 +575,96 @@ where t1.mother_sku_warehouse_code in @mother_sku_warehouse_codes ", new
...
@@ -564,93 +575,96 @@ where t1.mother_sku_warehouse_code in @mother_sku_warehouse_codes ", new
vardc_auto_sales_list=newList<dc_auto_sales>();
vardc_auto_sales_list=newList<dc_auto_sales>();
foreach(variteminturn_datas)
foreach(variteminturn_datas)
{
{
varitem_dc_auto_sales=conn.QuerySingleOrDefault<dc_auto_sales>(" select * from dc_auto_sales where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new{
varitem_dc_auto_sales=conn.QuerySingleOrDefault<dc_auto_sales>(" select * from dc_auto_sales where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
mother_dc_auto_sales.id=conn.QueryFirstOrDefault<int?>(" select id from dc_auto_sales where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new{
mother_dc_auto_sales.id=conn.QueryFirstOrDefault<int?>(" select id from dc_auto_sales where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
mother_inbound_data.id=conn.QueryFirstOrDefault<int?>(" select id from dc_auto_inbound where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
mother_inbound_data.id=conn.QueryFirstOrDefault<int?>(" select id from dc_auto_inbound where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
...
@@ -745,7 +759,7 @@ where t1.mother_sku_warehouse_code in @mother_sku_warehouse_codes ", new
...
@@ -745,7 +759,7 @@ where t1.mother_sku_warehouse_code in @mother_sku_warehouse_codes ", new
vargroup_list=_connection.Query<temp_turnover_dto>(@"select t1.bailun_sku,GROUP_CONCAT(CONCAT(t1.warehouse_code,'_',t1.daily_weighted_sales,'_',t1.id)) as 'warehouse_codes' from dc_auto_turnover as t1
left join dc_base_warehouse as t2 on t1.warehouse_code =t2.warehouse_code
left join dc_auto_config_sku_warehouse as t3 on t1.bailun_sku = t3.bailun_sku and t1.warehouse_code = t3.warehouse_code
where t2.hq_type in ('fba仓') and ifnull(t3.`status`,0)=0 GROUP BY t1.bailun_sku HAVING count(1)>1