varstock=_connection.QueryFirstOrDefault<int?>(" select usable_stock from dc_base_stock as t1 where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code ",parameters)??0;
varstock=_connection.QueryFirstOrDefault<int?>(" select usable_stock from dc_base_stock as t1 where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code ",parameters)??0;
...
@@ -649,7 +649,7 @@ and t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code
...
@@ -649,7 +649,7 @@ and t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code
(case when t9.transport_type=1 then '铁路运输' when t9.transport_type=2 then '海运' when t9.transport_type=3 then '空运' else '未知' end ) as 'transport_type_str'
(case when t9.transport_type=1 then '铁路运输' when t9.transport_type=2 then '海运' when t9.transport_type=3 then '空运' else '未知' end ) as 'transport_type_str'
from dc_base_transfer_info as t1
from dc_base_transfer_info as t1
left join dc_base_lms_channel as t9 on t1.channelname = t9.`name`
left join dc_base_lms_channel as t9 on t1.channelname = t9.`name`
varlast_task_synchro_log=conn.QuerySingleOrDefault<task_synchro_log>(" select * from task_synchro_log where task_name=@task_name and status=1 order by end_time desc limit 1 ",new{task_name=task_name});
vardatas=conn.Query<sku_warehouse_code_dto>($@" select t1.bailun_sku,t1.warehouse_code from dc_base_stock as t1 left join dc_base_warehouse as t2 on t1.warehouse_code =t2.warehouse_code
where t2.hq_type not in ('国内仓') and t1.gmt_modified>=@btime and t1.gmt_modified <=@etime