@@ -575,7 +575,7 @@ where t2.isdeleted=0 and t2.stateid not in (5,11,12) and t9.transport_type in (1
...
@@ -575,7 +575,7 @@ where t2.isdeleted=0 and t2.stateid not in (5,11,12) and t9.transport_type in (1
and t1.deliverycount > t1.storagecount
and t1.deliverycount > t1.storagecount
and t2.isexception = 0
and t2.isexception = 0
and t3.hq_type in ('fba仓','第三方仓库') and t2.expectarrivaltime >='1991-01-01' and t1.sku=@bailun_sku and t2.targetwareno=@warehouse_code ",parameters).ToList();
and t3.hq_type in ('fba仓','第三方仓库') and t2.expectarrivaltime >='1991-01-01' and t1.sku=@bailun_sku and t2.targetwareno=@warehouse_code ",parameters).ToList();
if(orders!=null&&orders.Count>=1)
if(orders!=null&&orders.Count>=1)
{
{
transDatas.AddRange(orders);
transDatas.AddRange(orders);
}
}
...
@@ -618,16 +618,57 @@ and t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code
...
@@ -618,16 +618,57 @@ and t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code
varlogs=_connection.Query<order_transfer_status_log>(" select * from order_transfer_status_log where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and is_delete=0 ",parameters);
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;
if(stock>0)
{
varlogs=_connection.Query<order_transfer_status_log>(" select * from order_transfer_status_log as t1 where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and is_delete=0 ",parameters).ToList();
(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
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});
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});