@@ -11,6 +11,8 @@ using AutoTurnOver.Models.stock;
usingAutoTurnOver.Utility;
usingAutoTurnOver.Models.Report;
usingSystem.Threading;
usingNewtonsoft.Json;
usingAutoTurnOver.Models.auto;
namespaceAutoTurnOver.DB
{
...
...
@@ -289,7 +291,7 @@ from dc_auto_turnover as dat
break;
case8:
varmother_sku_warehouse_codes=_connection.Query<string>(@" select mother_sku_warehouse_code from dc_base_mother_sku_map as tm where tm.bailun_sku = @bailun_sku ",new{bailun_sku=m.key_words}).ToList();
varstorage_capacity_configs=_connection.Query<dc_base_storage_capacity_config>(" select * from dc_base_storage_capacity_config where bailun_sku_warehouse_code in @bailun_sku_warehouse_codes ",new{
varstorage_capacity_configs=_connection.Query<dc_base_storage_capacity_config>(" select * from dc_base_storage_capacity_config where bailun_sku_warehouse_code in @bailun_sku_warehouse_codes ",new
@@ -501,10 +504,11 @@ from dc_auto_turnover as dat
if(obj.Count<=200)
{
// 查询所有映射
varmap_datas=_connection.Query<dc_base_mother_sku_map>(" select * from dc_base_mother_sku_map where mother_sku_warehouse_code in @mother_sku_warehouse_codes ",new{
varmap_datas=_connection.Query<dc_base_mother_sku_map>(" select * from dc_base_mother_sku_map where mother_sku_warehouse_code in @mother_sku_warehouse_codes ",new
varmap_turn_datas=_connection.Query<dc_auto_turnover_list_dto>(sql+" and dat.bailun_sku_warehouse_code in @bailun_sku_warehouse_codes ",new{bailun_sku_warehouse_codes=map_datas.Select(s=>s.bailun_sku_warehouse_code).ToList()});
foreach(variteminobj)
...
...
@@ -1418,8 +1422,8 @@ where t1.gmt_modified>=@btime and t1.gmt_modified<=@etime
@@ -2197,7 +2201,7 @@ from dc_base_oms_sku where bailun_sku=@bailun_sku and warehouse_code=@warehouse_
vardatas=conn.Query<sku_warehouse_code_dto>($@" select t1.bailun_sku,t1.warehouse_code from dc_auto_turnover 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 and t1.daily_weighted_sales>1
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});
varsales_day_configs=_connection.Query<sales_day_config>(" select * from sales_day_config where bailun_sku_warehouse_code =@bailun_sku_warehouse_code ",new