update dc_report_cash_flow_sku_group set current_balance=current_income+current_expend ,last_balance=last_income+last_expend;
update dc_report_cash_flow_sku_group set current_balance=current_income+current_expend ,last_balance=last_income+last_expend;
",datePar,commandTimeout:0);
",datePar,commandTimeout:0);
_connection.Execute(@" update dc_base_stock as t1,
_connection.Execute(@"
update dc_base_stock set pay_amount_30=0,income_amount_30=0;
update dc_base_stock as t1,
( select bailun_sku,warehouse_code,
abs(sum(case when data_type not in (2) then val else 0 end )) as 'pay_amount_30',
( select bailun_sku,warehouse_code,
abs(sum(case when data_type not in (2) then val else 0 end )) as 'pay_amount_30',
sum(case when data_type in (2) then val else 0 end ) as 'income_amount_30'
sum(case when data_type in (2) then val else 0 end ) as 'income_amount_30'
from dc_report_cash_flow_log where occur_time >=@btime and is_delete=0 and data_type in (2,3,5,8,9,10,11,12,13,14) GROUP BY bailun_sku,warehouse_code ) as t2
from dc_report_cash_flow_log where occur_time >=@btime and is_delete=0 and data_type in (2,3,5,8,9,10,11,12,13,14) GROUP BY bailun_sku,warehouse_code ) as t2
...
@@ -1985,7 +1987,9 @@ set t1.pay_amount_30 =t2.pay_amount_30, t1.income_amount_30 = t2.income_amount_
...
@@ -1985,7 +1987,9 @@ set t1.pay_amount_30 =t2.pay_amount_30, t1.income_amount_30 = t2.income_amount_
where t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code;
where t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code;