target_stock_id=get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';"%branch_id)
bill_expdt_date=get_expdt_date("select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;"%branch_id)