drop table handover;
CREATE TABLE handover (
vbeln text,
task_id text,
handover_id  text,
handover_type  integer,
order_type  integer,
task_no   text,
sale_no   text,
delivery_type  integer,
handover_state  integer,
f_plant   text,
plant   text,
customer_id  integer,
customer_name  text,
fmenge   integer,
delivery_num  integer,
port   integer,
piect_total  integer,
total_net_weight numeric(11,0),
weight_total  numeric(9,2),
settlement_weight numeric(9,2),
weight_state  integer,
vrkme   text,
average_freight  numeric(9,2),
order_remark  text,
delivery_time  timestamp,
erdat   timestamp,
plan_product_time timestamp,
open_ready_time  timestamp,
already_ready_time timestamp,
appearance_time  timestamp,
sign_time  timestamp,
edatu   timestamp,
area_no   text,
area_name  text,
fmenge_time  timestamp,
klabc   text,
sales_man  text,
sales_department text,
is_valid  integer,
created_user_id  text,
created_time  timestamp,
modified_user_id text,
modified_time  timestamp,
remark   text,
is_auto_created  integer,
delivery_state  text,
operate_tag  integer,
transport_time  integer,
is_date_success  integer,
is_num_success  integer,
is_sign_success  integer,
weighing_weight  numeric(9,2),
delivery_issued_time timestamp,
PRIMARY KEY (handover_id)
)
Distributed by (handover_id);

alter table handover add column hashResult text;
alter table handover add column rowNum serial;
