Commit 4961287d by lizefeng

修复缺货明细表刷新BUG

parent 6f6c655f
...@@ -68,7 +68,10 @@ where 1=1 "; ...@@ -68,7 +68,10 @@ where 1=1 ";
from dc_auto_turnover as dat from dc_auto_turnover as dat
left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
"; ";
if(m.monitor_status != null)
DynamicParameters parameters = new DynamicParameters();
if (m.monitor_status != null)
{ {
sqlCount += " left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code "; sqlCount += " left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code ";
} }
...@@ -112,8 +115,9 @@ left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code ...@@ -112,8 +115,9 @@ left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
switch (m.searchType.Value) switch (m.searchType.Value)
{ {
case 1: case 1:
sql += " and dat.bailun_sku =" + $"'{m.key_words}'"; sql += " and dat.bailun_sku in @bailun_skus ";
sqlCount += " and dat.bailun_sku =" + $"'{m.key_words}'"; sqlCount += " and dat.bailun_sku in @bailun_skus ";
parameters.Add("bailun_skus", m.key_words.Split(',').ToArray());
break; break;
case 2: case 2:
sql += " and dat.bailun_sku like " + $"'%{m.key_words}%'"; sql += " and dat.bailun_sku like " + $"'%{m.key_words}%'";
...@@ -189,7 +193,7 @@ left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code ...@@ -189,7 +193,7 @@ left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
} }
else else
{ {
total = _connection.ExecuteScalar<int>(sqlCount); total = _connection.ExecuteScalar<int>(sqlCount, parameters);
//设置默认排序字段 //设置默认排序字段
if (string.IsNullOrWhiteSpace(sort)) sort = "dat.id"; if (string.IsNullOrWhiteSpace(sort)) sort = "dat.id";
...@@ -213,7 +217,7 @@ left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code ...@@ -213,7 +217,7 @@ left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
var obj = _connection.Query<Models.dc_auto_turnover_Extend>(sql, commandTimeout: 0); var obj = _connection.Query<Models.dc_auto_turnover_Extend>(sql, parameters, commandTimeout: 0);
return obj.AsList(); return obj.AsList();
} }
......
...@@ -739,7 +739,7 @@ Truncate table dc_base_oms_bailun_no_map_items_temp; ...@@ -739,7 +739,7 @@ Truncate table dc_base_oms_bailun_no_map_items_temp;
INSERT into dc_base_oms_bailun_no_map_items_temp(`bailun_order_id`,`items`) ( INSERT into dc_base_oms_bailun_no_map_items_temp(`bailun_order_id`,`items`) (
select t1.bailun_order_id,GROUP_CONCAT(DISTINCT t1.item_id) as 'items' from dc_base_oms_platform_sku as t1 select t1.bailun_order_id,GROUP_CONCAT(DISTINCT t1.item_id) as 'items' from dc_base_oms_platform_sku as t1
where t1.has_innersale=0 and t1.create_time>'2019-03-01 12:00:00' and t1.bailun_order_status = 'Handling' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part') and t1.platform_type!='FBA' where t1.create_time>'2019-03-01 12:00:00' and t1.bailun_order_status = 'Handling' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part') and t1.platform_type!='FBA'
GROUP BY t1.bailun_order_id GROUP BY t1.bailun_order_id
); );
...@@ -761,7 +761,7 @@ t1.*,( CASE WHEN ( `t1`.`warehouse_code` IN ( 'QYBLZZ', 'GZBLWH' ) ) THEN 'QYBLZ ...@@ -761,7 +761,7 @@ t1.*,( CASE WHEN ( `t1`.`warehouse_code` IN ( 'QYBLZZ', 'GZBLWH' ) ) THEN 'QYBLZ
from dc_base_oms_sku as t1 from dc_base_oms_sku as t1
left join dc_base_warehouse as t_db on t1.warehouse_code = t_db.warehouse_code left join dc_base_warehouse as t_db on t1.warehouse_code = t_db.warehouse_code
left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku
where t1.has_innersale and t1.create_time>'2019-03-01 12:00:00' and t1.bailun_picking_status!='TotalPicked' and t1.bailun_order_status = 'Handling' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part') and t1.platform_type!='FBA' where t1.has_innersale=0 and t1.create_time>'2019-03-01 12:00:00' and t1.bailun_picking_status!='TotalPicked' and t1.bailun_order_status = 'Handling' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part') and t1.platform_type!='FBA'
); );
alter table dc_base_oms_sku_outofstock rename dc_base_oms_sku_outofstockTemp; alter table dc_base_oms_sku_outofstock rename dc_base_oms_sku_outofstockTemp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment