vartemp_datas=_connection.Query<temp_sum_dto>(@"select sku_ware_no,sku as 'bailun_sku',target_ware_no as 'warehouse_code',sum(product_num) as 'count' from dc_base_trans_temp_schedule
if(data_skus!=null&&data_skus.Count>=1)
{
// 计算相关sku的总在途
vartemp_datas=_connection.Query<temp_sum_dto>(@"select sku_ware_no,sku as 'bailun_sku',target_ware_no as 'warehouse_code',sum(product_num) as 'count' from dc_base_trans_temp_schedule
where is_delete=0 and is_temp_data=1 and is_exception=0 and create_state=@create_state
and sku_ware_no in @sku_ware_nos
GROUP BY sku_ware_no",new{sku_ware_nos=data_skus.Select(s=>s.sku_ware_no).Distinct().ToList(),create_state=(int)dc_base_trans_temp_schedule_create_state_enum.未创建});
_connection.Execute("update dc_mid_transit set quantity_transfer_temp_schedule=@quantity_transfer_temp_schedule where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
{
bailun_sku=item.bailun_sku,
warehouse_code=item.warehouse_code,
quantity_transfer_temp_schedule=item.count
});
}
_connection.Execute("update dc_mid_transit set quantity_transfer_temp_schedule=@quantity_transfer_temp_schedule where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
_connection.Execute("update dc_mid_transit set quantity_transfer_temp_schedule=0 where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
{
bailun_sku=item.sku,
warehouse_code=item.target_ware_no
});
}
_connection.Execute("update dc_mid_transit set quantity_transfer_temp_schedule=0 where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
{
bailun_sku=item.sku,
warehouse_code=item.target_ware_no
});
}
}
// 计算相关sku的总暂存
vartemp_datas2=_connection.Query<temp_sum_dto>(@"select sku_ware_no,sku as 'bailun_sku',target_ware_no as 'warehouse_code',sum(temp_delivery_count) as 'count' from dc_base_trans_temp_schedule
// 计算相关sku的总暂存
vartemp_datas2=_connection.Query<temp_sum_dto>(@"select sku_ware_no,sku as 'bailun_sku',target_ware_no as 'warehouse_code',sum(temp_delivery_count) as 'count' from dc_base_trans_temp_schedule
where is_delete=0 and is_temp_data=1 and is_exception=0 and create_state=@create_state
and sku_ware_no in @sku_ware_nos
GROUP BY sku_ware_no",new{sku_ware_nos=data_skus.Select(s=>s.sku_ware_no).Distinct().ToList(),create_state=(int)dc_base_trans_temp_schedule_create_state_enum.已暂存});
_connection.Execute("update dc_mid_transit set quantity_transfer_temporary_storage=@quantity_transfer_temporary_storage where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
{
bailun_sku=item.bailun_sku,
warehouse_code=item.warehouse_code,
quantity_transfer_temporary_storage=item.count
});
}
_connection.Execute("update dc_mid_transit set quantity_transfer_temporary_storage=@quantity_transfer_temporary_storage where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
_connection.Execute("update dc_mid_transit set quantity_transfer_temporary_storage=0 where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new
{
bailun_sku=item.sku,
warehouse_code=item.target_ware_no
});
}
_connection.Execute("update dc_mid_transit set quantity_transfer_temporary_storage=0 where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new