conn.Execute(" update dc_auto_purchase_advise_detailed set quantity_actual=quantity_init_advise where quantity_actual<=0 and main_id=@mainID ",new{mainID=lastPurchaseAdvise.id},transaction);
varresult=ApiServices.PushBuyPlan(data);
conn.Execute(" update dc_auto_purchase_advise set buy_sys_plan_no=@buy_sys_plan_no,push_time=@push_time ",new{buy_sys_plan_no=result.planNo,push_time=now},transaction);
conn.Execute(" update dc_auto_purchase_advise_detailed set quantity_actual=quantity_init_advise where quantity_actual<=0 and main_id=@mainID ",new{mainID=lastPurchaseAdvise.id},transaction);
varresult=ApiServices.PushBuyPlan(datas);
conn.Execute(" update dc_auto_purchase_advise set buy_sys_plan_no=@buy_sys_plan_no,push_time=@push_time ",new{buy_sys_plan_no=result.planNo,push_time=now},transaction);